A gRPC client for connecting to BCHD, a Bitcoin Cash full node implementation. Version 0.15.2 provides a JavaScript/TypeScript interface to BCHD's gRPC API, supporting transaction queries, blockchain data retrieval, and SLP token metadata (when node has SLP index enabled). This is a lean wrapper over gRPC, with minimal overhead compared to REST APIs. It supports both Node.js and browser (via grpc-bchrpc-web). The library is maintained by SimpleLedger and has a moderate release cadence, with updates tied to BCHD protocol changes.
npm install grpc-bchrpc-nodeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a gRPC client connecting to a public BCHD instance, fetches blockchain info, and prints height and user agent.
Use import statements or dynamic import() in CommonJS files.
Use `sslCredentials: grpc.credentials.createSsl()` or pass a valid cert path via `rootCertPath` until further notice.
Always include `reversedHashOrder: true` in request objects for methods like `getRawTransaction`, `getTransaction`, or `getMerkleProof`.
Check node capabilities via `getBlockchainInfo` and verify SLP index is active before calling SLP-specific RPCs.
Replace `import GrpcClient from 'grpc-bchrpc-node'` with `import { GrpcClient } from 'grpc-bchrpc-node'`.Verify BCHD version supports the method. For example, SLP methods require BCHD with SLP index enabled.
Run `npm install @grpc/grpc-js` alongside grpc-bchrpc-node.
Update grpc-bchrpc-node to the latest version and ensure BCHD is up to date.