Skip to content

Synapse

Synapse SDK - Main entry point

import { class SynapseSynapse } from '@filoz/synapse-sdk'
Namespace Description
asChain -
getChain -
getPriceList -
getUploadCosts -
Class Description
CommitError All commits failed - data stored but not on-chain. Thrown when on-chain commit fails on every provider after successful store.
StoreError Primary store failed - no data stored anywhere. Thrown when the initial upload to the primary provider fails.
Synapse Class for interacting with Filecoin storage and other on-chain services
Interface Description
BaseContextOptions Base options shared by all context creation methods
CommitOptions Options for committing pieces on-chain
CommitResult Result of a commit operation
ContextCreateContextsOptions Options for creating multiple storage contexts via createContexts()
CopyResult Result for a single successful copy of data on a provider
CreateContextsOptions Options for creating multiple storage contexts via createContexts()
DataSetData Data set data returned from the API
DataSetInfo Data set information returned from Warm Storage contract
DataSetPieceData Individual data set piece data from API
EnhancedDataSetInfo Enhanced data set information with chain details and clear ID separation
FailedAttempt A provider attempt that did not produce a successful copy.
FilecoinChain -
PDPProvider -
PieceBatchingOptions Configuration for automatic addPieces batching.
PieceCID -
PieceFetchOptions -
PieceRecord Canonical representation of a piece within a data set.
PieceRetriever PieceRetriever interface for fetching pieces from various sources Returns standard Web API Response objects for flexibility
PieceStatus Status 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.
PrepareOptions Options for the prepare() method on StorageManager
PrepareResult Result of the prepare() method on StorageManager
ProviderSelectionResult Result of provider selection and data set resolution
PullOptions Options for pulling pieces from a source provider
PullResult Result of a pull operation
SettlementResult Settlement result from settling a payment rail
StorageContextCallbacks Callbacks for storage context creation process
StorageContextCreateOptions Options for creating or selecting a single storage context via createContext()
StorageErrorOptions -
StorageInfo Comprehensive storage service information
StorageOptions Storage service options
StorageServiceOptions Options for creating or selecting a single storage context via createContext()
StoreOptions Options for storing data on a provider without on-chain commit
StoreResult Result of a store operation
SynapseFromClientOptions -
SynapseOptions Options for initializing the Synapse instance
TerminateServiceOptions Options for terminating a data set service
TerminateServiceResult Result of a data set service termination
UploadCallbacks -
UploadOptions Options for uploading individual pieces to an existing storage context
UploadResult Result of a multi-copy upload operation.
UploadTask Upload task tracking
Type Alias Description
CopyRole Role of a copy in a multi-provider upload.
DataSetId -
DownloadOptions Download options Currently empty, reserved for future options
FilecoinNetworkType Supported Filecoin network types
FundOptions Options for the fund() method on PaymentsService. Re-exported from synapse-core.
getPriceList -
getUploadCosts -
GetUploadCostsOptions Alias for the upload costs options type
MetadataEntry -
MetadataObject -
PieceBatcherWait -
PrivateKey -
PullSource Source for pulling pieces from another provider. Either a base URL string or a function that returns a piece URL for a given PieceCID.
PullStatus -
RailInfo -
ServiceProvider -
TokenAmount -
TokenIdentifier Token identifier for balance queries
UploadCosts Alias for the upload costs return type
Variable Description
calibration -
DEFAULT_CHAIN -
devnet -
mainnet -
METADATA_KEYS Common metadata keys
SIZE_CONSTANTS -
TIME_CONSTANTS -
TOKENS Token identifiers
Function Description
asChain -
formatUnits -
getChain -
parseUnits -