Skip to Content
API ReferencePOST /wallet/:address/transactions

POST /wallet/:address/transactions

Build unsigned Solana VersionedTransaction objects for a set of selected items. Each transaction includes a signed submission ticket that must be passed back when submitting.

Request

POST https://api.aerosol.com/api/v1/burner/wallet/:address/transactions

Headers

HeaderRequiredDescription
X-Api-Key or AuthorizationYesAPI key or session token with transactions:build scope
Content-TypeYesapplication/json

Path parameters

ParameterTypeDescription
addressstringSolana wallet address

Body

FieldTypeRequiredDescription
itemsItemSelection[]YesItems to burn/close. Must contain at least 1 element.
donationPercentagenumberNoFraction of rebate to donate (0-1, e.g. 0.1 = 10%). The donation is routed to your project automatically based on your API key.
priorityFeeLevelstringNoTransaction priority fee level. One of none, low, medium, high. Defaults to medium.

ItemSelection

FieldTypeRequiredDescription
typeWalletItemTypeYesThe item type (e.g., empty_account, token, nft).
addressstringYesThe address returned by GET /wallet/:address/assets.
actionBurnerActionYesThe action to perform (e.g., close, burn).

Example request

curl -X POST https://api.aerosol.com/api/v1/burner/wallet/DRpbCBMxVnDK7maPM5tGv6MvB3v1sRMC86PZ8okm21hy/transactions \ -H "Authorization: Bearer eyJhbGci..." \ -H "Content-Type: application/json" \ -d '{ "items": [ { "type": "empty_account", "address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", "action": "close" }, { "type": "token", "address": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU", "action": "burn" } ], "donationPercentage": 0.05 }'

Response

200 OK

{ "transactions": [ { "transactionBase64": "AQAAAA...", "includes": [ { "type": "empty_account", "address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", "action": "close" } ], "grossRebate": 2039280, "netRebate": 1937316, "donationAmount": 101964, "computeUnitsNeeded": 200000, "submissionTicket": "ticket_abc123..." }, { "transactionBase64": "AgAAAA...", "includes": [ { "type": "token", "address": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU", "action": "burn" } ], "grossRebate": 2039280, "netRebate": 1937316, "donationAmount": 101964, "computeUnitsNeeded": 300000, "submissionTicket": "ticket_def456..." } ], "recentBlockhash": "GHtXQBsoZHVnNFa9YevAzFr17DJjgHXk3ycTKD5xD3Zi", "lastValidBlockHeight": 242567890, "totals": { "itemCount": 2, "grossRebate": 4078560, "netRebate": 3874632, "donationAmount": 203928, "fees": 0 } }

Response fields

FieldTypeDescription
transactionsBuiltTransaction[]One transaction per item (or group of items).
recentBlockhashstringThe blockhash used to build the transactions.
lastValidBlockHeightnumberBlock height after which these transactions expire.
totalsobjectAggregate accounting across all transactions.

BuiltTransaction fields

FieldTypeDescription
transactionBase64stringBase64-encoded unsigned VersionedTransaction. Deserialize, sign, and submit.
includesItemSelection[]The items covered by this specific transaction.
grossRebatenumberSOL reclaimed before fees, in lamports.
netRebatenumberSOL the user keeps after fees and donation, in lamports.
donationAmountnumberLamports routed to the project donation.
computeUnitsNeedednumberEstimated compute units for this transaction.
submissionTicketstringSigned ticket. Must be passed back in the submit request.

Error responses

StatusCause
400Empty items array, invalid action for item type, unknown address
401Invalid credentials or session lacks transactions:build scope
429Rate limit exceeded

SDK example

const { transactions, totals } = await client.buildTransactions( walletAddress, { items: [ { type: 'empty_account', address: ataAddress, action: 'close' }, ], } )

Raw fetch example

const res = await fetch( `https://api.aerosol.com/api/v1/burner/wallet/${walletAddress}/transactions`, { method: 'POST', headers: { Authorization: `Bearer ${sessionToken}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ items: [ { type: 'empty_account', address: ataAddress, action: 'close' }, ], }), } ) const data = await res.json()
Last updated on