Skip to content

Synapse SDK - Main entry point

import {
class Synapse
Synapse
} from '@filoz/synapse-sdk'
NamespaceDescription
asChain-
ClassDescription
SynapseClass for interacting with Filecoin storage and other on-chain services
InterfaceDescription
AuthSignatureSignature data for authenticated operations
Chain-
CreateContextsOptions-
DataSetDataData set data returned from the API
DataSetInfoData set information returned from Warm Storage contract
DataSetPieceDataIndividual data set piece data from API
EnhancedDataSetInfoEnhanced data set information with chain details and clear ID separation
PDPProvider-
PieceRecordCanonical representation of a piece within a data set.
PieceRetrieverPieceRetriever interface for fetching pieces from various sources Returns standard Web API Response objects for flexibility
PieceStatusStatus information for a piece stored on a provider Note: Proofs are submitted for entire data sets, not individual pieces. The timing information reflects the data set’s status.
PreflightInfoPreflight information for storage uploads
ProviderSelectionResultResult of provider selection and data set resolution
SettlementResultSettlement result from settling a payment rail
StorageContextCallbacksCallbacks for storage service creation process
StorageInfoComprehensive storage service information
StorageOptionsStorage service options
StorageServiceOptionsOptions for creating or selecting a storage context
SubgraphConfigConfiguration for the SubgraphService, determining how to connect to a Synapse-compatible subgraph for provider discovery.
SubgraphRetrievalServiceDefines the contract for a service that can retrieve provider information from a data source, typically a Synapse-compatible subgraph.
SynapseFromClientOptions-
SynapseOptionsOptions for initializing the Synapse instance
UploadCallbacks-
UploadOptionsOptions for uploading individual pieces to an existing storage context
UploadResultUpload result information
UploadTaskUpload task tracking
Type AliasDescription
DataSetId-
DownloadOptionsDownload options Currently empty, reserved for future options
FilecoinNetworkTypeSupported Filecoin network types
MetadataEntry-
MetadataObject-
PieceCID-
PrivateKey-
RailInfo-
ServiceProvider-
TokenAmount-
TokenIdentifierToken identifier for balance queries
VariableDescription
calibration-
devnet-
mainnet-
METADATA_KEYSCommon metadata keys
SIZE_CONSTANTSConstants for the Synapse SDK
TIME_CONSTANTSConstants for the Synapse SDK
TIMING_CONSTANTSTiming constants for blockchain operations
TOKENSToken identifiers
FunctionDescription
asChain-
formatUnits-
getChain-
parseUnits-