To run the recipes in this book you need a wallet that understands txmanifest.
An example wallet is provided at https://github.com/stringhandler/txmanifest-wallet
This page installs that CLI and points it at a network. Creating a wallet then gets you keys and coins.
tx-manifest-walletis an example implementation of a wallet. It is a reference tool that consumes manifests and walks through the full build-and-sign lifecycle so the recipes in this book are runnable. It is not the only way to consume a manifest — any wallet can implement the same lifecycle. If you are building your own wallet, see the Wallet implementation guide for the execution lifecycle a wallet follows when executing an action.
The wallet binary is tx-manifest-wallet, and this book calls it txw
throughout — the two are interchangeable. There are two ways to get it.
The codespace installs nothing on your machine and is the fastest way to run a recipe. A local install is what you want if you would rather work in your own editor, or you are on arm64.
txw-codespace is a dev
container with the wallet already installed and nothing else. Click the badge in
its README, or from the repo page choose Code ▸ Codespaces ▸ Create codespace
on main. First creation takes a couple of minutes and ends with Ready. in the
log.
Then:
txw --helpThree things about it are worth knowing before you start:
-
work/is entirely gitignored. Put your manifests, wallets and state files there and nothing of yours can be committed by accident. Start every recipe withcd work. -
txwis a wrapper script, not a shell alias, so it works from scripts and editor tasks as well as from the prompt. -
The recipes that use bundled examples need one command first. The examples are not copied into the codespace, where they would drift from the format the installed wallet speaks. Fetch them on demand:
./scripts/fetch-examples.sh
That puts a sparse clone in
work/txmanifest-wallet/, keeping upstream'sexamples/andschema/layout so the manifests' relative$schemareferences still resolve.
It runs on x86_64 only, because that is what the wallet publishes Linux binaries for. On an arm64 machine, use a local build.
A prebuilt binary is the simplest. Grab one from the
releases page —
Linux x86_64, macOS Apple Silicon, and Windows x86_64 are published — unpack it,
and put tx-manifest-wallet on your PATH:
curl -LO https://github.com/stringhandler/txmanifest-wallet/releases/download/v0.2.2/tx-manifest-wallet-v0.2.2-x86_64-unknown-linux-gnu.tar.gz
tar xzf tx-manifest-wallet-v0.2.2-x86_64-unknown-linux-gnu.tar.gz
sudo mv tx-manifest-wallet /usr/local/bin/
alias txw=tx-manifest-wallet
txw --helpAsset names are version-stamped, so check the releases page for the current
one. The macOS and Windows builds are
tx-manifest-wallet-<version>-aarch64-apple-darwin.tar.gz and
tx-manifest-wallet-<version>-x86_64-pc-windows-msvc.zip.
Or via asdf, which is how the codespace does it, and lets you keep several versions side by side (Linux x86_64 and macOS Apple Silicon; asdf is shell-based, so not Windows):
asdf plugin add tx-manifest-wallet https://github.com/stringhandler/asdf-tx-manifest-wallet.git
asdf install tx-manifest-wallet latest
asdf set -u tx-manifest-wallet latestOr from source, which is the arm64 answer and the one to use if you want to
change the wallet itself. It is the txmanifest_wallet crate of a standard
Cargo workspace:
git clone https://github.com/stringhandler/txmanifest-wallet
cd txmanifest-wallet
cargo build --release # binary at ./target/release/tx-manifest-wallet
alias txw="$(pwd)/target/release/tx-manifest-wallet"
txw --helpA source clone also gives you examples/ directly, which is what the recipes'
bundled-example paths refer to.
This book is written against manifest format 0.2.0, and a wallet checks that
before it does anything else. Any 0.2.x release speaks it; a 0.1.x one will
refuse every manifest here.
txw --versionIn the codespace the version is pinned in .tool-versions and can be changed
without a rebuild:
./scripts/set-wallet-version.sh latestThroughout the book, commands are written as txw <subcommand>. Manifest paths
like examples/p2pk/txmanifest.json are relative to your current directory — run
them from a source clone, or from work/txmanifest-wallet/ in the codespace.
You do not need
simcinstalled. The SimplicityHL compiler is linked into the wallet as a library, sotxwcompiles the.simffiles a manifest points at in-process. Nothing shells out, and there is no separate toolchain to keep in step. Thesimc "=x.y.z";directive inside a.simfstill applies — it is enforced by that same linked compiler.
The CLI keeps a small config file with two keys: the default network and the default Esplora URL. Set them once:
txw config default_network testnet
txw config default_esplora https://blockstream.info/liquidtestnet/apiRun config with no arguments to print the current values:
txw configMost subcommands also accept --network and --esplora flags to override the
defaults per-invocation.
With the CLI installed and pointed at testnet, the next step is a wallet: Creating a wallet.