-
Notifications
You must be signed in to change notification settings - Fork 0
Labels
squad: gatekeepersCatalyst App Backend, System Development & Integration TeamCatalyst App Backend, System Development & Integration Team
Description
Summary
Modify the current draft implementation of the DocLocator type to starting actually define it as ipfs Cid v1
Description
- Use
ipld-core = { version = "0.4.1", features = ["serde"]}crate version - Update the
DocLocatortopub struct DocLocator(ipld_core::Cid); - Modify the
DocumentRefAPI, so it will start hashing theCatalystSignedDocbytes and properly derive aDocLocaltortype
Additional notes
Note: Only CIDv1 with multihash sha2-256 is permitted for document CIDs; implementations MUST reject other multihash functions.
CIDv1 binary encoding
- Layout (packed bytes):
cidv1 = varint(1) || varint(multicodec) || multihash. - Multihash for this PoC MUST be sha2-256 with a 32-byte digest:
multihash = varint(0x12) || varint(32) || digest[32].
- Length varies slightly (36..40 bytes) due to varint encoding of the multicodec field.
- We do not accept other multihash functions.
References
- CIDv1 specification: https://github.com/multiformats/cid
- Multicodec table: https://github.com/multiformats/multicodec
- Multihash specification: https://github.com/multiformats/multihash
Metadata
Metadata
Assignees
Labels
squad: gatekeepersCatalyst App Backend, System Development & Integration TeamCatalyst App Backend, System Development & Integration Team
Type
Projects
Status
🏗 In progress