UNPKG

viem

Version:

TypeScript Interface for Ethereum

350 lines • 14.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; 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; withdrawalsRoot?: import("../index.js").Hex | undefined; mixHash?: undefined; randomness?: { committed: import("../index.js").Hex; revealed: import("../index.js").Hex; } | undefined; uncles?: 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; blobVersionedHashes?: undefined; chainId?: number | undefined; yParity?: undefined; type: "legacy"; gasPrice: bigint; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: 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; blobVersionedHashes?: undefined; chainId: number; type: "eip2930"; gasPrice: bigint; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: 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; blobVersionedHashes?: undefined; chainId: number; type: "eip1559"; gasPrice?: undefined; maxFeePerBlobGas?: 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; blobVersionedHashes: readonly import("../index.js").Hex[]; chainId: number; type: "eip4844"; gasPrice?: 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; gasPrice?: undefined; maxFeePerBlobGas?: 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"; 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; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; accessList: import("../index.js").AccessList; chainId: number; feeCurrency: import("abitype").Address | null; type: "cip64"; 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; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; isSystemTx?: boolean; mint?: bigint | undefined; sourceHash: import("../index.js").Hex; type: "deposit"; accessList?: undefined; blobVersionedHashes?: undefined; chainId?: undefined; feeCurrency?: undefined; gatewayFee?: undefined; gatewayFeeRecipient?: undefined; }) & {}; type: "transaction"; }; readonly transactionRequest: { exclude: [] | undefined; format: (args: CeloTransactionRequest) => ({ 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; feeCurrency?: import("abitype").Address | 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; feeCurrency?: import("abitype").Address | 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; feeCurrency?: import("abitype").Address | 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}`; feeCurrency?: import("abitype").Address | 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; feeCurrency?: import("abitype").Address | undefined; type?: "0x7b" | undefined; gasPrice?: undefined; maxFeePerBlobGas?: undefined; maxFeePerGas?: `0x${string}` | undefined; maxPriorityFeePerGas?: `0x${string}` | undefined; blobs?: undefined; blobVersionedHashes?: undefined; kzg?: undefined; sidecars?: undefined; }) & {}; type: "transactionRequest"; }; }; //# sourceMappingURL=formatters.d.ts.map