Skip to content
Quickstart · 5 minutes

From download to your first piece of BVM bytecode.

Every command on this page is taken from the official installation and tutorial pages; if your local platform diverges, follow docs.installation.

This is the 5-minute taster — download, compile, debug. The full installation guide is the source of truth for platform specifics. docs.installation.

Step 01

Download a release.

Linux package layout
utxo_compiler-v1.0.0-linux/
├── utxo_compiler        # executable
├── doc/                 # documentation
├── install.sh           # install script
└── VERSION              # version info
Windows package layout (64 / 32-bit)
utxo_compiler-v1.0.0-windows-64/
├── utxo_compiler.exe    # Windows executable
├── libstdc++-6.dll      # C++ standard library
├── libgcc_s_seh-1.dll   # GCC runtime
├── libwinpthread-1.dll  # threading runtime
├── doc/                 # documentation
├── install.bat          # Windows install script
├── DEPENDENCIES.txt     # dependency notes
└── VERSION              # version info

macOS support is planned, not yet shipped.

Step 02

Verify the install.

verify.sh
# Linux
./builds/linux/bin/utxo_compiler --version
verify.ps1
# Windows (PowerShell)
.\builds\windows-64\bin\utxo_compiler.exe --version

Step 03

Write a P2PKH contract.

Create a new file, p2pkh.ct:

p2pkh.ct
Contract P2PKH:
    def verify(sig: hex, pubKey: hex):
        pubKey_copy = pubKey.Clone()
        pubKeyHash = Hash160(pubKey_copy)
        EqualVerify(pubKeyHash, self.pubKeyHash)
        result = CheckSig(sig, pubKey)
  • Hash160 consumes its input — and the next line, CheckSig(sig, pubKey), still needs pubKey, so we Clone it first.
  • EqualVerify aborts immediately on mismatch, matching the "must satisfy" semantics of constraint checks.

Step 04

Compile.

compile.sh
./utxo_compiler p2pkh.ct

On success the compiler emits JSON-shaped bytecode containing the contract name (P2PKH), the public function verify(sig: hex, pubKey: hex), and the corresponding bytecode plus debug info (depending on flags).

Step 05

Debug.

debug.sh
./utxo_compiler p2pkh.ct --debug

Inside the interactive debugger, supply parameters:

debugger session
Enter parameters for verify:
  sig    [hex]: 0x3045022100...
  pubKey [hex]: 0x03ab12...
  • Passing path: a public key matching pubKeyHash and the matching signature → EqualVerify clears, CheckSig returns 1, the contract returns true.
  • Failing path: type a wrong key or signature on purpose → the failing step rejects immediately.