nym-cli Binary Commands
nym-cli queries the Nyx blockchain and the Nym smart contracts, and sends transactions to them. Each command group has subcommands.
| Command | What it does |
|---|---|
account create | Creates a new mnemonic. The account appears on the chain only after its address is used in a transaction. |
account balance | Shows the balance of an account. |
account pub-key | Shows the public key of an account. |
account send | Sends tokens to another account. |
account send-multiple | Sends tokens to several accounts, listed in an input file, in one transaction. |
signature sign | Signs a message with the account key. |
signature verify | Verifies a signed message. |
ecash issue-ticket-book | Pays a deposit from the account and gets a ticketbook issued, into the credential store of a client or into a file. |
ecash recover-ticket-book | Recovers ticketbooks whose deposits were made but whose issuance did not finish. |
ecash import-ticket-book | Imports a ticketbook into a client’s credential store. |
ecash generate-ticket | Prints the ticketbook data and a payment for one of its tickets, for a given provider. |
ecash import-coin-index-signatures | Imports the coin index signatures that ticketbooks need into a client’s store. |
ecash import-expiration-date-signatures | Imports the expiration date signatures that ticketbooks need into a client’s store. |
ecash import-master-verification-key | Imports the master verification key that ticketbooks need into a client’s store. |
block get | Prints the details of a block as JSON. |
block time | Shows the block time at a height. |
block current-height | Shows the current block height. |
cosmwasm upload | Uploads a smart contract WASM blob. |
cosmwasm init | Instantiates an uploaded contract. |
cosmwasm generate-init-message | Generates the instantiate message of a Nym contract: ecash bandwidth, DKG, mixnet, multisig or vesting. |
cosmwasm migrate | Migrates a contract to new code. |
cosmwasm execute | Calls a method of a contract. |
cosmwasm raw-contract-state | Prints the raw state of a contract. |
tx get | Gets a transaction by hash. |
tx query | Searches for transactions. |
vesting-schedule create | Creates a vesting schedule. |
vesting-schedule query | Shows a vesting schedule. |
vesting-schedule vested-balance | Shows the vested amount that is free to withdraw, delegate or bond. |
vesting-schedule withdraw-vested | Withdraws vested tokens. The amount excludes tokens that are delegated or bonded. |
mixnet query | Queries the mixnet directory for mixnodes and gateways. |
mixnet delegators | Lists, makes and removes delegations, and claims their rewards. |
mixnet operators | Manages a Nym Node, a legacy mixnode or a legacy gateway that you operate, and signs messages with its identity key. |
generate-fig | Prints a Fig completion spec. |
Global options
These options apply to each nym-cli command.
| Option | What it does |
|---|---|
--mnemonic | The mnemonic of the account that signs. When a command signs a transaction, such as account send, the MNEMONIC environment variable takes precedence over this flag, so clear MNEMONIC before choosing the signing account with --mnemonic. Prefer the variable anyway: a flag value shows in the process list. |
--config-env-file | A file of environment variables that sets the network. A variable that is set in the environment wins over the file. setup_env skips the file entirely when CONFIGURED is already set, so unset CONFIGURED when you want the file loaded. |
--nyxd-url | The nyxd endpoint. It overrides the legacy NYMD_VALIDATOR variable and the config file. |
--nym-api-url | The Nym API endpoint. It overrides API_VALIDATOR and the config file. |
--mixnet-contract-address, --vesting-contract-address | The contract addresses. They override the environment and the config file. |
The ecash commands open the credential store of a client. When that client encrypts its databases, give the same key with --database-key, or better with the NYM_CLIENT_DATABASE_KEY environment variable: a raw 256-bit key as 64 hex characters, which needs a build with SQLCipher. Set the variable in the process environment, because --config-env-file is read only after the arguments are parsed.
Run nym-cli <command> <subcommand> --help for all options.
Last updated on