From c0ab85119fdae731e364beead824ad632b20525a Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 17 Apr 2023 11:25:22 -0700 Subject: [PATCH] feat: add non-dag codec variants (json/cbor) We now CBOR, at least, in Filecoin when we want structured data that can't have links. --- cid.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cid.go b/cid.go index f182424..9094be1 100644 --- a/cid.go +++ b/cid.go @@ -81,6 +81,10 @@ const ( DagJSON = 0x0129 // https://ipld.io/docs/codecs/known/dag-json/ Libp2pKey = 0x72 // https://github.com/libp2p/specs/blob/master/peer-ids/peer-ids.md#peer-ids + // Non "dag" variants of common codecs + CBOR = 0x51 // Regular (arbitrary) CBOR. + JSON = 0x0200 // Regular (arbitrary) JSON. + // other GitRaw = 0x78 DagJOSE = 0x85 // https://ipld.io/specs/codecs/dag-jose/spec/