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

Introduction

Welcome to The tx-manifest Cookbook — a recipe-driven guide to writing manifests: machine-readable descriptions of multi-UTXO protocols on Bitcoin and Liquid.

This book is not a top-to-bottom reference manual. It is a cookbook in the style of the Rust Cookbook: a sequence of small, self-contained recipes, each solving one concrete problem and introducing one or two new concepts. You can read it straight through, or jump to the recipe that matches what you are trying to do.

Who this is for

  • Protocol authors who have a Simplicity contract and want a portable description of the transactions that drive it.
  • Wallet and tooling developers who want to read a single file and know which UTXOs to watch, which transactions are valid, and which witnesses to construct.
  • Anyone trying to understand an unfamiliar on-chain protocol without reverse-engineering it from source.

How the book is organised

  1. Getting Started explains what a manifest is, gets the tx-manifest-wallet CLI built and a wallet ready, and dissects the top-level structure of a file.
  2. The Cookbook is the heart of the book. Each recipe builds on the previous one, starting from a no-covenant warm-up (splitting a UTXO) and a single key locking a single output, then growing toward covenants, issuance, and multi-step lifecycles.
  3. The Full Walkthrough ties every concept together on a real peer-to-peer lending protocol.
  4. The Appendix is the quick-reference material: the generated field reference, type tables, the formula language grammar, the CLI command list, and a guide for implementing your own wallet.

How to read a recipe

Every recipe in the Cookbook follows the same shape:

Problem — one sentence describing the goal.

Recipe — the manifest JSON you can copy and adapt.

How it works — an annotated tour of the new fields.

Every JSON snippet and command in this book is drawn from real files in the reference wallet (examples/p2pk/, examples/last_will/, examples/lending/) and its CLI — nothing here is invented.

This book describes manifest format 0.2.0. That version string goes in every manifest as manifest_version, and it is checked before anything else runs — a file written against a different revision is refused outright rather than half-understood.

For the exhaustive field list — every type, default and constraint — see the manifest field reference, which is generated from the schema the reference wallet parses with.

Let's start with the big picture: what is a manifest?