Other clients
This section helps you reach a go-ricochet server from a stack other than the one in the Go developer guide: an existing go-libp2p host, Dart or Flutter, a browser, Node.js or Electron, or a client you write yourself.
Two questions decide it
Section titled “Two questions decide it”1. Which transports does the server run? UDX by default, and whatever else its operator turned on. A go-ricochet 1.4.1 server runs the transports listed in server.transports: udx, tcp, quic-v1, websocket and webtransport. The default is UDX alone, through go-libp2p-udx-transport, with addresses like /ip4/203.0.113.10/udp/55223/udx. A stack that cannot speak UDX can connect only to a server that also runs a transport it has. Ask the operator, or read the server’s addresses: /tcp/... is TCP, /quic-v1 is QUIC, /ws or /wss is WebSocket, /webtransport is WebTransport. Over UDX, TCP and WebSocket the connection is secured with Noise and multiplexed with Yamux; QUIC and WebTransport bring their own TLS 1.3 and streams. See Transport.
2. Is there a Ricochet client for your language? There are three: pkg/client for Go, the ricochet package for Dart, and @go-ricochet/ricochet for JavaScript and TypeScript. Anywhere else, you implement the protocols yourself. They are length-prefixed JSON over libp2p streams; see Writing your own client.
Compatibility
Section titled “Compatibility”| Stack | Standard libp2p transports | UDX | Ricochet client |
|---|---|---|---|
| Go (go-libp2p) | Yes, when the server runs tcp, quic-v1, websocket or webtransport: a plain libp2p.New() host connects |
Yes: go-libp2p-udx-transport v0.1.8, on go-udx | Yes: pkg/client |
| Dart / Flutter (dart_libp2p) | Over TCP, when the server runs tcp |
Yes: dart_libp2p’s UDXTransport, on dart_udx 3.0 or later |
Yes: ricochet on pub.dev, 0.2.4 |
| JavaScript (js-libp2p, Node.js, Electron main process) | When the server runs a transport js-libp2p has: tcp or websocket |
Yes: @go-ricochet/libp2p-udx 0.1.1 on npm, from js-udx; Node 22 or later |
Yes: @go-ricochet/ricochet on npm, 0.1.0, over UDX or WebSocket |
| Browsers (js-libp2p) | When the server runs webtransport, or websocket with a /wss address for pages served over HTTPS |
No | Yes: @go-ricochet/ricochet 0.1.0, over WebSocket only |
| Anything else (rust-libp2p, py-libp2p, …) | When the server runs a transport the stack has, such as tcp or quic-v1 |
No: UDX exists for Go, Dart and JavaScript only | No |
Pages in this section
Section titled “Pages in this section”- Go: your own libp2p host: add
pkg/clientto a host you already run, and the options that host needs. - UDX: Go, Dart, JS: build a host that dials a server over UDX, the default transport, in each language.
- Dart client: install the
ricochetpackage, send and retrieve, and what it covers compared withpkg/client. - JavaScript client: install
@go-ricochet/ricochet, pick the browser or Node.js entry, send and retrieve, and what it covers compared withpkg/client. - Writing your own client: protocol IDs, framing, request and response shapes, status codes, and a conformance checklist.
The byte-level details are in Protocol IDs and Wire format & status codes.