-
As title |
Beta Was this translation helpful? Give feedback.
Answered by
0x-j
Mar 5, 2024
Replies: 1 comment 2 replies
-
Checkout the wallet standard doc using ts-sdk, basically you can get private key from mnemonic then get wallet from privatekey. static fromDerivePath(path: string, mnemonics: string): AptosAccount {
if (!AptosAccount.isValidPath(path)) {
throw new Error("Invalid derivation path");
}
const normalizeMnemonics = mnemonics
.trim()
.split(/\s+/)
.map((part) => part.toLowerCase())
.join(" ");
const { key } = derivePath(path, bytesToHex(bip39.mnemonicToSeedSync(normalizeMnemonics)));
return new AptosAccount(new Uint8Array(key));
} If you want to use python, here's an open source repo made by community. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
0x-j
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checkout the wallet standard doc using ts-sdk, basically you can get private key from mnemonic then get wallet from privatekey.
If you want to use python, here's an open source repo made by community.