-
Notifications
You must be signed in to change notification settings - Fork 21
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
add bip39_entropy as alternative to mnemonic for signer-service #993
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #993 +/- ##
==========================================
- Coverage 60.12% 55.38% -4.75%
==========================================
Files 88 124 +36
Lines 12356 16354 +3998
Branches 2010 2815 +805
==========================================
+ Hits 7429 9057 +1628
- Misses 3238 5211 +1973
- Partials 1689 2086 +397 ☔ View full report in Codecov by Sentry. |
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.
main suggestion is to consider matching on a tuple.
I can understand if it feels too dense, but I would still encourage one to move that direction as I think it's more readable than the nested match statements
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.
LGTM & thank you @nick-mobilecoin for a great review too!
Co-authored-by: Nick Santana <nick@mobilecoin.com>
Co-authored-by: Nick Santana <nick@mobilecoin.com>
Co-authored-by: Nick Santana <nick@mobilecoin.com>
Motivation
Offline signers have expressed a desire to store and manage the secret entropy of their account as a 32 byte value rather than as a 24 word mnemonic phrase for consistency with other blockchain wallets that their software manages this way.
Herein we introduce
bip39_entropy
, a 32 byte, hex-encoded string (64 characters) to thesigner-service
API to satisfy this need. When outputting account keys, signing txos, or syncing txos for aview-only
wallet, users of thesigner-service
can now chose between providing a 24 word phrase,mnemonic
, or a 64 character hex-encoded 32 byte secret, usingbip39_entropy
.In this PR
mnemonic
optional and to optionally allowbip39_entropy
.mnemonic
orbip39_entropy
and to use whichever is provided.