MCPcopy Create free account
hub / github.com/NoteProtocol/NoteWallet / importMnemonic

Function importMnemonic

src/wallet.ts:66–75  ·  view source on GitHub ↗
(mnemonicStr: string, lang = "ENGLISH")

Source from the content-addressed store, hash-verified

64 }
65
66 protected importMnemonic(mnemonicStr: string, lang = "ENGLISH"): void {
67 this.mnemoic = new Mnemonic(mnemonicStr, Mnemonic.Words[lang]);
68
69 const seed = this.mnemoic.toSeed();
70 this.rootHDPrivateKey = bitcore.HDPrivateKey.fromSeed(
71 seed,
72 this.config.network
73 );
74 this.currentAccount = this.createAccount(this.rootPath, this.accoutIndex);
75 }
76
77 // Create account
78 createAccount(

Callers

nothing calls this directly

Calls 1

createAccountMethod · 0.80

Tested by

no test coverage detected