getAccountTotalStorageSize
getAccountTotalStorageSize(
client,options):Promise<OutputType>
Defined in: packages/synapse-core/src/warm-storage/get-account-total-storage-size.ts:55
Get the total storage size across all live datasets for an account.
Fetches all datasets for the given address from FWSS, checks liveness via PDP Verifier, and sums the sizes of live datasets.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain> | The client to use. |
options | OptionsType | getAccountTotalStorageSize.OptionsType |
Returns
Section titled “Returns”Total storage size and dataset count getAccountTotalStorageSize.OutputType
Example
Section titled “Example”import { getAccountTotalStorageSize } from '@filoz/synapse-core/warm-storage'import { calibration } from '@filoz/synapse-core/chains'import { createPublicClient, http } from 'viem'
const client = createPublicClient({ chain: calibration, transport: http(),})
const { totalSizeBytes, datasetCount } = await getAccountTotalStorageSize(client, { address: '0x...',})