Skip to content

StorageServiceOptions

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

Options for creating or selecting a single storage context via createContext()

Extends BaseContextOptions with singular provider/dataset selection.

optional callbacks?: StorageContextCallbacks

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

Callbacks for creation process

BaseContextOptions.callbacks


optional cdnGroup?: string

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

CDN group id used as the withCDN metadata value when CDN is enabled. Every context (primary and secondaries) that shares this value resolves to the same shared CDN bandwidth rail in FWSS (keyed by keccak256(payer, cdnGroup)), so a multi-copy CDN upload buys bandwidth once instead of once per copy. Opt-in and empty by default, which keeps a dedicated bandwidth rail per data set and preserves exact-metadata reuse.

BaseContextOptions.cdnGroup


optional dataSetId?: bigint

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

Specific data set ID to use (optional)


optional excludeProviderIds?: bigint[]

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

Do not select any of these providers


optional metadata?: Record<string, string>

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

Custom metadata for data sets (key-value pairs). Used to match existing data sets during provider selection.

BaseContextOptions.metadata


optional providerId?: bigint

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

Specific provider ID to use (optional)


optional withCDN?: boolean

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

Whether to enable CDN services

BaseContextOptions.withCDN