Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Creating a wallet

tx-manifest-wallet needs keys to select UTXOs and to sign. This page creates a wallet, funds it from the testnet faucet, and prepares the UTXOs an action needs.

This is a txw page, not a format page. How a wallet holds keys, where it keeps them, and what it calls the command to make one are all its own business. Nothing here appears in a manifest.

Make a wallet

txw create-wallet --out wallet.json

This writes a new HD wallet to wallet.json. Add --mainnet true for a mainnet wallet; by default it follows your configured default_network.

Inspect it — fingerprint, master xpub, oracle key, and a receive address:

txw info --wallet wallet.json

⚠️ Use this wallet for testing only. create-wallet generates a fresh 12-word BIP39 seed phrase and writes it to wallet.json in plaintext. Anyone who can read that file — a backup, a synced folder, a shared machine, a screenshot — controls every coin it holds, and there is no passphrase or encryption to stop them.

This is a deliberate simplification in an example CLI, not an oversight to be worked around: it keeps the recipes runnable without a key-management detour. A real wallet encrypts key material at rest and keeps it off disk while unlocked.

So treat wallet.json as disposable and keep it on testnet. Don't reuse a seed you care about, don't commit the file, and don't put mainnet funds behind it — --mainnet true exists for completeness, not as a recommendation.

Fund and sync

Your new wallet is empty. Fund it with Liquid testnet L-BTC from the faucet:

  1. Get your receive address. Run info and copy the receive address it prints:

    txw info --wallet wallet.json
    

    Among the output (fingerprint, xpub, oracle key) is a receive address — copy that value.

  2. Request coins from the faucet. Open the Liquid testnet faucet, paste your receive address into the address field, and request the funds. The faucet broadcasts a small amount of testnet L-BTC to your wallet.

  3. Sync the wallet once the faucet transaction has been broadcast, so the CLI picks up the new UTXO from Esplora:

    txw sync --wallet wallet.json
    

sync scans the chain, updates the persisted wallet state, and prints your balance. To re-print the last known balance without hitting the network:

txw get-balance --wallet wallet.json

Prepare UTXOs for an action

Many actions need several separate UTXOs (one per input). The prepare subcommand inspects an action and, if the wallet doesn't have enough discrete UTXOs, builds and broadcasts a split transaction to create them:

txw prepare examples/p2pk/txmanifest.json Pay --wallet wallet.json

You can also split manually:

txw split -n 4 --asset lbtc --amount-each 10000 --wallet wallet.json

With a funded, synced wallet you're ready for the first recipe: Splitting a UTXO, a warm-up with no covenant in it.