Skip to main content

Overview

Lambit gives TypeScript developers a functional authoring surface for Bitcoin Script contracts. The public flow is the same in every guide: define a named contract(...), bind props by calling it, inspect the artifact, and use init(...) when a runtime instance needs to be deployed or spent.

import { P2PKH } from '@opcat-labs/lambit';

const p2pkh = P2PKH({ addr: '00112233445566778899aabbccddeeff00112233' });

console.log(p2pkh.artifact.contract); // P2PKH
console.log(p2pkh.artifact.hex); // 76a9<addr>88ac

Where It Fits

  • Use contract() and method() when you want pure TypeScript definitions that compile to artifact JSON.
  • Use createMemoryProvider() for offline tests and reproducible examples.
  • Use createTestnetProvider() and createWifSigner() when you are ready to deploy to the OP_CAT testnet backend.
note

The guides here are the public teaching path for contract authors. Internal release and parity notes are intentionally kept out of the published site.

What's Next