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,
}) { ... }
}
Add feature of wallet derivation to the
cosmos_node_clientlibraryAcceptance criteria
Mnemonicthat has the constructorMnemonic.generate(MnemonicLength length)Accountwith a factoryderiveFromMnemonicthat acceptsMnemonic mnemonic.