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

Added Ledger support to the wallet. #2118

Closed
wants to merge 10 commits into from

Conversation

murisi
Copy link
Contributor

@murisi murisi commented Nov 7, 2023

Describe your changes

Added Ledger support to the namadaw command, expanded the Store to also hold derivation paths and public keys, and attempted to simplify the wallet logic. More specifically:

  • Derivation paths are now stored in the wallet to ease future signing operations
  • Public keys are now stored in the wallet so that the namadaw key list command remains as informative even in the absence of the secret key (which may be being stored externally on a hardware wallet)
  • Modified the key generation command to always generate and print out a seed phrase
  • Encryption is now done in store.rs to ensure that the key derivations are always maximized and are done correctly:
    • I.e. a public key and public key hash of the same alias should always be derived from inserting secret key to wallet
  • The SDK now takes derivation paths using the type DerivationPath instead of String
    • This enabled the removal of string parsing logic (like checking for "default" keyword) from the SDK
  • Broke up the SDK key derivation function because it was doing many things and its parameters were like flags
  • Implemented key derivation given a derivation path using the hardware wallet
  • Enabled transactions to be signed using the hardware wallet when it is connected
  • Parameterized SDK functions depending on randomness with a randomness parameter
  • Removed code that allowed multiple wallet entries sharing the same alias to be inserted separately
  • Implemented Serde (de)serialization of public keys and derivation paths to enable Store (de)serialization
  • Augmented the namadaw key list command to also print out public keys (labelled as external) even when no corresponding secret key exists

closes #70

Indicate on which release or other PRs this topic is based on

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

@murisi murisi changed the title Murisi/hw wallet integration on 0.25.0 Added Ledger support to the wallet. Nov 7, 2023
@murisi murisi mentioned this pull request Nov 10, 2023
@murisi murisi closed this Nov 11, 2023
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.

ledger (HW wallet) keys integration
1 participant