* - standardise versions for all nym-sdk workspace dependencies - prepend sqlx-pool-guard with 'nym-' * Test remove nym-api from deps * Add oneliner to client_pool doc comments * Add note to commented out docs.rs link in sdk * remove nym-api from script * add publishing file * bring non-binary / contract / tools into workspace version * added more info to publishing.md * make deps workspace version * remove uploaded sphinx-types crate from script * remove erroueously included ignore-defaults * add zeroise to feature * chore: Release * add topology to batch * more cargo versioning * more cargo versioning - wasm utils * more cargo versioning - wasm utils * Add publish=false to manifest for cargo workspaces / crates.io publishing exclusion * remove script now switched to manifest based exclusion * rename import based on rename of contracts-common dep * Making workspace versions for publication + removing unnecessary crates from publication * Remove OOD info from publishing sdk guide * rename contract imports + remove package * temp commit: continuing with removal of path from cargo manifest and replacing with workspace version import for publication * continuing with cargo.toml updates * dryrun only erroring on known version problem crates * remove old published-crates file * Minor comment change * remove default features warning * Additional info on workspace dep comment re publish list * Add missing description to cargo.toml * Fix missing feature flags * Add missing descriptions * Fix remaining path import * Add workspace repo / homepage / documentation links to cargo.toml files * remove workspace version from excluded crate * Remove todo descriptions * Minor comment change * add homepage etc * move from bls git import to nym_bls_fork crate * Modify rest of imports from path to workspace import, excluding binaries * add directory/homepage info * fix cargo fmt * add notes to gitignore * better solution to contracts/ experiment * wasm -> nym_wasm crate renaming * fix fatfinger * add metadata to ecash cargo.toml * stub publishing guide * fix misrevolved netlink- version * Fixes and block publication of rebase re: LP * first pass @ workflows
Nym CLI
This is a CLI tool for interacting with:
- the Nyx blockchain
- the smart contracts for the Mixnet
It provides a convenient wrapper around the nyxd client with similar functionality to thenyxd binary for querying the chain or executing smart contract methods.
And in the future it will provide an easy way to interact with Coconut, to issue and verify Coconut credenitals.
It DOES NOT do these things:
The infrastructure components that run a gateway, mixnode or Service Provider have their own binaries.
The socks5 client also has its own binary, or use NymConnect.
Installing
Download the CLI binary for your platform from https://nymtech.net/downloads or get a specific version from GitHub releases.
Configuration
The Nym CLI runs against mainnet by default.
If you want to use another environment, you can do this by:
- providing a
.envfile - setting environment variables (see here for options)
- passing named arguments
.env File
There are two ways to provide this:
- A file called
.envin the same directory as the binary - Pass the
--config-env-filealong with a command
Passing named arguments
You will need to pass the following with most commands as arguments:
--mnemonic <MNEMONIC>
--nyxd-url <nyxd_URL>
--mixnet-contract <MIXNET_CONTRACT_ADDRESS>
--vesting-contract <VESTING_CONTRACT_ADDRESS>
How do I use it?
The simplest way to find out how to use the CLI is to explore the built-in help:
nym-cli --help
Features
🏦 Account
- create a new account with a random mnemonic
- query the account balance
- query the account public key (needed to verify signatures)
- query for transactions originating from the account
- send tokens to another account
⛓ Block
- query for the current block height
- query for a block at a height
- query for a block at a timestamp
🪐 cosmwasm
- upload a smart contract
- instantiate a smart contract
- upgrade a smart contract
- execute a smart contract method
𐄳 Mixnet
📒 Directory
- query for mixnodes
- query for gateways
🧑🔧 Operators
- bond/unbond a mixnode or gateway
- query for waiting rewards
- withdraw rewards
- manage mixnode settings
- create payload for family creation signature
- create family
🥩 Delegators
- delegate/undelegate to a mixnode
- query for waiting rewards
- withdraw rewards
✍ Sign
- create a signature for string data (UTF-8)
- verify a signature for an account
🕓 Vesting
- create a vesting schedule
- query for a vesting schedule
🥥 Coconut
Coming soon, including:
- issue credential
- verify credential
Building
Build the tool locally by running the following in this directory:
cargo build --release
Generating user docs
There is a Makefile with a target to build the user docs:
make generate-user-docs
Build the tool and run the generate command:
cargo build --release
../../target/release/nym-cli generate-fig > user-docs/fig-spec.ts
See https://github.com/withfig/autocomplete-tools/tree/main/types.