Mainnet opt-in (beta)
Three switches, one per front end, never read from the config or from a tool
argument: wasit run --mainnet; the Action's mainnet: true, honoured only on
workflow_dispatch, on a GitHub-hosted runner, with tier: payment, on the
default branch, against a deployed service (no service.start, no local
baseUrl) and with nothing installed in the job before Wasit; and the
MCP server's start-up variables WASIT_MAINNET_OPT_IN=1, WASIT_MAINNET_CONFIG
and WASIT_MAINNET_ENVIRONMENT. A run also needs a stellar:pubnet environment
with operatedByMe: true, a pin to mainnet USDC and a payee that is not the
payer, an https RPC that serves mainnet, the key in WASIT_MAINNET_PAYER_SECRET
and in no other key variable, a payer holding at most $10.00 in USDC, and no
other mainnet run holding the lock (wasit-mainnet.lock) in its ledger's
folder. A payer that holds less than the run needs to finish its checks is
refused too, before anything is signed. It signs at most
$1.00 a payment and $5.00 a run (for the MCP server, $5.00 for its whole
process), writes every signature to its run ledger before the key signs, and
ends by comparing the payer's balances with that ledger.
- Use a dedicated account. The caps bound what Wasit signs, not what a person or a program holding the key can do: the bound there is that account's balance.
- In GitHub Actions the job rules stop a wrong workflow, not code that already ran in the job. Keep the key as the secret of a GitHub environment limited to the default branch, with a required reviewer. On GitHub Free, Pro and Team, required reviewers are available for public repositories only (GitHub's documentation on deployments and environments, read 2026-11-29).
- The MCP path is the weakest. An MCP server takes its environment from the client's configuration, so the key may sit in a file the agent can read, and an agent that reads the key is outside every limit of Wasit. Start the server from a shell that already holds the variable, and never write the key into an MCP config file. An agent with a shell can still read it.