Navigate...

K

Prepare Transactions

sdk.distributions.prepare(id, req?)

Generate transaction calldata for a DRAFT distribution. Transitions the status from DRAFT to PREPARED and returns the updated distribution together with the ready-to-sign transaction batches.

API key required to run methods

API Key *

Don't have an API key?Get one at dashboard.multisender.app

Base URL

id

string

required

Distribution ID (must be in DRAFT status)

Distribution ID

request.account

string

optional

Wallet address that will execute transactions

Account (optional)

request.rpcUrl

string

optional

Custom RPC URL for gas estimation

RPC URL (optional)

Returns

DistributeResult

{ distribution, calldata } — the prepared distribution plus the transactions to sign.

distribution

Distribution

Updated distribution with status PREPARED and populated feeData

distribution.id

string

Distribution identifier

distribution.status

string

PREPARED — ready for on-chain execution

distribution.feeData

DistributionFeeDataDto | null

Fee estimation: { estimatedGas, estimatedCost, gasPrice, maxFeePerGas, maxPriorityFeePerGas }

calldata

CalldataResponse

{ transactions, summary } — transactions to sign plus aggregate totals

calldata.transactions

CalldataTransaction[]

Array of transactions, each with to, data, value, gasLimit

calldata.summary

object

{ totalRecipients, totalAmount, feeData } — batch totals

Errors

400

Invalid distribution id

401

The request is not authorized

403

You do not have permission to access this resource

404

Distribution not found

409

Not in DRAFT status

See Also

getTransactions()

Retrieve generated transaction batches after preparing

distribute()

Alternative: create + prepare + get calldata in one call

Previous

replaceRecipients()

Next

cancel()

Generated Code