{"_id":"@anvoio/node-core-abi","name":"@anvoio/node-core-abi","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@anvoio/node-core-abi","version":"1.0.0","publishConfig":{"access":"public","tag":"latest"},"description":"Node bindings for core-abi: binary <> JSON conversion using ABIs. Native Anvo Core (core_net) support with full Antelope/EOSIO compatibility.","main":"./dist/core-abi.js","types":"./dist/core-abi.d.ts","type":"module","exports":{".":{"types":"./dist/core-abi.d.ts","import":"./dist/core-abi.js","require":"./dist/core-abi.cjs"}},"scripts":{"install":"node -e 'process.exit(0)'","build:linux":"cmake-js compile && node scripts/copy-module.mjs","build":"tsup","test":"node --test test/**/*.test.js","test:coverage":"c8 --reporter=text --reporter=lcov node --test test/**/*.test.js","test:watch":"node --test --watch --experimental-test-coverage test/**/*.test.js","tsc:watch":"tsc --watch","clean":"cmake-js clean","build:win":"cmake-js","build:mac":"cmake-js","update_version":"node scripts/update-version.mjs"},"repository":{"type":"git","url":"git+https://github.com/AnvoIO/node-core-abi.git"},"author":{"name":"Stratovera LLC"},"license":"MIT","bugs":{"url":"https://github.com/AnvoIO/node-core-abi/issues"},"homepage":"https://github.com/AnvoIO/node-core-abi#readme","devDependencies":{"@microsoft/api-extractor":"^7.57.2","@types/node":"^25.3.0","@wharfkit/antelope":"^1.1.1","c8":"^10.1.3","cmake-js":"^8.0.0","node-addon-api":"^8.5.0","tsup":"^8.5.1","typescript":"^5.9.3"},"binary":{"napi_versions":[10]},"gitHead":"b9c5f3303c8ff5e9e00afebc146cc5d73377fd7d","_id":"@anvoio/node-core-abi@1.0.0","_nodeVersion":"22.22.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-UfJUWujnnhyuQjDYgbbbH0y/ww8BpX6i95nvfk/bAeZzxZmQrBXKR84uq1NYyfUiFl/h98z0rF+c4N+trgZMRw==","shasum":"38c7e2eb9ccea239dc7e50a6498951fadf61806a","tarball":"https://registry.npmjs.org/@anvoio/node-core-abi/-/node-core-abi-1.0.0.tgz","fileCount":15,"unpackedSize":640803,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDYeCmx4+RGEim2o0uKllHOCROL1Oni7LcPRqBI1vso6AiEA6zF1xsbFEk2qylklzf533ekr00Davlk0oh8ibOo2Ryg="}]},"_npmUser":{"name":"rwcii","email":"robert@anvo.io"},"directories":{},"maintainers":[{"name":"rwcii","email":"robert@anvo.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/node-core-abi_1.0.0_1776381537922_0.4003028135567368"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-16T23:18:57.822Z","1.0.0":"2026-04-16T23:18:58.110Z","modified":"2026-04-16T23:18:58.349Z"},"maintainers":[{"name":"rwcii","email":"robert@anvo.io"}],"description":"Node bindings for core-abi: binary <> JSON conversion using ABIs. Native Anvo Core (core_net) support with full Antelope/EOSIO compatibility.","homepage":"https://github.com/AnvoIO/node-core-abi#readme","repository":{"type":"git","url":"git+https://github.com/AnvoIO/node-core-abi.git"},"author":{"name":"Stratovera LLC"},"bugs":{"url":"https://github.com/AnvoIO/node-core-abi/issues"},"license":"MIT","readme":"# node-core-abi\n\n[![MIT licensed][1]][2]\n\n[1]: https://img.shields.io/badge/license-MIT-blue.svg\n[2]: LICENSE\n\nNode.js N-API native binding for [core-abi](https://github.com/AnvoIO/core-abi). Binary ↔ JSON conversion of ABI-encoded data for Anvo Core, Antelope, and EOSIO chains.\n\nBased on [eosrio/node-abieos](https://github.com/eosrio/node-abieos) with first-class support for the `core_net::abi/*` version prefix emitted by chains bootstrapped under the Anvo Core `core_net` namespace.\n\n## Features\n\n- **Native Anvo Core support** — accepts `core_net::abi/{1,2}.x` ABI version prefixes alongside `eosio::abi/{1,2}.x`.\n- **Singleton binding** — single global N-API context shared across the process.\n- **Loaded-contract map** — internal tracking with `getLoadedAbis()` and `cleanup()`.\n- **Cross-runtime** — Node.js, Deno, and Bun.\n- **TypeScript typings included.**\n\n## Install\n\n```bash\nnpm i @anvoio/node-core-abi --save\n```\n\n## Usage\n\n### Node.js (ES Modules)\n\n```typescript\nimport { CoreAbi } from '@anvoio/node-core-abi';\n\nconst coreAbi = CoreAbi.getInstance();\ncoreAbi.loadAbi('eosio.token', tokenAbiJson);\nconst hex = coreAbi.jsonToHex('eosio.token', 'transfer', JSON.stringify({\n    from: 'alice',\n    to: 'bob',\n    quantity: '1.0000 SYS',\n    memo: ''\n}));\n```\n\n### Node.js (CommonJS)\n\n```js\nconst { CoreAbi } = require('@anvoio/node-core-abi');\n```\n\n### Deno\n\n```bash\n# examples/basic.cjs can be run with:\ndeno run --allow-ffi --allow-read examples/basic.cjs\n\n# For an example using the published npm package with Deno:\ncd examples/deno-core-abi-test\ndeno run --allow-ffi --allow-read main.ts\n```\n\n### Bun\n\n```bash\nbun run examples/basic.mjs\n```\n\nSee the [examples/](./examples) folder for more.\n\n## Build from Source\n\nRequires Clang 18+:\n\n```bash\nwget https://apt.llvm.org/llvm.sh\nchmod +x llvm.sh\nsudo ./llvm.sh 18\n```\n\nClone and build:\n\n```bash\ngit clone https://github.com/AnvoIO/node-core-abi.git --recursive\ncd node-core-abi\nnpm install\nnpm run build:linux   # cmake-js compile + copy native module\nnpm run build         # tsup (TypeScript bundling)\n```\n\n## ABI Version Compatibility\n\n| Version prefix | Accepted on ingest |\n|---|---|\n| `eosio::abi/1.0` through `eosio::abi/2.x` | yes |\n| `core_net::abi/1.0` through `core_net::abi/2.x` | yes |\n\nAnvo Core emits the version prefix that matches the chain's heritage: eosio-bootstrapped chains emit `eosio::abi/*`; chains bootstrapped fresh under `core_net` emit `core_net::abi/*`. See [AnvoIO/core#105](https://github.com/AnvoIO/core/issues/105) for context.\n\n## Supported Platforms\n\n| Platform | Architecture | Status |\n|---|---|---|\n| Linux (Ubuntu 22.04+) | x86_64, ARM64 | Primary — CI tested |\n| macOS | x86_64, ARM64 | Best-effort |\n| Windows | x86_64 | Best-effort |\n\nPrebuilt binaries may not be available for all platforms; build from source if needed.\n\n## Migration from @eosrio/node-abieos\n\nDownstream consumers migrating from `@eosrio/node-abieos` need the following changes:\n\n- Package name: `@eosrio/node-abieos` → `@anvoio/node-core-abi`\n- Class name: `Abieos` → `CoreAbi`\n- Log tag: `[node-abieos]` → `[node-core-abi]`\n- Native binding file: `abieos.node` → `core-abi.node` (internal; transparent to JS consumers)\n\nThe runtime API surface is otherwise unchanged. Existing code calling `Abieos.getInstance().loadAbi(...)` becomes `CoreAbi.getInstance().loadAbi(...)`.\n\n## License\n\n[MIT](./LICENSE). See [NOTICE](./NOTICE) for upstream attributions.\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md).\n","readmeFilename":"README.md","_rev":"1-8cc692eda3f9472ff6a14d202d68788b"}