Skip to content

SynapseOptions

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

Options for initializing the Synapse instance

account: `0x${string}` | Account

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

Viem account


optional cdnGroup?: string

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

CDN group id used as the withCDN metadata value when CDN is enabled. FWSS keys the shared CDN bandwidth rail by keccak256(payer, cdnGroup), so all data sets sharing this value join one bandwidth subscription instead of buying CDN per data set. Opt-in and empty by default, which keeps a dedicated bandwidth rail per data set and preserves exact-metadata reuse. Set the same value on every copy of a multi-copy upload so they share one rail.


optional chain?: Chain

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

Filecoin chain


optional requiredPermissions?: Permission[]

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

The set of session key permissions Synapse.create validates as authorized and unexpired.

Defaults to SessionKey.DefaultFwssPermissions (all four FWSS permissions: CreateDataSet, AddPieces, SchedulePieceRemovals, TerminateService), which matches the operations exposed by the high-level Synapse class.

Pass a narrower array (e.g. [CreateDataSetPermission, AddPiecesPermission]) to keep least-privilege session keys on the Synapse.create happy path when the app only exercises a subset of the SDK surface. Operations whose permissions are not listed here will revert on-chain if attempted; the SDK does not enforce per-operation checks.

Only meaningful together with sessionKey.


optional sessionKey?: SessionKey<"Secp256k1">

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


source: string | null

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

Application identifier for namespace isolation. When set to a non-empty string, datasets are tagged with this value and only datasets with a matching source are reused. Set to null to explicitly opt out.


optional transport?: Transport

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

Viem transport

https://viem.sh/docs/clients/intro#transports


optional withCDN?: boolean

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

Whether to use CDN for retrievals (default: false)