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

    Class ETHAccount

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

    Hierarchy

    • EVMAccount
      • ETHAccount
    Index

    Constructors

    • Parameters

      • wallet: Wallet | JsonRPCWallet
      • address: string
      • OptionalpublicKey: string
      • OptionalrpcId: number

      Returns ETHAccount

    Properties

    address: string
    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 ethereum account. The full message is not used as the payload, only fields of the BaseMessage type are.

      The signMessage method of the package 'ethers' is used as the signature method.

      Parameters

      • message: SignableMessage

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

      Returns Promise<string>