x402-github-bounty
Put money on a GitHub issue, prove it, and settle it — with signed artifacts and live GitHub state.
$0.01 to mint a bounty certificate. $0.002 for a merged-PR verification report. USDC on Base or Solana.
What you get
| Route | Price | What lands in the 200 body |
|---|
POST /bounties | $0.01 | An HMAC-signed bounty certificate — issue URL, title, pledged amount, terms, expiry — minted only after the issue is confirmed open and real through the live GitHub API. Plus a one-time settleKey. |
GET /verify/:bountyId | $0.002 | A signed verification report built from live GitHub state at request time: is the issue closed, which merged PRs reference it, who authored them, and whether the bounty is eligible to pay out. |
POST /settle/:bountyId | free | A signed payout receipt. Settling costs nothing — you already paid to mint, and a funder should never be charged to close out. |
GET /bounties · POST /check-signature · GET / · /health · /skill.md · /.well-known/x402 · /openapi.json | free | Public board, signature validation, discovery |
Every paid route returns its artifact in the 200 body. Nothing is queued, nothing is
promised for later.
Non-custodial, and that is the point
This service never holds your money. The $0.01 buys the certificate; the amount you
declare is a pledge signed into it. You pay the claimant yourself and record it with
POST /settle/:bountyId, which returns the signed receipt.
Why build it this way? Custody is the hard part of bounty platforms — it is where the fees,
the lock-ups, the disputes and the regulatory surface come from. Strip it out and what is
actually scarce remains: a tamper-evident record that this issue was open, this amount was
pledged, this PR merged, this payout happened. That record is what you are buying, and it
costs a cent.
Why x402 for this
A bounty is a one-off act by someone who may never return — an agent that found a blocking
bug in a dependency, a user who wants an issue fixed this week. Making them create an
account, add a card, and accept a platform's custody terms to move $25 is absurd overhead.
x402 charges $0.01 for the artifact, from a wallet they already have, with no signup and no
key to store.
Quickstart
git clone https://github.com/nirholas/x402-github-bounty.git
cd x402-github-bounty
npm install
cp .env.example .env # already filled with working defaults
npm run dev # http://localhost:4027
Ask without paying and you get the dual-rail challenge:
curl -i -s -X POST localhost:4027/bounties \
-H 'content-type: application/json' \
-d '{"issueUrl":"https://github.com/nodejs/node/issues/1","amount":25}'
# HTTP/1.1 402 Payment Required
# { "x402Version": 1, "accepts": [ {…base-sepolia…}, {…solana…} ] }
Pay and you get the certificate:
PRIVATE_KEY=0xyourTestnetKey npm run client
How x402 works here
funder ──POST /bounties {issueUrl, amount}──▶ server
◀──402 + accepts:[ Base USDC, Solana USDC ]──
(client picks a rail, signs $0.01)
──POST /bounties + X-PAYMENT─────────▶ server
├─ facilitator: verify → settle
└─ GitHub API: is this issue real and open?
◀──200 + signed certificate + settleKey + X-PAYMENT-RESPONSE──
Later, anyone can buy the verification report; only the holder of settleKey can close the
bounty.
Dual-rail payment: Base or Solana
Every 402 lists two payment requirements — USDC on Base (EIP-3009
transferWithAuthorization) and USDC on Solana (SPL transferChecked). The client picks
whichever chain it can sign on; the server settles either and returns the same artifact.
| EVM rail | Solana rail |
|---|
| network | base-sepolia (default) / base | solana (default) / solana-devnet |
| asset | USDC 0x036CbD…dCF7e (sepolia) | USDC mint EPjFWdd5…TDt1v |
| payTo | 0x40252CFDF8B20Ed757D61ff157719F33Ec332402 | WwwuGbqHrwF5RG89KhUbmRWEvjnRH9k5kVM5p7T3WwW |
| facilitator | https://x402.org/facilitator | https://facilitator.payai.network |