grpc-libp2p-client is a browser-based gRPC client library built on libp2p, enabling direct peer-to-peer gRPC communication from browsers to libp2p servers. It supports all four gRPC modes (Unary, Server Streaming, Client Streaming, Bidirectional Streaming). Version 0.0.42 is the current stable release; the project appears to be in early development with active commits. Key differentiators: browser-first (uses WebRTC, noise, yamux), protobuf-encoded messages, no dependency on gRPC-web or HTTP/2. Ideal for decentralized applications requiring secure, efficient P2P gRPC.
npm install grpc-libp2p-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create libp2p node with WebRTC, noise, yamux, then instantiate Libp2pGrpcClient and perform a unary call.
Use a protobuf library like protobufjs to encode/decode messages manually before passing to libp2pGrpcClient methods.
Always start the libp2p node before calling new Libp2pGrpcClient() or ensure the client handles it (check docs).
Pin to exact version in package.json (e.g., "grpc-libp2p-client": "0.0.42") and review changelogs before upgrading.
Wrap calls in try/catch and handle errors appropriately; responses are raw bytes.
Use exact mode strings: 'server-streaming', 'client-streaming', or 'bidi-streaming' (case-sensitive).
Ensure the node is created with required transports and encryption: include webRTC and noise in config.
Call await node.start() before using node.peerId or passing node to Libp2pGrpcClient.
Install with npm install grpc-libp2p-client, and use ES module import syntax (type: "module" in package.json or .mjs extension).
Double-check the method path format: it should be '/package.Service/Method' (case-sensitive).
No dependency data recorded yet.