A one-time account linking vault for agent flows. Credentials go in once, AES-256-GCM encrypted; agents get scoped, expiring access tokens out — paid per use, no API keys.
git clone https://github.com/nirholas/x402-account-link && npm install && npm run dev| Route | Price | What you get back |
|---|---|---|
POST /links | $0.01 | Signed link record + HMAC proof (credential fingerprint, scopes, expiry). Credentials are encrypted at rest and never returned. |
GET /links/:id/token | $0.002 | Scoped, expiring access token (owner-wallet auth), returned in the response body. |
GET /links/:id · POST /verify-token · POST /links/:id/revoke | free | Metadata, token introspection, owner revocation. |
Call a paid route. The vault answers 402 Payment Required with exact USDC payment requirements.
The 402 offers two rails — USDC on Base and USDC on Solana. Your client signs whichever one its wallet supports and retries with X-PAYMENT.
That rail's facilitator verifies and settles on-chain. The server holds no key and pays no gas.
The signed link record or minted token arrives in the response body, receipt in X-PAYMENT-RESPONSE.
npm install && npm run dev # vault on :4036, both rails live # to receive the funds yourself: export PAY_TO_ADDRESS=0xYourEvmWallet # USDC on Base export SOLANA_PAY_TO_ADDRESS=YourSolanaWallet # USDC on Solana # agent side — pays $0.01, gets the signed link record back PRIVATE_KEY=0xAgentWallet npx tsx examples/agent-client.ts
| Rail | Network | Asset | Pays to | Facilitator |
|---|---|---|---|---|
| EVM | base-sepolia (default) · base | USDC | 0x40252CFDF8B20Ed757D61ff157719F33Ec332402 | x402.org/facilitator |
| Solana | solana (default) · solana-devnet | USDC | WwwuGbqHrwF5RG89KhUbmRWEvjnRH9k5kVM5p7T3WwW | facilitator.payai.network |
Both entries appear in every 402. Pay in USDC on Base or Solana — your client picks the rail.
Agents find this service via skill.md and the machine-readable /.well-known/x402 manifest — indexable by x402scan.com, the x402 Bazaar, and agentic.market.