getUploadCosts
getUploadCosts(
client,options):Promise<OutputType>
Defined in: packages/synapse-core/src/warm-storage/get-upload-costs.ts:55
Read-only function that computes upload costs, reserve-aware deposit needed, and approval state.
Fetches account state, pricing, and approval via read-only contract calls,
then delegates all cost arithmetic to the shared pure
calculateUploadCosts utility. Existing-data-set calls must provide
dataSetLeafCount and currentLifecycleReserveBalance; pass
pendingOneTimePayments when the data set has unflushed lifecycle fees.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain> | The client to use to compute upload costs. |
options | OptionsType | getUploadCosts.OptionsType |
Returns
Section titled “Returns”Throws
Section titled “Throws”ValidationError when existing-data-set state, leaf count, or piece sizes are invalid