zcash.js (@zcashlabs/zcash.js) is an experimental TypeScript/JavaScript SDK released by Zcash Labs on 26 October 2026. It lets developers build wallets, light clients, dashboards, and applications that interact with the Zcash network from Node.js and the browser.
Status: Experimental (v0.1.1). Persistent Node wallets currently require Linux +
flock. Complete live-browser send/receive and historical wallet-database migration are not yet fully qualified. Always check the official documentation before production use.
createPublicClient — stateless JSON-RPC queries and transaction observationcreateLightClient — lightwallet queries and streams (native gRPC on Node, gRPC-Web in the browser)createWalletClient — local accounts, scanning, proposals, signing, submission, and recorded payment recoverybigint amounts, network validation, viewing/address tools, and PCZT utilitiesUse Node.js 22.23.4 (the version pinned by the package).
npm install @zcashlabs/zcash.js@0.1.1
"type": "module" in package.json).import { createLightClient } from '@zcashlabs/zcash.js';
const light = await createLightClient('https://testnet.zec.rocks:443', {
network: 'testnet',
});
const tip = await light.getTip();
console.log(tip.height, tip.hash);
network option defaults to mainnet (provide a matching endpoint).createPublicClient is also available for pure JSON-RPC usage.import { createWalletClient } from '@zcashlabs/zcash.js';
const wallet = await createWalletClient('https://testnet.zec.rocks:443', {
network: 'testnet',
storage: { kind: 'node-filesystem', path: './my-wallet' }, // Linux only for durable storage
});
try {
const accounts = await wallet.accounts.list();
console.log(accounts);
} finally {
await wallet.close();
}
| Environment | Storage option |
|---|---|
| Node (durable) | { kind: 'node-filesystem', path: './my-wallet' } |
| Browser | { kind: 'browser-opfs', name: 'my-wallet' } |
| Disposable | { kind: 'memory' } |
Important defaults (as of v0.1.1):
wallet.sync() before proposing a paymentwallet.sync()wallet.send()The application owns the mnemonic bytes. Clear them from memory when they are no longer needed. Always present a clear approval UI that shows every recipient, amount, fee, pool, and expiry.
See the official Wallet walkthrough for a complete working example.
| Capability | Node | Browser |
|---|---|---|
| Package | Node 22.23.4 + ESM | Modern ESM bundler + WebAssembly |
| Light queries | Native gRPC | gRPC-Web + CORS |
| Durable storage | Linux + flock only | OPFS (secure context) |
| Disposable storage | memory | memory |
Additional limitations:
await wallet.close()@zcashlabs/zcash.jsThis guide is based on @zcashlabs/zcash.js@0.1.1 (October 2026). The SDK is under active development — always prefer the official documentation for the latest API and limitations.