methods: {
    _getPollInterval: ((type, options) => Promise<number>);
    aensBid: ((name, nameFee, options) => ReturnType<typeof aensClaim>);
    aensClaim: ((name, salt, options) => Promise<AensClaimReturnType>);
    aensPreclaim: ((name, options) => Promise<Readonly<Awaited<ReturnType<typeof sendTransaction>> & {
        claim: ((opts?) => ReturnType<typeof aensClaim>);
        commitmentId: string;
        salt: number;
    }>>);
    aensQuery: ((name, opt) => Promise<Readonly<TransformNodeType<NameEntry> & {
        extendTtl: ((nameTtl?, options?) => ReturnType<typeof aensUpdate> & ReturnType<typeof aensQuery>);
        id: Name;
        owner: AccountAddress;
        pointers: KeyPointers | NamePointer[];
        revoke: ((options?) => ReturnType<typeof aensRevoke>);
        transfer: ((account, options?) => ReturnType<typeof aensUpdate> & ReturnType<typeof aensQuery>);
        ttl: number;
        update: ((pointers, options?) => ReturnType<typeof aensUpdate> & ReturnType<typeof aensQuery>);
    }>>);
    aensRevoke: ((name, options) => ReturnType<typeof sendTransaction>);
    aensTransfer: ((name, account, options) => ReturnType<typeof sendTransaction>);
    aensUpdate: ((name, pointers, options) => ReturnType<typeof sendTransaction>);
    awaitHeight: ((height, options) => Promise<number>);
    buildAuthTxHash: ((transaction, options) => Promise<Buffer>);
    buildAuthTxHashByGaMetaTx: ((transaction, options) => Promise<Buffer>);
    createDelegationSignature: ((contractAddress, ids, options) => Promise<Uint8Array>);
    createGeneralizedAccount: ((authFnName, args, options) => Promise<Readonly<{
        gaContractId: ContractAddress;
        owner: AccountAddress;
        rawTx: Transaction;
        transaction: TxHash;
    }>>);
    extendOracleTtl: ((options) => Promise<Awaited<ReturnType<typeof sendTransaction>> & Awaited<ReturnType<typeof getOracleObject>>>);
    getAccount: ((address, options) => Promise<TransformNodeType<Account>>);
    getBalance: ((address, options) => Promise<string>);
    getContract: ((contractId, options) => Promise<TransformNodeType<ContractObject>>);
    getContractByteCode: ((contractId, options) => Promise<TransformNodeType<ByteCode>>);
    getCurrentGeneration: ((options) => Promise<TransformNodeType<Generation>>);
    getGeneration: ((hashOrHeight, options) => Promise<TransformNodeType<Generation>>);
    getHeight: ((options) => Promise<number>);
    getKeyBlock: ((hashOrHeight, options) => Promise<TransformNodeType<KeyBlock>>);
    getMicroBlockHeader: ((hash, options) => Promise<TransformNodeType<MicroBlockHeader>>);
    getMicroBlockTransactions: ((hash, options) => Promise<TransformNodeType<SignedTx[]>>);
    getName: ((name, options) => Promise<TransformNodeType<NameEntry>>);
    getOracleObject: ((oracleId, options) => Promise<GetOracleObjectReturnType>);
    getQueryObject: ((oracleId, queryId, options) => Promise<GetQueryObjectReturnType>);
    payForTransaction: ((transaction, options) => ReturnType<typeof sendTransaction>);
    poll: ((th, options) => Promise<TransformNodeType<SignedTx>>);
    pollForQueries: ((oracleId, onQuery, options) => (() => void));
    pollForQueryResponse: ((oracleId, queryId, options) => Promise<string>);
    postQueryToOracle: ((oracleId, query, options) => Promise<Awaited<ReturnType<typeof sendTransaction>> & Awaited<ReturnType<typeof getQueryObject>>>);
    registerOracle: ((queryFormat, responseFormat, options) => Promise<Awaited<ReturnType<typeof sendTransaction>> & Awaited<ReturnType<typeof getOracleObject>>>);
    resolveName: (<Type>(nameOrId, key, options) => Promise<Generic<Type | Name>>);
    respondToQuery: ((queryId, response, options) => Promise<Awaited<ReturnType<typeof sendTransaction>> & Awaited<ReturnType<typeof getOracleObject>>>);
    sendTransaction: ((txUnsigned, options) => Promise<SendTransactionReturnType>);
    spend: ((amount, recipientIdOrName, options) => ReturnType<typeof sendTransaction>);
    transferFunds: ((fraction, recipientIdOrName, options) => ReturnType<typeof sendTransaction>);
    txDryRun: ((tx, accountAddress, options) => Promise<{
        txEvents?: TransformNodeType<DryRunResults["txEvents"]>;
    } & TransformNodeType<DryRunResult>>);
    waitForTxConfirm: ((txHash, options) => Promise<number>);
} = ...

Type declaration

  • _getPollInterval: ((type, options) => Promise<number>)
      • (type, options): Promise<number>
      • Parameters

        • type: "key-block" | "micro-block"

          Type

        • options: {
              _expectedMineRate?: number;
              _microBlockCycle?: number;
              onNode: Node;
          }

          Options

          • Optional _expectedMineRate?: number
          • Optional _microBlockCycle?: number
          • onNode: Node

        Returns Promise<number>

  • aensBid: ((name, nameFee, options) => ReturnType<typeof aensClaim>)
      • (name, nameFee, options): ReturnType<typeof aensClaim>
      • Bid to name auction

        Parameters

        • name: `${string}.chain`

          Domain name

        • nameFee: string | number | BigNumber

          Name fee (bid fee)

        • options: Omit<AensClaimOptions, "nameFee">

          Options

        Returns ReturnType<typeof aensClaim>

        Transaction result

        Example

        const name = 'test.chain'
        const bidFee = computeBidFee(name, { startFee, increment: 0.42 })

        await sdkInstance.aensBid(name, 213109412839123, { ttl, fee, nonce })
  • aensClaim: ((name, salt, options) => Promise<AensClaimReturnType>)
      • (name, salt, options): Promise<AensClaimReturnType>
      • Claim a previously preclaimed registration. This can only be done after the preclaim step

        Parameters

        • name: `${string}.chain`

          AENS name

        • salt: number

          Salt from pre-claim, or 0 if it's a bid or claiming without preclaim (in Ceres)

        • options: AensClaimOptions

          options

        Returns Promise<AensClaimReturnType>

        Transaction result

        Example

        const name = 'test.chain'
        const salt = preclaimResult.salt // salt from pre-claim transaction

        await sdkInstance.aensClaim(name, salt, { ttl, fee, nonce, nameFee })
  • aensPreclaim: ((name, options) => Promise<Readonly<Awaited<ReturnType<typeof sendTransaction>> & {
        claim: ((opts?) => ReturnType<typeof aensClaim>);
        commitmentId: string;
        salt: number;
    }>>)
      • (name, options): Promise<Readonly<Awaited<ReturnType<typeof sendTransaction>> & {
            claim: ((opts?) => ReturnType<typeof aensClaim>);
            commitmentId: string;
            salt: number;
        }>>
      • Preclaim a name. Sends a hash of the name and a random salt to the node

        Parameters

        Returns Promise<Readonly<Awaited<ReturnType<typeof sendTransaction>> & {
            claim: ((opts?) => ReturnType<typeof aensClaim>);
            commitmentId: string;
            salt: number;
        }>>

        Example

        const name = 'test.chain'
        const salt = preclaimResult.salt // salt from pre-claim transaction

        await sdkInstance.aensPreclaim(name, { ttl, fee, nonce })
        {
        ...transactionResult,
        claim, // Claim function (options={}) => claimTransactionResult
        salt,
        commitmentId
        }
  • aensQuery: ((name, opt) => Promise<Readonly<TransformNodeType<NameEntry> & {
        extendTtl: ((nameTtl?, options?) => ReturnType<typeof aensUpdate> & ReturnType<typeof aensQuery>);
        id: Name;
        owner: AccountAddress;
        pointers: KeyPointers | NamePointer[];
        revoke: ((options?) => ReturnType<typeof aensRevoke>);
        transfer: ((account, options?) => ReturnType<typeof aensUpdate> & ReturnType<typeof aensQuery>);
        ttl: number;
        update: ((pointers, options?) => ReturnType<typeof aensUpdate> & ReturnType<typeof aensQuery>);
    }>>)
      • (name, opt): Promise<Readonly<TransformNodeType<NameEntry> & {
            extendTtl: ((nameTtl?, options?) => ReturnType<typeof aensUpdate> & ReturnType<typeof aensQuery>);
            id: Name;
            owner: AccountAddress;
            pointers: KeyPointers | NamePointer[];
            revoke: ((options?) => ReturnType<typeof aensRevoke>);
            transfer: ((account, options?) => ReturnType<typeof aensUpdate> & ReturnType<typeof aensQuery>);
            ttl: number;
            update: ((pointers, options?) => ReturnType<typeof aensUpdate> & ReturnType<typeof aensQuery>);
        }>>
      • Query the AENS name info from the node and return the object with info and predefined functions for manipulating name

        Parameters

        Returns Promise<Readonly<TransformNodeType<NameEntry> & {
            extendTtl: ((nameTtl?, options?) => ReturnType<typeof aensUpdate> & ReturnType<typeof aensQuery>);
            id: Name;
            owner: AccountAddress;
            pointers: KeyPointers | NamePointer[];
            revoke: ((options?) => ReturnType<typeof aensRevoke>);
            transfer: ((account, options?) => ReturnType<typeof aensUpdate> & ReturnType<typeof aensQuery>);
            ttl: number;
            update: ((pointers, options?) => ReturnType<typeof aensUpdate> & ReturnType<typeof aensQuery>);
        }>>

        Example

        const nameObject = sdkInstance.aensQuery('test.chain')
        console.log(nameObject)
        {
        id, // name hash
        pointers, // array of pointers
        update, // Update name function
        extendTtl, // Extend Ttl name function
        transfer, // Transfer name function
        revoke // Revoke name function
        }
  • aensRevoke: ((name, options) => ReturnType<typeof sendTransaction>)
      • (name, options): ReturnType<typeof sendTransaction>
      • Revoke a name

        Parameters

        Returns ReturnType<typeof sendTransaction>

        Transaction result

        Example

        const name = 'test.chain'
        const nameObject = await sdkInstance.aensQuery(name)

        await sdkInstance.aensRevoke(name, { fee, ttl , nonce })
        // or
        await nameObject.revoke({ fee, ttl, nonce })
  • aensTransfer: ((name, account, options) => ReturnType<typeof sendTransaction>)
      • (name, account, options): ReturnType<typeof sendTransaction>
      • Transfer a domain to another account

        Parameters

        • name: `${string}.chain`

          AENS name

        • account: `ak_${string}`

          Recipient account publick key

        • options: AensTransferOptions

          Options

        Returns ReturnType<typeof sendTransaction>

        Transaction result

        Example

        const name = 'test.chain'
        const recipientPub = 'ak_asd23dasdas...'
        const nameObject = await sdkInstance.aensQuery(name)

        await sdkInstance.aensTransfer(name, recipientPub, { ttl, fee, nonce })
        // or
        await nameObject.transfer(recipientPub, { ttl, fee, nonce })
  • aensUpdate: ((name, pointers, options) => ReturnType<typeof sendTransaction>)
      • (name, pointers, options): ReturnType<typeof sendTransaction>
      • Update a name

        Parameters

        Returns ReturnType<typeof sendTransaction>

        Throws

        Invalid pointer array error

        Example

        const name = 'test.chain'
        const pointersArray = ['ak_asd23dasdas...,' 'ct_asdf34fasdasd...']
        const nameObject = await sdkInstance.aensQuery(name)

        await sdkInstance.aensUpdate(name, pointersArray, { nameTtl, ttl, fee, nonce, clientTtl })
        // or
        await nameObject.update(pointers, { nameTtl, ttl, fee, nonce, clientTtl })
  • awaitHeight: ((height, options) => Promise<number>)
      • (height, options): Promise<number>
      • Wait for the chain to reach a specific height

        Parameters

        • height: number

          Height to wait for

        • options: {
              interval?: number;
              onNode: Node;
          } & {
              _expectedMineRate?: number;
              _microBlockCycle?: number;
              onNode: Node;
          }

          Options

        Returns Promise<number>

        Current chain height

  • buildAuthTxHash: ((transaction, options) => Promise<Buffer>)
      • (transaction, options): Promise<Buffer>
      • Build a transaction hash the same as Auth.tx_hash by GaMetaTx payload

        Parameters

        • transaction: `tx_${string}`

          tx-encoded transaction

        • options: {
              fee?: Int;
              gasPrice?: Int;
              onNode: Node;
          }

          Options

          • Optional fee?: Int

            GaMetaTx fee, required in Ceres

          • Optional gasPrice?: Int

            GaMetaTx gasPrice, required in Ceres

          • onNode: Node

            Node to use

        Returns Promise<Buffer>

        Transaction hash

  • buildAuthTxHashByGaMetaTx: ((transaction, options) => Promise<Buffer>)
      • (transaction, options): Promise<Buffer>
      • Build a transaction hash the same as Auth.tx_hash by GaMetaTx

        Parameters

        • transaction: `tx_${string}`

          tx-encoded signed GaMeta transaction

        • options: {
              onNode: Node;
          }

          Options

          • onNode: Node

            Node to use

        Returns Promise<Buffer>

        Transaction hash

  • createDelegationSignature: ((contractAddress, ids, options) => Promise<Uint8Array>)
      • (contractAddress, ids, options): Promise<Uint8Array>
      • Helper to generate a signature to delegate

        • pre-claim/claim/transfer/revoke of a name to a contract.
        • register/extend/respond of an Oracle to a contract.

        Parameters

        • contractAddress: `ct_${string}`

          Address of contract to delegate access

        • 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}`)[]

          The list of id's to prepend

        • options: {
              isOracle?: boolean;
              omitAddress?: boolean;
              onAccount: AccountBase;
              onNode: Node;
          }

          Options

          • Optional isOracle?: boolean
          • Optional omitAddress?: boolean

            Prepend delegation signature with an account address

          • onAccount: AccountBase

            Account to use

          • onNode: Node

            Node to use

        Returns Promise<Uint8Array>

        Signature

        Deprecated

        use methods sign*DelegationToContract of Account instance instead

        Example

        const aeSdk = new AeSdk({ ... })
        const contractAddress = 'ct_asd2ks...'
        const aensName = 'example.chain'
        const onAccount = new MemoryAccount(...) // Sign with a specific account
        // Preclaim signature
        const preclaimSig = await aeSdk.createDelegationSignature(contractAddress, [], { onAccount })
        // Claim, transfer and revoke signature
        const aensDelegationSig = await aeSdk
        .createDelegationSignature(contractAddress, [aensName], { onAccount })

        const oracleQueryId = 'oq_...'
        const onAccount = new MemoryAccount(...) // Sign with a specific account
        // Oracle register and extend signature
        const oracleDelegationSig = await aeSdk
        .createDelegationSignature(contractAddress, [], { onAccount })
        // Oracle respond signature
        const respondSig = await aeSdk
        .createDelegationSignature(contractAddress, [oracleQueryId], { onAccount, omitAddress: true })
  • createGeneralizedAccount: ((authFnName, args, options) => Promise<Readonly<{
        gaContractId: ContractAddress;
        owner: AccountAddress;
        rawTx: Transaction;
        transaction: TxHash;
    }>>)
  • extendOracleTtl: ((options) => Promise<Awaited<ReturnType<typeof sendTransaction>> & Awaited<ReturnType<typeof getOracleObject>>>)
  • getAccount: ((address, options) => Promise<TransformNodeType<Account>>)
      • (address, options): Promise<TransformNodeType<Account>>
      • Get account by account public key

        Parameters

        • address: `ct_${string}` | `ak_${string}`

          Account address (public key)

        • options: {
              hash?: `kh_${string}` | `mh_${string}`;
              height?: number;
              onNode: Node;
          }

          Options

          • Optional hash?: `kh_${string}` | `mh_${string}`

            Get account on specific block by micro block hash or key block hash

          • Optional height?: number

            Get account on specific block by block height

          • onNode: Node

            Node to use

        Returns Promise<TransformNodeType<Account>>

  • getBalance: ((address, options) => Promise<string>)
      • (address, options): Promise<string>
      • Request the balance of specified account

        Parameters

        • address: `ct_${string}` | `ok_${string}` | `ak_${string}`

          The public account address to obtain the balance for

        • options: {
              format?: AE_AMOUNT_FORMATS;
          } & {
              hash?: `kh_${string}` | `mh_${string}`;
              height?: number;
              onNode: Node;
          }

          Options

        Returns Promise<string>

  • getContract: ((contractId, options) => Promise<TransformNodeType<ContractObject>>)
  • getContractByteCode: ((contractId, options) => Promise<TransformNodeType<ByteCode>>)
  • getCurrentGeneration: ((options) => Promise<TransformNodeType<Generation>>)
  • getGeneration: ((hashOrHeight, options) => Promise<TransformNodeType<Generation>>)
  • getHeight: ((options) => Promise<number>)
      • (options): Promise<number>
      • Obtain current height of the chain

        Parameters

        • options: {
              cached?: boolean;
              onNode: Node;
          } & {
              _expectedMineRate?: number;
              _microBlockCycle?: number;
              onNode: Node;
          }

          Options

        Returns Promise<number>

        Current chain height

  • getKeyBlock: ((hashOrHeight, options) => Promise<TransformNodeType<KeyBlock>>)
  • getMicroBlockHeader: ((hash, options) => Promise<TransformNodeType<MicroBlockHeader>>)
  • getMicroBlockTransactions: ((hash, options) => Promise<TransformNodeType<SignedTx[]>>)
  • getName: ((name, options) => Promise<TransformNodeType<NameEntry>>)
  • getOracleObject: ((oracleId, options) => Promise<GetOracleObjectReturnType>)
  • getQueryObject: ((oracleId, queryId, options) => Promise<GetQueryObjectReturnType>)
      • (oracleId, queryId, options): Promise<GetQueryObjectReturnType>
      • Constructor for OracleQuery Object (helper object for using OracleQuery)

        Parameters

        • oracleId: `ok_${string}`

          Oracle public key

        • queryId: `oq_${string}`

          Oracle Query id

        • options: RespondToQueryOptions & {
              interval?: number;
              onNode: Node;
          } & {
              _expectedMineRate?: number;
              _microBlockCycle?: number;
              onNode: Node;
          }

          Options

        Returns Promise<GetQueryObjectReturnType>

        OracleQuery object

  • payForTransaction: ((transaction, options) => ReturnType<typeof sendTransaction>)
      • (transaction, options): ReturnType<typeof sendTransaction>
      • Submit transaction of another account paying for it (fee and gas)

        Parameters

        Returns ReturnType<typeof sendTransaction>

        Object Transaction

  • poll: ((th, options) => Promise<TransformNodeType<SignedTx>>)
      • (th, options): Promise<TransformNodeType<SignedTx>>
      • Return transaction details if it is mined, fail otherwise. If the transaction has ttl specified then would wait till it leaves the mempool. Otherwise would fail if a specified amount of blocks were mined.

        Parameters

        • th: `th_${string}`

          The hash of transaction to poll

        • options: {
              blocks?: number;
              interval?: number;
              onNode: Node;
          } & {
              _expectedMineRate?: number;
              _microBlockCycle?: number;
              onNode: Node;
          }

          Options

        Returns Promise<TransformNodeType<SignedTx>>

        The transaction as it was mined

  • pollForQueries: ((oracleId, onQuery, options) => (() => void))
      • (oracleId, onQuery, options): (() => void)
      • Poll for oracle queries

        Parameters

        • oracleId: `ok_${string}`

          Oracle public key

        • onQuery: ((query) => void)

          OnQuery callback

            • (query): void
            • Parameters

              • query: {
                    fee: bigint;
                    id: string;
                    oracleId: string;
                    query: string;
                    response: string;
                    responseTtl: {
                        type: TTLType;
                        value: string;
                    };
                    senderId: string;
                    senderNonce: string;
                    ttl: number;
                }
                • fee: bigint
                • id: string

                  Base58Check encoded tagged value

                • oracleId: string

                  Base58Check encoded tagged pubkey

                • query: string
                • response: string
                • responseTtl: {
                      type: TTLType;
                      value: string;
                  }
                • senderId: string

                  Base58Check encoded tagged pubkey

                • senderNonce: string
                • ttl: number

              Returns void

        • options: {
              interval?: number;
              onNode: Node;
          } & {
              _expectedMineRate?: number;
              _microBlockCycle?: number;
              onNode: Node;
          }

          Options object

        Returns (() => void)

        Callback to stop polling function

          • (): void
          • Returns void

  • pollForQueryResponse: ((oracleId, queryId, options) => Promise<string>)
      • (oracleId, queryId, options): Promise<string>
      • Poll for oracle query response

        Parameters

        • oracleId: `ok_${string}`

          Oracle public key

        • queryId: `oq_${string}`

          Oracle Query id

        • options: {
              interval?: number;
              onNode: Node;
          } & {
              _expectedMineRate?: number;
              _microBlockCycle?: number;
              onNode: Node;
          }

          Options object

        Returns Promise<string>

        OracleQuery object

  • postQueryToOracle: ((oracleId, query, options) => Promise<Awaited<ReturnType<typeof sendTransaction>> & Awaited<ReturnType<typeof getQueryObject>>>)
  • registerOracle: ((queryFormat, responseFormat, options) => Promise<Awaited<ReturnType<typeof sendTransaction>> & Awaited<ReturnType<typeof getOracleObject>>>)
  • resolveName: (<Type>(nameOrId, key, options) => Promise<Generic<Type | Name>>)
      • <Type>(nameOrId, key, options): Promise<Generic<Type | Name>>
      • Resolve AENS name and return name hash

        Type Parameters

        Parameters

        • nameOrId: `${string}.chain` | `${Type}_${string}`

          AENS name or address

        • key: string

          in AENS pointers record

        • options: {
              onNode: Node;
              resolveByNode?: boolean;
              verify?: boolean;
          }

          Options

          • onNode: Node

            Node to use

          • Optional resolveByNode?: boolean

            Enables pointer resolving using node

          • Optional verify?: boolean

            To ensure that name exist and have a corresponding pointer // TODO: avoid that to don't trust to current api gateway

        Returns Promise<Generic<Type | Name>>

        Address or AENS name hash

  • respondToQuery: ((queryId, response, options) => Promise<Awaited<ReturnType<typeof sendTransaction>> & Awaited<ReturnType<typeof getOracleObject>>>)
  • sendTransaction: ((txUnsigned, options) => Promise<SendTransactionReturnType>)
  • spend: ((amount, recipientIdOrName, options) => ReturnType<typeof sendTransaction>)
      • (amount, recipientIdOrName, options): ReturnType<typeof sendTransaction>
      • Send coins to another account

        Parameters

        • amount: string | number

          Amount to spend

        • recipientIdOrName: `${string}.chain` | `ct_${string}` | `ak_${string}`

          Address or name of recipient account

        • options: SpendOptions

          Options

        Returns ReturnType<typeof sendTransaction>

        Transaction

  • transferFunds: ((fraction, recipientIdOrName, options) => ReturnType<typeof sendTransaction>)
      • (fraction, recipientIdOrName, options): ReturnType<typeof sendTransaction>
      • Spend a fraction of coin balance to another account. Useful if needed to drain account balance completely, sending funds to another account (with fraction set to 1).

        Parameters

        • fraction: string | number

          Fraction of balance to spend (between 0 and 1)

        • recipientIdOrName: `${string}.chain` | `ct_${string}` | `ak_${string}`

          Address or name of recipient account

        • options: TransferFundsOptions

          Options

        Returns ReturnType<typeof sendTransaction>

        Example

        // `fraction` * 100 = % of AE to be transferred (e.g. `0.42` for 42% or `1` for 100%)
        const { blockHeight } = await aeSdk.transferFunds(
        0.42,
        'ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E',
        );
        console.log('Transaction mined at', blockHeight);
  • txDryRun: ((tx, accountAddress, options) => Promise<{
        txEvents?: TransformNodeType<DryRunResults["txEvents"]>;
    } & TransformNodeType<DryRunResult>>)
      • (tx, accountAddress, options): Promise<{
            txEvents?: TransformNodeType<DryRunResults["txEvents"]>;
        } & TransformNodeType<DryRunResult>>
      • Transaction dry-run

        Parameters

        • tx: `tx_${string}`

          transaction to execute

        • accountAddress: `ak_${string}`

          address that will be used to execute transaction

        • options: {
              combine?: boolean;
              onNode: Node;
              top?: number | `kh_${string}` | `mh_${string}`;
              txEvents?: boolean;
          }

          Options

          • Optional combine?: boolean

            Enables combining of similar requests to a single dry-run call

          • onNode: Node

            Node to use

          • Optional top?: number | `kh_${string}` | `mh_${string}`

            hash of block on which to make dry-run

          • Optional txEvents?: boolean

            collect and return on-chain tx events that would result from the call

        Returns Promise<{
            txEvents?: TransformNodeType<DryRunResults["txEvents"]>;
        } & TransformNodeType<DryRunResult>>

  • waitForTxConfirm: ((txHash, options) => Promise<number>)
      • (txHash, options): Promise<number>
      • Wait for transaction confirmation

        Parameters

        • txHash: `th_${string}`

          Transaction hash

        • options: {
              confirm?: number;
              onNode: Node;
          } & {
              interval?: number;
              onNode: Node;
          } & {
              _expectedMineRate?: number;
              _microBlockCycle?: number;
              onNode: Node;
          }

          Options

        Returns Promise<number>

        Current Height

Generated using TypeDoc