Avalanche SDK Client
    Preparing search index...

    Type Alias AvalancheAccount

    AvalancheAccount is a type that represents an account on the Avalanche network. It can be a combination of an EVM account and an XP account.

    type AvalancheAccount = {
        evmAccount: Account;
        getEVMAddress: () => Address;
        getXPAddress: (chain?: "X" | "P" | "C", hrp?: string) => XPAddress;
        xpAccount?: XPAccount;
    }
    Index

    Properties

    evmAccount: Account

    The EVM account used for C-chain or any EVM chain operations. Type: Account

    getEVMAddress: () => Address

    Get the EVM address for the account.

    Type declaration

      • (): Address
      • Returns Address

        The EVM address for the account. Address

    getXPAddress: (chain?: "X" | "P" | "C", hrp?: string) => XPAddress

    Get the XP address for the X and P chain account.

    Type declaration

      • (chain?: "X" | "P" | "C", hrp?: string): XPAddress
      • Parameters

        • Optionalchain: "X" | "P" | "C"

          The chain to get the XP address for. "X" | "P" | "C"

        • Optionalhrp: string

          The human readable prefix to use for the XP address. Default to "avax". "avax" | "fuji" | any custom hrp

        Returns XPAddress

        The XP address for the account. XPAddress

    xpAccount?: XPAccount

    The AVM and PVM account used for X and P chain operations. Type: XPAccount