|
|
9 місяців тому | |
|---|---|---|
| .. | ||
| src | 9 місяців тому | |
| Cargo.toml | 9 місяців тому | |
| README.md | 9 місяців тому | |
# Generate a new key pair with random entropy
wallet keygen
# Import keys from a jammed file
wallet import-keys --input path/to/keys.jam
# Import a master public key and chain code
wallet import-master-pubkey --key <base58-key> --knot <base58-chain-code>
wallet gen-master-privkey --seedphrase "your seed phrase here"
Creates a master private key deterministically from a BIP39-style seed phrase.
wallet gen-master-pubkey --master-privkey <private-key>
Derives the master public key from a master private key.
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.
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
wallet --nockchain-socket ./test-leader/nockchain.sock <command>
# Example: checking balance while connected to nockchain
wallet --nockchain-socket ./test-leader/nockchain.sock balance
# Example: broadcasting a transaction
wallet --nockchain-socket ./test-leader/nockchain.sock make-tx --draft my_draft
Note: Make sure nockchain is running and the socket path matches your nockchain configuration.
wallet list-notes
Displays all notes (UTXOs) currently managed by the wallet, sorted by assets.
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
wallet simple-spend \
--names "[first1 last1],[first2 last2]" \
--recipients "[1 pk1],[2 pk2,pk3]" \
--gifts "100,200" \
--fee 10
# Sign the transaction
wallet sign-tx --draft path/to/draft.draft
# Make and broadcast the signed transaction
wallet make-tx --draft path/to/draft.draft
Note: The draft file will be saved in ./drafts/ directory with a .draft extension.