getServicePrice
getServicePrice(
client,options):Promise<OutputType>
Defined in: packages/synapse-core/src/warm-storage/get-service-price.ts:67
Get the service price for the warm storage
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain> | The client to use to get the service price. |
options | OptionsType | getServicePrice.OptionsType |
Returns
Section titled “Returns”The service price getServicePrice.OutputType
Throws
Section titled “Throws”Errors getServicePrice.ErrorType
Example
Section titled “Example”import { getServicePrice } 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 price = await getServicePrice(client, {})
console.log(price.pricePerTiBPerMonthNoCDN)