UNPKG

viem

Version:

TypeScript Interface for Ethereum

413 lines • 17.4 kB
import type { CeloRpcBlock, CeloRpcTransaction, CeloTransaction, CeloTransactionRequest } from './types.js'; export declare const formatters: { readonly block: { exclude: [] | undefined; format: (args: CeloRpcBlock) => { baseFeePerGas: bigint | null; blobGasUsed: bigint; difficulty: bigint | undefined; excessBlobGas: bigint; extraData: import("../index.js").Hex; gasLimit: bigint | undefined; gasUsed: bigint; hash: `0x${string}` | null; logsBloom: `0x${string}` | null; miner: import("abitype").Address; nonce: bigint | null | undefined; number: bigint | null; parentBeaconBlockRoot?: `0x${string}` | undefined; 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}`[] | CeloTransaction<boolean>[]; transactionsRoot: import("../index.js").Hash; withdrawals?: import("../index.js").Withdrawal[] | undefined | undefined; withdrawalsRoot?: `0x${string}` | undefined; mixHash?: undefined | undefined; randomness?: { committed: import("../index.js").Hex; revealed: import("../index.js").Hex; } | undefined | undefined; uncles?: undefined | undefined; } & {}; type: "block"; }; readonly transaction: { exclude: [] | undefined; format: (args: CeloRpcTransaction) => ({ 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 | undefined; authorizationList?: undefined | undefined; blobVersionedHashes?: undefined | undefined; chainId?: number | undefined; yParity?: undefined | undefined; type: "legacy"; gasPrice: bigint; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: undefined | undefined; maxPriorityFeePerGas?: undefined | undefined; feeCurrency: import("abitype").Address | null; mint?: undefined; isSystemTx?: undefined; sourceHash?: undefined; gatewayFee?: undefined; gatewayFeeRecipient?: undefined; } | { 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; authorizationList?: undefined | undefined; blobVersionedHashes?: undefined | undefined; chainId: number; type: "eip2930"; gasPrice: bigint; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: undefined | undefined; maxPriorityFeePerGas?: undefined | undefined; feeCurrency: import("abitype").Address | null; mint?: undefined; isSystemTx?: undefined; sourceHash?: undefined; gatewayFee?: undefined; gatewayFeeRecipient?: undefined; } | { 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; authorizationList?: undefined | undefined; blobVersionedHashes?: undefined | undefined; chainId: number; type: "eip1559"; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; feeCurrency: import("abitype").Address | null; mint?: undefined; isSystemTx?: undefined; sourceHash?: undefined; gatewayFee?: undefined; gatewayFeeRecipient?: undefined; } | { 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; authorizationList?: undefined | undefined; blobVersionedHashes: readonly import("../index.js").Hex[]; chainId: number; type: "eip4844"; gasPrice?: undefined | undefined; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; feeCurrency: import("abitype").Address | null; mint?: undefined; isSystemTx?: undefined; sourceHash?: undefined; gatewayFee?: undefined; gatewayFeeRecipient?: undefined; } | { 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; authorizationList: import("../index.js").SignedAuthorizationList; blobVersionedHashes?: undefined | undefined; chainId: number; type: "eip7702"; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; feeCurrency: import("abitype").Address | null; mint?: undefined; isSystemTx?: undefined; sourceHash?: undefined; gatewayFee?: undefined; gatewayFeeRecipient?: undefined; } | { 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; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; accessList: import("../index.js").AccessList; chainId: number; feeCurrency: import("abitype").Address | null; gatewayFee: bigint | null; gatewayFeeRecipient: import("abitype").Address | null; type: "cip42"; authorizationList?: undefined; blobVersionedHashes?: undefined; mint?: undefined; isSystemTx?: undefined; sourceHash?: undefined; } | { 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; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; accessList: import("../index.js").AccessList; chainId: number; feeCurrency: import("abitype").Address | null; type: "cip64"; authorizationList?: undefined; blobVersionedHashes?: undefined; mint?: undefined; isSystemTx?: undefined; sourceHash?: undefined; gatewayFee?: undefined; gatewayFeeRecipient?: undefined; } | { 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; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; isSystemTx?: boolean; mint?: bigint | undefined | undefined; sourceHash: import("../index.js").Hex; type: "deposit"; accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; chainId?: undefined; feeCurrency?: undefined; gatewayFee?: undefined; gatewayFeeRecipient?: undefined; }) & {}; type: "transaction"; }; readonly transactionRequest: { exclude: [] | undefined; format: (args: CeloTransactionRequest) => ({ data?: `0x${string}` | undefined; from?: `0x${string}` | undefined; gas?: `0x${string}` | undefined; nonce?: `0x${string}` | undefined; to?: `0x${string}` | null | undefined; type?: "0x0" | undefined; value?: `0x${string}` | undefined; gasPrice?: `0x${string}` | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: undefined | undefined; maxPriorityFeePerGas?: undefined | undefined; blobs?: undefined; accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; kzg?: undefined; sidecars?: undefined; feeCurrency?: `0x${string}` | undefined; } | { data?: `0x${string}` | undefined; from?: `0x${string}` | undefined; gas?: `0x${string}` | undefined; nonce?: `0x${string}` | undefined; to?: `0x${string}` | null | undefined; type?: "0x1" | undefined; value?: `0x${string}` | undefined; gasPrice?: `0x${string}` | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: undefined | undefined; maxPriorityFeePerGas?: undefined | undefined; accessList?: import("../index.js").AccessList | undefined; blobs?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; kzg?: undefined; sidecars?: undefined; feeCurrency?: `0x${string}` | undefined; } | { data?: `0x${string}` | undefined; from?: `0x${string}` | undefined; gas?: `0x${string}` | undefined; nonce?: `0x${string}` | undefined; to?: `0x${string}` | null | undefined; type?: "0x2" | undefined; value?: `0x${string}` | undefined; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: `0x${string}` | undefined; maxPriorityFeePerGas?: `0x${string}` | undefined; accessList?: import("../index.js").AccessList | undefined; blobs?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; kzg?: undefined; sidecars?: undefined; feeCurrency?: `0x${string}` | undefined; } | { type?: "0x3" | undefined; data?: `0x${string}` | undefined; from?: `0x${string}` | undefined; gas?: `0x${string}` | undefined; nonce?: `0x${string}` | undefined; value?: `0x${string}` | undefined; to: `0x${string}` | null; gasPrice?: undefined | undefined; maxFeePerGas?: `0x${string}` | undefined; maxPriorityFeePerGas?: `0x${string}` | undefined; maxFeePerBlobGas: `0x${string}`; accessList?: import("../index.js").AccessList | undefined; blobs: readonly import("../index.js").Hex[] | readonly import("../index.js").ByteArray[]; blobVersionedHashes?: readonly `0x${string}`[] | undefined; kzg?: import("../index.js").Kzg | undefined; sidecars?: readonly import("../index.js").BlobSidecar<`0x${string}`>[] | undefined; authorizationList?: undefined; feeCurrency?: `0x${string}` | undefined; } | { type?: "0x4" | undefined; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: `0x${string}` | undefined; maxPriorityFeePerGas?: `0x${string}` | undefined; to?: `0x${string}` | null | undefined; data?: `0x${string}` | undefined; from?: `0x${string}` | undefined; gas?: `0x${string}` | undefined; nonce?: `0x${string}` | undefined; value?: `0x${string}` | undefined; accessList?: import("../index.js").AccessList | undefined; authorizationList?: import("../types/rpc.js").RpcAuthorizationList | undefined; blobs?: undefined; blobVersionedHashes?: undefined; kzg?: undefined; sidecars?: undefined; feeCurrency?: `0x${string}` | undefined; } | { data?: `0x${string}` | undefined; from?: `0x${string}` | undefined; gas?: `0x${string}` | undefined; nonce?: `0x${string}` | undefined; to?: `0x${string}` | null | undefined; type?: "0x7b" | undefined; value?: `0x${string}` | undefined; accessList?: import("../index.js").AccessList | undefined; feeCurrency?: `0x${string}` | undefined; gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas?: `0x${string}` | undefined; maxPriorityFeePerGas?: `0x${string}` | undefined; blobs?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; kzg?: undefined; sidecars?: undefined; }) & {}; type: "transactionRequest"; }; }; //# sourceMappingURL=formatters.d.ts.map