Install CLI & SDK
Prerequisites
- Install
Node.js(require version>=16) andNPMon your machine by following the instructions here.
- 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 sCrypt projects.
The CLI provides best practice project scaffolding including dependencies such as sCrypt, a test framework (Mocha), code auto-formatting (Prettier), linting (ES Lint), 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
Typescript SDK
There is a package that is useful for developing with Typescript:
@opcat-labs/scrypt-ts-opcat
Installation
For npm users:
npm install @opcat-labs/scrypt-ts-opcat
For yarn users:
yarn add @opcat-labs/scrypt-ts-opcat
Usage
import { ... } from '@opcat-labs/scrypt-ts-opcat';
You can refer to more detailed usage examples and SDK references in this site for further information.