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

    Class AvalancheAccount

    AvalancheAccount implements the Account class for the Avalanche protocol. It is used to represent an Avalanche account when publishing a message on the Aleph network.

    Hierarchy

    • EVMAccount
      • AvalancheAccount
    Index

    Constructors

    • Parameters

      • signerOrWallet: KeyPair | KeyPair | Wallet | JsonRpcProvider | JsonRPCWallet
      • address: string
      • OptionalpublicKey: string
      • OptionalrpcId: number

      Returns AvalancheAccount

    Properties

    address: string
    keyPair?: KeyPair | KeyPair
    publicKey: undefined | string
    selectedRpcId?: RpcId
    wallet?: Wallet | JsonRPCWallet

    Methods

    • Ask for a Provider Account a read Access to its encryption publicKey If the encryption public Key is already loaded, nothing happens

      This method will throw if:

      • The account was not instanced with a provider.
      • The user denied the encryption public key sharing.

      Returns Promise<void>

    • Parameters

      • OptionalchainOrRpc: RpcId | RpcType

      Returns Promise<void>

    • Retrieves the ALEPH token balance for a specified wallet address.

      Returns Promise<Decimal>

    • Returns Promise<number>

    • Returns Promise<RpcId>

    • Returns string

    • The Sign method provides a way to sign a given Aleph message using an avalanche keypair. The full message is not used as the payload, only fields of the BaseMessage type are.

      The sign method of the keypair is used as the signature method.

      Parameters

      • message: SignableMessage

        The Aleph message to sign, using some of its fields.

      Returns Promise<string>