p2p-cljs.git

ird-p2p-cljs — ClojureScript peer SDK for the ird p2p service on Node.js (18+): rooms that find each other through the app's signaling relay, WebRTC data channels with TURN and the relay as fallback, end-to-end encryption, invite links, verified identities, and the offline mailbox. core.async channels end to end; a sibling of p2p-swift, byte-for-byte interoperable with it.

Use as a dependency

No registry — a source library served straight from this domain, consumed as a git dependency (with shadow-cljs reading deps.edn):

;; deps.edn
{:deps {ro.ird/ird-p2p-cljs {:git/url "https://ird.cod-sursa.ro/p2p-cljs.git"
                             :git/tag "v0.3.1" :git/sha "0000000"}
        thheller/shadow-cljs {:mvn/version "3.5.0"}}}

The latest release is v0.3.1 (0000000). To pin that exact commit:

ro.ird/ird-p2p-cljs {:git/url "https://ird.cod-sursa.ro/p2p-cljs.git"
                     :git/sha "0000000000000000000000000000000000000000"}

Add ws to your package.json dependencies (the default relay socket); ClojureScript and core.async come from deps.edn. These coordinates are filled from releases.json, which scripts and agents can read directly (head, tag, tag_sha per repo).

Quickstart

(require '[cljs.core.async :refer [go 

Every async call returns a core.async channel delivering one value — the result or an ex-info error. The full guide — one API for the /ws relay or libp2p, identity and invite links, the offline mailbox, errors, origins for Node clients, WebRTC — is in the repo's README.md; the end-to-end envelope format is in PROTOCOL.md.

Clone

git clone https://ird.cod-sursa.ro/p2p-cljs.git

browse the source in your browser →

What's inside

License

MIT.