OverviewFilesCommitsIssuesDocsReleasesPeers

atproto-identity commits / 14acccf

atproto-identity: encodeLabel/decodeLabel (label-feed wire codec)
DAG-CBOR encode/decode of a full (signed) label — one block of a label feed. sig (bytes) round-trips. Distinct from labelSigningBytes (which strips sig for the signature domain). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
14acccfcb329a5fa4456dfa252abcb5ae325c2b7
by plankatron <fleeky@gmail.com> · 2026-07-14T17:59:07.000Z

Changed files (1) +5 -0

lib/labels.js +5 -0
……@@ -45,3 +45,8 @@ export function verifyLabel (label, labelerDidKey) {
4545 if (!label || !label.sig) return false
4646 return verifySig(labelSigningBytes(label), label.sig, labelerDidKey)
4747}
48
49// Wire codec for a full (signed) label — one block of a label feed. `sig` (bytes) round-trips as
50// DAG-CBOR bytes. Distinct from labelSigningBytes (which strips sig for the signature domain).
51export function encodeLabel (label) { return dagCbor.encode(label) }
52export function decodeLabel (bytes) { return dagCbor.decode(bytes) }