Skip to main content

Install CLI & SDK

Prerequisites

  1. Install Node.js (required version >=16) and NPM on your machine by following the instructions here.
  1. Install Git.
note

On Mac computers with Apple silicon like M1/M2, make sure Rosetta is installed. If not, it can be installed with the following command.

softwareupdate --install-rosetta --agree-to-license

CLI Tool

The OP_CAT Layer CLI tool is used to easily create, compile and publish Lambit projects. The CLI provides best practice project scaffolding including dependencies such as Lambit, a test framework (Mocha), code auto-formatting (Prettier), linting (ESLint), and more.

Install it globally on your machine.

npm install -g @opcat-labs/cli-opcat

Run the CLI tool directly with npx and try it out by creating a demo project:

npx @opcat-labs/cli-opcat project demo

Lambit

Lambit is the TypeScript smart-contract framework for developing OP_CAT smart contracts.

The Lambit package is available on npm as @opcat-labs/lambit.

Installation

For npm users:

npm install @opcat-labs/lambit

For yarn users:

yarn add @opcat-labs/lambit

Usage

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

Refer to the Lambit basics and the guides on this site for detailed usage examples and API references.