import { IN3 } from '../../in3/sdk-wasm.js'; export declare class Eth { in3: IN3; /** initialiazes the Eth API * @param in3 - the incubed Client */ constructor(in3: IN3); /** analyzes a transaaction before signing and produces a human readbale explaination what the transaction will do. * * @param tx - the transactiondata. if the data are 32bytes it will be handled as transactionhash, if not the raw transaction is expected. * @param sender - the address of the sender who would sign the tx. This is needed if the tx is a unsigned raw transaction in order to verify the balances and nonce. * @return a collection of messages describing the action in the transaction. */ txAnalyze(tx: string, sender?: string): Promise; /** returns the number of the most recent block. * * See [eth_blockNumber](https://eth.wiki/json-rpc/API#eth_blockNumber) for spec. * * No proof returned, since there is none, but the client should verify the result by comparing it to the current blocks returned from others. * With the `blockTime` from the chainspec, including a tolerance, the current blocknumber may be checked if in the proposed range. * * @return the highest known blocknumber * * **Example** * * ```js * let result = await sdk.eth.blockNumber() * // result = "0xb8a2a5" * ``` * */ blockNumber(): Promise; /** returns the given Block by number with transactionHashes. if no blocknumber is specified the latest block will be returned. * @param blockNumber - the blockNumber or one of `latest`, `earliest`or `pending` * @return the blockdata, or in case the block with that number does not exist, `null` will be returned. * * **Example** * * ```js * let result = await sdk.eth.getBlock() * // result = * // author: "0x0000000000000000000000000000000000000000" * // difficulty: "0x2" * // extraData: 0x696e667572612d696f0000000000000...31570f1e500 * // gasLimit: "0x7a1200" * // gasUsed: "0x20e145" * // hash: "0x2baa54adcd8a105cdedfd9c6635d48d07b8f0e805af0a5853190c179e5a18585" * // logsBloom: 0x000008000000000000...00400100000000080 * // miner: "0x0000000000000000000000000000000000000000" * // number: "0x449956" * // parentHash: "0x2c2a4fcd11aa9aea6b9767651a10e7dbd2bcddbdaba703c74458ad6faf7c2694" * // receiptsRoot: "0x0240b90272b5600bef7e25d0894868f85125174c2f387ef3236fc9ed9bfb3eff" * // sealFields: * // - "0xa00000000000000000000000000000000000000000000000000000000000000000" * // - "0x880000000000000000" * // sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" * // size: "0x74b" * // stateRoot: "0xf44699575afd2668060be5ba77e66e1e80edb77ad1b5070969ddfa63da6a4910" * // timestamp: "0x605aec86" * // totalDifficulty: "0x6564de" * // transactions: * // - "0xcb7edfdb3229c9beeb418ab1ef1a3c9210ecfb22f0157791c3287085d798da58" * // - "0x0fb803696521ba109c40b3eecb773c93dc6ee891172af0f620c8d44c05198641" * // - "0x3ef6725cab4470889c3c7d53609a5d4b263701f5891aa98c9ed48b73b6b2fb75" * // - "0x4010c4c112514756dcdcf14f91117503826dcbe15b03a1636c07aa713da24b8d" * // - "0xd9c14daa5e2e9cc955534865365ef6bde3045c70e3a984a74c298606c4d67bb5" * // - "0xfa2326237ba5dcca2127241562be16b68c48fed93d29add8d62f79a00518c2d8" * // transactionsRoot: "0xddbbd7bf723abdfe885539406540671c2c0eb97684972175ad199258c75416cc" * // uncles: [] * ``` * */ getBlock(blockNumber?: number): Promise; /** returns the given Block by number with full transaction data. if no blocknumber is specified the latest block will be returned. * @param blockNumber - the blockNumber or one of `latest`, `earliest`or `pending` * @return the blockdata, or in case the block with that number does not exist, `null` will be returned. * * **Example** * * ```js * let result = await sdk.eth.getBlockWithTx() * // result = * // author: "0x0000000000000000000000000000000000000000" * // difficulty: "0x2" * // extraData: 0x696e667572612d696f0000000000000...31570f1e500 * // gasLimit: "0x7a1200" * // gasUsed: "0x20e145" * // hash: "0x2baa54adcd8a105cdedfd9c6635d48d07b8f0e805af0a5853190c179e5a18585" * // logsBloom: 0x000008000000000000...00400100000000080 * // miner: "0x0000000000000000000000000000000000000000" * // number: "0x449956" * // parentHash: "0x2c2a4fcd11aa9aea6b9767651a10e7dbd2bcddbdaba703c74458ad6faf7c2694" * // receiptsRoot: "0x0240b90272b5600bef7e25d0894868f85125174c2f387ef3236fc9ed9bfb3eff" * // sealFields: * // - "0xa00000000000000000000000000000000000000000000000000000000000000000" * // - "0x880000000000000000" * // sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" * // size: "0x74b" * // stateRoot: "0xf44699575afd2668060be5ba77e66e1e80edb77ad1b5070969ddfa63da6a4910" * // timestamp: "0x605aec86" * // totalDifficulty: "0x6564de" * // transactions: * // - "0xcb7edfdb3229c9beeb418ab1ef1a3c9210ecfb22f0157791c3287085d798da58" * // - "0x0fb803696521ba109c40b3eecb773c93dc6ee891172af0f620c8d44c05198641" * // - "0x3ef6725cab4470889c3c7d53609a5d4b263701f5891aa98c9ed48b73b6b2fb75" * // - "0x4010c4c112514756dcdcf14f91117503826dcbe15b03a1636c07aa713da24b8d" * // - "0xd9c14daa5e2e9cc955534865365ef6bde3045c70e3a984a74c298606c4d67bb5" * // - "0xfa2326237ba5dcca2127241562be16b68c48fed93d29add8d62f79a00518c2d8" * // transactionsRoot: "0xddbbd7bf723abdfe885539406540671c2c0eb97684972175ad199258c75416cc" * // uncles: [] * ``` * */ getBlockWithTx(blockNumber?: number): Promise; /** returns the given Block by hash with transactionHashes * @param blockHash - the blockHash of the block * @return the blockdata, or in case the block with that number does not exist, `null` will be returned. * * **Example** * * ```js * let result = await sdk.eth.getBlockByHash("0x2baa54adcd8a105cdedfd9c6635d48d07b8f0e805af0a5853190c179e5a18585") * // result = * // author: "0x0000000000000000000000000000000000000000" * // difficulty: "0x2" * // extraData: 0x696e667572612d696f0000000000000...31570f1e500 * // gasLimit: "0x7a1200" * // gasUsed: "0x20e145" * // hash: "0x2baa54adcd8a105cdedfd9c6635d48d07b8f0e805af0a5853190c179e5a18585" * // logsBloom: 0x000008000000000000...00400100000000080 * // miner: "0x0000000000000000000000000000000000000000" * // number: "0x449956" * // parentHash: "0x2c2a4fcd11aa9aea6b9767651a10e7dbd2bcddbdaba703c74458ad6faf7c2694" * // receiptsRoot: "0x0240b90272b5600bef7e25d0894868f85125174c2f387ef3236fc9ed9bfb3eff" * // sealFields: * // - "0xa00000000000000000000000000000000000000000000000000000000000000000" * // - "0x880000000000000000" * // sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" * // size: "0x74b" * // stateRoot: "0xf44699575afd2668060be5ba77e66e1e80edb77ad1b5070969ddfa63da6a4910" * // timestamp: "0x605aec86" * // totalDifficulty: "0x6564de" * // transactions: * // - "0xcb7edfdb3229c9beeb418ab1ef1a3c9210ecfb22f0157791c3287085d798da58" * // - "0x0fb803696521ba109c40b3eecb773c93dc6ee891172af0f620c8d44c05198641" * // - "0x3ef6725cab4470889c3c7d53609a5d4b263701f5891aa98c9ed48b73b6b2fb75" * // - "0x4010c4c112514756dcdcf14f91117503826dcbe15b03a1636c07aa713da24b8d" * // - "0xd9c14daa5e2e9cc955534865365ef6bde3045c70e3a984a74c298606c4d67bb5" * // - "0xfa2326237ba5dcca2127241562be16b68c48fed93d29add8d62f79a00518c2d8" * // transactionsRoot: "0xddbbd7bf723abdfe885539406540671c2c0eb97684972175ad199258c75416cc" * // uncles: [] * ``` * */ getBlockByHash(blockHash: string): Promise; /** returns the given Block by hash with full transaction data * @param blockHash - the blockHash of the block * @return the blockdata, or in case the block with that number does not exist, `null` will be returned. * * **Example** * * ```js * let result = await sdk.eth.getBlockByHashWithTx("0x2baa54adcd8a105cdedfd9c6635d48d07b8f0e805af0a5853190c179e5a18585") * // result = * // author: "0x0000000000000000000000000000000000000000" * // difficulty: "0x2" * // extraData: 0x696e667572612d696f0000000000000...31570f1e500 * // gasLimit: "0x7a1200" * // gasUsed: "0x20e145" * // hash: "0x2baa54adcd8a105cdedfd9c6635d48d07b8f0e805af0a5853190c179e5a18585" * // logsBloom: 0x000008000000000000...00400100000000080 * // miner: "0x0000000000000000000000000000000000000000" * // number: "0x449956" * // parentHash: "0x2c2a4fcd11aa9aea6b9767651a10e7dbd2bcddbdaba703c74458ad6faf7c2694" * // receiptsRoot: "0x0240b90272b5600bef7e25d0894868f85125174c2f387ef3236fc9ed9bfb3eff" * // sealFields: * // - "0xa00000000000000000000000000000000000000000000000000000000000000000" * // - "0x880000000000000000" * // sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" * // size: "0x74b" * // stateRoot: "0xf44699575afd2668060be5ba77e66e1e80edb77ad1b5070969ddfa63da6a4910" * // timestamp: "0x605aec86" * // totalDifficulty: "0x6564de" * // transactions: * // - "0xcb7edfdb3229c9beeb418ab1ef1a3c9210ecfb22f0157791c3287085d798da58" * // - "0x0fb803696521ba109c40b3eecb773c93dc6ee891172af0f620c8d44c05198641" * // - "0x3ef6725cab4470889c3c7d53609a5d4b263701f5891aa98c9ed48b73b6b2fb75" * // - "0x4010c4c112514756dcdcf14f91117503826dcbe15b03a1636c07aa713da24b8d" * // - "0xd9c14daa5e2e9cc955534865365ef6bde3045c70e3a984a74c298606c4d67bb5" * // - "0xfa2326237ba5dcca2127241562be16b68c48fed93d29add8d62f79a00518c2d8" * // transactionsRoot: "0xddbbd7bf723abdfe885539406540671c2c0eb97684972175ad199258c75416cc" * // uncles: [] * ``` * */ getBlockByHashWithTx(blockHash: string): Promise; /** returns the number of transactions. For Spec, see [eth_getBlockTransactionCountByHash](https://eth.wiki/json-rpc/API#eth_getBlockTransactionCountByHash). * @param blockHash - the blockHash of the block * @return the number of transactions in the block */ getBlockTransactionCountByHash(blockHash: string): Promise; /** returns the number of transactions. For Spec, see [eth_getBlockTransactionCountByNumber](https://eth.wiki/json-rpc/API#eth_getBlockTransactionCountByNumber). * @param blockNumber - the blockNumber of the block * @return the number of transactions in the block */ getBlockTransactionCountByNumber(blockNumber: number): Promise; /** returns the number of uncles. For Spec, see [eth_getUncleCountByBlockHash](https://eth.wiki/json-rpc/API#eth_getUncleCountByBlockHash). * @param blockHash - the blockHash of the block * @return the number of uncles */ getUncleCountByBlockHash(blockHash: string): Promise; /** returns the number of uncles. For Spec, see [eth_getUncleCountByBlockNumber](https://eth.wiki/json-rpc/API#eth_getUncleCountByBlockNumber). * @param blockNumber - the blockNumber of the block * @return the number of uncles */ getUncleCountByBlockNumber(blockNumber: number): Promise; /** returns the transaction data. * * See JSON-RPC-Spec for [eth_getTransactionByBlockHashAndIndex](https://eth.wiki/json-rpc/API#eth_getTransactionByBlockHashAndIndex) for more details. * * @param blockHash - the blockhash containing the transaction. * @param index - the transactionIndex * @return the transactiondata or `null` if it does not exist * * **Example** * * ```js * let result = await sdk.eth.getTransactionByBlockHashAndIndex("0x4fc08daf8d670a23eba7a1aca1f09591c19147305c64d25e1ddd3dd43ff658ee", "0xd5") * // result = * // blockHash: "0x4fc08daf8d670a23eba7a1aca1f09591c19147305c64d25e1ddd3dd43ff658ee" * // blockNumber: "0xb8a4a9" * // from: "0xcaa6cfc2ca92cabbdbce5a46901ee8b831e00a98" * // gas: "0xac6b" * // gasPrice: "0x1bf08eb000" * // hash: "0xd635a97452d604f735116d9de29ac946e9987a20f99607fb03516ef267ea0eea" * // input: 0x095ea7b300000000000000000000000...a7640000 * // nonce: "0xa" * // to: "0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce" * // transactionIndex: "0xd5" * // value: "0x0" * // type: "0x0" * // v: "0x25" * // r: "0xb18e0928c988d898d3217b145d78439072db15ea7de1005a73cf5feaf01a57d4" * // s: "0x6b530c2613f543f9e26ef9c27a7986c748fbc856aaeacd6000a8ff46d2a2dd78" * ``` * */ getTransactionByBlockHashAndIndex(blockHash: string, index: number): Promise; /** returns the transaction data. * * See JSON-RPC-Spec for [eth_getTransactionByBlockNumberAndIndex](https://eth.wiki/json-rpc/API#eth_getTransactionByBlockNumberAndIndex) for more details. * * @param blockNumber - the block number containing the transaction. * @param index - the transactionIndex * @return the transactiondata or `null` if it does not exist * * **Example** * * ```js * let result = await sdk.eth.getTransactionByBlockNumberAndIndex("0xb8a4a9", "0xd5") * // result = * // blockHash: "0x4fc08daf8d670a23eba7a1aca1f09591c19147305c64d25e1ddd3dd43ff658ee" * // blockNumber: "0xb8a4a9" * // from: "0xcaa6cfc2ca92cabbdbce5a46901ee8b831e00a98" * // gas: "0xac6b" * // gasPrice: "0x1bf08eb000" * // hash: "0xd635a97452d604f735116d9de29ac946e9987a20f99607fb03516ef267ea0eea" * // input: 0x095ea7b300000000000000000000000...a7640000 * // nonce: "0xa" * // to: "0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce" * // transactionIndex: "0xd5" * // value: "0x0" * // type: "0x0" * // v: "0x25" * // r: "0xb18e0928c988d898d3217b145d78439072db15ea7de1005a73cf5feaf01a57d4" * // s: "0x6b530c2613f543f9e26ef9c27a7986c748fbc856aaeacd6000a8ff46d2a2dd78" * ``` * */ getTransactionByBlockNumberAndIndex(blockNumber: number, index: number): Promise; /** returns the transaction data. * * See JSON-RPC-Spec for [eth_getTransactionByHash](https://eth.wiki/json-rpc/API#eth_getTransactionByHash) for more details. * * @param txHash - the transactionHash of the transaction. * @return the transactiondata or `null` if it does not exist * * **Example** * * ```js * let result = await sdk.eth.getTransactionByHash("0xe9c15c3b26342e3287bb069e433de48ac3fa4ddd32a31b48e426d19d761d7e9b") * // result = * // blockHash: "0x4fc08daf8d670a23eba7a1aca1f09591c19147305c64d25e1ddd3dd43ff658ee" * // blockNumber: "0xb8a4a9" * // from: "0xcaa6cfc2ca92cabbdbce5a46901ee8b831e00a98" * // gas: "0xac6b" * // gasPrice: "0x1bf08eb000" * // hash: "0xd635a97452d604f735116d9de29ac946e9987a20f99607fb03516ef267ea0eea" * // input: 0x095ea7b300000000000000000000000...a7640000 * // nonce: "0xa" * // to: "0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce" * // transactionIndex: "0xd5" * // value: "0x0" * // type: "0x0" * // v: "0x25" * // r: "0xb18e0928c988d898d3217b145d78439072db15ea7de1005a73cf5feaf01a57d4" * // s: "0x6b530c2613f543f9e26ef9c27a7986c748fbc856aaeacd6000a8ff46d2a2dd78" * ``` * */ getTransactionByHash(txHash: string): Promise; /** searches for events matching the given criteria. See [eth_getLogs](https://eth.wiki/json-rpc/API#eth_getLogs) for the spec. * @param filter - The filter criteria for the events. * @return array with all found event matching the specified filter */ getLogs(filter: EthFilter): Promise; /** gets the balance of an account for a given block * @param account - address of the account * @param block - the blockNumber or `latest` * @return the balance * * **Example** * * ```js * let result = await sdk.eth.getBalance("0x2e333ec090f1028df0a3c39a918063443be82b2b") * // result = "0x20599832af6ec00" * ``` * */ getBalance(account: string, block?: number): Promise; /** gets the nonce or number of transaction sent from this account at a given block * @param account - address of the account * @param block - the blockNumber or `latest` * @return the nonce * * **Example** * * ```js * let result = await sdk.eth.getTransactionCount("0x2e333ec090f1028df0a3c39a918063443be82b2b") * // result = "0x5" * ``` * */ getTransactionCount(account: string, block?: number): Promise; /** gets the code of a given contract * @param account - address of the account * @param block - the blockNumber or `latest` * @return the code as hex * * **Example** * * ```js * let result = await sdk.eth.getCode("0xac1b824795e1eb1f6e609fe0da9b9af8beaab60f") * // result = 0x6080604052348...6c634300050a0040 * ``` * */ getCode(account: string, block?: number): Promise; /** gets the storage value of a given key * @param account - address of the account * @param key - key to look for * @param block - the blockNumber or`latest` * @return the value of the storage slot. * * **Example** * * ```js * let result = await sdk.eth.getStorageAt("0xac1b824795e1eb1f6e609fe0da9b9af8beaab60f", "0x0") * // result = "0x19" * ``` * */ getStorageAt(account: string, key: string, block?: number): Promise; /** signs and sends a Transaction * @param tx - the transactiondata to send * @return the transactionHash */ sendTransaction(tx: EthTransaction): Promise; /** signs and sends a Transaction, but then waits until the transaction receipt can be verified. Depending on the finality of the nodes, this may take a while, since only final blocks will be signed by the nodes. * @param tx - the transactiondata to send * @return the transactionReceipt */ sendTransactionAndWait(tx: EthTransaction): Promise; /** sends or broadcasts a prviously signed raw transaction. See [eth_sendRawTransaction](https://eth.wiki/json-rpc/API#eth_sendRawTransaction) * @param tx - the raw signed transactiondata to send * @return the transactionhash */ sendRawTransaction(tx: string): Promise; /** calculates the gas needed to execute a transaction. for spec see [eth_estimateGas](https://eth.wiki/json-rpc/API#eth_estimateGas) * @param tx - the tx-object, which is the same as specified in [eth_sendTransaction](https://eth.wiki/json-rpc/API#eth_sendTransaction). * @param block - the blockNumber or `latest` * @return the amount of gass needed. */ estimateGas(tx: EthTransaction, block?: number): Promise; /** calls a function of a contract (or simply executes the evm opcodes) and returns the result. for spec see [eth_call](https://eth.wiki/json-rpc/API#eth_call) * @param tx - the tx-object, which is the same as specified in [eth_sendTransaction](https://eth.wiki/json-rpc/API#eth_sendTransaction). * @param block - the blockNumber or `latest` * @return the abi-encoded result of the function. * * **Example** * * ```js * let result = await sdk.eth.call(EthTransaction(to: "0x2736D225f85740f42D17987100dc8d58e9e16252", data: "0x5cf0f3570000000000000000000000000000000000000000000000000000000000000001")) * // result = 0x0000000000000000000000000... * ``` * */ call(tx: EthTransaction, block?: number): Promise; /** The Receipt of a Transaction. For Details, see [eth_getTransactionReceipt](https://eth.wiki/json-rpc/API#eth_gettransactionreceipt). * @param txHash - the transactionHash * @return the TransactionReceipt or `null` if it does not exist. * * **Example** * * ```js * let result = await sdk.eth.getTransactionReceipt("0x5dc2a9ec73abfe0640f27975126bbaf14624967e2b0b7c2b3a0fb6111f0d3c5e") * // result = * // blockHash: "0xea6ee1e20d3408ad7f6981cfcc2625d80b4f4735a75ca5b20baeb328e41f0304" * // blockNumber: "0x8c1e39" * // contractAddress: null * // cumulativeGasUsed: "0x2466d" * // gasUsed: "0x2466d" * // logs: * // - address: "0x85ec283a3ed4b66df4da23656d4bf8a507383bca" * // blockHash: "0xea6ee1e20d3408ad7f6981cfcc2625d80b4f4735a75ca5b20baeb328e41f0304" * // blockNumber: "0x8c1e39" * // data: 0x00000000000... * // logIndex: "0x0" * // removed: false * // topics: * // - "0x9123e6a7c5d144bd06140643c88de8e01adcbb24350190c02218a4435c7041f8" * // - "0xa2f7689fc12ea917d9029117d32b9fdef2a53462c853462ca86b71b97dd84af6" * // - "0x55a6ef49ec5dcf6cd006d21f151f390692eedd839c813a150000000000000000" * // transactionHash: "0x5dc2a9ec73abfe0640f27975126bbaf14624967e2b0b7c2b3a0fb6111f0d3c5e" * // transactionIndex: "0x0" * // transactionLogIndex: "0x0" * // type: mined * // logsBloom: 0x00000000000000000000200000... * // root: null * // status: "0x1" * // transactionHash: "0x5dc2a9ec73abfe0640f27975126bbaf14624967e2b0b7c2b3a0fb6111f0d3c5e" * // transactionIndex: "0x0" * ``` * */ getTransactionReceipt(txHash: string): Promise; /** * Executes a function of a contract, by passing a [method-signature](https://github.com/ethereumjs/ethereumjs-abi/blob/master/README.md#simple-encoding-and-decoding) and the arguments, which will then be ABI-encoded and send as eth_call. */ callFn(to: string, method: string, ...args: any[]): Promise; /** * Returns the EIP155 chain ID used for transaction signing at the current best block. Null is returned if not available. */ chainId(): Promise; /** * Polling method for a filter, which returns an array of logs which occurred since last poll. */ getFilterChanges(id: string | number): Promise; /** * Returns an array of all logs matching filter with given id. */ getFilterLogs(id: string | number): Promise; /** * adds a filter for pending transaction (only available for local rpc) */ newPendingFilter(): Promise; /** * Creates a filter in the node, to notify when a new block arrives. To check if the state has changed, call eth_getFilterChanges. */ newBlockFilter(): Promise; /** * Creates a filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call eth_getFilterChanges. * * A note on specifying topic filters: * Topics are order-dependent. A transaction with a log with topics [A, B] will be matched by the following topic filters: * * [] “anything” * [A] “A in first position (and anything after)” * [null, B] “anything in first position AND B in second position (and anything after)” * [A, B] “A in first position AND B in second position (and anything after)” * [[A, B], [A, B]] “(A OR B) in first position AND (A OR B) in second position (and anything after)” */ newFilter(filter: EthFilter): Promise; /** * Creates a filter in the node, to notify when new pending transactions arrive. * * To check if the state has changed, call eth_getFilterChanges. */ newPendingTransactionFilter(): Promise; /** * Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additonally Filters timeout when they aren’t requested with eth_getFilterChanges for a period of time. */ uninstallFilter(id: string | number): Promise; /** * Returns the current ethereum protocol version. */ protocolVersion(): Promise; /** * Returns the state of the underlying node. */ syncing(): Promise; /** * returns a contract instance with the same api as web3js. * @param abi the contract abi * @param address the address of the contract * @param options the tx options * @returns the instance */ web3ContractAt(abi: ABI[], address?: string, options?: { gasPrice?: string | number | bigint; gas?: string | number | bigint; from?: string; data?: string; }): import("../../in3/sdk-wasm.js").Web3Contract; /** * returns a contract instance with a api similiar to ethers.js. * @param abi the contract abi * @param address the address of the contract * @returns the instance */ contractAt(abi: ABI[], address?: string): { [methodName: string]: any; _address: string; _eventHashes: any; events: { [event: string]: { getLogs: (options: { limit?: number; fromBlock?: import("../../in3/sdk-wasm.js").BlockType; toBlock?: import("../../in3/sdk-wasm.js").BlockType; topics?: any[]; filter?: { [key: string]: any; }; }) => Promise<{ [key: string]: any; event: string; log: import("../../in3/sdk-wasm.js").Log; }[]>; }; all: { getLogs: (options: { limit?: number; fromBlock?: import("../../in3/sdk-wasm.js").BlockType; toBlock?: import("../../in3/sdk-wasm.js").BlockType; topics?: any[]; filter?: { [key: string]: any; }; }) => Promise<{ [key: string]: any; event: string; log: import("../../in3/sdk-wasm.js").Log; }[]>; }; decode: any; }; _abi: import("../../in3/sdk-wasm.js").ABI[]; _in3: import("../../in3/sdk-wasm.js").default; }; } export declare type ABIField = { internalType?: string; indexed?: boolean; name: string; type: string; }; export declare type ABI = { anonymous?: boolean; constant?: boolean; payable?: boolean; stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable' | string; components?: ABIField[]; inputs?: ABIField[]; outputs?: ABIField[] | any[]; name?: string; type: 'function' | 'constructor' | 'event' | 'fallback' | string; internalType?: string; }; /** a collection of messages describing the action in the transaction. */ export interface EthTxMessage { /** the log level (`main`,`info`,`error` or `warning`) */ level: string; /** the id of the message (which can be used to translate it) */ msg_id: string; /** the values for the placeholders. */ args: string[]; /** the english text representation of the message */ msg: string; } /** the blockdata, or in case the block with that number does not exist, `null` will be returned. */ export interface EthBlockdataWithTxHashes { /** Array of transaction hashes */ transactions: string[]; /** the block number. `null` when its pending block. */ number: number; /** hash of the block. `null` when its pending block. */ hash: string; /** hash of the parent block. */ parentHash: string; /** hash of the generated proof-of-work. `null` when its pending block. */ nonce: bigint; /** SHA3 of the uncles Merkle root in the block. */ sha3Uncles: string; /** the bloom filter for the logs of the block. `null` when its pending block. */ logsBloom: string; /** the root of the transaction trie of the block. */ transactionsRoot: string; /** the root of the final state trie of the block. */ stateRoot: string; /** the root of the receipts trie of the block. */ receiptsRoot: string; /** the address of the beneficiary to whom the mining rewards were given. */ miner: string; /** integer of the difficulty for this block. */ difficulty: bigint; /** integer of the total difficulty of the chain until this block. */ totalDifficulty: bigint; /** the "extra data" field of this block. */ extraData: string; /** integer the size of this block in bytes. */ size: number; /** the maximum gas allowed in this block. */ gasLimit: number; /** the total used gas by all transactions in this block. */ gasUsed: number; /** the unix timestamp for when the block was collated. */ timestamp: number; /** Array of uncle hashes. */ uncles: string[]; } /** the blockdata, or in case the block with that number does not exist, `null` will be returned. */ export interface EthBlockdata { /** Array of transaction objects */ transactions: EthTransactiondata[]; /** the block number. `null` when its pending block. */ number: number; /** hash of the block. `null` when its pending block. */ hash: string; /** hash of the parent block. */ parentHash: string; /** hash of the generated proof-of-work. `null` when its pending block. */ nonce: bigint; /** SHA3 of the uncles Merkle root in the block. */ sha3Uncles: string; /** the bloom filter for the logs of the block. `null` when its pending block. */ logsBloom: string; /** the root of the transaction trie of the block. */ transactionsRoot: string; /** the root of the final state trie of the block. */ stateRoot: string; /** the root of the receipts trie of the block. */ receiptsRoot: string; /** the address of the beneficiary to whom the mining rewards were given. */ miner: string; /** integer of the difficulty for this block. */ difficulty: bigint; /** integer of the total difficulty of the chain until this block. */ totalDifficulty: bigint; /** the "extra data" field of this block. */ extraData: string; /** integer the size of this block in bytes. */ size: number; /** the maximum gas allowed in this block. */ gasLimit: number; /** the total used gas by all transactions in this block. */ gasUsed: number; /** the unix timestamp for when the block was collated. */ timestamp: number; /** Array of uncle hashes. */ uncles: string[]; } /** Array of transaction objects */ export interface EthTransactiondata { /** receipient of the transaction. */ to: string; /** sender or signer of the transaction */ from: string; /** value in wei to send */ value: bigint; /** the gas to be send along */ gas: number; /** the price in wei for one gas-unit. If not specified it will be fetched using `eth_gasPrice` */ gasPrice: number; /** the current nonce of the sender. If not specified it will be fetched using `eth_getTransactionCount` */ nonce: number; /** blockHash of the block holding this transaction or `null` if still pending. */ blockHash: string; /** blockNumber of the block holding this transaction or `null` if still pending. */ blockNumber: number; /** transactionHash */ hash: string; /** data of the transaaction */ input: string; /** index of the transaaction in the block */ transactionIndex: number; /** recovery-byte of the signature */ v: string; /** x-value of the EC-Point of the signature */ r: string; /** y-value of the EC-Point of the signature */ s: string; } /** The filter criteria for the events. */ export interface EthFilter { /** Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions. */ fromBlock: number; /** Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions. */ toBlock: number; /** Contract address or a list of addresses from which logs should originate. */ address: string; /** Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with “or” options. */ topics: string[]; /** With the addition of EIP-234, blockHash will be a new filter option which restricts the logs returned to the single block with the 32-byte hash blockHash. Using blockHash is equivalent to fromBlock = toBlock = the block number with hash blockHash. If blockHash is present in in the filter criteria, then neither fromBlock nor toBlock are allowed. */ blockhash: string; } /** array with all found event matching the specified filter */ export interface Ethlog { /** the address triggering the event. */ address: string; /** the blockNumber */ blockNumber: number; /** blockhash if ther containing block */ blockHash: string; /** abi-encoded data of the event (all non indexed fields) */ data: string; /** the index of the even within the block. */ logIndex: number; /** the reorg-status of the event. */ removed: boolean; /** array of 32byte-topics of the indexed fields. */ topics: string[]; /** requested transactionHash */ transactionHash: string; /** transactionIndex within the containing block. */ transactionIndex: number; /** index of the event within the transaction. */ transactionLogIndex: number; /** mining-status */ type: string; } /** the transactiondata to send */ export interface EthTransaction { /** receipient of the transaction. */ to: string; /** sender of the address (if not sepcified, the first signer will be the sender) */ from: string; /** value in wei to send */ value: bigint; /** the gas to be send along */ gas: number; /** the price in wei for one gas-unit. If not specified it will be fetched using `eth_gasPrice` */ gasPrice: number; /** the current nonce of the sender. If not specified it will be fetched using `eth_getTransactionCount` */ nonce: number; /** the data-section of the transaction */ data: string; } /** the transactionReceipt */ export interface EthTransactionReceipt { /** the blockNumber */ blockNumber: number; /** blockhash if ther containing block */ blockHash: string; /** the deployed contract in case the tx did deploy a new contract */ contractAddress: string; /** gas used for all transaction up to this one in the block */ cumulativeGasUsed: number; /** gas used by this transaction. */ gasUsed: number; /** array of events created during execution of the tx */ logs: Ethlog[]; /** bloomfilter used to detect events for `eth_getLogs` */ logsBloom: string; /** error-status of the tx. 0x1 = success 0x0 = failure */ status: number; /** requested transactionHash */ transactionHash: string; /** transactionIndex within the containing block. */ transactionIndex: number; } export default Eth;