SynapseOptions
Defined in: packages/synapse-sdk/src/types.ts:91
Options for initializing the Synapse instance
Properties
Section titled “Properties”account
Section titled “account”account:
`0x${string}`|Account
Defined in: packages/synapse-sdk/src/types.ts:111
Viem account
chain?
Section titled “chain?”
optionalchain?:Chain
Defined in: packages/synapse-sdk/src/types.ts:103
Filecoin chain
requiredPermissions?
Section titled “requiredPermissions?”
optionalrequiredPermissions?:Permission[]
Defined in: packages/synapse-sdk/src/types.ts:129
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.
sessionKey?
Section titled “sessionKey?”
optionalsessionKey?:SessionKey<"Secp256k1">
Defined in: packages/synapse-sdk/src/types.ts:113
source
Section titled “source”source:
string|null
Defined in: packages/synapse-sdk/src/types.ts:139
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.
transport?
Section titled “transport?”
optionaltransport?:Transport
Defined in: packages/synapse-sdk/src/types.ts:97
Viem transport
https://viem.sh/docs/clients/intro#transports
withCDN?
Section titled “withCDN?”
optionalwithCDN?:boolean
Defined in: packages/synapse-sdk/src/types.ts:132
Whether to use CDN for retrievals (default: false)