Operator CLI
For the operator. Review admission requests and read or change the ledger's configuration.
The operator CLI runs from the backend's folder against the same database and RPC node as the API. It does two jobs: deciding queued admission requests, and reading or changing the Ledger config. Every command prints JSON.
npm run operator -- <group> <action> [wallet] [flags]Admissions
Where GET /v1/config reports admissionMode: "review", a request from POST /v1/admissions waits for the operator. Approving it lets the wallet build admit; the API adds the operator's signature when the wallet submits it. See Admission.
| Command | What it does |
|---|---|
admissions list | Prints every admission request, oldest first, with its wallet, entity, role and status. |
admissions approve <wallet> | Marks the wallet's request approved. The app then asks the wallet to sign its admission. |
admissions reject <wallet> | Marks it rejected, with the reason "The operator rejected this request." It stays rejected until the operator approves it, or the wallet signs a new request with a different entity or role. |
npm run operator -- admissions list
npm run operator -- admissions approve <wallet>Ledger config
| Command | What it does |
|---|---|
config show | Prints the Ledger account: ledger, admin, operator, feeRecipient, feeBps, cashMint and vault. |
config set | Sends update_config with the changes below, keeping every field not named. |
config set takes at least one of:
| Flag | Sets |
|---|---|
--fee-bps <n> | The settlement fee, a whole number from 0 to 50. |
--fee-recipient <wallet> | The wallet that receives fees. The same transaction creates its USDC associated token account if it has none, so the next fill can pay into it. |
--operator <wallet> | The key that co-signs admissions. |
--admin <wallet> | The admin, which signs every later config change. |
npm run operator -- config set --fee-bps 3It signs with the admin key from ADMIN_SECRET_KEY, and refuses to send if that key isn't the ledger's admin. It prints the signature, the fee and the fee recipient. The change lands as a Configured event (Events).