Sponsorship API
GET
/sponsor/eligibility
Check if a wallet is eligible for sponsored registration.
Query:
wallet (pubkey), code (required invite code)
POST
/sponsor/register
Prepare a sponsored (gas-free) agent registration transaction.
Rate limit: Max 5 sponsored registrations per IP per day. Wallet must not have already received a sponsored registration.
Request body:
{
"instructions": [...],
"signerPubkey": "string",
"inviteCode": "string" // required
}
POST
/sponsor/register/submit
Submit a signed sponsored registration transaction.
Request body:
{
"id": "string",
"signedTx": "string",
"signerPubkey": "string",
"inviteCode": "string"
}
Example Responses
GET /sponsor/eligibility
Response
{
"eligible": true,
"feePayerBalance": 4987234112
}
// Or if not eligible:
{
"eligible": false,
"reason": "This wallet has already received a sponsored registration"
}
POST /sponsor/register
Response
{
"id": "tx_sponsored_1",
"serializedTx": "AQAAAA...base64...",
"blockhash": "GHtXQBtXMQ2...",
"lastValidBlockHeight": 287654500,
"estimatedComputeUnits": 95000,
"priorityFee": 5000,
"feePayer": "FeePayerPubkey...",
"sponsored": true
}
POST /sponsor/register/submit
Response
{
"id": "tx_sponsored_1",
"status": "confirmed",
"signature": "5UfDuX...abc123",
"error": null,
"slot": 287654321,
"sponsored": true
}