Navigate...
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.
For single-step usage, prefer distribute() — it creates, prepares, and returns calldata all in one call.
Use distribute() instead
API key required to run methods
API Key *
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
Invalid distribution id
The request is not authorized
You do not have permission to access this resource
Distribution not found
Not in DRAFT status
See Also
getApproveCalldataForDistribution()
Get token approval before preparing (ERC-20 only)
getTransactions()
Retrieve generated transaction batches after preparing
distribute()
Alternative: create + prepare + get calldata in one call
Generated Code