warm-storage
Warm Storage Contract Operations
Example
Section titled “Example”import * as WarmStorage from '@filoz/synapse-core/warm-storage'Namespaces
Section titled “Namespaces”Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| PdpDataSet | Data set information returned from Warm Storage contract |
| Piece | - |
| PieceWithMetadata | - |
Type Aliases
Section titled “Type Aliases”| Type Alias | Description |
|---|---|
| DataSetInfo | Data set information returned from Warm Storage contract |
| PdpDataSetInfo | - |
Functions
Section titled “Functions”| Function | Description |
|---|---|
| addApprovedProvider | Add an approved provider for the client |
| addApprovedProviderCall | Create a call to the addApprovedProvider function |
| addApprovedProviderSync | Add an approved provider for the client and wait for confirmation |
| extractAddApprovedProviderEvent | Extracts the ProviderApproved event from transaction logs |
| extractRemoveApprovedProviderEvent | Extracts the ProviderUnapproved event from transaction logs |
| extractTerminateServiceEvent | Extracts the ServiceTerminated event from transaction logs |
| getAllDataSetMetadata | Get all metadata for a data set formatted as a MetadataObject |
| getAllDataSetMetadataCall | Create a call to the getAllDataSetMetadata function |
| getAllPieceMetadata | Get all metadata for a piece formatted as a MetadataObject |
| getAllPieceMetadataCall | Create a call to the getAllPieceMetadata function |
| getApprovedProviders | Get approved provider IDs with optional pagination |
| getApprovedProvidersCall | Create a call to the getApprovedProviders function for use with the Viem multicall, readContract, or simulateContract functions. |
| getClientDataSets | Get client data sets |
| getClientDataSetsCall | Create a call to the getClientDataSets function for use with the Viem multicall, readContract, or simulateContract functions. |
| getDataSet | Get a data set by ID |
| getDataSetCall | Create a call to the getDataSet function for use with the multicall or readContract function. |
| getPdpDataSet | Get a PDP data set by ID |
| getPdpDataSets | Get PDP data sets |
| getServicePrice | Get the service price for the warm storage |
| getServicePriceCall | Create a call to the getServicePrice function |
| parseAllDataSetMetadata | Parse the contract output into a MetadataObject |
| parseAllPieceMetadata | Parse the contract output into a MetadataObject |
| readAddresses | Read FOC addresses from the Warm Storage contract |
| readPdpDataSetInfo | Read the PDP data set info. |
| removeApprovedProvider | Remove an approved provider for the client |
| removeApprovedProviderCall | Create a call to the removeApprovedProvider function |
| removeApprovedProviderSync | Remove an approved provider for the client and wait for confirmation |
| terminateService | Terminate a service (data set) |
| terminateServiceCall | Create a call to the terminateService function |
| terminateServiceSync | Terminate a service (data set) and wait for confirmation |
References
Section titled “References”datasetMetadataObjectToEntry
Section titled “datasetMetadataObjectToEntry”Re-exports datasetMetadataObjectToEntry
METADATA_LIMITS
Section titled “METADATA_LIMITS”Re-exports METADATA_LIMITS
MetadataArray
Section titled “MetadataArray”Re-exports MetadataArray
metadataArrayToObject
Section titled “metadataArrayToObject”Re-exports metadataArrayToObject
MetadataDataSetInternal
Section titled “MetadataDataSetInternal”Re-exports MetadataDataSetInternal
MetadataEntry
Section titled “MetadataEntry”Re-exports MetadataEntry
MetadataObject
Section titled “MetadataObject”Re-exports MetadataObject
MetadataPieceInternal
Section titled “MetadataPieceInternal”Re-exports MetadataPieceInternal
pieceMetadataObjectToEntry
Section titled “pieceMetadataObjectToEntry”Re-exports pieceMetadataObjectToEntry