For the complete documentation index, see llms.txt. This page is also available as Markdown.

API Reference

Gas sponsorship is enabled per API key. Once your key is enabled, sponsored transactions use your existing Robinhood Chain endpoint at https://robinhood.blinklabs.xyz/v1/<API_KEY>, with one addition: eth_sendRawTransaction must carry the sponsorship=true query string parameter, exactly as it does on Ethereum.

1

Ask whether the transaction is sponsorable

Send the unsigned transaction to pm_isSponsorable.

2

Sign it with a normal gas price

Bypass your local balance and simulation checks — they will fail, and that is expected.

3

Submit it with eth_sendRawTransaction

Append the sponsorship=true query parameter, and send it to Blink only.

Checking for Transaction Sponsorship

To check whether a swap is sponsorable, first send your unsigned transaction to your RPC endpoint at https://robinhood.blinklabs.xyz/v1/<API_KEY> with the following POST request

pm_isSponsorable

{
    "jsonrpc": "2.0",
    "method": "pm_isSponsorable",
    "params": [
        {
          "to": "<TX_TO_ADDRESS>",
          "from": "<TX_FROM_ADDRESS>",
          "value": "<TX_VALUE_HEX>",
          "data": "<TX_DATA_HEX>",
          "gas": "<TX_GAS_LIMIT_HEX>"
        }
    ],
    "id": 1
}

Example request — an ERC-20 approval granting one of your whitelisted routers an allowance. The token and spender addresses below are placeholders:

For a swap, to is the swap contract itself and must be one of the contracts on your whitelist. For an approval, to is the token and the spender encoded in data must be one of your whitelisted routers.

Example response:

If sponsorable returns true, your transaction is sponsorable.

If the transaction is not sponsorable, the response returns false with a reason explaining why:

The reason is a human-readable explanation, not a fixed set of values. Log or display it rather than matching on its text.

Signing a Sponsored Transaction

Two things are different from an ordinary Robinhood Chain transaction, and both follow from the account being unfunded at the moment you sign.

Set a normal gas price

Sign with a real, non-zero gas price, exactly as you would an unsponsored transaction. Blink sizes the funding transfer to cover it.

Expect your own checks to fail

The account genuinely cannot afford the transaction yet. Any balance check, local simulation, or eth_estimateGas run against current state will report insufficient funds. Submit anyway — pm_isSponsorable returning true is the check that matters on this path.

Submitting the Transaction

eth_sendRawTransaction

Submit the signed transaction as you normally would, with one difference: you must add the query string parameter sponsorship=true. This matches Ethereum. The full URL is:

https://robinhood.blinklabs.xyz/v1/<API_KEY>?sponsorship=true

Example response:

The hash returned is the user's own transaction hash. The funding transfer is a separate transaction from a Blink sponsor address and is not returned here.

Notes

  • Pass the same transaction data to eth_sendRawTransaction that you passed to pm_isSponsorable. If it differs, the transaction may no longer qualify.

  • By default we only sponsor when the account cannot cover the transaction itself. Sponsoring accounts that already hold a balance is available on request.

  • Transactions that are not sponsorable are handled exactly as they are today — pm_isSponsorable returning false simply tells you the user needs to cover their own gas.

  • Sponsorable criteria are configured per API key: whitelisted swap contracts and approval spenders, per-user daily caps, gas limit ceilings, and whether per-transaction profitability is enforced. See Gas Sponsorship to set yours up.

Last updated