Runtime support
| Surface | Support and requirements |
|---|---|
| Node.js 22, 24, 26 | CI tests ESM, CommonJS, TypeScript, workflows and packaged installation. Node 22 is the minimum declared version. |
| Modern browsers | Bundled ESM and the NanoPay script global are tested in Chromium, including mnemonic recovery, signing and work. Web Crypto needs a secure context (HTTPS or localhost). RPC servers must allow CORS. |
| Web Workers | Browser-tested local WASM work. Each worker has its own module cache. Main-thread and Worker builds need Web Crypto and WebAssembly. |
| Node worker threads | The Node bundle can run in a worker thread; the library does not start workers for you. |
| Electron | Node code can run in the main process; browser code can run in a renderer with the required APIs. No Electron-specific adapter is included or tested. |
| Deno, Bun, edge/serverless runtimes | Expected to work where npm compatibility, native fetch, Web Crypto, BigInt and WebAssembly compilation are available. These runtimes are not currently tested in CI. Some edge platforms restrict dynamic WASM compilation or runtime CPU time; use RPC work there. |
| React Native | Requires compatible cryptographic randomness, Web Crypto for mnemonic PBKDF2, and fetch. Local work additionally requires WebAssembly support. Not tested; no React Native polyfills or native module are bundled. |
Cryptographic and account functions run offline. Starting in 0.2.0, RPC workflows use BerryPay's public Nano mainnet endpoint by default; supply your own URL to override it. In 0.1.0 the URL is required. Live notifications still take an explicit WebSocket URL and need a browser-compatible WebSocket implementation; supply a factory if your runtime lacks one. See node configuration for BerryPay's URLs and account-filter requirement.
Focused nanopay/keys, /amounts, /blocks, /rpc, /payments and /confirmations imports do not include the local work engine. Mnemonic dependencies and the English word list live in /mnemonic and the full main bundle. Only import /work where local WASM execution is supported.
Keys, block hashing/signing, amounts and URI helpers are synchronous. Mnemonic PBKDF2 uses native Web Crypto asynchronously, and mnemonic child derivation is synchronous once the wallet is created. RPC, work generation and transaction workflows return Promises; confirmation events use an async iterator.