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

    Function importAccountFromPrivateKey

    • Imports an Avalanche account given a private key and chain

      It creates an Avalanche keypair containing information about the account, extracted in the AvalancheAccount constructor.

      Parameters

      • privateKey: string

        The private key of the account to import.

      • chain: ChainType = ChainType.C_CHAIN

        The Avalanche subnet to use the account with.

      Returns Promise<AvalancheAccount>