@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 (View Summary)

    Index

    Constructors

    Properties

    address: string
    keyPair?: KeyPair | KeyPair
    publicKey: undefined | string
    selectedRpcId?: RpcId

    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>

    • 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>