Skip to content

calculateUploadFees

calculateUploadFees(params): OutputType

Defined in: packages/synapse-core/src/warm-storage/calculate-upload-fees.ts:34

Compute the one-time fees an upload incurs.

Scope is intentionally limited to upload-time fees: create-data-set (new datasets only) and add-pieces. Schedule-removals, terminate, and delete are post-upload lifecycle operations and are not part of an upload cost preview.

The length of pieceSizes determines the per-piece fee and the calculation includes one add-pieces base fee. Execution batch limits are intentionally not enforced here because they are independent of fee calculation.

ParameterTypeDescription
paramsParamsTypecalculateUploadFees.ParamsType

OutputType

calculateUploadFees.OutputType

ValidationError when pieceSizes is invalid