import { IN3 } from '../../in3/sdk-wasm.js'; export declare class Zksync { in3: IN3; /** initialiazes the Zksync API * @param in3 - the incubed Client */ constructor(in3: IN3); /** creates a new Layer 2 Wallet. * * This wallet is created directly in Layer 2 (Zksync), but features a full multisig wallet. It also holds the option to deploy contracts to layer 1 if needed. This is the case if, * * - the zksync operator stops its service or censors your tx * - if the approver service stop running or rejects valid requests * * In this case a deployment to Layer 1 may cost some fees, but ensures full access to all funds. * * In order to use this the SDK needs to have those properties in `zk_wallet` configured: * * - `zksync.musig_urls` - the url of the approving service * - `zksync.sync_key` - the seed for the signing key * - `zksync.create_proof_method` - which creates the proof needed. This should be `zk_wallet_create_signatures` for most cases. * * @param threshold - the minimal number of signatures needed for the multisig to approve a transaction. It must be at least one and less or equal to the number of owners. * @param owners - array of owners. * Each owner is described by either the address ( with role as approver) or `ROLE:ADDRESS`. * Role can be either * - `R` - Recovery : this owner can challenge other owners in order to recover, but not approve or initiate a transaction * - `A` - Approver: a signature from this owner counts towards the threshhold, but this role alone can not initiate a transaction. * - `I` - Initiator: is allowed to initiate a transaction. * * you can combine multiple Role like `IA:0xab35d7cb3...` * * @return a collection of relevant data you may need for the new wallet * * **Example** * * ```js * let result = await sdk.zksync.walletCreate(1, ["IA:0x8a91dc2d28b689474298d91899f0c1baf62cb85b","A:0x5a876b8a53f8b9d40268ebcad8fc7c78c1439334"]) * // result = * // account: "0x0e8b4fe889b126b9b502b244c9130912510f014f" * // deploy_tx: * // data: "0x1688f0b900000000000000000000000005876b8a53f8b9d40268ebcad8fc7c78c14393\ * // 340000000000000000000000000000000000000000000000000000000000000060000000000\ * // 000000000000000865a7e441ed840fa3336e756b9ad4ba1d65a384c00000000000000000000\ * // 000000000000000000000000000000000000000002046efc73ce00000000000000000000000\ * // 000000000000000000000000000000000000001200000000000000000000000000000000000\ * // 000000000000000000000000000180000000000000000000000000000000000000000000000\ * // 000000000000000000100000000000000000000000000000000000000000000000000000000\ * // 0000000000000000000000000000000000000000000000000000000000000000000001e0000\ * // 000000000000000000000000000000000000000000000000000000000000000000000000000\ * // 000000000000000000000000000000000000000000000000000000000000000000000000000\ * // 000000000000000000000000000000000000000000000000000000000000000000000000000\ * // 000000000000000000000000000000000000000000000000000000000000000000000000000\ * // 000000000000000020000000000000000000000008a91dc2d28b689474298d91899f0c1baf6\ * // 2cb85b0000000000000000000000005a876b8a53f8b9d40268ebcad8fc7c78c143933400000\ * // 000000000000000000000000000000000000000000000000000000000020000000000000000\ * // 000000000000000000000000000000000000000000000006000000000000000000000000000\ * // 000000000000000000000000000000000000400000000000000000000000000000000000000\ * // 000000000000000000000000000000000000000000000000000000000000000000000000000\ * // 0000000" * // to: "0x29a988ca607d8ec6fae32b724d5dbfd3132d708e" * // create2: * // creator: "0x29a988ca607d8ec6fae32b724d5dbfd3132d708e" * // saltarg: "0xfc2bb08be9fef30b6c40afc031bf161e969e3a1afdc04f91a89880dc4645b9c0" * // codehash: "0x1297c8f6fc77b41b23b2e8c9b51d7c6482e3846444eccecea8426e97e04bb512" * // musig_pub_keys: "0xf7f229e75842cbc0225c6ded105349f582d65df8a84fc86dd8f4859157f0\ * // bf13e8f753725ff83d95135257cc4c4df2baa9a962340e134ca8d5520fedb9afab9a" * // musig_urls: * // - null * // - http://localhost:8099 * // wallet: * // address: "0x0e8b4fe889b126b9b502b244c9130912510f014f" * // threshold: 1 * // signer: "0xf7f229e75842cbc0225c6ded105349f582d65df8a84fc86dd8f4859157f0bf13" * // owners: * // - roles: 6 * // address: "0x8a91dc2d28b689474298d91899f0c1baf62cb85b" * // - roles: 4 * // address: "0x5a876b8a53f8b9d40268ebcad8fc7c78c1439334" * ``` * */ walletCreate(threshold: number, owners: string[]): Promise; /** reads the current configuration from the cosigner. This function will only be used internally and is not available as direct comand in the client. * @return the current config of the signer. */ walletGetConfig(): Promise; /** updates a wallet configuration, which allows the owner to add or replace keys. Each change needs to be signed by enough owners to reach the threshold. * Those signatures are signing the hashed wallet-configuration, which is build: * * - `address` account_address (20 bytes) * - `bytes32` public key signer (32 bytes) * - `uint32` threshold ( bigendian ) * - for each owner: * - `uint8` role * - `address` owner address * * @param wallet - the new wallet-config. * @param proof - the proof or the signatures of the current owners reaching the threshold. The datastructure depends on the proof_method, but per default is the result of `zk_wallet_create_signatures`. The signatures need to sign the new structure. * @return the success confirmation or a error is thrown. * * **Example** * * ```js * let result = await sdk.zksync.walletSet(ZksyncZkWallet(address: "0x0e8b4fe889b126b9b502b244c9130912510f014f", threshold: 1, signer: "0xf7f229e75842cbc0225c6ded105349f582d65df8a84fc86dd8f4859157f0bf13", owners: [{"roles":6,"address":"0x8a91dc2d28b689474298d91899f0c1baf62cb85b"},{"roles":4,"address":"0x5a876b8a53f8b9d40268ebcad8fc7c78c1439334"}]), ["0xabf7f229e75842cbc0225c6ded105349f582d65df8a84fc86dd8f4859157f0bf13f7f229e75842cbc0225c6ded105349f582d65df8a84fc86dd8f4859157f0bf13"]) * // result = true * ``` * */ walletSet(wallet: ZksyncZkWallet, proof: string[]): Promise; /** signs a message by as many owners as possible to reach the threshold. * @param message - the message to sign * @param account - the account of the wallet * @return a array of signatures from the owner * * **Example** * * ```js * let result = await sdk.zksync.walletCreateSignatures("0xf7f229e75842cbc0225c6ded105349f582d65df8a84fc86dd8f4859157f0bf13e8f753725ff83d95135257cc4c4df2baa9a962340e134ca8d5520fedb9afab9a", "0x0e8b4fe889b126b9b502b244c9130912510f014f") * // result = * // - "0xabf7f229e75842cbc0225c6ded105349f582d65df8a84fc86dd8f4859157f0bf13f7f229e7\ * // 5842cbc0225c6ded105349f582d65df8a84fc86dd8f4859157f0bf13" * ``` * */ walletCreateSignatures(message: string, account: string): Promise; /** verifies signatures and checks if the threshold is reached. * @param message - the message to sign * @param account - the account of the wallet * @param signer - the public key of the signer * @param signatures - the signatures of the owner * @return returns true or an error if the signatures are not enough or invalid. * * **Example** * * ```js * let result = await sdk.zksync.walletVerifySignatures("0xf7f229e75842cbc0225c6ded105349f582d65df8a84fc86dd8f4859157f0bf13e8f753725ff83d95135257cc4c4df2baa9a962340e134ca8d5520fedb9afab9a", "0x0e8b4fe889b126b9b502b244c9130912510f014f", "0xf7f229e75842cbc0225c6ded105349f582d65df8a84fc86dd8f4859157f0bf13", ["0xabf7f229e75842cbc0225c6ded105349f582d65df8a84fc86dd8f4859157f0bf13f7f229e75842cbc0225c6ded105349f582d65df8a84fc86dd8f4859157f0bf13"]) * // result = true * ``` * */ walletVerifySignatures(message: string, account: string, signer: string, signatures: string[]): Promise; /** returns the contract address * @return fetches the contract addresses from the zksync server. This request also caches them and will return the results from cahe if available. * * **Example** * * ```js * let result = await sdk.zksync.contractAddress() * // result = * // govContract: "0x34460C0EB5074C29A9F6FE13b8e7E23A0D08aF01" * // mainContract: "0xaBEA9132b05A70803a4E85094fD0e1800777fBEF" * ``` * */ contractAddress(): Promise; /** returns the list of all available tokens * @return a array of tokens-definitions. This request also caches them and will return the results from cahe if available. * * **Example** * * ```js * let result = await sdk.zksync.tokens() * // result = * // BAT: * // address: "0x0d8775f648430679a709e98d2b0cb6250d2887ef" * // decimals: 18 * // id: 8 * // symbol: BAT * // BUSD: * // address: "0x4fabb145d64652a948d72533023f6e7a623c7c53" * // decimals: 18 * // id: 6 * // symbol: BUSD * // DAI: * // address: "0x6b175474e89094c44da98b954eedeac495271d0f" * // decimals: 18 * // id: 1 * // symbol: DAI * // ETH: * // address: "0x0000000000000000000000000000000000000000" * // decimals: 18 * // id: 0 * // symbol: ETH * ``` * */ tokens(): Promise<{ [key: string]: ZksyncTokens; }>; /** returns account_info from the server * @param address - the account-address. if not specified, the client will try to use its own address based on the signer config. * @return the current state of the requested account. * * **Example** * * ```js * let result = await sdk.zksync.accountInfo() * // result = * // address: "0x3b2a1bd631d9d7b17e87429a8e78dbbd9b4de292" * // committed: * // balances: {} * // nonce: 0 * // pubKeyHash: sync:0000000000000000000000000000000000000000 * // depositing: * // balances: {} * // id: null * // verified: * // balances: {} * // nonce: 0 * // pubKeyHash: sync:0000000000000000000000000000000000000000 * ``` * */ accountInfo(address?: string): Promise; /** returns the state or receipt of the the zksync-tx * @param tx - the txHash of the send tx * @return the current state of the requested tx. * * **Example** * * ```js * let result = await sdk.zksync.txInfo("sync-tx:e41d2489571d322189246dafa5ebde1f4699f498000000000000000000000000") * // result = * // block: null * // executed: false * // failReason: null * // success: null * ``` * */ txInfo(tx: string): Promise; /** sets the signerkey based on the current pk or as configured in the config. * You can specify the key by either * - setting a signer ( the sync key will be derrived through a signature ) * - setting the seed directly ( `sync_key` in the config) * - setting the `musig_pub_keys` to generate the pubKeyHash based on them * - setting the `create2` options and the sync-key will generate the account based on the pubKeyHash * * * we support 3 different signer types (`signer_type` in the `zksync` config) : * * 1. `pk` - Simple Private Key * If a signer is set (for example by setting the pk), incubed will derrive the sync-key through a signature and use it * 2. `contract` - Contract Signature * In this case a preAuth-tx will be send on L1 using the signer. If this contract is a mutisig, you should make sure, you have set the account explicitly in the config and also activate the multisig-plugin, so the transaction will be send through the multisig. * 3. `create2` - Create2 based Contract * * @param token - the token to pay the gas (either the symbol or the address) * @return the pubKeyHash, if it was executed successfully * * **Example** * * ```js * let result = await sdk.zksync.setKey("eth") * // result = sync:e41d2489571d322189246dafa5ebde1f4699f498 * ``` * */ setKey(token: string): Promise; /** returns the current PubKeyHash based on the configuration set. * @param pubKey - the packed public key to hash ( if given the hash is build based on the given hash, otherwise the hash is based on the config) * @return the pubKeyHash * * **Example** * * ```js * let result = sdk.zksync.pubkeyhash() * * // result = sync:4dcd9bb4463121470c7232efb9ff23ec21398e58 * ``` * */ pubkeyhash(pubKey?: string): string; /** returns the current packed PubKey based on the config set. * * If the config contains public keys for musig-signatures, the keys will be aggregated, otherwise the pubkey will be derrived from the signing key set. * * @return the pubKey * * **Example** * * ```js * let result = sdk.zksync.pubkey() * * // result = "0xfca80a469dbb53f8002eb1e2569d66f156f0df24d71bd589432cc7bc647bfc04" * ``` * */ pubkey(): string; /** returns the address of the account used. * @return the account used. * * **Example** * * ```js * let result = sdk.zksync.accountAddress() * * // result = "0x3b2a1bd631d9d7b17e87429a8e78dbbd9b4de292" * ``` * */ accountAddress(): string; /** returns the schnorr musig signature based on the current config. * * This also supports signing with multiple keys. In this case the configuration needs to sets the urls of the other keys, so the client can then excange all data needed in order to create the combined signature. * when exchanging the data with other keys, all known data will be send using `zk_sign` as method, but instead of the raw message a object with those data will be passed. * * @param message - the message to sign * @return The return value are 96 bytes of signature: * - `[0...32]` packed public key * - `[32..64]` r-value * - `[64..96]` s-value * * * **Example** * * ```js * let result = await sdk.zksync.sign("0xaabbccddeeff") * // result = "0xfca80a469dbb53f8002eb1e2569d66f156f0df24d71bd589432cc7bc647bfc0493f69034c398\ * // 0e7352741afa6c171b8e18355e41ed7427f6e706f8432e32e920c3e61e6c3aa00cfe0c202c29a31\ * // b69cd0910a432156a0977c3a5baa404547e01" * ``` * */ sign(message: string): Promise; /** returns 0 or 1 depending on the successfull verification of the signature. * * if the `musig_pubkeys` are set it will also verify against the given public keys list. * * @param message - the message which was supposed to be signed * @param signature - the signature (96 bytes) * @return 1 if the signature(which contains the pubkey as the first 32bytes) matches the message. * * **Example** * * ```js * let result = sdk.zksync.verify("0xaabbccddeeff", "0xfca80a469dbb53f8002eb1e2569d66f156f0df24d71bd589432cc7bc647bfc0493f69034c3980e7352741afa6c171b8e18355e41ed7427f6e706f8432e32e920c3e61e6c3aa00cfe0c202c29a31b69cd0910a432156a0977c3a5baa404547e01") * * // result = 1 * ``` * */ verify(message: string, signature: string): number; /** returns the state or receipt of the the PriorityOperation * @param opId - the opId of a layer-operstion (like depositing) */ ethopInfo(opId: number): Promise; /** returns current token-price * @param token - Symbol or address of the token * @return the token price * * **Example** * * ```js * let result = await sdk.zksync.getTokenPrice("WBTC") * // result = 11320.002167 * ``` * */ getTokenPrice(token: string): Promise; /** calculates the fees for a transaction. * @param txType - The Type of the transaction "Withdraw" or "Transfer" * @param address - the address of the receipient * @param token - the symbol or address of the token to pay * @return the fees split up into single values * * **Example** * * ```js * let result = await sdk.zksync.getTxFee("Transfer", "0xabea9132b05a70803a4e85094fd0e1800777fbef", "BAT") * // result = * // feeType: TransferToNew * // gasFee: "47684047990828528" * // gasPriceWei: "116000000000" * // gasTxAmount: "350" * // totalFee: "66000000000000000" * // zkpFee: "18378682992117666" * ``` * */ getTxFee(txType: string, address: string, token: string): Promise; /** returns private key used for signing zksync-transactions * @return the raw private key configured based on the signers seed * * **Example** * * ```js * let result = await sdk.zksync.syncKey() * // result = "0x019125314fda133d5bf62cb454ee8c60927d55b68eae8b8b8bd13db814389cd6" * ``` * */ syncKey(): Promise; /** sends a deposit-transaction and returns the opId, which can be used to tradck progress. * @param amount - the value to deposit in wei (or smallest token unit) * @param token - the token as symbol or address * @param approveDepositAmountForERC20 - if true and in case of an erc20-token, the client will send a approve transaction first, otherwise it is expected to be already approved. * @param account - address of the account to send the tx from. if not specified, the first available signer will be used. * @return the opId. You can use `zksync_ethop_info` to follow the state-changes. * * **Example** * * ```js * let result = await sdk.zksync.deposit(1000, "WBTC") * // result = 74 * ``` * */ deposit(amount: bigint, token: string, approveDepositAmountForERC20?: boolean, account?: string): Promise; /** sends a zksync-transaction and returns data including the transactionHash. * @param to - the receipient of the tokens * @param amount - the value to transfer in wei (or smallest token unit) * @param token - the token as symbol or address * @param account - address of the account to send the tx from. if not specified, the first available signer will be used. * @return the transactionHash. use `zksync_tx_info` to check the progress. * * **Example** * * ```js * let result = await sdk.zksync.transfer(9.814684447173249e+47, 100, "WBTC") * // result = "0x58ba1537596739d990a33e4fba3a6fb4e0d612c5de30843a2c415dd1e5edcef1" * ``` * */ transfer(to: string, amount: bigint, token: string, account?: string): Promise; /** withdraws the amount to the given `ethAddress` for the given token. * @param ethAddress - the receipient of the tokens in L1 * @param amount - the value to transfer in wei (or smallest token unit) * @param token - the token as symbol or address * @param account - address of the account to send the tx from. if not specified, the first available signer will be used. * @return the transactionHash. use `zksync_tx_info` to check the progress. * * **Example** * * ```js * let result = await sdk.zksync.withdraw(9.814684447173249e+47, 100, "WBTC") * // result = "0x58ba1537596739d990a33e4fba3a6fb4e0d612c5de30843a2c415dd1e5edcef1" * ``` * */ withdraw(ethAddress: string, amount: bigint, token: string, account?: string): Promise; /** withdraws all tokens for the specified token as a onchain-transaction. This is useful in case the zksync-server is offline or tries to be malicious. * @param token - the token as symbol or address * @return the transactionReceipt * * **Example** * * ```js * let result = await sdk.zksync.emergencyWithdraw("WBTC") * // 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" * ``` * */ emergencyWithdraw(token: string): Promise; /** calculate the public key based on multiple public keys signing together using schnorr musig signatures. * @param pubkeys - concatinated packed publickeys of the signers. the length of the bytes must be `num_keys * 32` * @return the compact public Key * * **Example** * * ```js * let result = sdk.zksync.aggregatePubkey("0x0f61bfe164cc43b5a112bfbfb0583004e79dbfafc97a7daad14c5d511fea8e2435065ddd04329ec94be682bf004b03a5a4eeca9bf50a8b8b6023942adc0b3409") * * // result = "0x9ce5b6f8db3fbbe66a3bdbd3b4731f19ec27f80ee03ead3c0708798dd949882b" * ``` * */ aggregatePubkey(pubkeys: string): string; } /** a collection of relevant data you may need for the new wallet */ export interface ZksyncWalletCreate { /** the address of the wallet */ account: string; /** the transaction which the user would need to deploy in order to create the wallet in Layer 1. The transaction could be send by anybody as long as it contains those data. */ deploy_tx: ZksyncDeployTx; /** the create-arguments you need to configure your wallet for zksync. */ create2: ZksyncCreate2; /** the public keys of all the signer of the zksync musig key. This would be the user key first and then the approver-key. */ musig_pub_keys: string; /** the list of urls to be used to get the signature to create a schnorr musig signature. */ musig_urls: string[]; /** the wallet setup */ wallet: ZksyncZkWallet; } /** the transaction which the user would need to deploy in order to create the wallet in Layer 1. The transaction could be send by anybody as long as it contains those data. */ export interface ZksyncDeployTx { /** the data to send to the factory */ data: string; /** the recipient, which is the factory */ to: string; } /** the create-arguments you need to configure your wallet for zksync. */ export interface ZksyncCreate2 { /** the sender deploying the wallet, which is the factory. */ creator: string; /** the hash of the init-transaction and is used together with the pubkeyhash to determine the account address */ saltarg: string; /** the hash of the creator-tx, which is the tx send from the factory to deploy the proxy. This also includes the mastercopy as argument */ codehash: string; } /** the wallet setup */ export interface ZksyncZkWallet { /** the address of the wallet */ address: string; /** the minimal number of signatures needed for the multisig to approve a transaction. It must be at least one and less or equal to the number of owners. */ threshold: number; /** the public key of the zksync signer */ signer: string; /** the owners of multisig */ owners: ZksyncOwners[]; } /** the owners of multisig */ export interface ZksyncOwners { /** the bitmask representing the combined roles. */ roles: number; /** address of the owner */ address: string; } /** the current config of the signer. */ export interface ZksyncWalletGetConfig { /** the public key of the signer */ pubkey: string; /** the mastercopy as configured */ mastercopy: string; /** the sender deploying the wallet, which is the factory. */ creator: string; /** the hash of the creator-tx, which is the tx send from the factory to deploy the proxy. This also includes the mastercopy as argument */ codehash: string; } /** fetches the contract addresses from the zksync server. This request also caches them and will return the results from cahe if available. */ export interface ZksyncContractAddress { /** the address of the govement contract */ govContract: string; /** the address of the main contract */ mainContract: string; } /** a array of tokens-definitions. This request also caches them and will return the results from cahe if available. */ export interface ZksyncTokens { /** the address of the ERC2-Contract or 0x00000..000 in case of the native token (eth) */ address: string; /** decimals to be used when formating it for human readable representation. */ decimals: number; /** id which will be used when encoding the token. */ id: number; /** symbol for the token */ symbol: string; } /** the current state of the requested account. */ export interface ZksyncAccountInfo { /** the address of the account */ address: string; /** the state of the zksync operator after executing transactions successfully, but not not verified on L1 yet. */ commited: ZksyncCommited; /** the state of all depositing-tx. */ depositing: ZksyncDepositing; /** the assigned id of the account, which will be used when encoding it into the rollup. */ id: number; /** the state after the rollup was verified in L1. */ verified: ZksyncVerified; } /** the state of the zksync operator after executing transactions successfully, but not not verified on L1 yet. */ export interface ZksyncCommited { /** the token-balance */ balances: { [key: string]: bigint; }; /** the nonce or transaction count. */ nonce: number; /** the pubKeyHash set for the requested account or `0x0000...` if not set yet. */ pubKeyHash: string; } /** the state of all depositing-tx. */ export interface ZksyncDepositing { /** the token-values. */ balances: { [key: string]: bigint; }; } /** the state after the rollup was verified in L1. */ export interface ZksyncVerified { /** the token-balances. */ balances: { [key: string]: bigint; }; /** the nonce or transaction count. */ nonce: number; /** the pubKeyHash set for the requested account or `0x0000...` if not set yet. */ pubKeyHash: string; } /** the current state of the requested tx. */ export interface ZksyncTxInfo { /** the blockNumber containing the tx or `null` if still pending */ block: number; /** true, if the tx has been executed by the operator. If false it is still in the txpool of the operator. */ executed: boolean; /** if executed, this property marks the success of the tx. */ success: boolean; /** if executed and failed this will include an error message */ failReason: string; } /** the fees split up into single values */ export interface ZksyncTxFee { /** Type of the transaaction */ feeType: string; /** the gas for the core-transaction */ gasFee: number; /** current gasPrice */ gasPriceWei: number; /** gasTxAmount */ gasTxAmount: number; /** total of all fees needed to pay in order to execute the transaction */ totalFee: number; /** zkpFee */ zkpFee: number; } /** the transactionReceipt */ export interface ZksyncTransactionReceipt { /** 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: ZksyncEthlog[]; /** 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; } /** array of events created during execution of the tx */ export interface ZksyncEthlog { /** 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; } export default Zksync;