Skip to content

SynapseOptions

Defined in: packages/synapse-sdk/src/types.ts:39

Options for initializing the Synapse instance Must provide one of:

  1. privateKey + rpcURL (for server environments)
  2. provider (for browser environments - user handles MetaMask coupling)
  3. signer (for direct ethers.js integration)
optional authorization: string;

Defined in: packages/synapse-sdk/src/types.ts:54

Authorization header value for API authentication (e.g., Bearer token)


optional dev: boolean;

Defined in: packages/synapse-sdk/src/types.ts:63

Whether to include providers with serviceStatus=dev in the capabilities list (default: false)


optional disableNonceManager: boolean;

Defined in: packages/synapse-sdk/src/types.ts:67

Whether to disable NonceManager for automatic nonce management (default: false, meaning NonceManager is used)


optional pieceRetriever: PieceRetriever;

Defined in: packages/synapse-sdk/src/types.ts:65

Optional override for piece retrieval


optional privateKey: string;

Defined in: packages/synapse-sdk/src/types.ts:43

Private key for signing transactions (requires rpcURL)


optional provider: Provider;

Defined in: packages/synapse-sdk/src/types.ts:45

Ethers Provider instance (handles both reads and transactions)


optional rpcURL: string;

Defined in: packages/synapse-sdk/src/types.ts:52

RPC URL for Filecoin node (required with privateKey)


optional signer: Signer;

Defined in: packages/synapse-sdk/src/types.ts:47

Ethers Signer instance (for direct ethers.js integration)


optional subgraphConfig: SubgraphConfig;

Defined in: packages/synapse-sdk/src/types.ts:74

Optional configuration for the default subgraph service, to enable subgraph-based retrieval.


optional subgraphService: SubgraphRetrievalService;

Defined in: packages/synapse-sdk/src/types.ts:72

Optional override for default subgraph service, to enable subgraph-based retrieval.


optional telemetry: TelemetryConfig;

Defined in: packages/synapse-sdk/src/types.ts:78

Telemetry configuration for error tracking and debugging (enabled by default)


optional warmStorageAddress: string;

Defined in: packages/synapse-sdk/src/types.ts:69

Override Warm Storage service contract address (defaults to network’s default)


optional withCDN: boolean;

Defined in: packages/synapse-sdk/src/types.ts:59

Whether to use CDN for retrievals (default: false)


optional withIpni: boolean;

Defined in: packages/synapse-sdk/src/types.ts:61

Whether to filter providers by IPNI availability