getAllPieceMetadata
getAllPieceMetadata(
client,options):Promise<MetadataObject>
Defined in: packages/synapse-core/src/warm-storage/get-all-piece-metadata.ts:66
Get all metadata for a piece formatted as a MetadataObject
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain> | The client to use to get the piece metadata. |
options | OptionsType | getAllPieceMetadata.OptionsType |
Returns
Section titled “Returns”The metadata formatted as a MetadataObject getAllPieceMetadata.OutputType
Throws
Section titled “Throws”Errors getAllPieceMetadata.ErrorType
Example
Section titled “Example”import { getAllPieceMetadata } 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 metadata = await getAllPieceMetadata(client, { dataSetId: 1n, pieceId: 0n,})
console.log(metadata)