Skip to content
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 2 replies

Comment options

0x-j
Mar 5, 2024
Maintainer Author

You must be logged in to vote
2 replies
@slyofzero
Comment options

@0xmaayan
Comment options

Answer selected by 0x-j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wallet Questions related to Aptos wallets
3 participants