Node.js native binding for abieos, with some improvements:
- Internal loaded contract map
- deleteContract: to remove the loaded contract from memory (now in vanilla abieos too)
Made with ♥ by EOS Rio
Only Linux is supported for now
- Typescript typings included
- Prebuilt binary included (Clang 18 required to build)
- Now supports NodeJS, Deno, and Bun runtimes.
npm i @eosrio/node-abieos --save
CommonJS
const nodeAbieos = require('@eosrio/node-abieos');
ES Modules (NodeJS, Bun)
import {Abieos} from "@eosrio/node-abieos";
const abieos = Abieos.getInstance();
Deno
# examples/basic.cjs can be run with:
deno run --allow-ffi --allow-read examples/basic.cjs
# For an example using the published npm package with Deno:
# Check the examples/deno-abieos-test folder
cd examples/deno-abieos-test
deno run --allow-ffi --allow-read main.ts
Bun
# examples/basic.mjs can be run with:
bun run examples/basic.mjs
Check the /examples folder for implementation examples
Make sure you have Clang installed on your system:
We recommend using Clang 18 to build the abieos
C++ library.
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
Clone and Build
git clone https://github.com/eosrio/node-abieos.git --recursive
cd node-abieos
npm install
npm run build:linux
npm run build
For detailed and user-friendly documentation, including installation, usage, API reference, error handling, debugging, and examples, please refer to the documentation.
For contribution guidelines and developer documentation, refer to the contribution guidelines.