-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cat-voices): encode/decode cose documents #1408
Conversation
✅ Test Report | |
❌ Test Report | |
❌ Test Report | |
✅ Test Report | |
@dtscalac I added @saibatizoku to also do a review because hes doing the backend side of this. |
@dtscalac further to the comment above about getting @saibatizoku to do a review. He has a PR in catalyst-libs for a decoder library. see: input-output-hk/catalyst-libs#101 Work with @saibatizoku by generating some signed docs using your code here so he can validate them against his decoder. |
catalyst_voices/packages/libs/catalyst_cose/test/cose_sign_test.dart
Outdated
Show resolved
Hide resolved
catalyst_voices/packages/libs/catalyst_cose/test/cose_sign_test.dart
Outdated
Show resolved
Hide resolved
catalyst_voices/packages/internal/catalyst_voices_shared/lib/src/document/document_manager.dart
Outdated
Show resolved
Hide resolved
..._voices/packages/internal/catalyst_voices_shared/lib/src/document/document_manager_impl.dart
Outdated
Show resolved
Hide resolved
..._voices/packages/internal/catalyst_voices_shared/lib/src/document/document_manager_impl.dart
Show resolved
Hide resolved
catalyst_voices/packages/libs/catalyst_cose/lib/src/types/cose_headers.dart
Outdated
Show resolved
Hide resolved
✅ Test Report | |
✅ Test Report | |
✅ Test Report | |
✅ Test Report | |
✅ Test Report | |
✅ Test Report | |
✅ Test Report | |
✅ Test Report | |
# Conflicts: # catalyst_voices/packages/internal/catalyst_voices_shared/lib/src/catalyst_voices_shared.dart
✅ Test Report | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Description
Adds utils around encoding/decoding/signing COSE_SIGN documents for proposals. The
Document
is not limited to a proposal, it can handle anything that can be represented as a binary list: json, images or any other format that can be encoded/decoded as bytes.Limitations:
DocumentManager
assumesED25519
signature algorithm and won't work with different ones unless we decide we want to support others.DocumentManager
always compresses the document using brotli compression but it can receive both compressed or uncompressed document depending on the "content encoding" header from COSE_SIGN.Related Issue(s)
Closes #1400
Description of Changes
How to use the util:
Please confirm the following checks