Copy the .env.sample
to .env
.
Update the HOOKS_COMPILE_HOST
variable.
Install:
npm i -g @transia/hooks-toolkit-cli
Use:
You can initialize a new project by running:
hooks-toolkit-cli init
To build the c contracts, run:
hooks-toolkit-cli compile-c contracts build
This will compile the contracts
directory and output the .wasm
files into the build
directory.
To build the js contracts, run:
hooks-toolkit-cli compile-js contracts/base.ts build
This will compile the base.ts
file and output the .bc
file into the build
directory.
To listen to the debug stream, run:
hooks-toolkit-cli debug "Account 1" rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn
Install:
npm install @transia/hooks-toolkit-cli
Usage:
import { buildDir } from "@transia/hooks-toolkit-cli";
const dirPath = "my/path/to/hooks/root/dir";
const outDir = "my/build/wasm/directory";
await buildDir(dirPath, outDir);
yarn run build
pkg .
npm publish --access=public