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/transactionsHeaders
| Header | Required | Description |
|---|---|---|
X-Api-Key or Authorization | Yes | API key or session token with transactions:build scope |
Content-Type | Yes | application/json |
Path parameters
| Parameter | Type | Description |
|---|---|---|
address | string | Solana wallet address |
Body
| Field | Type | Required | Description |
|---|---|---|---|
items | ItemSelection[] | Yes | Items to burn/close. Must contain at least 1 element. |
donationPercentage | number | No | Fraction of rebate to donate (0-1, e.g. 0.1 = 10%). The donation is routed to your project automatically based on your API key. |
priorityFeeLevel | string | No | Transaction priority fee level. One of none, low, medium, high. Defaults to medium. |
ItemSelection
| Field | Type | Required | Description |
|---|---|---|---|
type | WalletItemType | Yes | The item type (e.g., empty_account, token, nft). |
address | string | Yes | The address returned by GET /wallet/:address/assets. |
action | BurnerAction | Yes | The 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
| Field | Type | Description |
|---|---|---|
transactions | BuiltTransaction[] | One transaction per item (or group of items). |
recentBlockhash | string | The blockhash used to build the transactions. |
lastValidBlockHeight | number | Block height after which these transactions expire. |
totals | object | Aggregate accounting across all transactions. |
BuiltTransaction fields
| Field | Type | Description |
|---|---|---|
transactionBase64 | string | Base64-encoded unsigned VersionedTransaction. Deserialize, sign, and submit. |
includes | ItemSelection[] | The items covered by this specific transaction. |
grossRebate | number | SOL reclaimed before fees, in lamports. |
netRebate | number | SOL the user keeps after fees and donation, in lamports. |
donationAmount | number | Lamports routed to the project donation. |
computeUnitsNeeded | number | Estimated compute units for this transaction. |
submissionTicket | string | Signed ticket. Must be passed back in the submit request. |
Error responses
| Status | Cause |
|---|---|
| 400 | Empty items array, invalid action for item type, unknown address |
| 401 | Invalid credentials or session lacks transactions:build scope |
| 429 | Rate 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