Class AccountBaseAbstract

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

Hierarchy (view full)

Constructors

Properties

address: `ak_${string}`

Account address

Methods

  • Sign data blob

    Parameters

    • data: string | Uint8Array

      Data blob to sign

    • Optional options: {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
      }

      Options

      • Optional aeppOrigin?: string
      • Optional aeppRpcClientId?: string

    Returns Promise<Uint8Array>

    Signature

  • Sign delegation of all AENS names to a contract (not available in Iris)

    Parameters

    • contractAddress: `ct_${string}`

      Address of a contract to delegate permissions to

    • Optional options: {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
          consensusProtocolVersion?: ConsensusProtocolVersion;
          networkId?: string;
      }

      Options

      • Optional aeppOrigin?: string
      • Optional aeppRpcClientId?: string
      • Optional consensusProtocolVersion?: ConsensusProtocolVersion
      • Optional networkId?: string

    Returns Promise<`sg_${string}`>

    Signature

    Deprecated

    use AccountBase:signDelegation in Ceres

  • Sign delegation, works only in Ceres

    Parameters

    • delegation: `ba_${string}`

      Delegation to sign

    • Optional options: {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
          networkId?: string;
      }

      Options

      • Optional aeppOrigin?: string
      • Optional aeppRpcClientId?: string
      • Optional networkId?: string

    Returns Promise<`sg_${string}`>

    Signature

  • Sign delegation of AENS, oracle operations to a contract

    Parameters

    • contractAddress: `ct_${string}`

      Address of a contract to delegate permissions to

    • Optional options: {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
          consensusProtocolVersion?: ConsensusProtocolVersion;
          isOracle?: boolean;
          networkId?: string;
      }

      Options

      • Optional aeppOrigin?: string
      • Optional aeppRpcClientId?: string
      • Optional consensusProtocolVersion?: ConsensusProtocolVersion
      • Optional isOracle?: boolean

        Use to generate an oracle delegation signature in Ceres, otherwise an AENS preclaim delegation signature would be generated

      • Optional networkId?: string

    Returns Promise<`sg_${string}`>

    Signature

    Deprecated

    use AccountBase:signDelegation in Ceres

  • Sign message

    Parameters

    • message: string

      Message to sign

    • Optional options: {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
      }

      Options

      • Optional aeppOrigin?: string
      • Optional aeppRpcClientId?: string

    Returns Promise<Uint8Array>

    Signature

  • Sign delegation of an AENS name to a contract

    Parameters

    • contractAddress: `ct_${string}`

      Address of a contract to delegate permissions to

    • name: `${string}.chain`

      AENS name to manage by a contract

    • Optional options: {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
          consensusProtocolVersion?: ConsensusProtocolVersion;
          networkId?: string;
      }

      Options

      • Optional aeppOrigin?: string
      • Optional aeppRpcClientId?: string
      • Optional consensusProtocolVersion?: ConsensusProtocolVersion
      • Optional networkId?: string

    Returns Promise<`sg_${string}`>

    Signature

    Deprecated

    use AccountBase:signDelegation in Ceres

  • Sign delegation of oracle query to a contract

    Warning! Implementations needs to ensure that decoded oracle query id is not equal to decoded current account address unless https://github.com/aeternity/aesophia/issues/475 is fixed.

    Warning! Implementations needs to ensure that oracle query and contract exists unless https://github.com/aeternity/aesophia/issues/474 is fixed.

    Parameters

    • contractAddress: `ct_${string}`

      Address of a contract to delegate permissions to

    • oracleQueryId: `oq_${string}`

      Oracle query ID to reply by a contract

    • Optional options: {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
          consensusProtocolVersion?: ConsensusProtocolVersion;
          networkId?: string;
      }

      Options

      • Optional aeppOrigin?: string
      • Optional aeppRpcClientId?: string
      • Optional consensusProtocolVersion?: ConsensusProtocolVersion
      • Optional networkId?: string

    Returns Promise<`sg_${string}`>

    Signature

    Deprecated

    use AccountBase:signDelegation in Ceres

  • Sign encoded transaction

    Parameters

    • tx: `tx_${string}`

      Transaction to sign

    • options: {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
          authData?: AuthData | ((tx) => Promise<AuthData>);
          innerTx?: boolean;
          networkId?: string;
          onCompiler?: CompilerBase;
          onNode?: Node;
      }

      Options

      • Optional aeppOrigin?: string
      • Optional aeppRpcClientId?: string
      • Optional authData?: AuthData | ((tx) => Promise<AuthData>)

        Object with gaMeta params

      • Optional innerTx?: boolean

        Sign as inner transaction for PayingFor

      • Optional networkId?: string
      • Optional onCompiler?: CompilerBase
      • Optional onNode?: Node

    Returns Promise<`tx_${string}`>

    Signed transaction

  • Sign typed data

    Parameters

    • data: `cb_${string}`

      Encoded data to sign

    • aci: AciValue

      Type of data to sign

    • Optional options: Domain & {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
      }

      Options

    Returns Promise<`sg_${string}`>

    Signature

Generated using TypeDoc