CLI command reference
The repository has two commands that share one wallet folder. xmr721 inscribes NFTs and collections, and xmr20 creates and mints open XMR20 tokens.
Run them from the repository folder after installing. With npm link or a global install they are also on your path as xmr721 and xmr20.
#xmr721 wallet
| Command | What it does |
|---|---|
wallet create | Makes a new wallet and prints its address |
wallet receive | Prints the wallet's address |
wallet balance | Its balance and how many coins can pay right now |
wallet split <n> | Makes n coins of 0.01 XMR (2 to 14) from one larger coin, so n records can go out in one block |
wallet inscribe --file <path> [--type <type>] [--name <text>] [--to <address>] [--collection <id> [--edition <n>]] [--dry-run] | One NFT. With --collection, an edition of one of the wallet's collections |
wallet collection --name <text> --max <n> [--dry-run] | A collection whose editions only this wallet mints |
wallet send <nft id> <address> [--dry-run] | Sends an NFT the wallet owns |
wallet deploy --tick <ticker> --max <supply> [--lim <most per mint>] [--pre <creator's share>] [--token-name <text>] [--col <collection id>] [--dry-run] | An open XMR20 token |
wallet mint <token id> <amount> [--to <address>] [--dry-run] | Mints an open XMR20 token |
wallet inscriptions | What the wallet built, and where each transaction is now |
wallet resend | Hands the node, as they are, the kept transactions it does not have |
wallet forget <n> | Takes entry n off the list: a transaction never sent, or one settled 100 blocks ago |
wallet rescan | Reads the wallet's coins anew; frees coins of transactions that never got in |
wallet restore --height <n> | The block the wallet's scan starts at, for a folder that has only its keys |
#xmr20
xmr20 runs the same wallet under the names a token creator expects.
| xmr20 | Same as |
|---|---|
xmr20 create | xmr721 wallet create |
xmr20 receive | xmr721 wallet receive |
xmr20 balance | xmr721 wallet balance |
xmr20 split <n> | xmr721 wallet split <n> |
xmr20 deploy --tick … --max … [--lim …] [--pre …] [--token-name …] [--dry-run] | xmr721 wallet deploy … (without --col) |
xmr20 mint <token id> <amount> [--to <address>] [--dry-run] | xmr721 wallet mint … |
xmr20 status | xmr721 wallet inscriptions |
xmr20 resend, forget <n>, rescan, restore --height <n> | the same xmr721 wallet commands |
See XMR20 tokens.
#Options for every command
Each option is written --name value, with a space, not =.
| Option | Default | What |
|---|---|---|
--wallet <dir> | ~/.xmr721/wallet | The wallet folder. Back it up: its keys are in it |
--network <name> | mainnet | mainnet or stagenet |
--node <url> | http://127.0.0.1:18081 (stagenet :38081) | Your Monero node. Decoys come from it and transactions go through it |
--reader <url> | https://api.xmr20.org/xmr721 on mainnet | An XMR721 reader; run your own to trust nothing else |
--domain <hex> | fixed on mainnet | The ledger's domain. Needed on stagenet to inscribe or send |
--carrier <path> | reader/bin/mordinals-carrier | The transaction tool, built with sh reader/carrier/build.sh |
--max-fee <xmr> | 0.005 | The highest network fee one transaction may pay |
--help | The help text |
#Content types for --type
png, jpeg, webp, gif, text, json, mp4, art. Without --type the file ending decides.
#Files in the wallet folder
| File | What |
|---|---|
carrier.keys.json | The wallet's keys. Never share it |
wallet.json | Network and the block the scan starts at |
journal.json | Every transaction built, kept until the chain has settled it |
carrier.state.json | The transaction tool's view of the wallet's coins |
lock/ | Present while a command runs; a second command waits a few seconds, then is told to try again |
#Exit codes and output
Results are printed as JSON. Errors are printed in plain words on standard error, and the command exits with a non-zero code. Nothing that steers a terminal is ever printed from a reader, a node or the tool.