Installation
rpckit is distributed as multiple packages. Install only what you need.
Quick Start
For most applications using WebSocket:
Packages
Core
The core package provides shared types and utilities. It's automatically installed as a dependency of all transport packages.
npm i @rpckit/coreExports:
parse()- Create transports from URL stringscreateParse()- Factory for custom parse functions with overridden package mapsBatchScheduler- Request batching utilitywithRetry()- Exponential backoff retry wrapper- TypeScript types and interfaces
Electrum Cash types and a pre-configured parse are available via @rpckit/core/electrum-cash.
WebSocket Transport
WebSocket transport with subscriptions, reconnection, and keep-alive.
npm i @rpckit/websocketWorks in browsers and Node.js.
TCP Transport
TCP transport with TLS support. Node.js only.
npm i @rpckit/tcpHTTP Transport
Stateless HTTP transport. Works in browsers and Node.js.
npm i @rpckit/httpFallback Transport
Meta-transport for failover across multiple transports.
npm i @rpckit/fallbackCluster Transport
Meta-transport for m-of-n quorum consensus.
npm i @rpckit/clusterFull Installation
To install all packages:
npm i @rpckit/core @rpckit/websocket @rpckit/tcp @rpckit/http @rpckit/fallback @rpckit/clusterRequirements
- Node.js 18+ or modern browser
- TypeScript 5.0+ (for type inference)