lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README | LICENSE

README (2554B)


      1 # radroots_events_codec
      2 
      3 This is the README for `radroots_events_codec`, which provides canonical event
      4 codecs and tag builders for the `radroots` core libraries.
      5 
      6 ## Overview
      7 
      8  * canonical decoders for event content, tags, job envelopes, profiles, Field
      9    event envelopes, NIP-29 group events, and wire representations;
     10  * tag builder helpers for the same event families exposed by
     11    `radroots_events`;
     12  * parsed view and error types for codec-driven validation and routing;
     13  * optional `serde_json` and `radroots_nostr` integration for JSON and wire
     14    interop.
     15 
     16 ## Field Event Codecs
     17 
     18 The Field codec surface validates the public Nostr event substrate exposed by
     19 `radroots_events`:
     20 
     21  * workspace manifests use kind `30078`, JSON content, a schema marker, `d` and
     22    `h` routing tags, owner tags, relay references, and Field-supported kind
     23    declarations;
     24  * CRDT changes use kind `78`, JSON content, `h`, `d`, `a`, optional author `p`,
     25    and semantic `t` tags, with base64url change payload validation;
     26  * farm files use kind `1063`, NIP-94-compatible metadata tags, a workspace
     27    address, a farm group id, an owner document tag, lowercase SHA-256 hashes,
     28    and optional caption text as content;
     29  * NIP-42 relay auth and NIP-98 HTTP auth events require empty content and the
     30    auth tags required by their protocols;
     31  * NIP-29 group codecs preserve the protocol distinction between `h`-routed
     32    group operations and `d`-routed addressable group state for the supported
     33    `9000`, `9001`, `9002`, `9005`, `9007`, `9008`, `9009`, `9021`, `9022`,
     34    `39000`, `39001`, `39002`, and `39003` subset.
     35 
     36 These codecs validate event shape, routing tags, hashes, and payload encoding.
     37 They do not validate private Field task, work-session, harvest, approval, or
     38 authorization semantics; those remain application and CRDT document concerns.
     39 The group codecs use bare metadata marker tags such as `private`, `restricted`,
     40 `hidden`, and `closed`, `supported_kinds` declarations, and `code` tags for
     41 invite and join flows. They preserve optional reason content on user management
     42 and moderation events. LiveKit room metadata and live participant state are
     43 deferred. SDK-owned wasm bindings expose deterministic JSON tag builders for the
     44 same Field and NIP-29 families.
     45 
     46 ## Copyright
     47 
     48 Except as otherwise noted, all files in the `radroots_events_codec`
     49 distribution are
     50 
     51  Copyright (c) 2020-2026 Tyson Lupul
     52 
     53 For information on usage and redistribution, and for a DISCLAIMER OF ALL
     54 WARRANTIES, see LICENSE included in the `radroots_events_codec` distribution.