Skip to content

CLI Wallet

The Citizen CLI wallet is a command-line tool for operators and developers.

Build

cd citizen-protocol
cargo build --release -p citizen-wallet-cli

The binary will be at target/release/citizen-wallet-cli.

Key Lifecycle

Generate a Wallet

citizen-wallet-cli generate

This generates a BIP39 mnemonic, derives Ed25519/X25519 keys, and stores them locally.

Import a Wallet

citizen-wallet-cli import --mnemonic "word1 word2 ... word12"

List Wallets

citizen-wallet-cli list

Set Active Wallet

citizen-wallet-cli set-active --id <wallet-id>

Operations

Sign a Payload

citizen-wallet-cli sign \
  --namespace default \
  --payload '{"action": "register", "data": "..."}'

Submit an Entry

citizen-wallet-cli submit \
  --namespace default \
  --payload '{"message": "Hello, Citizen!"}' \
  --network localnet

View a Receipt

citizen-wallet-cli receipt --hash <entry-hash>

Namespace Signing Helpers

citizen-wallet-cli namespace-sign \
  --namespace civic-records \
  --operation create \
  --config '{"policies": {...}}'

Builder-Credit Multisig Proof

citizen-wallet-cli builder-credit \
  --grant-id <grant-id> \
  --signers <signer1>,<signer2>,<signer3> \
  --threshold 3

Network Selection

# Specify network per command
citizen-wallet-cli --network testnet submit --payload '...'

# Or set default network
citizen-wallet-cli config set network testnet

Deterministic Receipt Validation

The CLI validates receipts deterministically - the receipt hash, signatures, and finality proof are independently verifiable without trusting the node:

citizen-wallet-cli verify-receipt --hash <entry-hash>

This makes the CLI the reference implementation for canonical signing behavior across all wallet surfaces.