This package is just a simple example on how JS Hooks can be coded up, compiled, deployed.
This is not a toolkit, this is an reference implementation of the build steps for future actual toolkits.
- Make sure you have
wasmtime
installed: https://docs.wasmtime.dev/cli-install.html - Make sure you are running the JS Hooks Dev environment on your machine: https://github.com/Xahau/jshooks-alpha, clone and run:
./install && ./logs
npm install
npm run getwasm
- Write a HooksJS contract, e.g.
contracts/sample.ts
- Build,
npm run build
(configured to buildsample.ts
) - Deploy, run
npm run deploy
(configured to deploysample.ts
)