
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
loro-protocol
Advanced tools
Compact binary wire protocol for collaborative CRDTs (Loro/Yjs), with encoders/decoders and bytes utilities
Binary wire protocol for Loro CRDTs (TypeScript). Provides compact encoders/decoders for all protocol messages, bytes utilities, and helpers for the %ELO end-to-end encrypted flow (AES‑GCM with 12‑byte IV and exact-header AAD).
pnpm add loro-protocol
BytesWriter, BytesReader) with varUint/varBytes/varStringSee protocol.md and protocol-e2ee.md at the repo root for the ground‑truth spec.
Encode and decode messages:
import { encode, decode, CrdtType, MessageType } from "loro-protocol";
const join = encode({
type: MessageType.JoinRequest,
crdt: CrdtType.Loro,
roomId: "room-1",
auth: new Uint8Array(), // join metadata (auth/session tokens, etc.)
version: new Uint8Array(),
});
const msg = decode(join);
console.log(msg.type); // 0x00 JoinRequest
%ELO encrypted records (AES‑GCM):
import {
EloRecordKind,
encryptSnapshot,
encryptDeltaSpan,
decryptEloRecord,
encodeEloContainer,
decodeEloContainer,
parseEloRecordHeader,
} from "loro-protocol";
// Encrypt a snapshot
const key = crypto.getRandomValues(new Uint8Array(32));
const plaintext = new Uint8Array([1, 2, 3]);
const { record } = await encryptSnapshot(plaintext, { vv: [], keyId: "k1" }, key);
const container = encodeEloContainer([record]);
// Later, parse and decrypt
const [rec] = decodeEloContainer(container);
const parsed = parseEloRecordHeader(rec);
const out = await decryptEloRecord(rec, async () => key);
console.log(parsed.kind === EloRecordKind.Snapshot, out.plaintext);
Notes
ct.encode(msg), decode(buf), tryDecode(buf)BytesWriter, BytesReaderencodeEloContainer, decodeEloContainer, parseEloRecordHeader, encryptSnapshot, encryptDeltaSpan, decryptEloRecord%ELO crypto uses Web Crypto (globalThis.crypto.subtle). Node 18+ provides it via globalThis.crypto.
MIT
FAQs
Compact binary wire protocol for collaborative CRDTs (Loro/Yjs), with encoders/decoders and bytes utilities
We found that loro-protocol demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.