UNPKG

viem

Version:

TypeScript Interface for Ethereum

317 lines • 13.1 kB
import type { ZkSyncRpcBlock } from './types/block.js'; import type { ZkSyncL2ToL1Log, ZkSyncLog } from './types/log.js'; import type { ZkSyncRpcTransaction, ZkSyncRpcTransactionReceipt, ZkSyncTransaction, ZkSyncTransactionRequest } from './types/transaction.js'; export declare const formatters: { readonly block: { exclude: [] | undefined; format: (args: ZkSyncRpcBlock) => { baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: import("../index.js").Hex; gasLimit: bigint; gasUsed: bigint; hash: `0x${string}` | null; logsBloom: `0x${string}` | null; miner: import("abitype").Address; mixHash: import("../index.js").Hash; nonce: `0x${string}` | null; number: bigint | null; parentHash: import("../index.js").Hash; receiptsRoot: import("../index.js").Hex; sealFields: import("../index.js").Hex[]; sha3Uncles: import("../index.js").Hash; size: bigint; stateRoot: import("../index.js").Hash; timestamp: bigint; totalDifficulty: bigint | null; transactions: `0x${string}`[] | ZkSyncTransaction<boolean>[]; transactionsRoot: import("../index.js").Hash; uncles: import("../index.js").Hash[]; withdrawals?: import("../index.js").Withdrawal[] | undefined; withdrawalsRoot?: import("../index.js").Hex | undefined; l1BatchNumber: bigint | null; l1BatchTimestamp: bigint | null; } & {}; type: "block"; }; readonly transaction: { exclude: [] | undefined; format: (args: ZkSyncRpcTransaction) => ({ r: import("../index.js").Hex; s: import("../index.js").Hex; v: bigint; to: import("abitype").Address | null; from: import("abitype").Address; gas: bigint; nonce: number; value: bigint; blockHash: `0x${string}` | null; blockNumber: bigint | null; hash: import("../index.js").Hash; input: import("../index.js").Hex; transactionIndex: number | null; typeHex: import("../index.js").Hex | null; accessList?: undefined; blobVersionedHashes?: undefined; chainId?: number | undefined; yParity?: undefined; type: "legacy"; gasPrice: bigint; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; l1BatchNumber: bigint | null; l1BatchTxIndex: bigint | null; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; from: import("abitype").Address; gas: bigint; hash: import("../index.js").Hash; input: import("../index.js").Hex; nonce: number; r: import("../index.js").Hex; s: import("../index.js").Hex; to: import("abitype").Address | null; transactionIndex: number | null; typeHex: import("../index.js").Hex | null; v: bigint; value: bigint; yParity: number; accessList: import("../index.js").AccessList; blobVersionedHashes?: undefined; chainId: number; type: "eip2930"; gasPrice: bigint; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; l1BatchNumber: bigint | null; l1BatchTxIndex: bigint | null; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; from: import("abitype").Address; gas: bigint; hash: import("../index.js").Hash; input: import("../index.js").Hex; nonce: number; r: import("../index.js").Hex; s: import("../index.js").Hex; to: import("abitype").Address | null; transactionIndex: number | null; typeHex: import("../index.js").Hex | null; v: bigint; value: bigint; yParity: number; accessList: import("../index.js").AccessList; blobVersionedHashes?: undefined; chainId: number; type: "eip1559"; gasPrice?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; l1BatchNumber: bigint | null; l1BatchTxIndex: bigint | null; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; from: import("abitype").Address; gas: bigint; hash: import("../index.js").Hash; input: import("../index.js").Hex; nonce: number; r: import("../index.js").Hex; s: import("../index.js").Hex; to: import("abitype").Address | null; transactionIndex: number | null; typeHex: import("../index.js").Hex | null; v: bigint; value: bigint; yParity: number; accessList: import("../index.js").AccessList; blobVersionedHashes: readonly import("../index.js").Hex[]; chainId: number; type: "eip4844"; gasPrice?: undefined; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; l1BatchNumber: bigint | null; l1BatchTxIndex: bigint | null; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; from: import("abitype").Address; gas: bigint; hash: import("../index.js").Hash; input: import("../index.js").Hex; nonce: number; r: import("../index.js").Hex; s: import("../index.js").Hex; to: import("abitype").Address | null; transactionIndex: number | null; typeHex: import("../index.js").Hex | null; v: bigint; value: bigint; yParity: number; l1BatchNumber: bigint | null; l1BatchTxIndex: bigint | null; gasPrice?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; type: "priority"; } | { blockHash: `0x${string}` | null; blockNumber: bigint | null; from: import("abitype").Address; gas: bigint; hash: import("../index.js").Hash; input: import("../index.js").Hex; nonce: number; r: import("../index.js").Hex; s: import("../index.js").Hex; to: import("abitype").Address | null; transactionIndex: number | null; typeHex: import("../index.js").Hex | null; v: bigint; value: bigint; yParity: number; l1BatchNumber: bigint | null; l1BatchTxIndex: bigint | null; gasPrice?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; type: "eip712" | "priority"; }) & {}; type: "transaction"; }; readonly transactionReceipt: { exclude: [] | undefined; format: (args: ZkSyncRpcTransactionReceipt) => { type: import("./types/transaction.js").ZkSyncTransactionType; to: import("abitype").Address | null; from: import("abitype").Address; blockHash: import("../index.js").Hash; blockNumber: bigint; transactionIndex: number; status: "success" | "reverted"; logsBloom: import("../index.js").Hex; blobGasUsed?: bigint | undefined; gasUsed: bigint; contractAddress: import("abitype").Address | null | undefined; transactionHash: import("../index.js").Hash; blobGasPrice?: bigint | undefined; cumulativeGasUsed: bigint; effectiveGasPrice: bigint; root?: import("../index.js").Hash | undefined; l1BatchNumber: bigint | null; l1BatchTxIndex: bigint | null; logs: ZkSyncLog[]; l2ToL1Logs: ZkSyncL2ToL1Log[]; } & {}; type: "transactionReceipt"; }; readonly transactionRequest: { exclude: ("paymaster" | "gasPerPubdata" | "factoryDeps" | "paymasterInput" | "customSignature")[] | undefined; format: (args: ZkSyncTransactionRequest) => ({ data?: import("../index.js").Hex | undefined; from: import("abitype").Address; gas?: `0x${string}` | undefined; nonce?: `0x${string}` | undefined; to?: import("abitype").Address | null | undefined; value?: `0x${string}` | undefined; accessList?: undefined; blobs?: undefined; type?: "0x0" | undefined; gasPrice?: `0x${string}` | undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; blobVersionedHashes?: undefined; kzg?: undefined; sidecars?: undefined; eip712Meta?: undefined; } | { data?: import("../index.js").Hex | undefined; from: import("abitype").Address; gas?: `0x${string}` | undefined; nonce?: `0x${string}` | undefined; to?: import("abitype").Address | null | undefined; value?: `0x${string}` | undefined; accessList?: import("../index.js").AccessList | undefined; blobs?: undefined; type?: "0x1" | undefined; gasPrice?: `0x${string}` | undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; blobVersionedHashes?: undefined; kzg?: undefined; sidecars?: undefined; eip712Meta?: undefined; } | { data?: import("../index.js").Hex | undefined; from: import("abitype").Address; gas?: `0x${string}` | undefined; nonce?: `0x${string}` | undefined; to?: import("abitype").Address | null | undefined; value?: `0x${string}` | undefined; gasPrice?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: `0x${string}` | undefined; maxPriorityFeePerGas?: `0x${string}` | undefined; accessList?: import("../index.js").AccessList | undefined; blobs?: undefined; type?: "0x2" | undefined; blobVersionedHashes?: undefined; kzg?: undefined; sidecars?: undefined; eip712Meta?: undefined; } | { data?: import("../index.js").Hex | undefined; from: import("abitype").Address; gas?: `0x${string}` | undefined; nonce?: `0x${string}` | undefined; value?: `0x${string}` | undefined; to: `0x${string}` | null; accessList?: import("../index.js").AccessList | undefined; blobs: readonly import("../index.js").Hex[] | readonly import("../index.js").ByteArray[]; blobVersionedHashes?: readonly import("../index.js").Hex[] | undefined; kzg?: import("../index.js").Kzg | undefined; sidecars?: readonly import("../index.js").BlobSidecar<import("../index.js").Hex>[] | undefined; type?: "0x3" | undefined; gasPrice?: undefined; maxFeePerGas?: `0x${string}` | undefined; maxPriorityFeePerGas?: `0x${string}` | undefined; maxFeePerBlobGas: `0x${string}`; eip712Meta?: undefined; } | { data?: import("../index.js").Hex | undefined; from: import("abitype").Address; gas?: `0x${string}` | undefined; nonce?: `0x${string}` | undefined; to?: import("abitype").Address | null | undefined; value?: `0x${string}` | undefined; gasPrice?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: `0x${string}` | undefined; maxPriorityFeePerGas?: `0x${string}` | undefined; eip712Meta: import("./index.js").ZkSyncEip712Meta; type: "0x71" | "0xff"; }) & { paymaster: never; gasPerPubdata: never; factoryDeps: never; paymasterInput: never; customSignature: never; }; type: "transactionRequest"; }; }; //# sourceMappingURL=formatters.d.ts.map