Ask a BB84 Wallet user for read access to their profile, balances and transactions, and optionally to propose payments. The user approves in the app under Settings → Connectors — no API key, no registration.
Ask a BB84 Wallet user for read access to their profile, balances and transactions. The user approves the request in the app under Settings → Connectors and can disconnect at any time. By default access tokens can only read. With the optional scope payment_requests they can also propose payments, which the user confirms in the app. Only if the user sets up an AI budget for a connection can it pay from that budget without confirmation. It can never move the user's other funds.
Connectors use the standard OAuth 2.0 Device Authorization Grant (RFC 8628), so any OAuth library that supports the device flow works out of the box. Clients are public: pick your own client_id (e.g. acme-books), no registration or client secret. Endpoints are discoverable via server metadata (RFC 8414, issuer https://bb84.com/api/connect).
curl -X POST https://bb84.com/api/connect/oauth/device_authorization \
-d client_id=acme-books \
-d client_name="Acme Books" \
-d client_uri=https://acme.example \
-d scope="profile balances transactions"
# {"device_code":"bb84_dc_…","user_code":"K7QM-2XPA",
# "verification_uri":"https://bb84.com/connect",
# "verification_uri_complete":"https://bb84.com/connect?code=K7QM-2XPA",
# "expires_in":600,"interval":5}
Show the user the user_code and verification_uri, or a QR code of verification_uri_complete. The user enters the code in the app under Settings → Connectors. On their phone, bb84://connect/K7QM2XPA opens that screen directly. scope is optional (default: all three). The wallet shows client_name (or your client_id) and client_uri to the user. These values are self-declared, so users decide whom to trust.
curl -X POST https://bb84.com/api/connect/oauth/token \
-d grant_type=urn:ietf:params:oauth:grant-type:device_code \
-d device_code=bb84_dc_… \
-d client_id=acme-books
# {"access_token":"bb84_conn_…","token_type":"Bearer","scope":"profile balances transactions"}
# ← returned once, store it securely. Tokens do not expire; they stay valid until the user (or you) disconnects.
# Exception: a token that is never used within 7 days of approval is removed.
Poll every interval seconds until you get a token or a final error. Errors are returned as HTTP 400 with {"error":"…","error_description":"…"}:
| error | Meaning |
|---|---|
| authorization_pending | The user has not decided yet. Keep polling. |
| slow_down | You polled too fast. Add 5 seconds to your interval for all further polls. |
| access_denied | The user rejected the request. Stop. |
| expired_token | The code expired after 10 minutes. Start again with step 1. |
| invalid_grant | Unknown device_code, a different client_id, or the token was already issued. Stop. |
Example in Python with plain requests. OAuth libraries with device-flow support, such as Authlib, work too:
import requests, time
B = "https://bb84.com/api/connect/oauth"
d = requests.post(f"{B}/device_authorization",
data={"client_id": "acme-books", "client_name": "Acme Books"}).json()
print("Enter", d["user_code"], "in the BB84 Wallet (Settings → Connectors)")
interval = d["interval"]
while True:
time.sleep(interval)
r = requests.post(f"{B}/token", data={"grant_type": "urn:ietf:params:oauth:grant-type:device_code",
"device_code": d["device_code"], "client_id": "acme-books"}).json()
if "access_token" in r: token = r["access_token"]; break
if r["error"] == "slow_down": interval += 5
elif r["error"] != "authorization_pending": raise SystemExit(r["error"])
curl -X POST https://bb84.com/api/connect/oauth/revoke -d token=bb84_conn_…
Token revocation per RFC 7009. The connection disappears from the user's wallet as well. The response is always HTTP 200, even for unknown tokens.
| Method & Path | Description |
|---|---|
| GET /api/connect/v1/account | Granted scopes, the user's addresses, profile (name, bb84 name, photo) if granted |
| GET /api/connect/v1/balances | USDC/EURC balance per address and in total (base units, 6 decimals) |
| GET /api/connect/v1/transactions?limit=100&fromBlock=…&toBlock=… | USDC/EURC transfers in/out, newest first (max 500). fromBlock/toBlock are optional (decimal or 0x-hex); without them the whole history is returned. The response contains toBlock (last block covered) and nextFromBlock — pass that as fromBlock next time to fetch only new transfers. If total is larger than the returned list, only the newest were returned: narrow the range with toBlock before advancing. |
curl https://bb84.com/api/connect/v1/balances \ -H "Authorization: Bearer bb84_conn_…"
The connector data is also available over the Model Context Protocol, so AI assistants and agents (Claude, Cursor, ChatGPT and others) can answer questions like “How much EURC did I spend in October?” directly. The MCP server uses the same access token, scopes and rate limit as /v1. By default it only offers read tools. With the optional payment_requests scope it can propose payments, which the user confirms in the app. An AI can never send, sign or approve a payment itself, except from an AI budget the user set up for this connection (pay_from_budget, limited to the budget address).
| Endpoint | Transport |
|---|---|
| POST https://bb84.com/api/connect/mcp | Streamable HTTP, stateless, JSON responses (no SSE stream). tools.listChanged: when your tool list changes, the next response arrives as a short SSE body with notifications/tools/list_changed before the result (send the Mcp-Session-Id from initialize and accept text/event-stream). Authorization: Bearer bb84_conn_… |
| Tool | Scope | Description |
|---|---|---|
| get_account | – | The connection in one call: shared addresses, granted scopes, profile snapshot (scope profile), balances per address and in total, raw and human-readable (scope balances), the AI budget if the user set one up (address, name, balances, paymentsLeft/paymentsTotal, payments so far; null otherwise) and standingOrders as last shared by the app (scope payment_requests). ownership says whether the addresses are cryptographically proven |
| list_transactions | transactions | Transfers, newest first. Filters: since/until (ISO date or Unix seconds), direction, asset, limit, fromBlock/toBlock. Payments carry counterpartyName (the other side's bb84 name, if any); the fee collector of merchant payments is marked with counterpartyNote. With summary: true a statement for the period instead: totals in/out/net per asset, by type (payment, deposit, withdrawal), per month, top counterparties with bb84 names, plus up to limit transactions (since/until then also take YYYY-MM; default: the current month) |
| list_events | transactions | What happened since a point in time {since?, limit?}, newest first: payments in/out, deposits, withdrawals (with the counterparty's bb84 name), name changes of the addresses, decided proposals, payments from the AI budget. Returns cursor; pass it as since next time. Also readable as MCP resource bb84://events (last 24 h) |
| list_contacts | – | The user's dynamic contact list {query?, kind?, limit?}: everyone the shared addresses paid or were paid by (scope transactions), the own addresses, AI budgets (agents), merchants of paid calls, merged with the contact book the app shares (nicknames, notes, pins, manual entries — scope payment_requests). Each entry: address, bb84 name, nickname, displayName, kind (person, merchant, agent, own, service), sources, last use, sent/received counts, public profile. Also readable as MCP resource bb84://contacts |
| search_directory | – | The public directory of the name service as a queryable database {query?, kind?, city?, country?, addresses?, sort?, limit?, offset?}: every named address (<name>.bb84.eth) with its public profile (display name, city, country, avatar — never e-mail, phone, street, postal code or birthdate; a private profile shows only name and address), the on-chain merchant flag, AI-budget addresses as agents, website, payment link, first-seen and last-activity day; kind is person, merchant or agent, sort name | newest | active, pages carry nextOffset. Entries of this connection's own addresses carry isOwn, entries in the shared contact book contact (nickname, note). Also readable as MCP resource bb84://directory (first 100 by name) |
| resolve_name | – | Name ↔ address {query, suggest?}: a bb84 name (alice or alice.bb84.eth), a 0x address, a mainnet .eth name or a DNS domain imported into ENS via DNSSEC (shop.example → kind: "dns", verified: "dnssec", address = the bb84 address its owner published; status no_bb84_address / not_found otherwise). Returns address, name, website <name>.bb84.com, public profile (display name, location, avatar; nothing if the owner set it private), merchant flag, whether it is one of the connection's own addresses, ENS records, EFP counts; status reserved, deleted or not_found for names without an address. For a name nobody has, availability says whether it can be claimed for a new address or a rename (available, reserved, auto — adjective-noun-number names are assigned automatically —, invalid) with up to three free alternatives when it cannot; suggest: true does the same for a taken name. Checking claims nothing |
| request_payment | – | Lets someone else pay the user {amount?, asset?, note?, address?}: payment link + QR code (bb84.com/pay/…), nothing is created on the server, the payment shows up in list_transactions (use the returned fromBlock). With items, description, customer, number, dueDays, issuer, language or invoice: true an invoice as well: the link plus a one-page PDF (pdfUrl, public but unguessable) with items, total, QR code and link; paid status via get_proposal with the inv_… id. The result says kind link or invoice |
| propose_payment | payment_requests | Proposes a payment {to, amount, asset, note}, or one taken from a bb84 payment link {payLink}. Nothing is paid until the user confirms it in the app; status via get_proposal |
| propose | payment_requests | Proposes a wallet action the user carries out in the app (or on the proposal page with a passkey). kind picks the fields: create (a new address: asset, name?), rename (address, name), profile (name?, city?, country?, avatarUrl?, private?), delete (address), recurring (standing order: to, amount | "max", asset, frequency, runDay?), cheque (amount ≤ 250, asset), credit_line (grantee, amount, asset, frequency?, periodLimit?, maxPerTx?, expiryDays?); note for all. Fields of another kind are refused together with the list of the right ones. Details below |
| get_proposal | – | Status of any proposal by its id: pr_… (payment) pending, paid (with txHash), rejected or expired, for pay_and_call also call (its state and, once delivered, the merchant's answer); or_… (action) pending, created / renamed / saved / deleted (with result), rejected or expired; inv_… (invoice) open or paid (≥ 99 % of the amount received after creation) |
| pay_and_call | payment_requests | Calls a paid HTTP API or a paid tool of another MCP server and pays the merchant's bb84 price {url, maxAmount, method?, body?, headers?, mcpTool?, asset?, payFromBudget?, idempotencyKey?} — or turns an x402 PaymentRequired the client already received into a payment proposal {paymentRequired, maxAmount?} (afterwards get_proposal returns the x402 proof). See Paid calls |
| pay_from_budget | AI budget | {to, amount, asset, note?, goodsAndServices?, idempotencyKey?} → pays immediately from the AI budget, no confirmation in the app. Only listed once the user set up a budget for this connection; see AI budget |
| scan_code | – | Shows a scan card (MCP Apps) with which the user scans a bb84 triangle code (ΔQR) or a QR code like in the bb84 app: a photo with the phone camera, a picture, a pasted screenshot or the live camera. The code is read in the browser (nothing is uploaded); its content — payment link, shop checkout link, proposal link, address or name — reaches the assistant with the user's next message, which then proposes the payment or asks get_proposal for the status. The card pays nothing |
| get_docs | – | The user guide How the bb84 wallet works {topic?, lang?}, for explaining bb84 to the user: accounts and hash chains, money in and out, payments, wallet features, names, the app, passkey and recovery, security, AI assistants, merchants, fees and limits, glossary, FAQ. Without topic the overview plus the topic list; topic is one id (overview, accounts, money, payments, features, names, app, backup, security, ai, merchants, fees, glossary, faq), several separated by commas, or all; lang en (default) or de. Also the resources bb84://docs and bb84://docs/de, and public at bb84.com/api/connect/docs/wallet.en.md / wallet.de.md |
| get_protocol | – | The bb84 protocol specification and the reference clients for autonomous agents that hold a wallet themselves (part: spec, python, typescript, all); see Autonomous agents without MCP |
Older tool names. Until 17 November 2026 the server listed 28 tools, one per endpoint: get_balances, get_budget, list_recurring (now in get_account), get_statement (list_transactions with summary), check_ens_name (resolve_name), create_payment_link, create_invoice (request_payment), propose_ota, propose_rename, propose_recurring, propose_cheque, propose_credit_line, propose_delete, propose_profile (propose), get_payment_request, get_action_request, get_invoice (get_proposal) and pay_x402 (pay_and_call with paymentRequired). tools/call still accepts every one of them with its old arguments and answer; they are just no longer in tools/list. The REST endpoints are unchanged.
payment_requests)With the optional scope payment_requests, an app or AI assistant can propose payments. It can never execute them. Each proposal appears in the user's bb84 app (bell → Connectors). The user opens it in the normal Send flow, checks recipient and amount and confirms with their passkey. Only after the payment is sent does the server verify it on-chain and report paid with the transaction hash.
scope=… payment_requests). The user can switch it off when approving.to: a 0x address or a bb84/ENS name (alice becomes alice.bb84.eth). amount: a decimal string such as "12.50". asset: USDC or EURC. note: up to 140 characters.payLink instead of to/amount/asset: a bb84 payment link (https://bb84.com/pay/<name>?amount=…&asset=…&memo=…) or the checkout link a shop shows after an order (https://<shop>.bb84.com/<amount>/<currency>/<reference>). Recipient, amount, currency and reference come from the link. The reference stays unchanged, so the shop recognises the payment, and the payment is sent as Goods & Services.POST /api/connect/v1/payment-requests (JSON) and GET /api/connect/v1/payment-requests/<id>.payment_requests)An assistant can also propose a new address (a fresh OTA) for the user, for example “a EURC address named shop.bb84.eth for the web shop”. A bb84 address is a hash chain whose keys only ever exist in the app, so the server cannot create one. propose with kind: "create" therefore only records the wish. It appears in the app (bell → Connectors, push notification, appLink https://bb84.com/pay/proposal/<id>); when the user taps “Create”, the app generates the address on the phone, claims the proposed name and reports address and final name back. get_proposal then returns created with address and finalName, and the address is part of get_account.
resolve_name (availability; no scope needed) and only propose names the user agreed to. A name is claimed at the moment the user creates the address; until then someone else may take it, in which case the address gets an automatically assigned name and finalName says so.swift-moon-142) are assigned by bb84 and cannot be chosen.kind: "rename" works the same way for an existing shared address (address: 0x or its current bb84 name). Renaming needs the owner's on-chain proof, which only the phone can make, so the user confirms it in the app. The old name is released at that moment and payment links to it stop working; one open rename per address.POST /api/connect/v1/ota-requests, POST /api/connect/v1/ota-requests/rename, GET /api/connect/v1/ota-requests/<id>, GET /api/connect/v1/ens/check/<name>, GET /api/connect/v1/ens/resolve/<name-or-address>.payment_requests)The same proposal pattern covers four more things the app can do. Each proposal appears under bell → Connectors (and as a push notification); “Check & confirm” opens the app's normal screen prefilled, the user checks every field and confirms there as usual, and the app reports the outcome, which get_proposal returns in result.
kind: "recurring": a standing order. amount may be "max" (the address's whole balance per run); frequency is daily, weekly, biweekly, monthly, quarterly, semiannual or yearly; runDay the day of month for monthly and longer rhythms. Result: result.jobId, result.nextRunAt. Standing orders run on the user's phone, so the app has to be opened now and then. get_account returns them as standingOrders, as the app last shared them (it shares them with payment-scope connections on every sync).kind: "cheque": a bearer cheque (bb84 credit) over up to 250 USDC/EURC. Result: result.code, the bearer code — whoever has it can cash it in their bb84 app. The app tells the user that the code goes to the assistant.kind: "credit_line": a spending allowance for another address, funded from one of the user's addresses; optional per-period limit, maximum per payment and expiry. Opening it is an on-chain transaction the user confirms with their passkey. Result: result.lineId.kind: "delete": deleting (archiving) one of the shared addresses. The app's delete dialog decides what is possible (funds are moved to another address first; a protection period may apply). Result: result.address, result.archived. One open proposal per address.kind: "profile": public profile details — display name, city, country, an avatar as https image URL (the app downloads, resizes and uploads it) and/or the private flag. The profile screen opens with the proposed values next to the current ones; saving needs the owner's on-chain proof, so only the phone can do it. Result: result.address, result.fields; status saved. One open profile proposal per connection.POST /api/connect/v1/ota-requests/recurring | cheque | credit-line | delete | profile, GET /api/connect/v1/recurring.Without the app (passkey wallet): a user who connected the assistant with a passkey instead of the app opens the same appLink in the browser. The page shows what the assistant proposed, and after the passkey carries it out itself with the bytes the app would send — a payment, a new name, the public profile (text fields; a photo only in the app), a credit line, a bearer cheque (the code is shown once on the page), deleting an address, a further address (derived from the same passkey) — and reports it, so get_proposal ends in the same status. The one exception is kind: "recurring": a standing order runs on the phone, and nothing can run on a passkey without the user; the assistant gets this as the pending message, with a credit line or an AI budget as the alternative. The AI budget of a connection is granted at bb84.com/pay/budget (the app has it under Connectors). The same passkey is the same wallet in the bb84 app: the app pulls connections made in the browser from the server (POST /api/connect/web/connections, signed with the address's proof key), and a proposal can be confirmed in either place.
Every bb84 address has a name <label>.bb84.eth — and, since bb84.com is imported into ENS via DNSSEC, the same name as <label>.bb84.com (same records, same resolver; tools accept both spellings and answer with the .bb84.eth form). resolve_name turns a name the user mentions into an address (and back) and tells the assistant what the name service serves publicly anyway: website, display name, location and avatar from the owner's profile (nothing if the profile is private; email, phone and street are never passed on), whether the address is a registered merchant and whether it belongs to the connection. Names without an address come back with status reserved, deleted (an OTA deleted on-chain: never pay it) or not_found. A mainnet .eth name resolves to its Ethereum address with kind: "mainnet" — bb84 can only pay it as a withdrawal from the app.
Your own domain as a bb84 name (DNSSEC). Any DNSSEC-signed domain can be a bb84 recipient — shop.example or a subdomain such as pay.shop.example — without an account at bb84: the domain's owner publishes the bb84 address as an ENS record, and bb84 resolves the domain through ENS exactly as a wallet does (Universal Resolver, ENSIP-10, CCIP-Read followed server-side). A DNS name exists in ENS only behind a DNSSEC proof, so a payment to shop.example provably reaches whoever controls that domain in the DNS — a stronger identity than any first-come name. Two ways to publish, both need DNSSEC enabled at the registrar. Merchants check their setup step by step at bb84.com/domain (DNSSEC, TXT record, proof chain against ENS's oracles, what bb84 resolves; the same report as JSON: GET /api/ens/mainnet/check/<domain>, the ENS-side state: GET /api/ens/mainnet/dns-status):
_ens.shop.example = ENS1 dnsname.ens.eth a[e42069000]=0x<bb84 address> (ENS's extended DNS resolver; a[60]=0x… may be added for an Ethereum address, t[url]=… for text records). No transaction, no key besides DNS access; ENS reads the record with its DNSSEC proof on every lookup._ens.shop.example = a=0x<owner's Ethereum address>, then app.ens.domains → “Import DNS name” (one Ethereum transaction). The domain then has an ENS resolver of its own; set the bb84 address as the multicoin record with coin type 2189552648 (ENSIP-11 for chain 42069000, addr(node, 2189552648)) — the Ethereum address record is optional.Then resolve_name answers kind: "dns", verified: "dnssec", address = the bb84 address (plus mainnetAddress if an Ethereum address is published, bb84Name if the address also has a .bb84.eth name, profile and merchant flag of that address); propose_payment and the recurring/cheque/credit-line proposals take the domain as to and pin the resolved address (toAddress); the app resolves the domain the same way and shows “Domain verified via DNSSEC” next to the recipient. A domain in ENS that only carries an Ethereum address comes back as status: "no_bb84_address" (bb84 cannot pay it — the note tells the owner what to publish), a domain never imported as not_found. Public endpoint behind it: GET /api/ens/mainnet/resolve/<domain> → {name, kind: "dns", verified: "dnssec", address, bb84Address, isContract}, 404 when the domain is not in ENS. bb84 never contacts a domain's own servers for this; only ENS resolvers' CCIP-Read gateways (https, public addresses, 64 KiB) are called. The lookups depend on the ENS DNSSEC oracle knowing the current DNS root key.
The same data is on ENS itself, so any ENS-aware wallet or agent sees it without bb84's API (CCIP-Read via the resolver of bb84.eth on Ethereum mainnet):
addr(node, 2189552648) — the address on the bb84 L2 (ENSIP-11, coin type 0x80000000 | 42069000); empty for unknown names and deleted OTAs. addr(node) keeps returning the L1 deposit receiver (or the zero address).url (https://<label>.bb84.com) and description for every registered name; name, avatar and location from a public profile; com.bb84.pay (payment link https://bb84.com/pay/<label>.bb84.eth), com.bb84.merchant (1/0 from the on-chain MerchantRegistry) and, for merchants, com.bb84.badge — so a wallet can read the payment path and the buyer-protection status from the name alone. resolve_name returns the same as payLink, isMerchant, badge; invoices and payment links carry the payee's name (payee, toName). resolve_name also returns efp — the address's or name's Ethereum Follow Protocol counts (followers, following, link to efp.app; read-only, public API cached 10 min) — and GET /api/ens/efp/<address|name> serves the same.data(node, "payment-preference") — accepted assets USDC and EURC on the bb84 L2 as ERC-7930 (ENSIP-31). bb84.eth itself carries the ERC-8004 agent registration and MCP endpoint (ENSIP-25/26).Contacts. An assistant no longer has to rediscover the user's counterparties in every chat (list_transactions, then resolve_name per address). list_contacts returns one merged list per connection: payers and payees of the shared addresses, the user's own addresses, AI budgets as agents (claude-…, chatgpt-… names), merchants of paid calls, and the contact book the bb84 app keeps (Settings → Contacts) — the user's own nicknames, notes, pins, manual entries and kinds. The app shares that book with payment-scope connections on every sync, like its standing orders; the server adds bb84 names, public profiles and the on-chain merchant flag and rebuilds the list at most once a minute. Assistants pass an entry's address or bb84 name (never the nickname) to propose_payment. MCP resource bb84://contacts holds the first 100 entries; REST: GET /api/connect/v1/contacts?query=…&kind=…&limit=….
Directory. The public part of the name service as one queryable list, so an assistant can treat names and profiles as a database (“which merchants are in Berlin?”, “who is called …?”). search_directory returns every named address with its public profile — display name, city, country, avatar; never e-mail, phone, street, postal code or birthdate, and nothing but the flag for a profile its owner set private —, the on-chain merchant flag, AI-budget addresses as agents (claude-…, chatgpt-… names), the website <name>.bb84.com, the payment link, and the first-seen and last-activity day. Filters: query (substring of name, profile name, city, country, address or agent app), kind (person, merchant, agent), city, country, addresses (bulk lookup of up to 100); sort name | newest | active; limit (≤ 100) and offset with nextOffset. The connector adds isOwn for the connection's own addresses and contact (the user's nickname and note) for entries in the shared contact book; addresses deleted on-chain are left out. Everything in it is public already (names, <name>.bb84.com sites, ENS text records), so no scope is needed. The name service builds the list at most once a minute and serves it itself: GET /api/ens/directory?q=…&kind=…&city=…&country=…&addresses=…&sort=…&limit=…&offset=… (public, no token). MCP resource bb84://directory holds the first 100 by name; REST with the connection token: GET /api/connect/v1/directory?query=…&kind=….
Guide. So that an assistant explains bb84 correctly instead of guessing, get_docs returns the user guide How the bb84 wallet works (14 topics from accounts and hash chains to fees, glossary and FAQ; English and German; the same ids in every language), whole or one topic at a time, and the server instructions tell the model to read it before answering how/why/what-if questions about the wallet. MCP resources bb84://docs and bb84://docs/de hold the whole text; public, no token: bb84.com/api/connect/docs/wallet.en.md and wallet.de.md. Live data of a wallet still comes from the other tools; the guide carries no user data.
Events. Nothing is pushed to an assistant; MCP clients such as Claude do not deliver server notifications. Instead list_events (scope transactions) returns everything that happened for the connection since a cursor: transfers with names, name changes (assigned, renamed, released — the name service keeps a public log of these), proposals the user decided, payments from the AI budget. The MCP resource bb84://events holds the last 24 hours. REST: GET /api/connect/v1/events?since=…; the name log itself: POST /api/ens/events {"addresses": […], "since": unix ms}.
AI budget names. When a user opens an AI budget, its address is named after the connected assistant: claude-moon-142.bb84.eth, chatgpt-…, gemini-…, copilot-…, otherwise ai-…. Such names cannot be claimed by anyone; the budget's ENS text records carry the ERC-8004 agent-registration of bb84 and a description that says what the address is, so payments an assistant makes are recognisable on the chain and on ENS. When the budget ends the address gets an ordinary auto-name again.
Names expire with inactivity. A bb84 name is released after 365 days without any activity of its address: no payment from or to it, no balance change, no rename, profile or commitment change. The owner is warned 30 days before (push to the app's devices, a card under the bell, nameExpiresAt in get_account); any use of the address keeps the name. On release the label becomes claimable for everyone again and the address gets a fresh auto-name (unless it was deleted), so apps that still show the old name adopt the new one. resolve_name on a released name says so (releasedInactiveAt), list_events marks such changes with reason: "inactive", and get_account reports nameReleased for 180 days. Names bb84 reserved and AI budget names are not subject to the rule.
list_transactions with summary: true (scope transactions) aggregates the shared addresses for a period: totals in/out/net per asset, by type (payment, deposit, withdrawal), per month and the top counterparties with their bb84 names, plus up to 500 transactions. since/until take YYYY-MM, YYYY-MM-DD or Unix seconds; without them the current month is used. REST: GET /api/connect/v1/statement?from=…&to=….request_payment with invoice fields (items, customer, number, … or invoice: true; no scope) builds an invoice for one of the shared addresses: a payment link (bb84.com/pay/… with amount, currency and the invoice number as reference) and a one-page PDF with issuer, customer, items, total, link and QR code. The PDF is served at pdfUrl (/api/connect/invoice/<id>.pdf) without login under an unguessable id for 180 days, so the user can forward it. Invoice numbers are unique per connection; 20 invoices per 24 hours. get_proposal reports paid once a transfer of at least 99 % of the amount (Goods & Services fee) reached the address after the invoice was created. REST: POST /api/connect/v1/invoices, GET /api/connect/v1/invoices/<id>.Clients that support MCP Apps (for example Claude on the web and desktop) show the result of propose_payment, pay_and_call and propose as a card in the chat: amount or what is proposed, recipient, reference and a live status that changes from “Waiting for confirmation” to “Paid” / “Done”, “Rejected” or “Expired”. The card's button opens the proposal page: “Confirm with passkey” for a connection made with a passkey (the page shows the proposal, Face ID carries it out), “Open in bb84 app” otherwise — the result also says which (confirm: passkey | app), and the pending texts for passkey connections lead with the link instead of the app. The card is the UI resource ui://bb84/payment-card.html (resources/read, MIME type text/html;profile=mcp-app), linked from the tools via _meta.ui.resourceUri. It loads nothing from the network and only calls get_proposal through the client, which counts against the same rate limit. It cannot confirm a payment. That still happens only in the bb84 app. While the proposal is open the card also shows a QR code and an “Open in bb84 app” button for appLink (https://bb84.com/pay/proposal/<id>), which opens exactly this proposal in the app; the wallet also gets a push notification. Clients without MCP Apps ignore it and get the JSON result as before.
A second card, ui://bb84/wallet-card.html, renders get_account (balances: totals and addresses), list_transactions (filter by direction and asset, sums, CSV copy), the AI budget in get_account / pay_from_budget (payments left, receipt) and request_payment (QR code, link, and a status that turns to “Received” once the matching transfer shows up in list_transactions). Data that only the cards need (the QR matrix) is in structuredContent._ui and not in the text content.
A third card, ui://bb84/scan-card.html (tool scan_code), is the scanner: the user takes a photo of a bb84 triangle code (ΔQR) or a QR code, picks a picture, pastes a screenshot or, where the client allows it, points the live camera at it. The card contains the same ΔQR reader as the bb84 app and a QR decoder and reads the code in the browser; nothing is uploaded. It shows what the code means (payment link, shop checkout, proposal link, address, name), passes the content to the assistant as context and offers a button that asks the assistant to propose the payment. Confirming still happens only in the bb84 app.
https://bb84.com/api/connect/mcp, then Connect.get_docs, also in German) and answers from it.Problems or questions: info@hadamard.com or a support ticket in the app.
Add https://bb84.com/api/connect/mcp as a custom connector. The client discovers everything itself and follows the MCP authorization spec. A browser page shows an 8-character code, the user approves it in the bb84 app, and the page returns to the client.
| Step | Standard | Endpoint |
|---|---|---|
| Resource metadata | RFC 9728 | GET /.well-known/oauth-protected-resource/api/connect/mcp (also in the 401 WWW-Authenticate header) |
| Server metadata | RFC 8414 | GET /.well-known/oauth-authorization-server/api/connect |
| Client registration | RFC 7591 | POST /api/connect/oauth/register (public clients, no secret; redirect URIs: https, http on localhost, or a private-use scheme) |
| Authorization | RFC 6749 + PKCE (RFC 7636, S256 required) | GET /api/connect/oauth/authorize |
| Token | RFC 6749 | POST /api/connect/oauth/token, grant_type=authorization_code with code_verifier |
Codes are single-use and valid for 5 minutes. Access tokens don't expire, so there is no refresh token. They end when the user disconnects in the app or the client revokes them, or if they are never used within 7 days of approval. In the app, the user sees where the token goes (the redirect host).
Alternatively, get an access token with the device flow above (the user approves in the bb84 app), then add the server:
claude mcp add --transport http bb84 https://bb84.com/api/connect/mcp \ --header "Authorization: Bearer bb84_conn_…"
Other clients (Cursor, VS Code and similar), as mcp.json:
{ "mcpServers": { "bb84": {
"url": "https://bb84.com/api/connect/mcp",
"headers": { "Authorization": "Bearer bb84_conn_…" } } } }
The MCP server is the right way for an assistant in a chat: the user's phone or an on-chain capped AI budget holds the keys. An agent that runs on its own machine and can keep a 32-byte secret private and durable does not need it: bb84 accounts are keccak-256 hash chains without signatures, so a complete wallet — create an address, receive, pay, pick a name — fits in one file that talks to public, unauthenticated endpoints.
python3 bb84.py selftest, new, status, pay).@noble/hashes).get_protocol and the resource bb84://protocol return the same files, so an assistant can read them on request. ENS: agent-endpoint[protocol] on bb84.eth (ENSIP-26) and the ERC-8004 registration file point here.Public endpoints an agent uses (rate-limited per IP, no key): GET /api/connect/web/chain/<address> (activation, remaining steps, nonce, balances, name, commit key, whether a recipient needs registration), GET /api/connect/web/fees, POST /api/connect/web/send {raw} (relays a 0x7c/0x7f hash transaction; the preimage inside is the authorization), GET /api/connect/web/tx/<hash>, and the name service /api/ens/… (publish a commitment, claim a name, resolve). The chain validates everything; the relay only forwards.
Secrets. The wallet file is the money. Whoever reads it can spend every balance, and nothing can revoke it short of emptying the wallet. An agent without private storage — any assistant inside a chat — must not run these clients and keeps using the MCP server.
x402 lets APIs and shops ask for payment with HTTP 402 and lets AI agents pay. bb84 accounts are post-quantum hash-chain accounts without ECDSA keys, so they can't sign the standard exact scheme (EIP-3009/Permit2). bb84 therefore uses its own upfront scheme. The payer first sends a normal bb84 payment, confirmed by the user in the app, and then proves it with the transaction hash.
Add this entry to accepts in your 402 response and use the bb84 facilitator:
{
"scheme": "bb84-prepaid",
"network": "eip155:42069000",
"amount": "12500000",
"asset": "0x50590EE131EdC98a7213c91Ae82e3e8987B9b5eE",
"payTo": "0xYOUR_BB84_ADDRESS",
"maxTimeoutSeconds": 3600,
"extra": { "memo": "x402:<unique-order-id>", "paymentFlow": "upfront" }
}
asset: USDC 0x50590EE131EdC98a7213c91Ae82e3e8987B9b5eE or EURC 0x47dbBf8233cd91C16360bDb69e325f771FD9A667, both with 6 decimals. amount is given in base units.extra.memo (required): a unique reference per request, e.g. x402:<order-id>. It goes on-chain with the payment and binds the payment to your request. Without it, verify and settle answer memo_required. Use a new memo for every 402 response and deliver at most once per memo: the transaction hash is public, so anyone may settle it, and settling again with the same payTo, asset and memo answers success again. Payments older than 180 days are never accepted.extra.memo may have at most 100 characters, single spaces and no control characters, because the wallet puts it on-chain unchanged. Longer references are refused before anything is paid.extra.paymentFlow: "upfront". In x402 v2 terms this scheme is a client-submitted payment proof: the payer has already paid, so your server must call settle before it delivers (settle → resource → respond), not verify → resource → settle. The official SDK does this by itself once the scheme declares the flow. Requirements without the field are still accepted; any other value is refused.maxTimeoutSeconds: how long you hold the offer. A person confirms the payment in the bb84 app, so give it time: at least 5 minutes, better an hour or more. pay_and_call refuses offers held for less than 4 minutes (2 minutes when paid from an AI budget).PAYMENT-SIGNATURE with payload: {"transaction": "0x…"}.With the official x402 SDK or with mppx you don't build any of this by hand: see Accept bb84 from AI agents.
| Facilitator (x402 v2) | Description |
|---|---|
| GET https://bb84.com/api/x402/supported | Supported scheme and network |
| POST https://bb84.com/api/x402/verify | {paymentPayload, paymentRequirements} → isValid, payer. Reads the chain only |
| POST https://bb84.com/api/x402/settle | Same checks, then binds the transaction to your payTo, asset and memo (one payment unlocks one request) → success, transaction. A repeated settle with the same binding answers success again, any other one transaction_already_used |
The facilitator never moves funds. The payment has already happened when it checks: successful transaction, a payment naming payTo as recipient with a token transfer of at least amount to it (Goods & Services payments may arrive minus the fee), your memo on-chain, not used for another request.
| Rule | bb84-prepaid |
|---|---|
| Instrument | Advertised in the requirements: payTo, asset, amount and the reference extra.memo. Proof in payload.transaction |
| Binding to the request | Server-issued reference carried in the payment: the memo is part of the on-chain transaction |
| Consumption key | eip155:42069000 + transaction hash. settle binds it to payTo, asset and memo under a row lock; another binding gets transaction_already_used |
| Single delivery | The facilitator has no merchant login, so the same binding settles again (anyone can read a transaction hash and must not be able to lock you out). Deliver once per reference on your side. The packages below do that for you |
| Maximum proof age | 180 days. Older payments are never accepted |
| Finality | The transaction receipt with status success on the bb84 chain, checked by the facilitator |
| Amount | Less than amount is refused (insufficient_funds). More is accepted and not returned |
| If you don't deliver | The protocol returns nothing. Payments made as Goods & Services fall under bb84 buyer protection (6 days) |
The usual way is pay_and_call: bb84 calls the merchant, the user confirms the price, and the merchant's answer comes back. A client that can set HTTP headers or _meta itself can hand pay_and_call the merchant's PaymentRequired instead (paymentRequired: object, JSON or base64 PAYMENT-REQUIRED header); that creates a payment proposal in the bb84 app. After the user confirmed it, get_proposal returns x402.paymentSignature (for the PAYMENT-SIGNATURE header) and x402.paymentPayload (for MCP _meta["x402/payment"]).
x402 and MPP carry the payment proof in an HTTP header or in the MCP request's _meta. An AI model can fill neither, it only writes tool arguments. In a chat client the proof therefore never reaches the merchant. pay_and_call makes bb84 the paying client: bb84 calls the merchant itself, turns the payment challenge into a payment proposal, and after the payment repeats the call with the proof and returns the merchant's answer.
pay_and_call with the URL and maxAmount.maxAmount, or the merchant doesn't accept bb84, it stops here and nothing is paid.get_proposal returns call.state and, once it is delivered, the answer in call.response.With payFromBudget: true step 3 is paid from the AI budget right away and the answer comes back in the same call (up to about 170 s). An idempotencyKey is required then. A retry with the same key never asks the merchant for a new price and never pays twice.
| Argument | Description |
|---|---|
| url | https URL of the paid API, or of the MCP server (Streamable HTTP) when mcpTool is given. Public DNS names on port 443 only |
| maxAmount | Required. The highest price the user agreed to, e.g. "0.50" |
| method, body, headers | GET or POST, a body of up to 8 KB, and the headers Accept, Accept-Language, Content-Type. No credentials can be set: this is for services where the payment replaces the login |
| mcpTool | {"name": "…", "arguments": {…}}: call this tool on the MCP server at url |
| asset | Preferred asset (USDC or EURC) if the merchant offers both |
| payFromBudget, idempotencyKey | Pay from the AI budget instead of asking in the app |
| Result | Meaning |
|---|---|
status: "pending" + id | Proposal created, nothing paid yet. merchant is the host the challenge came from. Poll get_proposal |
call.state | awaiting_payment, awaiting_delivery, delivering, delivered (answer in call.response, receipt in call.receipt) or failed (reason in call.error, proof in call.proof) |
no_payment_required | The URL answered without asking for payment. Its content is not handed on |
not_payable | The merchant asks for payment but not in bb84. merchantAccepts lists what it takes |
price_above_max | The price is higher than maxAmount. Ask the user |
offer_too_short | The merchant holds its offer for less than 4 minutes (AI budget: 2 minutes) |
merchant_unreachable | Host unknown, not reachable, invalid certificate or an error status |
| Protocol | Challenge | Proof |
|---|---|---|
| x402 over HTTP | 402 with PAYMENT-REQUIRED (v1: JSON body) | PAYMENT-SIGNATURE (v1: X-PAYMENT) |
| x402 over MCP | Tool result with isError and the requirements in structuredContent | _meta["x402/payment"] |
| MPP over HTTP | 402 with WWW-Authenticate: Payment … | Authorization: Payment … |
| MPP over MCP | JSON-RPC error -32042 with data.challenges | _meta["org.paymentauth/credential"] |
Payable are offers for the bb84 chain: x402 scheme bb84-prepaid on eip155:42069000 and MPP method bb84.
failed. The payment itself stands. Payments made as Goods & Services fall under buyer protection.pay_and_call.bb84 runs a small merchant that sells one sentence for 0.01 USDC or EURC. It asks for payment in every dialect pay_and_call understands.
| Endpoint | Asks for payment with |
|---|---|
| GET https://bb84.com/api/x402/demo/quote | x402 v2 (PAYMENT-REQUIRED) and MPP (WWW-Authenticate: Payment) in the same 402 |
| POST https://bb84.com/api/x402/demo/mcp | MCP server. Tool quantum_fact: x402. Tool quantum_fact_mpp: MPP |
In Claude with the bb84 connector, for example: “Use pay_and_call to buy a quantum fact from https://bb84.com/api/x402/demo/quote, at most 0.01 USDC.”
If your API or MCP server already asks for payment with x402 or MPP, bb84 is one more entry. Your server needs no bb84 node and no keys: the public facilitator https://bb84.com/api/x402 checks the payment. You receive USDC or EURC on your bb84 address.
npm install bb84-x402
import { paymentMiddleware, x402ResourceServer } from "@x402/express";
import { HTTPFacilitatorClient } from "@x402/core/server";
import { Bb84PrepaidScheme, BB84_NETWORK, BB84_FACILITATOR_URL } from "bb84-x402";
const server = new x402ResourceServer(new HTTPFacilitatorClient({ url: BB84_FACILITATOR_URL }))
.register(BB84_NETWORK, new Bb84PrepaidScheme({ secret: process.env.BB84_X402_SECRET }));
app.use(paymentMiddleware({
"GET /weather": {
accepts: [{ scheme: "bb84-prepaid", network: BB84_NETWORK, price: "$0.02",
payTo: "0xYOUR_BB84_ADDRESS", maxTimeoutSeconds: 86400 }],
description: "Weather report",
},
}, server));
The scheme puts a fresh, signed reference into every 402, checks that a presented payment carries one of its own references, and delivers each payment once. Prices: "$0.02" (USDC), "€0.02" or "0.02 EURC". You can list bb84 next to your other networks in the same accepts.
npm install bb84-mppx
import { Mppx } from "mppx/express";
import { charge, baseUnits } from "bb84-mppx";
const mppx = Mppx.create({
methods: [charge({ recipient: "0xYOUR_BB84_ADDRESS", currency: "USDC" })],
secretKey: process.env.MPP_SECRET_KEY,
});
app.get("/weather",
(req, res, next) => mppx.bb84.charge({ amount: baseUnits("0.02"),
expires: new Date(Date.now() + 3600_000).toISOString() })(req, res, next),
(req, res) => res.json({ report: "sunny" }));
Set expires: the mppx default of 5 minutes is short for a confirmation on a phone.
bb84The method follows the push mode of other chains: the payer broadcasts the payment and presents the transaction hash.
| Part | Content |
|---|---|
| Challenge | method="bb84", intent="charge" |
request | amount (base units, string), currency (token address on the bb84 chain, or USDC / EURC), recipient (0x address), optional methodDetails.chainId (42069000) and methodDetails.memo |
| Payment | A token transfer of amount to recipient on eip155:42069000 whose memo is methodDetails.memo or, without it, mpp:<challenge id>. The challenge id is protected by the server's HMAC, so a payment made for one challenge fits no other |
Credential payload | {"type": "hash", "hash": "0x…"} |
| Verification | POST https://bb84.com/api/x402/settle with requirements {scheme: "bb84-prepaid", network: "eip155:42069000", amount, asset: currency, payTo: recipient, extra: {memo}} and payload: {transaction: hash} |
| Receipt | method: "bb84", reference: the transaction hash |
Nothing to change. After an order your shop shows its bb84 payment link. The buyer can hand that link to an assistant, which calls propose_payment with payLink. The buyer confirms in the app, and your shop sees the payment by its reference as usual.
Answer 402 with the requirements above in a base64 PAYMENT-REQUIRED header, and on the retry call settle before you deliver. The demo merchant shows every header.
Give your AI a budget it physically cannot exceed. bb84 accounts spend with one-time hash keys from a hash chain. In the app (Settings → Connectors → tap a connection → AI budget) the user creates a separate budget address with its own hash chain, funds it and hands bb84 exactly one value: the chain element N steps below the top. Hashing forward from it yields exactly N one-time keys. Going back would mean inverting keccak, and the chain can only be renewed with element 0, which never leaves the phone. So the assistant can make at most N payments and never spend more than the address holds. The chain enforces this, not a server policy. Topping up adds money, not payments.
| MCP tool / endpoint | Description |
|---|---|
get_account → budget · GET /api/connect/v1/budget | Budget address and its name (claude-…bb84.eth, see AI budget names), balances, paymentsLeft/paymentsTotal, payments so far. null until the user set up a budget for this connection |
pay_from_budget · POST /api/connect/v1/budget/payments | {to, amount, asset, note?, goodsAndServices?, idempotencyKey?} → pays immediately, no confirmation in the app → status, txHash, paymentsLeft. Merchants are paid as Goods & Services. The recipient must be a merchant or an activated address |
Timeouts and retries: a budget payment waits for two chain confirmations and can take up to about 160 s. Let your HTTP or MCP client wait at least 180 s. An MCP batch may contain at most one pay_from_budget call. Send a new idempotencyKey for every payment (1–255 printable ASCII characters without spaces, e.g. a UUID; for REST also accepted as Idempotency-Key header). If you retry after a timeout or connection error, reuse the same key with the same payment data: bb84 pays at most once per key and budget and returns the original result with idempotentReplay: true (kept 24 h). While the first call is still running, a retry gets 409. The same key with different payment data gets 422. Errors where nothing was sent (e.g. 400, 409, 504 "Commit not confirmed") are not stored, so a retry with the same key tries again. Without a key, a retry after a successful payment pays a second time.
bb84 keeps the delegated value encrypted (AES-GCM) and deletes it when the user ends the budget or disconnects. The user can reclaim the rest at any time. Even if the server were compromised, only the budget addresses would be at risk, never the user's other accounts.
With the Verify identity switch, the app signs an attestation bound to the connection for each address. It uses the address's proof key anchored on-chain. get_account / GET /v1/account then return ownership.verified, verifiedAddresses and the signed proofs (message, EIP-191 signature, proof key, anchor tx). Anyone can re-check them via POST /api/connect/proof-keys/verify. A revoked or rotated proof key drops out at once.
bb84 OTAs are hash-based (post-quantum) accounts with no ECDSA key. To prove ownership off-chain, the wallet derives a proof key (secp256k1) per OTA and anchors it on-chain once: a successful self-send from the OTA whose input is 0x626238342d70726f6f666b65792d76313a ("bb84-proofkey-v1:") followed by the 20-byte key address. Only the OTA owner can send that transaction. The proof key can only sign proofs. It cannot authorize payments, because the chain rejects ECDSA transactions.
The wallet signs with a proof key only for its own purposes: approving a connection, the identity attestation above and the passkey web wallet. There is no WalletConnect pairing and no proof a user shares by hand; the signed attestations reach you through get_account / GET /v1/account. Important: plain ecrecover returns the proof key, not the OTA address, so verify with the endpoint below or check the anchor tx yourself.
curl -X POST https://bb84.com/api/connect/proof-keys/verify \
-H "Content-Type: application/json" \
-d '{"address":"0xOTA…","message":"Sign-in nonce 8f3a…","signature":"0x…"}'
# → {"valid":true,"address":"0xota…","signer":"0x…","proofKey":"0x…","anchorTx":"0x…"}
| Method & Path | Description |
|---|---|
| POST /api/connect/proof-keys/verify | {address, signature, message} (EIP-191; a 0x-hex message is treated as raw bytes, as in personal_sign) or {address, signature, typedData} (EIP-712). valid is true only if the signer is the currently anchored proof key of address. |
| GET /api/connect/proof-keys/<address> | Current proof key + anchor tx, or 404 if none is anchored. |
| POST /api/connect/proof-keys/anchor | {address, txHash}: registers an anchor tx (anyone may submit, because the tx proves itself). A newer anchor replaces an older one. A key of 20 zero bytes revokes it. |
https://bb84.com/rpc and confirm from == to == address, the input and a successful receipt. Only the endpoint knows about later revocations./v1 chain-data API has been retired. User data is available through connectors; public chain data through JSON-RPC (see below)./requests flow. Does it still work?+POST /api/connect/requests and GET /api/connect/requests/<requestId>/status (with pollToken) keep working, but they are deprecated: responses carry a Deprecation header. Access tokens from both flows are identical. Please move to the OAuth endpoints above.Question, bug report or feedback — we'll get back to you by email.