Skip to content

getPriceList

getPriceList(client, options?): Promise<OutputType>

Defined in: packages/synapse-core/src/warm-storage/price-list.ts:84

Read the warm storage price list.

Reads the getPriceList() view on FilecoinWarmStorageServiceStateView.

Parameter Type Description
client Client<Transport, Chain> The client to use to read the price list.
options OptionsType getPriceList.OptionsType

Promise<OutputType>

The price list getPriceList.OutputType

Errors getPriceList.ErrorType

import { getPriceList } from '@filoz/synapse-core/warm-storage'
import { createPublicClient, http } from 'viem'
import { calibration } from '@filoz/synapse-core/chains'

const client = createPublicClient({
  chain: calibration,
  transport: http(),
})

const priceList = await getPriceList(client)

console.log(priceList.rates.storagePerTibPerMonth)