Skip to content

calculateDepositNeeded

calculateDepositNeeded(params): OutputType

Defined in: packages/synapse-core/src/warm-storage/calculate-deposit-needed.ts:72

Orchestrate lockup + lifecycle-reserve replenishment + runway + debt + buffer to compute total deposit needed.

This compatibility helper adapts one data set to the shared pure calculateUploadCosts utility, so its funding result stays aligned with the single-context and multi-context top-level APIs.

Operation fees are returned as costs but are not added directly to the deposit. FWSS pays them from the lifecycle reserve, reducing account funds and fixed lockup together. The deposit includes only the initial reserve and any fixed-lockup increase needed when the reserve crosses its replenish threshold.

ParameterTypeDescription
paramsParamsTypecalculateDepositNeeded.ParamsType

OutputType

calculateDepositNeeded.OutputType

ValidationError when lifecycle reserve state, leaf count, or piece sizes are invalid