Class AccountBaseAbstract

Account is one of the three basic building blocks of an AeSdk and provides access to a signing key pair.

Hierarchy

Constructors

  • Parameters

    • options: { networkId?: string } = {}

      Options

      • Optional networkId?: string

        Using for signing transactions

    Returns AccountBase

Properties

getNetworkId: ((__namedParameters?: { networkId?: string }) => Promise<string>) = getNetworkId

Type declaration

    • (__namedParameters?: { networkId?: string }): Promise<string>
    • Obtain networkId from account or node

      Parameters

      • __namedParameters: { networkId?: string } = {}
        • Optional networkId?: string

      Returns Promise<string>

networkId?: string

Methods

  • Obtain account address

    Returns

    Public account address

    Parameters

    • Optional opt: object

    Returns Promise<`ak_${string}`>

  • Sign data blob

    Returns

    Signed data blob

    Parameters

    • data: string | Uint8Array

      Data blob to sign

    • Optional options: any

      Options

    Returns Promise<Uint8Array>

  • Sign message

    Returns

    Signature as hex string of Uint8Array

    Parameters

    • message: string

      Message to sign

    • opt: { returnHex?: boolean } = {}

      Options

      • Optional returnHex?: boolean

    Returns Promise<string | Uint8Array>

  • Sign encoded transaction

    Returns

    Signed transaction

    Parameters

    • tx: `tx_${string}`

      Transaction to sign

    • opt: { authData?: { args?: any[]; callData?: `cb_${string}`; gasLimit?: number; source?: string }; authFun?: string; innerTx?: boolean; networkId?: string } & Omit<Partial<{ onAccount: AccountBase; onCompiler: Compiler; onNode: Node } & object>, "onAccount"> = {}

      Options

    Returns Promise<`tx_${string}`>

  • Verify message

    Parameters

    • message: string

      Message to verify

    • signature: string | Uint8Array

      Signature

    • Optional options: object

      Options

    Returns Promise<boolean>

Generated using TypeDoc