npm ci
npm testNo native compile is required for the core JS unit/integration tests in this repo.
The fabric npm binary is the Node harness (scripts/fabric.js) for the Blessed TUI (chat default). Optional fabric.node accelerates a tiny API surface (e.g. doubleSha256); see docs/CLI-BINARY.md and functions/fabricNativeAccel.js.
Bundled executable: npm run make:binary (pkg).
The Node N-API addon implements peer/message helpers and Bitcoin-related bindings (binding.gyp). Build when you need C parity features or JS access to binding.cc exports.
npm ci
npm run build:cOutputs under build/Release/fabric.node (ignored by git — see .gitignore).
| Component | Linux (typical) | macOS (Homebrew) |
|---|---|---|
| Node | 22.x (see .nvmrc / package.json engines) |
same |
| Build | build-essential, Python 3.x (for node-gyp) |
Xcode CLT |
| secp256k1 | libsecp256k1-dev where available, or install to /usr/local |
brew install secp256k1 |
| libwally-core | Build from libwally-core or distro packages if present | brew install libwally-core |
| noise | Static or shared libnoiseprotocol / libnoisekeys on linker path |
Install to /usr/local/lib (e.g. from source) |
Headers and library search paths are defined in binding.gyp under conditions for OS=='linux' and OS=='mac'. On Apple Silicon, Homebrew often uses /opt/homebrew/opt/...; on Intel macOS or custom installs, /usr/local may be used instead — adjust binding.gyp or use symlinks if the linker reports missing -lwallycore or -lsecp256k1.
node -e "console.log(require('fs').existsSync('build/Release/fabric.node') ? 'ok' : 'run npm run build:c')"Wire-format and body-hash alignment between C and JS are summarized in docs/C-JS-PARITY.md.