Skip to content
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

Merged
merged 6 commits into from
Aug 14, 2020

Conversation

nrempel
Copy link
Contributor

@nrempel nrempel commented Jul 29, 2020

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

Nicholas Rempel added 3 commits July 29, 2020 14:30
@@ -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:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2020

Codecov Report

Merging #639 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #639   +/-   ##
=======================================
  Coverage   98.70%   98.70%           
=======================================
  Files         250      250           
  Lines       13389    13404   +15     
=======================================
+ Hits        13215    13230   +15     
  Misses        174      174           

Copy link
Contributor

@sklump sklump left a 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

aries_cloudagent/protocols/out_of_band/v1_0/manager.py Outdated Show resolved Hide resolved
aries_cloudagent/protocols/out_of_band/v1_0/manager.py Outdated Show resolved Hide resolved
aries_cloudagent/protocols/out_of_band/v1_0/manager.py Outdated Show resolved Hide resolved
@nrempel
Copy link
Contributor Author

nrempel commented Aug 11, 2020

Thanks @sklump, cleaned up those issues

@sklump
Copy link
Contributor

sklump commented Aug 14, 2020

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 qual_key() deserve a module somewhere, or maybe they can all go into wallet.util. I'll take care of it once this one is merged.

@swcurran swcurran merged commit 7204c00 into openwallet-foundation:master Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants