# Generate a new key pair with random entropy
nockchain-wallet keygen
The wallet supports importing and exporting keys:
# Export all wallet keys to a file (default: keys.export)
nockchain-wallet export-keys
# Import keys from the exported file
nockchain-wallet import-keys --input keys.export
# Import a master public key and chain code
nockchain-wallet import-master-pubkey --key <base58-key> --chain-code <base58-chain-code>
The exported keys file contains all wallet keys as a jam file that can be imported on another instance.
Can be used for:
The wallet needs to connect to a running nockchain instance to perform operations like checking balances, broadcasting transactions, etc.
# Connect to nockchain using a Unix domain socket
nockchain-wallet --nockchain-socket ./nockchain.sock <command>
Note: Make sure nockchain is running and the socket path matches your nockchain configuration.
nockchain-wallet gen-master-privkey --seedphrase "your seed phrase here"
Creates a master private key deterministically from a BIP39-style seed phrase.
nockchain-wallet gen-master-pubkey --master-privkey <private-key>
Derives the master public key from a master private key.
nockchain-wallet derive-child --key-type <pub|priv> --index <0-255>
Derives a child public or private key at the given index from the current master key.
nockchain-wallet list-notes
Displays all notes (UTXOs) currently managed by the wallet, sorted by assets.
nockchain-wallet list-notes-by-pubkey --pubkey <public-key>
Shows only the notes associated with the specified public key. Useful for filtering wallet contents by address or for multisig scenarios.
A draft represents a transaction that is being prepared for submission to the network. It is a collection of partially assembled seeds and inputs that can be persisted to disk and later signed and submitted.
# Create a draft using simple-spend
nockchain-wallet simple-spend \
--names "[first1 last1],[first2 last2]" \
--recipients "[1 pk1],[2 pk2,pk3]" \
--gifts "100,200" \
--fee 10
# Sign the transaction
nockchain-wallet sign-tx --draft path/to/draft.draft
# Make and broadcast the signed transaction
nockchain-wallet make-tx --draft path/to/draft.draft
Note: The draft file will be saved in ./drafts/ directory with a .draft extension.