-
Notifications
You must be signed in to change notification settings - Fork 515
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
Transform to and from 'did:key' style keys in oob messages #639
Transform to and from 'did:key' style keys in oob messages #639
Conversation
Signed-off-by: Nicholas Rempel <[email protected]>
Signed-off-by: Nicholas Rempel <[email protected]>
Signed-off-by: Nicholas Rempel <[email protected]>
@@ -57,3 +59,19 @@ def b58_to_bytes(val: str) -> bytes: | |||
def bytes_to_b58(val: bytes) -> str: | |||
"""Convert a byte string to base 58.""" | |||
return base58.b58encode(val).decode("ascii") | |||
|
|||
|
|||
def naked_to_did_key(key: str) -> str: |
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.
FYI @TelegramSam
Codecov Report
@@ Coverage Diff @@
## master #639 +/- ##
=======================================
Coverage 98.70% 98.70%
=======================================
Files 250 250
Lines 13389 13404 +15
=======================================
+ Hits 13215 13230 +15
Misses 174 174 |
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.
otherwise this looks good
Signed-off-by: Nicholas Rempel <[email protected]>
Thanks @sklump, cleaned up those issues |
Note that there's samey code in attachment decorator: https://github.com/hyperledger/aries-cloudagent-python/blob/240366c9f1dd16c389dd55daec9a8ae4a49305d2/aries_cloudagent/messaging/decorators/attach_decorator.py#L209 I will wait for this PR to merge and then I think these conversions, plus something like |
This pull request converts to and from
did:key
style keys to conform with https://github.com/hyperledger/aries-rfcs/tree/master/features/0360-use-did-key