Skip to main content
A solver card is one JSON file that describes your markets. Wallets find your solver through it. One card per solver per network, filed as solvers/<network>/<name>.json; the network lives in the path, never in the card. The trust model behind cards and registries is in Discovery and Registries.

Generate the Card

Run this in your intent-solver directory, with the .env that your solver uses:
  • --silent keeps the output of pnpm and the build out of the file, so the file holds only the card.
  • The card goes to stdout, and the registry path goes to stderr, for example registry path: solvers/bitcoin/my-solver.json. The command writes no file of its own and uploads nothing.
  • The name (my-solver) may use lowercase letters, digits, and hyphens, and must equal the filename you save the card under. You can omit it when SOLVER_NAME is set.
The card is built from your enabled routes, fees, and limits, and from your console markets, not from wallet balances. It lists your RELAY_URL, which must start with wss://, and the solver signs it with its wallet key. The solver card panel on the Health page of the admin console shows the same card.

Publish the Card on Nostr

Turn on publishing so the solver posts its signed card on its relays as a Nostr event of kind 38859:
.env
  • auto publishes the card, and publishes it again whenever it changes.
  • manual publishes only when you select Post now in the nostr panel of the Health page, then re-sends the last posted card every 30 minutes.
  • off, the default, publishes nothing.
  • SOLVER_NAME is required to publish, and must equal the name you file the card under.
Apps built on @arkade-os/swap read these cards when nostr-tools is installed, and use them in place of the markets a registry lists for you. A published card counts only for a solver that a registry lists or a wallet pins, so publishing does not replace sharing the card or listing it.

Check the Card Before Sharing

A market that the registry would reject is left off the card, and the reason goes to stderr. For an asset market, that includes:
  • a min of 0 on an open direction;
  • an asset with more decimals than BTC, which gives a negative price_decimals.
Fix the market in the admin console, then generate the card again. A problem with a Lightning or onchain route stops the command with an error instead. Then run the registry’s own validation on the card. Run this next to your intent-solver directory:
A valid card prints bitcoin: OK (2 markets), with your own market count. A rejected card prints bitcoin: FAILED and each reason under its filename. For a mutinynet solver, copy the card to solvers/mutinynet/ instead. The check then prints mutinynet: in place of bitcoin:. pnpm cli card prints the right path on stderr.

Share the Card Privately

A card works with no registry at all. In the Arkade wallet, a user pastes the card’s JSON under Settings → Advanced → Solvers. An app built on @arkade-os/swap pins cards with the swap client’s discovery.localCards (Find Markets). Pinned cards join discovery like any registry entry. Start here: there is no review wait, and you decide who sees the card.

Run Your Own Registry

Fork arkade-os/solver-registry, replace the cards under solvers/, and enable GitHub Pages with the GitHub Actions source. The index format is identical to the public registry’s, so any client can follow your Pages URL. Clients follow a set of registries, and yours is one more entry. An app built on @arkade-os/swap follows your index instead of the public one when it passes the index URL as the swap client’s discovery.registryUrl.

List in the Public Registry

  1. Generate and check the card, and save it as solvers/<network>/<name>.json. If the solver publishes on Nostr, you can file a pointer card instead: pnpm --silent cli card my-solver --pointer prints one, with your identity and relays but no markets.
  2. Open a pull request at arkade-os/solver-registry.
  3. CI validates every card and reports failures in the PR summary. A broken card on one network does not block the others.
After merge, the reducer publishes per-network indexes at https://arkade-os.github.io/solver-registry/<network>.json, grouped by pair with the best fee_bps first. Review of the pull request is the listing gate, so merge time is a human process.

Keep the Card in Sync

With NOSTR_AD_PUBLISH=auto and a pointer card in the registry, there is nothing to sync: wallets that read Nostr cards pick up each change from your relays. A full card in a registry, or a card someone pinned, is a copy that nothing updates. After changing markets, regenerate it and open a new PR, or re-share the file. Keep the full card in the registry until the wallets you serve read Nostr cards: older clients read only the index. A stale card advertises bounds you no longer honor, and swaps outside your real bounds go unfilled.

Run a Solver

Install, secure, fund, and open a market.

Discovery

Cards, registries, and curation: the trust model.