Skip to main content

Installation

Install Lambit in a TypeScript project, then use the CLI to scaffold, compile, or run the guarded test targets.

npm install @opcat-labs/lambit
npx @opcat-labs/lambit scaffold ./my-lambit-app
cd ./my-lambit-app
npm test

Repository Setup

When you are working in this repository instead of a generated project, use the local scripts:

npm install
npm run build
npm test

CLI Commands

  • npx @opcat-labs/lambit compile ./contracts/p2pkh.ts --out-dir artifacts
  • npx @opcat-labs/lambit artifact ./contracts/p2pkh.ts --export P2PKH --output artifacts/P2PKH.json
  • npx @opcat-labs/lambit scaffold ./my-lambit-app
  • npx @opcat-labs/lambit test --testnet
caution

lambit test --testnet is guarded. Set LAMBIT_RUN_TESTNET_E2E=1 and a funded TESTNET_WIF only when you intend to spend testnet coins.

What's Next