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

[Feature] [cosmos_node_client] Account derivation #256

Open
andrzejchm opened this issue Apr 13, 2022 · 1 comment
Open

[Feature] [cosmos_node_client] Account derivation #256

andrzejchm opened this issue Apr 13, 2022 · 1 comment
Assignees
Labels
📡 cosmos_node_client issues related to cosmos_node_client package Feature 💡

Comments

@andrzejchm
Copy link
Contributor

andrzejchm commented Apr 13, 2022

Add feature of wallet derivation to the cosmos_node_client library

Acceptance criteria

  • introduce new type Mnemonic that has the constructor Mnemonic.generate(MnemonicLength length)
enum MnemonicLength {
    words12,
    words24,
}

class Mnemonic {
 final String value;
 
 List<String> get words {} // generate list of words based on the `value`
 
 const Mnemonic._(this.value);
 
 factory Mnemonic.generate(MnemonicLength length) { ... }
  • introduce new type Account with a factory deriveFromMnemonic that accepts Mnemonic mnemonic.
class Account extends Equatable {
    static const defaultDerivationPath = "m/44'/118'/0'/0/0";
   
    final String bech32Address;
    final Uint8List publicKey;
    final Uint8List privateKey;
   
    factory Account.derive({
       required Mnemonic mnemonic, 
       String derivationPath = defaultDerivationPath,
    }) { ... }
}
@andrzejchm andrzejchm added Feature 💡 📡 cosmos_node_client issues related to cosmos_node_client package labels Apr 13, 2022
@Zfinix
Copy link
Contributor

Zfinix commented Apr 25, 2022

Would be working on this as soon as #261 and #263 are merged

@andrzejchm andrzejchm assigned andrzejchm and unassigned Zfinix May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📡 cosmos_node_client issues related to cosmos_node_client package Feature 💡
Projects
None yet
Development

No branches or pull requests

2 participants