@aleph-sdk/monorepo
    Preparing search index...

    Function importAccountFromMnemonic

    • Imports an Avalanche account given a mnemonic and the 'ethers' package.

      It creates an avalanche wallet containing information about the account, extracted in the AvalancheAccount constructor.

      Parameters

      • mnemonic: string

        The mnemonic of the account to import.

      • derivationPath: string = "m/44'/60'/0'/0/0"

        The derivation path used to retrieve the list of accounts attached to the given mnemonic.

      • chain: ChainType = ChainType.C_CHAIN

        The Avalanche subnet to use the account with.

      Returns Promise<AvalancheAccount>