Skip to content

OptionsType

OptionsType = object

Defined in: packages/synapse-core/src/warm-storage/get-upload-costs.ts:17

optional bufferEpochs?: bigint

Defined in: packages/synapse-core/src/warm-storage/get-upload-costs.ts:48

Safety margin in epochs. Default: 5n


clientAddress: Address

Defined in: packages/synapse-core/src/warm-storage/get-upload-costs.ts:19

The payer address to check account state and approval for.


optional currentLifecycleReserveBalance?: bigint

Defined in: packages/synapse-core/src/warm-storage/get-upload-costs.ts:36

Current lifecycle reserve balance. Required for an existing data set without dataSetId.


optional dataSetId?: bigint

Defined in: packages/synapse-core/src/warm-storage/get-upload-costs.ts:28

ID of the existing data set that will receive the upload. When set, the data set’s leaf count, lifecycle reserve balance, pending one-time payments and PDP end epoch are read on-chain and the upload is priced as an addition to it. Cannot be combined with isNewDataSet: true or with the explicit existing-data-set fields below.


optional dataSetLeafCount?: bigint

Defined in: packages/synapse-core/src/warm-storage/get-upload-costs.ts:34

Aggregate leaf count reported by PDP Verifier. Required for an existing data set without dataSetId.


optional extraRunwayEpochs?: bigint

Defined in: packages/synapse-core/src/warm-storage/get-upload-costs.ts:46

Extra runway in epochs beyond the required lockup.


optional isNewDataSet?: boolean

Defined in: packages/synapse-core/src/warm-storage/get-upload-costs.ts:30

Whether a new dataset will be created. Default: false when dataSetId is set, otherwise true


optional pdpEndEpoch?: bigint

Defined in: packages/synapse-core/src/warm-storage/get-upload-costs.ts:40

Epoch at which the PDP payment rail ends. Required for an existing data set without dataSetId; must be 0n.


optional pendingOneTimePayments?: bigint

Defined in: packages/synapse-core/src/warm-storage/get-upload-costs.ts:38

One-time operation fees already pending on an existing data set. Defaults to 0.


pieceSizes: readonly bigint[]

Defined in: packages/synapse-core/src/warm-storage/get-upload-costs.ts:43

Exact raw payload size of every piece planned for upload, in bytes.


optional withCDN?: boolean

Defined in: packages/synapse-core/src/warm-storage/get-upload-costs.ts:32

Whether CDN is enabled. Default: false