GET https://api.baanx.com/v1/delegation/token
Retrieve a single-use token required to initiate wallet delegation. Optionally request gas funds for users who don’t have native tokens to pay for the delegation transaction.
This is Step 1 of the 3-step delegation flow. The returned token is required to finalise delegation in Step 3 after the user completes wallet connection and blockchain approval on the frontend.The complete delegation process:
Set faucet=true to request a small amount of native tokens (ETH or SOL) for users who don’t yet have funds to pay for gas fees. This enables users with empty wallets to complete the delegation flow.
One-time only per user, across all networks. If a user has already received gas funds on any network, subsequent faucet requests will fail with a 207 response — but the delegation token is still issued and the flow can proceed.
Faucet behaviour:
Checks whether the user is eligible (has not already received gas funds on any network)
If eligible: sends a small amount of native tokens and polls for confirmation (up to 10 seconds)
Returns one of three statuses: confirmed, pending, or declined
A faucet failure does not block token generation — the token is always returned
Returns HTTP 200 if the faucet succeeds (or was not requested), HTTP 207 if the faucet fails
Request a small amount of native tokens (ETH/SOL) for users who don’t have funds to pay for delegation gas fees. When true, address and network are required. Supported networks: linea, solana, base.
The user’s wallet address — EVM format (0x + 40 hex chars) or Solana base58 public key. Required when faucet=true.Example:0x3a11a86cf218c448be519728cd3ac5c741fb3424
Single-use delegation token valid for ~10 minutes. Pass this to your frontend and include it in the Step 3 post-approval request.Example:ABC_100a99cf-f4d3-4fa1-9be9-2e9828b20ebc
Unique nonce generated by Applied Blockchain. Must be included in the Step 3 post-approval request alongside the token.Example:5f8a9b2c4d3e1a7b9c6d8e2f
Returned when faucet=true was requested but the faucet could not be fulfilled. The delegation token is still valid and the flow can proceed. Treat the faucet failure as informational.
Copy
{ "token": "ABC_100a99cf-f4d3-4fa1-9be9-2e9828b20ebc", "nonce": "5f8a9b2c4d3e1a7b9c6d8e2f", "faucet": { "success": false, "network": "linea", "status": "confirmed", "error": "User has already received gas funds", "transactionHash": "0xprevious-tx-hash..." }}