Skip to main content

PONS Lightning Claim

The Lightning route claims your PONS creator fees in one HTTP call. PumpDev holds the wallet for your API key, signs the EIP-7702 authorization and the transaction, sends it to the sequencer, and gives you the hash back — the same claim as the client-signed route, without the key handling, the nonce or the RPC.

API Endpoint: POST https://rhc.pumpdev.io/api/claim-lightning?api-key=YOUR_KEY

Get a key on the PONS Lightning Setup page — one click, or import a private key. The key may also be sent as an X-Api-Key header.

Commission on the Lightning path is 1% of the amount claimed, taken inside the claim transaction (the client-signed route is 0.5%).


Before You Start

Pass your tokens. Fees from live trading sit on each token's curve until swept. Name the tokens in tokens and the claim sweeps them; without it you get only what is already in the escrow (fees PONS swept itself, and fees from graduated tokens). Up to 10 tokens per claim. Only tokens created by the Lightning wallet can be swept.

The Lightning wallet pays the gas. About 0.0001 ETH covers a claim, and it is charged before the claimed fees arrive. An empty wallet answers 402 Insufficient ETH for the claim's gas.

The delegation stays on the wallet. The first claim installs the delegate; later claims skip the authorization and cost ~37k less gas. See how the claim works.


Request Parameters

ParameterTypeRequiredDescription
tokensstring[]NoTokens whose curves to sweep in this claim (max 10)
priorityFeenumberNoPriority fee in gwei per gas (default 0.05)

The wallet is the one behind your API key — there is no publicKey parameter.


Response

{
"hash": "0x…",
"publicKey": "0x…",
"sweeps": [{ "token": "0x…", "curve": "0x…", "pending": "115494414880525" }],
"claimable": "1562787000000000",
"fee": "15627870000000",
"expectedNet": "1547159130000000",
"feeBps": 100,
"delegated": false
}
FieldDescription
hashThe claim transaction, already sent
publicKeyThe Lightning wallet that claimed
sweeps[]The curves swept in this transaction and their pending fees; tokens that are graduated, custom-paired or unknown are left out rather than allowed to fail the transaction
claimable / fee / expectedNetEstimates in wei — the curve rounds its split on its own terms. The exact figures are in the Claimed(wallet, claimed, fee) event of the receipt
feeBpsPumpDev's commission in basis points (100 = 1% on the Lightning route)
delegatedfalse on the first claim (this transaction installs the delegate), true afterwards

Example

const API_URL = "https://rhc.pumpdev.io";
const API_KEY = process.env.PUMPDEV_API_KEY;
const MY_TOKENS = ["0x…", "0x…"]; // tokens the Lightning wallet created

const res = await fetch(`${API_URL}/api/claim-lightning?api-key=${API_KEY}`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ tokens: MY_TOKENS }),
});
if (res.status !== 200) throw new Error((await res.json()).error);

const { hash, expectedNet, sweeps } = await res.json();
console.log(`Claimed in ${hash} — swept ${sweeps.length} curve(s), net ~${expectedNet} wei`);

Read the amount first with GET /api/claim-account?publicKey=<your Lightning wallet> if you want to skip empty claims.


Limits in this version

  • ETH-quoted tokens only. Fees on tokens paired with an ERC-20 (balanceOfToken) are not claimed; such a token comes back with error: "Custom-pair fees are not supported yet" on the balance endpoint.
  • Graduated pools. After graduation fees accrue on the Uniswap V4 hook until PONS sweeps them into the escrow; this API claims what is in the escrow.

Error Handling

ErrorCauseFix
Invalid API key (401)Missing or wrong keyPass api-key in the query or X-Api-Key as a header
No claimable creator fees availableNothing in the escrow and nothing on the curves passedCheck GET /api/claim-account with your tokens first
Invalid token address: … / Maximum 10 tokens per claimBad or too many tokensPass up to 10 0x addresses
priorityFee … above the … gwei ceilingA value in ETH where gwei was expectedPass gwei per gas, e.g. 0.05
Gas estimation failed: …The simulated claim reverted — most often a token whose creator is not the Lightning walletPass only tokens this wallet created; the message carries the reason
Insufficient ETH for the claim's gas (402)The Lightning wallet cannot pay the gasTop up the wallet
Claim is not configured on this server (503)No delegate on this deployment

Next Steps