Implement proper DAG-CBOR (DRISL-CBOR) encoding/decoding layer #20
Labels
No labels
breaking-change
bug
documentation
duplicate
enhancement
good first issue
help wanted
performance
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/ATProto.NET#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
ATProto.NET has a CAR file reader, but lacks proper DAG-CBOR (DRISL-CBOR) encoding/decoding for the AT Protocol data model. The spec requires deterministic CBOR encoding for signing/verification and proper round-tripping between JSON and CBOR representations.
Spec Reference
From the Data Model specification:
Required capabilities
$linkobjects ↔ CID tag 42$bytesobjects ↔ CBOR byte strings$typediscriminator preservation$bytesbase64 encoding$linkCID format$prefix field handlingCurrent state
The project uses
System.Formats.Cborfor basic CAR reading, but doesn't have a proper AT Protocol data model layer that handles deterministic encoding, CID computation, or JSON↔CBOR conversion.Why this matters
Implemented in commit
bc2c651. Added DagCborEncoder, DagCborDecoder, and CidComputation with full DRISL-CBOR spec compliance: deterministic encoding, CID tag 42, sorted keys, no floats, Base32Lower CID strings.