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.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain> | The client to use to read the price list. |
options | OptionsType | getPriceList.OptionsType |
Returns
Section titled “Returns”The price list getPriceList.OutputType
Throws
Section titled “Throws”Errors getPriceList.ErrorType
Example
Section titled “Example”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)