Description
Summary
Create an encoder for catalyst signed documents that only uses minicbor.
Description
Testing
Encoding test case
- Generating our CatalystSignedDocument object
- Encoding into bytes
- Trying to decode using
coset
library
Acceptance Criteria
- The encode should be directly targeted to catalyst signed documents, and not general COSE.
- It should create a Catalyst Signed Document To Be Signed, that has all fields, except for signatures.
- It should have a signing method that adds a single signature (Ed25519) to the document, and allow multiple signatures to be attached.
- The signature must be given a catalyst ID, and the ED25519 Private key to sign with.
- The document structure should store both the raw signed/unsigned cbor document, as well as the decoded data from within the document.
Notes
Minicbor already creates data using the smallest form, so its automatically going to create a deterministic encoded cbor document.
The only exceptions come with arrays and maps, where the encoder must only use definite length arrays and maps, and must order the map keys according to the specification.
This is simply a matter of checking and setting the size of arrays and maps correctly, and creating the map keys in the appropriate order, and requires no special processing otherwise for encode.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
🏗 In progress