Skip to content

Synapse SDK - Main entry point

import {
class Synapse
Synapse
} from '@filoz/synapse-sdk'
NamespaceDescription
asChain-
ClassDescription
CommitErrorPrimary commit failed - data stored but not on-chain. Thrown when the on-chain commit to the primary provider fails after successful store.
StoreErrorPrimary store failed - no data stored anywhere. Thrown when the initial upload to the primary provider fails.
SynapseClass for interacting with Filecoin storage and other on-chain services
InterfaceDescription
AuthSignatureSignature data for authenticated operations
BaseContextOptionsBase options shared by all context creation methods
Chain-
CommitOptionsOptions for the commit() split operation
CommitResultResult of a commit() operation
CopyResultResult of a successful copy to a single provider
CreateContextOptionsOptions for creating a single storage context
CreateContextsOptionsOptions for creating multiple storage contexts
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
FailedCopyInformation about a failed copy attempt
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
PullOptionsOptions for the pull() split operation
PullResultResult of a pull() operation
SettlementResultSettlement result from settling a payment rail
StorageContextCallbacksCallbacks for storage context creation process
StorageInfoComprehensive storage service information
StorageOptionsStorage service options
StoreOptionsOptions for the store() split operation
StoreResultResult of a store() operation
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
UploadCallbacksCallbacks for upload operations
UploadOptionsOptions for uploading individual pieces to an existing storage context
UploadResultUpload result information with multi-copy support.
UploadTaskUpload task tracking
Type AliasDescription
DataSetId-
DownloadOptionsDownload options Currently empty, reserved for future options
FilecoinNetworkTypeSupported Filecoin network types
MetadataEntry-
MetadataObject-
PieceCID-
PrivateKey-
PullSourceSource for pull operations - either a StorageContext or base URL
PullStatus-
RailInfo-
ServiceProvider-
TokenAmount-
TokenIdentifierToken identifier for balance queries
UploadDataInput types for upload operations
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-