Navigate...
Distribute
sdk.distributions.distribute(req)
Create a distribution and return both the distribution object and transaction calldata in a single call. Accepts inline recipients (csv or recipients tuples) — does not support listId. To distribute from an existing list, use createDraft({ listId }) → prepare(). This is the primary method for SDK integrations — you get everything needed to sign and submit transactions immediately.
Sending native currency (ETH, POL, BNB, …)
Pass the zero address 0x0000000000000000000000000000000000000000 as tokenAddress to distribute native currency. No approve() step is required, and the generated calldata already includes the required value on each transaction. The server normalizes tokenSymbol to the chain’s nativeSymbol.
Token approval required for ERC-20
ERC-20 tokens require an on-chain approve() before distributing. Generate and submit approval calldata first.
Get approval calldata
Calldata summary
The calldata.summary field provides aggregate info: totalRecipients, totalAmount, estimatedGas, and estimatedCost. Use this to show the user a confirmation before signing.
Need to use an existing list?
distribute() only accepts inline recipients (csv or recipients tuples). To distribute from an existing recipient list, use the two-step flow: createDraft({ listId }) → prepare().
Use createDraft() with listId
API key required to run methods
API Key *
Base URL
request.chainId
number
required
Target blockchain chain ID (1=Ethereum, 137=Polygon, 8453=Base, 42161=Arbitrum, 10=Optimism)
Chain ID
Select chain
request.tokenAddress
string
required
ERC-20 token contract address to distribute. For native currency (ETH, POL, BNB, etc.) pass the zero address 0x0000000000000000000000000000000000000000.
Token Address
For native currency (ETH, POL, BNB, MATIC…) use
request.tokenSymbol
string
required
Token symbol (e.g. "USDC", "WETH"). For native currency the server normalizes this to the chain’s nativeSymbol — you can pass any placeholder.
Token Symbol
request.csv
string
optional
CSV string with address,amount per line — mutually exclusive with recipients
address,amount (one per line)
request.account
string
optional
Sender wallet address
Account (optional)
Sender wallet address that will execute the distribution
request.idempotencyKey
string
optional
Unique key to prevent duplicate distributions on retry
Idempotency Key (optional)
Unique string to prevent duplicate distributions on retry
Returns
DistributeResult
{ distribution, calldata } — distribution object + transactions to sign and submit
distribution
Distribution
Created distribution object with status PREPARED
calldata.transactions
TransactionCalldata[]
Array of pre-built transactions — sign and submit each one to the blockchain
calldata.transactions[].to
string
Contract address to call
calldata.transactions[].data
string
Encoded function calldata
calldata.transactions[].value
string
Native token value in wei
calldata.transactions[].gasLimit
string
Estimated gas limit for the transaction
calldata.summary.totalRecipients
number
Total number of recipients across all transactions
calldata.summary.totalAmount
string
Total token amount being distributed
calldata.summary.feeData
FeeData | null
Estimated fee metadata — contains estimatedGas, estimatedCost, gasPrice
Errors
Validation error
The request is not authorized
You do not have permission to access this resource
See Also
getApproveCalldata()
Generate ERC-20 approval before distributing (required step for ERC-20)
getStats()
Monitor batch completion after submitting transactions
createDraft()
Use an existing recipient list via listId (not supported in distribute)
Generated Code