RPC handler for AEPP side Contain functionality for wallet interaction and connect it to sdk

Hierarchy (view full)

Constructors

  • Parameters

    • options: {
          name: string;
          onAddressChange?: ((a) => void);
          onDisconnect?: ((p) => void);
          onNetworkChange?: ((a) => void);
      } & AeSdkMethodsOptions & {
          nodes?: {
              instance: Node;
              name: string;
          }[];
      }

      Options

    Returns AeSdkAepp

Properties

_accounts?: Accounts
_getPollInterval: ((...args) => Promise<number>)

Type declaration

    • (...args): Promise<number>
    • Parameters

      • Rest ...args: [type: "key-block" | "micro-block"] | [type: "key-block" | "micro-block", Omit<{
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }>]

      Returns Promise<number>

_options: AeSdkMethodsOptions = {}
aensBid: ((...args) => Promise<AensClaimReturnType>)

Type declaration

    • (...args): Promise<AensClaimReturnType>
    • Parameters

      • Rest ...args: [name: `${string}.chain`, nameFee: string | number | BigNumber] | [name: `${string}.chain`, nameFee: string | number | BigNumber, Omit<Omit<AensClaimOptions, "nameFee">, "onNode" | "onAccount" | "onCompiler"> & Partial<Omit<Omit<AensClaimOptions, "nameFee">, "onAccount"> & {
            onAccount: OnAccount;
        }>]

      Returns Promise<AensClaimReturnType>

aensClaim: ((...args) => Promise<AensClaimReturnType>)

Type declaration

aensPreclaim: ((...args) => Promise<Readonly<SendTransactionReturnType & {
    claim: ((opts?) => Promise<AensClaimReturnType>);
    commitmentId: string;
    salt: number;
}>>)

Type declaration

aensQuery: ((...args) => Promise<Readonly<{
    id: string;
    owner?: string;
    pointers: {
        id: string;
        key: string;
    }[];
    ttl: number;
} & {
    extendTtl: ((nameTtl?, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
    id: `nm_${string}`;
    owner: `ak_${string}`;
    pointers: NamePointer[] | KeyPointers;
    revoke: ((options?) => Promise<SendTransactionReturnType>);
    transfer: ((account, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
    ttl: number;
    update: ((pointers, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
}>>)

Type declaration

    • (...args): Promise<Readonly<{
          id: string;
          owner?: string;
          pointers: {
              id: string;
              key: string;
          }[];
          ttl: number;
      } & {
          extendTtl: ((nameTtl?, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
          id: `nm_${string}`;
          owner: `ak_${string}`;
          pointers: NamePointer[] | KeyPointers;
          revoke: ((options?) => Promise<SendTransactionReturnType>);
          transfer: ((account, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
          ttl: number;
          update: ((pointers, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
      }>>
    • Parameters

      Returns Promise<Readonly<{
          id: string;
          owner?: string;
          pointers: {
              id: string;
              key: string;
          }[];
          ttl: number;
      } & {
          extendTtl: ((nameTtl?, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
          id: `nm_${string}`;
          owner: `ak_${string}`;
          pointers: NamePointer[] | KeyPointers;
          revoke: ((options?) => Promise<SendTransactionReturnType>);
          transfer: ((account, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
          ttl: number;
          update: ((pointers, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
      }>>

aensRevoke: ((...args) => Promise<SendTransactionReturnType>)

Type declaration

aensTransfer: ((...args) => Promise<SendTransactionReturnType>)

Type declaration

aensUpdate: ((...args) => Promise<SendTransactionReturnType>)

Type declaration

awaitHeight: ((...args) => Promise<number>)

Type declaration

    • (...args): Promise<number>
    • Parameters

      • Rest ...args: [height: number] | [height: number, Omit<{
            interval?: number;
            onNode: Node;
        } & {
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            interval?: number;
            onNode: Node;
        } & {
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }>]

      Returns Promise<number>

buildAuthTxHash: ((...args) => Promise<Buffer>)

Type declaration

    • (...args): Promise<Buffer>
    • Parameters

      • Rest ...args: [transaction: `tx_${string}`] | [transaction: `tx_${string}`, Omit<{
            fee?: Int;
            gasPrice?: Int;
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            fee?: Int;
            gasPrice?: Int;
            onNode: Node;
        }>]

      Returns Promise<Buffer>

buildAuthTxHashByGaMetaTx: ((...args) => Promise<Buffer>)

Type declaration

    • (...args): Promise<Buffer>
    • Parameters

      • Rest ...args: [transaction: `tx_${string}`] | [transaction: `tx_${string}`, Omit<{
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            onNode: Node;
        }>]

      Returns Promise<Buffer>

createDelegationSignature: ((...args) => Promise<Uint8Array>)

Type declaration

    • (...args): Promise<Uint8Array>
    • Parameters

      • Rest ...args: [contractAddress: `ct_${string}`, ids: (`${string}.chain` | `kh_${string}` | `mh_${string}` | `bf_${string}` | `bx_${string}` | `bs_${string}` | `ch_${string}` | `ct_${string}` | `cb_${string}` | `ck_${string}` | `cv_${string}` | `tx_${string}` | `th_${string}` | `ok_${string}` | `ov_${string}` | `oq_${string}` | `or_${string}` | `ak_${string}` | `sg_${string}` | `cm_${string}` | `pp_${string}` | `nm_${string}` | `st_${string}` | `pi_${string}` | `ss_${string}` | `cs_${string}` | `ba_${string}`)[]] | [contractAddress: `ct_${string}`, ids: (`${string}.chain` | `kh_${string}` | `mh_${string}` | `bf_${string}` | `bx_${string}` | `bs_${string}` | `ch_${string}` | `ct_${string}` | `cb_${string}` | `ck_${string}` | `cv_${string}` | `tx_${string}` | `th_${string}` | `ok_${string}` | `ov_${string}` | `oq_${string}` | `or_${string}` | `ak_${string}` | `sg_${string}` | `cm_${string}` | `pp_${string}` | `nm_${string}` | `st_${string}` | `pi_${string}` | `ss_${string}` | `cs_${string}` | `ba_${string}`)[], Omit<{
            isOracle?: boolean;
            omitAddress?: boolean;
            onAccount: AccountBase;
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<Omit<{
            isOracle?: boolean;
            omitAddress?: boolean;
            onAccount: AccountBase;
            onNode: Node;
        }, "onAccount"> & {
            onAccount: OnAccount;
        }>]

      Returns Promise<Uint8Array>

createGeneralizedAccount: ((...args) => Promise<Readonly<{
    gaContractId: `ct_${string}`;
    owner: `ak_${string}`;
    rawTx: `tx_${string}`;
    transaction: `th_${string}`;
}>>)

Type declaration

    • (...args): Promise<Readonly<{
          gaContractId: `ct_${string}`;
          owner: `ak_${string}`;
          rawTx: `tx_${string}`;
          transaction: `th_${string}`;
      }>>
    • Parameters

      Returns Promise<Readonly<{
          gaContractId: `ct_${string}`;
          owner: `ak_${string}`;
          rawTx: `tx_${string}`;
          transaction: `th_${string}`;
      }>>

extendOracleTtl: ((...args) => Promise<SendTransactionReturnType & GetOracleObjectReturnType>)

Type declaration

getAccount: ((...args) => Promise<{
    authFun?: string;
    balance: bigint;
    contractId?: string;
    id: string;
    kind?: AccountKind;
    nonce: number;
    payable?: boolean;
}>)

Type declaration

    • (...args): Promise<{
          authFun?: string;
          balance: bigint;
          contractId?: string;
          id: string;
          kind?: AccountKind;
          nonce: number;
          payable?: boolean;
      }>
    • Parameters

      • Rest ...args: [address: `ct_${string}` | `ak_${string}`] | [address: `ct_${string}` | `ak_${string}`, Omit<{
            hash?: `kh_${string}` | `mh_${string}`;
            height?: number;
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            hash?: `kh_${string}` | `mh_${string}`;
            height?: number;
            onNode: Node;
        }>]

      Returns Promise<{
          authFun?: string;
          balance: bigint;
          contractId?: string;
          id: string;
          kind?: AccountKind;
          nonce: number;
          payable?: boolean;
      }>

getBalance: ((...args) => Promise<string>)

Type declaration

    • (...args): Promise<string>
    • Parameters

      • Rest ...args: [address: `ct_${string}` | `ok_${string}` | `ak_${string}`] | [address: `ct_${string}` | `ok_${string}` | `ak_${string}`, Omit<{
            format?: AE_AMOUNT_FORMATS;
        } & {
            hash?: `kh_${string}` | `mh_${string}`;
            height?: number;
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            format?: AE_AMOUNT_FORMATS;
        } & {
            hash?: `kh_${string}` | `mh_${string}`;
            height?: number;
            onNode: Node;
        }>]

      Returns Promise<string>

getContract: ((...args) => Promise<{
    abiVersion: string;
    active: boolean;
    deposit: bigint;
    id: string;
    ownerId: string;
    referrerIds: string[];
    vmVersion: string;
}>)

Type declaration

    • (...args): Promise<{
          abiVersion: string;
          active: boolean;
          deposit: bigint;
          id: string;
          ownerId: string;
          referrerIds: string[];
          vmVersion: string;
      }>
    • Parameters

      • Rest ...args: [contractId: `ct_${string}`] | [contractId: `ct_${string}`, Omit<{
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            onNode: Node;
        }>]

      Returns Promise<{
          abiVersion: string;
          active: boolean;
          deposit: bigint;
          id: string;
          ownerId: string;
          referrerIds: string[];
          vmVersion: string;
      }>

getContractByteCode: ((...args) => Promise<{
    bytecode: `cb_${string}`;
}>)

Type declaration

    • (...args): Promise<{
          bytecode: `cb_${string}`;
      }>
    • Parameters

      • Rest ...args: [contractId: `ct_${string}`] | [contractId: `ct_${string}`, Omit<{
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            onNode: Node;
        }>]

      Returns Promise<{
          bytecode: `cb_${string}`;
      }>

getCurrentGeneration: ((...args) => Promise<{
    keyBlock: {
        beneficiary: string;
        hash: string;
        height: number;
        info: string;
        miner: string;
        nonce?: number;
        pow?: string[];
        prevHash: string;
        prevKeyHash: string;
        stateHash: string;
        target: string;
        time: number;
        version: number;
    };
    microBlocks: string[];
}>)

Type declaration

    • (...args): Promise<{
          keyBlock: {
              beneficiary: string;
              hash: string;
              height: number;
              info: string;
              miner: string;
              nonce?: number;
              pow?: string[];
              prevHash: string;
              prevKeyHash: string;
              stateHash: string;
              target: string;
              time: number;
              version: number;
          };
          microBlocks: string[];
      }>
    • Parameters

      • Rest ...args: [] | [Omit<{
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            onNode: Node;
        }>]

      Returns Promise<{
          keyBlock: {
              beneficiary: string;
              hash: string;
              height: number;
              info: string;
              miner: string;
              nonce?: number;
              pow?: string[];
              prevHash: string;
              prevKeyHash: string;
              stateHash: string;
              target: string;
              time: number;
              version: number;
          };
          microBlocks: string[];
      }>

getGeneration: ((...args) => Promise<{
    keyBlock: {
        beneficiary: string;
        hash: string;
        height: number;
        info: string;
        miner: string;
        nonce?: number;
        pow?: string[];
        prevHash: string;
        prevKeyHash: string;
        stateHash: string;
        target: string;
        time: number;
        version: number;
    };
    microBlocks: string[];
}>)

Type declaration

    • (...args): Promise<{
          keyBlock: {
              beneficiary: string;
              hash: string;
              height: number;
              info: string;
              miner: string;
              nonce?: number;
              pow?: string[];
              prevHash: string;
              prevKeyHash: string;
              stateHash: string;
              target: string;
              time: number;
              version: number;
          };
          microBlocks: string[];
      }>
    • Parameters

      • Rest ...args: [hashOrHeight: number | `kh_${string}`] | [hashOrHeight: number | `kh_${string}`, Omit<{
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            onNode: Node;
        }>]

      Returns Promise<{
          keyBlock: {
              beneficiary: string;
              hash: string;
              height: number;
              info: string;
              miner: string;
              nonce?: number;
              pow?: string[];
              prevHash: string;
              prevKeyHash: string;
              stateHash: string;
              target: string;
              time: number;
              version: number;
          };
          microBlocks: string[];
      }>

getHeight: ((...args) => Promise<number>)

Type declaration

    • (...args): Promise<number>
    • Parameters

      • Rest ...args: [] | [Omit<{
            cached?: boolean;
            onNode: Node;
        } & {
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            cached?: boolean;
            onNode: Node;
        } & {
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }>]

      Returns Promise<number>

getKeyBlock: ((...args) => Promise<{
    beneficiary: string;
    hash: string;
    height: number;
    info: string;
    miner: string;
    nonce?: number;
    pow?: string[];
    prevHash: string;
    prevKeyHash: string;
    stateHash: string;
    target: string;
    time: number;
    version: number;
}>)

Type declaration

    • (...args): Promise<{
          beneficiary: string;
          hash: string;
          height: number;
          info: string;
          miner: string;
          nonce?: number;
          pow?: string[];
          prevHash: string;
          prevKeyHash: string;
          stateHash: string;
          target: string;
          time: number;
          version: number;
      }>
    • Parameters

      • Rest ...args: [hashOrHeight: number | `kh_${string}`] | [hashOrHeight: number | `kh_${string}`, Omit<{
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            onNode: Node;
        }>]

      Returns Promise<{
          beneficiary: string;
          hash: string;
          height: number;
          info: string;
          miner: string;
          nonce?: number;
          pow?: string[];
          prevHash: string;
          prevKeyHash: string;
          stateHash: string;
          target: string;
          time: number;
          version: number;
      }>

getMicroBlockHeader: ((...args) => Promise<{
    hash: string;
    height: number;
    pofHash: string;
    prevHash: string;
    prevKeyHash: string;
    signature: string;
    stateHash: string;
    time: number;
    txsHash: string;
    version: number;
}>)

Type declaration

    • (...args): Promise<{
          hash: string;
          height: number;
          pofHash: string;
          prevHash: string;
          prevKeyHash: string;
          signature: string;
          stateHash: string;
          time: number;
          txsHash: string;
          version: number;
      }>
    • Parameters

      • Rest ...args: [hash: `mh_${string}`] | [hash: `mh_${string}`, Omit<{
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            onNode: Node;
        }>]

      Returns Promise<{
          hash: string;
          height: number;
          pofHash: string;
          prevHash: string;
          prevKeyHash: string;
          signature: string;
          stateHash: string;
          time: number;
          txsHash: string;
          version: number;
      }>

getMicroBlockTransactions: ((...args) => Promise<{
    blockHash: string;
    blockHeight: number;
    encodedTx?: string;
    hash: string;
    signatures: string[];
    tx: {
        abiVersion?: string;
        accountId?: string;
        amount?: bigint;
        authData?: string;
        authFun?: string;
        callData?: string;
        callerId?: string;
        channelId?: string;
        channelReserve?: bigint;
        clientTtl?: number;
        code?: string;
        commitmentId?: string;
        contractId?: string;
        delegateIds?: {
            initiator?: string[];
            responder?: string[];
        };
        deposit?: bigint;
        fee: bigint;
        fromId?: string;
        gaId?: string;
        gas?: number;
        gasPrice?: bigint;
        initiatorAmount?: bigint;
        initiatorAmountFinal?: bigint;
        initiatorDelegateIds?: string[];
        initiatorId?: string;
        lockPeriod?: string;
        name?: string;
        nameFee?: bigint;
        nameId?: string;
        nameSalt?: number;
        nameTtl?: number;
        nonce?: number;
        offchainTrees?: string;
        oracleId?: string;
        oracleTtl?: {
            type: "delta";
            value: string;
        };
        ownerId?: string;
        payerId?: string;
        payload?: string;
        poi?: string;
        pointers?: {
            id: string;
            key: string;
        }[];
        query?: string;
        queryFee?: bigint;
        queryFormat?: string;
        queryId?: string;
        queryTtl?: {
            type: TTLType;
            value: string;
        };
        recipientId?: string;
        responderAmount?: bigint;
        responderAmountFinal?: bigint;
        responderDelegateIds?: string[];
        responderId?: string;
        response?: string;
        responseFormat?: string;
        responseTtl?: {
            type: "delta";
            value: string;
        };
        round?: number;
        senderId?: string;
        stateHash?: string;
        toId?: string;
        ttl?: number;
        tx?: { tx: { recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 54 more ...; type: TxType; }; ... 4 more ...; signatures: string[]; };
        type: TxType;
        update?: {
            op: "OffChainTransfer" | "OffChainWithdrawal" | "OffChainDeposit" | "OffChainNewContract" | "OffChainCallContract";
        } | {
            amount: bigint;
            from: string;
            op: "OffChainTransfer";
            to: string;
        } | {
            amount: bigint;
            op: "OffChainWithdrawal";
            to: string;
        } | {
            amount: bigint;
            from: string;
            op: "OffChainDeposit";
        } | {
            abiVersion: string;
            callData: string;
            code: {
                bytecode: `cb_${string}`;
            };
            deposit: bigint;
            op: "OffChainNewContract";
            owner: string;
            vmVersion: string;
        } | {
            abiVersion: string;
            amount: bigint;
            callData: string;
            caller: string;
            contract: string;
            gas: number;
            gasPrice: bigint;
            op: "OffChainCallContract";
        };
        version: number;
        vmVersion?: string;
    };
}[]>)

Type declaration

    • (...args): Promise<{
          blockHash: string;
          blockHeight: number;
          encodedTx?: string;
          hash: string;
          signatures: string[];
          tx: {
              abiVersion?: string;
              accountId?: string;
              amount?: bigint;
              authData?: string;
              authFun?: string;
              callData?: string;
              callerId?: string;
              channelId?: string;
              channelReserve?: bigint;
              clientTtl?: number;
              code?: string;
              commitmentId?: string;
              contractId?: string;
              delegateIds?: {
                  initiator?: string[];
                  responder?: string[];
              };
              deposit?: bigint;
              fee: bigint;
              fromId?: string;
              gaId?: string;
              gas?: number;
              gasPrice?: bigint;
              initiatorAmount?: bigint;
              initiatorAmountFinal?: bigint;
              initiatorDelegateIds?: string[];
              initiatorId?: string;
              lockPeriod?: string;
              name?: string;
              nameFee?: bigint;
              nameId?: string;
              nameSalt?: number;
              nameTtl?: number;
              nonce?: number;
              offchainTrees?: string;
              oracleId?: string;
              oracleTtl?: {
                  type: "delta";
                  value: string;
              };
              ownerId?: string;
              payerId?: string;
              payload?: string;
              poi?: string;
              pointers?: {
                  id: string;
                  key: string;
              }[];
              query?: string;
              queryFee?: bigint;
              queryFormat?: string;
              queryId?: string;
              queryTtl?: {
                  type: TTLType;
                  value: string;
              };
              recipientId?: string;
              responderAmount?: bigint;
              responderAmountFinal?: bigint;
              responderDelegateIds?: string[];
              responderId?: string;
              response?: string;
              responseFormat?: string;
              responseTtl?: {
                  type: "delta";
                  value: string;
              };
              round?: number;
              senderId?: string;
              stateHash?: string;
              toId?: string;
              ttl?: number;
              tx?: { tx: { recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 54 more ...; type: TxType; }; ... 4 more ...; signatures: string[]; };
              type: TxType;
              update?: {
                  op: "OffChainTransfer" | "OffChainWithdrawal" | "OffChainDeposit" | "OffChainNewContract" | "OffChainCallContract";
              } | {
                  amount: bigint;
                  from: string;
                  op: "OffChainTransfer";
                  to: string;
              } | {
                  amount: bigint;
                  op: "OffChainWithdrawal";
                  to: string;
              } | {
                  amount: bigint;
                  from: string;
                  op: "OffChainDeposit";
              } | {
                  abiVersion: string;
                  callData: string;
                  code: {
                      bytecode: `cb_${string}`;
                  };
                  deposit: bigint;
                  op: "OffChainNewContract";
                  owner: string;
                  vmVersion: string;
              } | {
                  abiVersion: string;
                  amount: bigint;
                  callData: string;
                  caller: string;
                  contract: string;
                  gas: number;
                  gasPrice: bigint;
                  op: "OffChainCallContract";
              };
              version: number;
              vmVersion?: string;
          };
      }[]>
    • Parameters

      • Rest ...args: [hash: `mh_${string}`] | [hash: `mh_${string}`, Omit<{
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            onNode: Node;
        }>]

      Returns Promise<{
          blockHash: string;
          blockHeight: number;
          encodedTx?: string;
          hash: string;
          signatures: string[];
          tx: {
              abiVersion?: string;
              accountId?: string;
              amount?: bigint;
              authData?: string;
              authFun?: string;
              callData?: string;
              callerId?: string;
              channelId?: string;
              channelReserve?: bigint;
              clientTtl?: number;
              code?: string;
              commitmentId?: string;
              contractId?: string;
              delegateIds?: {
                  initiator?: string[];
                  responder?: string[];
              };
              deposit?: bigint;
              fee: bigint;
              fromId?: string;
              gaId?: string;
              gas?: number;
              gasPrice?: bigint;
              initiatorAmount?: bigint;
              initiatorAmountFinal?: bigint;
              initiatorDelegateIds?: string[];
              initiatorId?: string;
              lockPeriod?: string;
              name?: string;
              nameFee?: bigint;
              nameId?: string;
              nameSalt?: number;
              nameTtl?: number;
              nonce?: number;
              offchainTrees?: string;
              oracleId?: string;
              oracleTtl?: {
                  type: "delta";
                  value: string;
              };
              ownerId?: string;
              payerId?: string;
              payload?: string;
              poi?: string;
              pointers?: {
                  id: string;
                  key: string;
              }[];
              query?: string;
              queryFee?: bigint;
              queryFormat?: string;
              queryId?: string;
              queryTtl?: {
                  type: TTLType;
                  value: string;
              };
              recipientId?: string;
              responderAmount?: bigint;
              responderAmountFinal?: bigint;
              responderDelegateIds?: string[];
              responderId?: string;
              response?: string;
              responseFormat?: string;
              responseTtl?: {
                  type: "delta";
                  value: string;
              };
              round?: number;
              senderId?: string;
              stateHash?: string;
              toId?: string;
              ttl?: number;
              tx?: { tx: { recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 54 more ...; type: TxType; }; ... 4 more ...; signatures: string[]; };
              type: TxType;
              update?: {
                  op: "OffChainTransfer" | "OffChainWithdrawal" | "OffChainDeposit" | "OffChainNewContract" | "OffChainCallContract";
              } | {
                  amount: bigint;
                  from: string;
                  op: "OffChainTransfer";
                  to: string;
              } | {
                  amount: bigint;
                  op: "OffChainWithdrawal";
                  to: string;
              } | {
                  amount: bigint;
                  from: string;
                  op: "OffChainDeposit";
              } | {
                  abiVersion: string;
                  callData: string;
                  code: {
                      bytecode: `cb_${string}`;
                  };
                  deposit: bigint;
                  op: "OffChainNewContract";
                  owner: string;
                  vmVersion: string;
              } | {
                  abiVersion: string;
                  amount: bigint;
                  callData: string;
                  caller: string;
                  contract: string;
                  gas: number;
                  gasPrice: bigint;
                  op: "OffChainCallContract";
              };
              version: number;
              vmVersion?: string;
          };
      }[]>

getName: ((...args) => Promise<{
    id: string;
    owner?: string;
    pointers: {
        id: string;
        key: string;
    }[];
    ttl: number;
}>)

Type declaration

    • (...args): Promise<{
          id: string;
          owner?: string;
          pointers: {
              id: string;
              key: string;
          }[];
          ttl: number;
      }>
    • Parameters

      • Rest ...args: [name: `${string}.chain`] | [name: `${string}.chain`, Omit<{
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            onNode: Node;
        }>]

      Returns Promise<{
          id: string;
          owner?: string;
          pointers: {
              id: string;
              key: string;
          }[];
          ttl: number;
      }>

getOracleObject: ((...args) => Promise<GetOracleObjectReturnType>)

Type declaration

getQueryObject: ((...args) => Promise<GetQueryObjectReturnType>)

Type declaration

    • (...args): Promise<GetQueryObjectReturnType>
    • Parameters

      • Rest ...args: [oracleId: `ok_${string}`, queryId: `oq_${string}`] | [oracleId: `ok_${string}`, queryId: `oq_${string}`, Omit<RespondToQueryOptions & {
            interval?: number;
            onNode: Node;
        } & {
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<Omit<RespondToQueryOptions & {
            interval?: number;
            onNode: Node;
        } & {
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }, "onAccount"> & {
            onAccount: OnAccount;
        }>]

      Returns Promise<GetQueryObjectReturnType>

name: string
onAddressChange: ((a) => void)

Type declaration

    • (a): void
    • Parameters

      Returns void

onDisconnect: ((p) => void)

Type declaration

    • (p): void
    • Parameters

      • p: any

      Returns void

onNetworkChange: ((a) => void)

Type declaration

    • (a): void
    • Parameters

      Returns void

payForTransaction: ((...args) => Promise<SendTransactionReturnType>)

Type declaration

poll: ((...args) => Promise<{
    blockHash: string;
    blockHeight: number;
    encodedTx?: string;
    hash: string;
    signatures: string[];
    tx: {
        abiVersion?: string;
        accountId?: string;
        amount?: bigint;
        authData?: string;
        authFun?: string;
        callData?: string;
        callerId?: string;
        channelId?: string;
        channelReserve?: bigint;
        clientTtl?: number;
        code?: string;
        commitmentId?: string;
        contractId?: string;
        delegateIds?: {
            initiator?: string[];
            responder?: string[];
        };
        deposit?: bigint;
        fee: bigint;
        fromId?: string;
        gaId?: string;
        gas?: number;
        gasPrice?: bigint;
        initiatorAmount?: bigint;
        initiatorAmountFinal?: bigint;
        initiatorDelegateIds?: string[];
        initiatorId?: string;
        lockPeriod?: string;
        name?: string;
        nameFee?: bigint;
        nameId?: string;
        nameSalt?: number;
        nameTtl?: number;
        nonce?: number;
        offchainTrees?: string;
        oracleId?: string;
        oracleTtl?: {
            type: "delta";
            value: string;
        };
        ownerId?: string;
        payerId?: string;
        payload?: string;
        poi?: string;
        pointers?: {
            id: string;
            key: string;
        }[];
        query?: string;
        queryFee?: bigint;
        queryFormat?: string;
        queryId?: string;
        queryTtl?: {
            type: TTLType;
            value: string;
        };
        recipientId?: string;
        responderAmount?: bigint;
        responderAmountFinal?: bigint;
        responderDelegateIds?: string[];
        responderId?: string;
        response?: string;
        responseFormat?: string;
        responseTtl?: {
            type: "delta";
            value: string;
        };
        round?: number;
        senderId?: string;
        stateHash?: string;
        toId?: string;
        ttl?: number;
        tx?: { tx: { recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 54 more ...; type: TxType; }; ... 4 more ...; signatures: string[]; };
        type: TxType;
        update?: {
            op: "OffChainTransfer" | "OffChainWithdrawal" | "OffChainDeposit" | "OffChainNewContract" | "OffChainCallContract";
        } | {
            amount: bigint;
            from: string;
            op: "OffChainTransfer";
            to: string;
        } | {
            amount: bigint;
            op: "OffChainWithdrawal";
            to: string;
        } | {
            amount: bigint;
            from: string;
            op: "OffChainDeposit";
        } | {
            abiVersion: string;
            callData: string;
            code: {
                bytecode: `cb_${string}`;
            };
            deposit: bigint;
            op: "OffChainNewContract";
            owner: string;
            vmVersion: string;
        } | {
            abiVersion: string;
            amount: bigint;
            callData: string;
            caller: string;
            contract: string;
            gas: number;
            gasPrice: bigint;
            op: "OffChainCallContract";
        };
        version: number;
        vmVersion?: string;
    };
}>)

Type declaration

    • (...args): Promise<{
          blockHash: string;
          blockHeight: number;
          encodedTx?: string;
          hash: string;
          signatures: string[];
          tx: {
              abiVersion?: string;
              accountId?: string;
              amount?: bigint;
              authData?: string;
              authFun?: string;
              callData?: string;
              callerId?: string;
              channelId?: string;
              channelReserve?: bigint;
              clientTtl?: number;
              code?: string;
              commitmentId?: string;
              contractId?: string;
              delegateIds?: {
                  initiator?: string[];
                  responder?: string[];
              };
              deposit?: bigint;
              fee: bigint;
              fromId?: string;
              gaId?: string;
              gas?: number;
              gasPrice?: bigint;
              initiatorAmount?: bigint;
              initiatorAmountFinal?: bigint;
              initiatorDelegateIds?: string[];
              initiatorId?: string;
              lockPeriod?: string;
              name?: string;
              nameFee?: bigint;
              nameId?: string;
              nameSalt?: number;
              nameTtl?: number;
              nonce?: number;
              offchainTrees?: string;
              oracleId?: string;
              oracleTtl?: {
                  type: "delta";
                  value: string;
              };
              ownerId?: string;
              payerId?: string;
              payload?: string;
              poi?: string;
              pointers?: {
                  id: string;
                  key: string;
              }[];
              query?: string;
              queryFee?: bigint;
              queryFormat?: string;
              queryId?: string;
              queryTtl?: {
                  type: TTLType;
                  value: string;
              };
              recipientId?: string;
              responderAmount?: bigint;
              responderAmountFinal?: bigint;
              responderDelegateIds?: string[];
              responderId?: string;
              response?: string;
              responseFormat?: string;
              responseTtl?: {
                  type: "delta";
                  value: string;
              };
              round?: number;
              senderId?: string;
              stateHash?: string;
              toId?: string;
              ttl?: number;
              tx?: { tx: { recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 54 more ...; type: TxType; }; ... 4 more ...; signatures: string[]; };
              type: TxType;
              update?: {
                  op: "OffChainTransfer" | "OffChainWithdrawal" | "OffChainDeposit" | "OffChainNewContract" | "OffChainCallContract";
              } | {
                  amount: bigint;
                  from: string;
                  op: "OffChainTransfer";
                  to: string;
              } | {
                  amount: bigint;
                  op: "OffChainWithdrawal";
                  to: string;
              } | {
                  amount: bigint;
                  from: string;
                  op: "OffChainDeposit";
              } | {
                  abiVersion: string;
                  callData: string;
                  code: {
                      bytecode: `cb_${string}`;
                  };
                  deposit: bigint;
                  op: "OffChainNewContract";
                  owner: string;
                  vmVersion: string;
              } | {
                  abiVersion: string;
                  amount: bigint;
                  callData: string;
                  caller: string;
                  contract: string;
                  gas: number;
                  gasPrice: bigint;
                  op: "OffChainCallContract";
              };
              version: number;
              vmVersion?: string;
          };
      }>
    • Parameters

      • Rest ...args: [th: `th_${string}`] | [th: `th_${string}`, Omit<{
            blocks?: number;
            interval?: number;
            onNode: Node;
        } & {
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            blocks?: number;
            interval?: number;
            onNode: Node;
        } & {
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }>]

      Returns Promise<{
          blockHash: string;
          blockHeight: number;
          encodedTx?: string;
          hash: string;
          signatures: string[];
          tx: {
              abiVersion?: string;
              accountId?: string;
              amount?: bigint;
              authData?: string;
              authFun?: string;
              callData?: string;
              callerId?: string;
              channelId?: string;
              channelReserve?: bigint;
              clientTtl?: number;
              code?: string;
              commitmentId?: string;
              contractId?: string;
              delegateIds?: {
                  initiator?: string[];
                  responder?: string[];
              };
              deposit?: bigint;
              fee: bigint;
              fromId?: string;
              gaId?: string;
              gas?: number;
              gasPrice?: bigint;
              initiatorAmount?: bigint;
              initiatorAmountFinal?: bigint;
              initiatorDelegateIds?: string[];
              initiatorId?: string;
              lockPeriod?: string;
              name?: string;
              nameFee?: bigint;
              nameId?: string;
              nameSalt?: number;
              nameTtl?: number;
              nonce?: number;
              offchainTrees?: string;
              oracleId?: string;
              oracleTtl?: {
                  type: "delta";
                  value: string;
              };
              ownerId?: string;
              payerId?: string;
              payload?: string;
              poi?: string;
              pointers?: {
                  id: string;
                  key: string;
              }[];
              query?: string;
              queryFee?: bigint;
              queryFormat?: string;
              queryId?: string;
              queryTtl?: {
                  type: TTLType;
                  value: string;
              };
              recipientId?: string;
              responderAmount?: bigint;
              responderAmountFinal?: bigint;
              responderDelegateIds?: string[];
              responderId?: string;
              response?: string;
              responseFormat?: string;
              responseTtl?: {
                  type: "delta";
                  value: string;
              };
              round?: number;
              senderId?: string;
              stateHash?: string;
              toId?: string;
              ttl?: number;
              tx?: { tx: { recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 54 more ...; type: TxType; }; ... 4 more ...; signatures: string[]; };
              type: TxType;
              update?: {
                  op: "OffChainTransfer" | "OffChainWithdrawal" | "OffChainDeposit" | "OffChainNewContract" | "OffChainCallContract";
              } | {
                  amount: bigint;
                  from: string;
                  op: "OffChainTransfer";
                  to: string;
              } | {
                  amount: bigint;
                  op: "OffChainWithdrawal";
                  to: string;
              } | {
                  amount: bigint;
                  from: string;
                  op: "OffChainDeposit";
              } | {
                  abiVersion: string;
                  callData: string;
                  code: {
                      bytecode: `cb_${string}`;
                  };
                  deposit: bigint;
                  op: "OffChainNewContract";
                  owner: string;
                  vmVersion: string;
              } | {
                  abiVersion: string;
                  amount: bigint;
                  callData: string;
                  caller: string;
                  contract: string;
                  gas: number;
                  gasPrice: bigint;
                  op: "OffChainCallContract";
              };
              version: number;
              vmVersion?: string;
          };
      }>

pollForQueries: ((...args) => (() => void))

Type declaration

    • (...args): (() => void)
    • Parameters

      • Rest ...args: [oracleId: `ok_${string}`, onQuery: ((query) => void)] | [oracleId: `ok_${string}`, onQuery: ((query) => void), Omit<{
            interval?: number;
            onNode: Node;
        } & {
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            interval?: number;
            onNode: Node;
        } & {
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }>]

      Returns (() => void)

        • (): void
        • Returns void

pollForQueryResponse: ((...args) => Promise<string>)

Type declaration

    • (...args): Promise<string>
    • Parameters

      • Rest ...args: [oracleId: `ok_${string}`, queryId: `oq_${string}`] | [oracleId: `ok_${string}`, queryId: `oq_${string}`, Omit<{
            interval?: number;
            onNode: Node;
        } & {
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            interval?: number;
            onNode: Node;
        } & {
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }>]

      Returns Promise<string>

pool: Map<string, Node> = ...
postQueryToOracle: ((...args) => Promise<SendTransactionReturnType & GetQueryObjectReturnType>)

Type declaration

registerOracle: ((...args) => Promise<SendTransactionReturnType & GetOracleObjectReturnType>)

Type declaration

resolveName: ((...args) => Promise<`ct_${string}` | `ak_${string}` | `nm_${string}`>)

Type declaration

    • (...args): Promise<`ct_${string}` | `ak_${string}` | `nm_${string}`>
    • Parameters

      • Rest ...args: [nameOrId: `${string}.chain` | `ct_${string}` | `ak_${string}`, key: string] | [nameOrId: `${string}.chain` | `ct_${string}` | `ak_${string}`, key: string, Omit<{
            onNode: Node;
            resolveByNode?: boolean;
            verify?: boolean;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            onNode: Node;
            resolveByNode?: boolean;
            verify?: boolean;
        }>]

      Returns Promise<`ct_${string}` | `ak_${string}` | `nm_${string}`>

respondToQuery: ((...args) => Promise<SendTransactionReturnType & GetOracleObjectReturnType>)

Type declaration

rpcClient?: default<WalletApi, AeppApi>
selectedNodeName?: string
sendTransaction: ((...args) => Promise<SendTransactionReturnType>)

Type declaration

spend: ((...args) => Promise<SendTransactionReturnType>)

Type declaration

    • (...args): Promise<SendTransactionReturnType>
    • Parameters

      • Rest ...args: [amount: string | number, recipientIdOrName: `${string}.chain` | `ct_${string}` | `ak_${string}`] | [amount: string | number, recipientIdOrName: `${string}.chain` | `ct_${string}` | `ak_${string}`, Omit<SpendOptions, "onNode" | "onAccount" | "onCompiler"> & Partial<Omit<SpendOptions, "onAccount"> & {
            onAccount: OnAccount;
        }>]

      Returns Promise<SendTransactionReturnType>

transferFunds: ((...args) => Promise<SendTransactionReturnType>)

Type declaration

txDryRun: ((...args) => Promise<{
    txEvents?: TransformNodeType<undefined | Record<string, unknown>[]>;
} & {
    callObj?: {
        callerId: string;
        callerNonce: string;
        contractId: string;
        gasPrice: bigint;
        gasUsed: number;
        height: number;
        log: {
            address: string;
            data: string;
            topics: string[];
        }[];
        returnType: ContractCallReturnType;
        returnValue: string;
    };
    reason?: string;
    result: string;
    type: string;
}>)

Type declaration

    • (...args): Promise<{
          txEvents?: TransformNodeType<undefined | Record<string, unknown>[]>;
      } & {
          callObj?: {
              callerId: string;
              callerNonce: string;
              contractId: string;
              gasPrice: bigint;
              gasUsed: number;
              height: number;
              log: {
                  address: string;
                  data: string;
                  topics: string[];
              }[];
              returnType: ContractCallReturnType;
              returnValue: string;
          };
          reason?: string;
          result: string;
          type: string;
      }>
    • Parameters

      • Rest ...args: [tx: `tx_${string}`, accountAddress: `ak_${string}`] | [tx: `tx_${string}`, accountAddress: `ak_${string}`, Omit<{
            combine?: boolean;
            onNode: Node;
            top?: number | `kh_${string}` | `mh_${string}`;
            txEvents?: boolean;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            combine?: boolean;
            onNode: Node;
            top?: number | `kh_${string}` | `mh_${string}`;
            txEvents?: boolean;
        }>]

      Returns Promise<{
          txEvents?: TransformNodeType<undefined | Record<string, unknown>[]>;
      } & {
          callObj?: {
              callerId: string;
              callerNonce: string;
              contractId: string;
              gasPrice: bigint;
              gasUsed: number;
              height: number;
              log: {
                  address: string;
                  data: string;
                  topics: string[];
              }[];
              returnType: ContractCallReturnType;
              returnValue: string;
          };
          reason?: string;
          result: string;
          type: string;
      }>

waitForTxConfirm: ((...args) => Promise<number>)

Type declaration

    • (...args): Promise<number>
    • Parameters

      • Rest ...args: [txHash: `th_${string}`] | [txHash: `th_${string}`, Omit<{
            confirm?: number;
            onNode: Node;
        } & {
            interval?: number;
            onNode: Node;
        } & {
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }, "onNode" | "onAccount" | "onCompiler"> & Partial<{
            confirm?: number;
            onNode: Node;
        } & {
            interval?: number;
            onNode: Node;
        } & {
            _expectedMineRate?: number;
            _microBlockCycle?: number;
            onNode: Node;
        }>]

      Returns Promise<number>

Accessors

  • get address(): `ak_${string}`
  • Returns `ak_${string}`

Methods

  • Add Node

    Parameters

    • name: string

      Node name

    • node: Node

      Node instance

    • select: boolean = false

      Select this node as current

    Returns void

    Example

    // add and select new node with name 'testNode'
    aeSdkBase.addNode('testNode', new Node({ url }), true)
  • Ask addresses from wallet

    Returns Promise<`ak_${string}`[]>

    Addresses from wallet

  • Connect to wallet

    Parameters

    • connection: default

      Wallet connection object

    • options: {
          connectNode?: boolean;
          name?: string;
      } = {}

      Options

      • Optional connectNode?: boolean

        Request wallet to bind node

      • Optional name?: string

        Node name

    Returns Promise<WalletInfo & {
        node?: Node;
    }>

  • Disconnect from wallet

    Returns void

  • Select Node

    Parameters

    • name: string

      Node name

    Returns void

    Example

    nodePool.selectNode('testNode')
    
  • Sign data blob

    Parameters

    • data: string | Uint8Array

      Data to sign

    • options: {
          onAccount?: OnAccount;
      } = {}

      Options

    Returns Promise<Uint8Array>

  • Parameters

    • contractAddress: `ct_${string}`

      Contract address

    • options: {
          onAccount?: OnAccount;
      } & {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
          consensusProtocolVersion?: ConsensusProtocolVersion;
          networkId?: string;
      } = {}

      Options

    Returns Promise<`sg_${string}`>

    Deprecated

    use AeSdkBase:signDelegation in Ceres

  • Sign delegation, works only in Ceres

    Parameters

    • delegation: `ba_${string}`

      Delegation to sign

    • options: {
          onAccount?: OnAccount;
      } & {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
          networkId?: string;
      } = {}

      Options

    Returns Promise<`sg_${string}`>

  • Parameters

    • contractAddress: `ct_${string}`

      Contract address

    • options: {
          onAccount?: OnAccount;
      } & {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
          consensusProtocolVersion?: ConsensusProtocolVersion;
          isOracle?: boolean;
          networkId?: string;
      } = {}

      Options

    Returns Promise<`sg_${string}`>

    Deprecated

    use AeSdkBase:signDelegation in Ceres

  • Sign message

    Parameters

    • message: string

      Message to sign

    • options: {
          onAccount?: OnAccount;
      } & {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
      } = {}

      Options

    Returns Promise<Uint8Array>

  • Parameters

    • contractAddress: `ct_${string}`

      Contract address

    • name: `${string}.chain`

      AENS name

    • options: {
          onAccount?: OnAccount;
      } & {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
          consensusProtocolVersion?: ConsensusProtocolVersion;
          networkId?: string;
      } = {}

      Options

    Returns Promise<`sg_${string}`>

    Deprecated

    use AeSdkBase:signDelegation in Ceres

  • Parameters

    • contractAddress: `ct_${string}`

      Contract address

    • oracleQueryId: `oq_${string}`

      Oracle query id

    • options: {
          onAccount?: OnAccount;
      } & {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
          consensusProtocolVersion?: ConsensusProtocolVersion;
          networkId?: string;
      } = {}

      Options

    Returns Promise<`sg_${string}`>

    Deprecated

    use AeSdkBase:signDelegation in Ceres

  • Sign encoded transaction

    Parameters

    • tx: `tx_${string}`

      Transaction to sign

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

      Options

    Returns Promise<`tx_${string}`>

  • Sign typed data

    Parameters

    • data: `cb_${string}`

      Encoded data to sign

    • aci: AciValue

      Type of data to sign

    • options: {
          onAccount?: OnAccount;
      } & Domain & {
          aeppOrigin?: string;
          aeppRpcClientId?: string;
      } = {}

      Options

    Returns Promise<`sg_${string}`>

  • Subscribe for addresses from wallet

    Parameters

    • type: SUBSCRIPTION_TYPES

      Subscription type

    • value: "connected" | "current"

      Should be one of 'current' (the selected account), 'connected' (all)

    Returns Promise<Promise<{
        address: Accounts;
        subscription: ("connected" | "current")[];
    }>>

    Accounts from wallet

Generated using TypeDoc