import { type Context } from 'hono'; import { Hex } from 'ox'; import * as z from 'zod/mini'; import type * as App from '../../../App.js'; import * as Response from '../../../internal/Response.js'; import * as Schema from '../../../internal/Schema.js'; import * as Transactions from './transactions.js'; import * as Valuation from './valuation.js'; /** Zod schemas owned by the receipt handlers. */ export declare namespace schema { /** One event log emitted by a transaction (RPC format). */ const Log: z.ZodMiniObject<{ address: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNullable>; blockTimestamp: z.ZodMiniOptional>>; data: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; logIndex: z.ZodMiniNullable>; removed: z.ZodMiniBoolean; topics: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionIndex: z.ZodMiniNullable>; }, z.core.$loose>; /** The verbatim JSON-RPC payloads, surfaced under each resource's `rpc` field. */ namespace Rpc { /** A JSON-RPC transaction receipt, passed through verbatim. */ const Receipt: z.ZodMiniObject<{ blobGasPrice: z.ZodMiniOptional>; blobGasUsed: z.ZodMiniOptional>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniTemplateLiteral<`0x${string}`>; blockTimestamp: z.ZodMiniOptional>>; contractAddress: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; cumulativeGasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>; effectiveGasPrice: z.ZodMiniTemplateLiteral<`0x${string}`>; feePayer: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; feeToken: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; from: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; gasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>; logs: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNullable>; blockTimestamp: z.ZodMiniOptional>>; data: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; logIndex: z.ZodMiniNullable>; removed: z.ZodMiniBoolean; topics: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionIndex: z.ZodMiniNullable>; }, z.core.$loose>>; logsBloom: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, string>>>; root: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, string>>>; status: z.ZodMiniTemplateLiteral<`0x${string}`>; to: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; transactionIndex: z.ZodMiniTemplateLiteral<`0x${string}`>; type: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; }, z.core.$loose>; } /** Receipt metadata containing valuation provenance and the verbatim JSON-RPC receipt. */ const ReceiptMeta: z.ZodMiniObject<{ valuation: z.ZodMiniOptional; source: z.ZodMiniString; }, z.core.$strip>>; rpc: z.ZodMiniObject<{ blobGasPrice: z.ZodMiniOptional>; blobGasUsed: z.ZodMiniOptional>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniTemplateLiteral<`0x${string}`>; blockTimestamp: z.ZodMiniOptional>>; contractAddress: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; cumulativeGasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>; effectiveGasPrice: z.ZodMiniTemplateLiteral<`0x${string}`>; feePayer: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; feeToken: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; from: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; gasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>; logs: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNullable>; blockTimestamp: z.ZodMiniOptional>>; data: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; logIndex: z.ZodMiniNullable>; removed: z.ZodMiniBoolean; topics: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionIndex: z.ZodMiniNullable>; }, z.core.$loose>>; logsBloom: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, string>>>; root: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, string>>>; status: z.ZodMiniTemplateLiteral<`0x${string}`>; to: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; transactionIndex: z.ZodMiniTemplateLiteral<`0x${string}`>; type: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; }, z.core.$loose>; }, z.core.$strip>; /** The fee charged to the fee payer, carrying its value in the requested denomination. */ const FeeAmount: z.ZodMiniObject<{ baseUnits: z.ZodMiniString; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; valuation: z.ZodMiniOptional; currency: z.ZodMiniString; }, z.core.$strip>>>; }, z.core.$strip>; /** * A humanized transaction receipt: decoded `status`/`type`, plain-number gas * and block fields, a structured fee amount, and a decimal-string gas price. * The raw event logs are surfaced under `logs`, and the RPC receipt under `meta.rpc`. */ const Receipt: z.ZodMiniObject<{ blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNumber; contractAddress: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; cumulativeGasUsed: z.ZodMiniNumber; effectiveGasPrice: z.ZodMiniString; feeAmount: z.ZodMiniObject<{ baseUnits: z.ZodMiniString; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; valuation: z.ZodMiniOptional; currency: z.ZodMiniString; }, z.core.$strip>>>; }, z.core.$strip>; feePayer: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; feeToken: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; logoUri: z.ZodMiniOptional>>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniOptional>; }, z.core.$strip>>>; gasUsed: z.ZodMiniNumber; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; logs: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNullable>; blockTimestamp: z.ZodMiniOptional>>; data: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; logIndex: z.ZodMiniNullable>; removed: z.ZodMiniBoolean; topics: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionIndex: z.ZodMiniNullable>; }, z.core.$loose>>; meta: z.ZodMiniObject<{ valuation: z.ZodMiniOptional; source: z.ZodMiniString; }, z.core.$strip>>; rpc: z.ZodMiniObject<{ blobGasPrice: z.ZodMiniOptional>; blobGasUsed: z.ZodMiniOptional>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniTemplateLiteral<`0x${string}`>; blockTimestamp: z.ZodMiniOptional>>; contractAddress: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; cumulativeGasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>; effectiveGasPrice: z.ZodMiniTemplateLiteral<`0x${string}`>; feePayer: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; feeToken: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; from: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; gasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>; logs: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNullable>; blockTimestamp: z.ZodMiniOptional>>; data: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; logIndex: z.ZodMiniNullable>; removed: z.ZodMiniBoolean; topics: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionIndex: z.ZodMiniNullable>; }, z.core.$loose>>; logsBloom: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, string>>>; root: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, string>>>; status: z.ZodMiniTemplateLiteral<`0x${string}`>; to: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; transactionIndex: z.ZodMiniTemplateLiteral<`0x${string}`>; type: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; }, z.core.$loose>; }, z.core.$strip>; recipient: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; sender: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; status: z.ZodMiniEnum<{ reverted: "reverted"; success: "success"; }>; timestamp: z.ZodMiniNullable; transactionHash: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; transactionIndex: z.ZodMiniNumber; type: z.ZodMiniLazy>; }, z.core.$strip>; /** Humanized transaction receipt shared by detail, list, and transaction includes. */ const TransactionReceipt: z.ZodMiniObject<{ blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNumber; contractAddress: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; cumulativeGasUsed: z.ZodMiniNumber; effectiveGasPrice: z.ZodMiniString; feeAmount: z.ZodMiniObject<{ baseUnits: z.ZodMiniString; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; valuation: z.ZodMiniOptional; currency: z.ZodMiniString; }, z.core.$strip>>>; }, z.core.$strip>; feePayer: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; feeToken: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; logoUri: z.ZodMiniOptional>>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniOptional>; }, z.core.$strip>>>; gasUsed: z.ZodMiniNumber; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; logs: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNullable>; blockTimestamp: z.ZodMiniOptional>>; data: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; logIndex: z.ZodMiniNullable>; removed: z.ZodMiniBoolean; topics: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionIndex: z.ZodMiniNullable>; }, z.core.$loose>>; meta: z.ZodMiniObject<{ valuation: z.ZodMiniOptional; source: z.ZodMiniString; }, z.core.$strip>>; rpc: z.ZodMiniObject<{ blobGasPrice: z.ZodMiniOptional>; blobGasUsed: z.ZodMiniOptional>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniTemplateLiteral<`0x${string}`>; blockTimestamp: z.ZodMiniOptional>>; contractAddress: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; cumulativeGasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>; effectiveGasPrice: z.ZodMiniTemplateLiteral<`0x${string}`>; feePayer: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; feeToken: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; from: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; gasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>; logs: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNullable>; blockTimestamp: z.ZodMiniOptional>>; data: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; logIndex: z.ZodMiniNullable>; removed: z.ZodMiniBoolean; topics: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionIndex: z.ZodMiniNullable>; }, z.core.$loose>>; logsBloom: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, string>>>; root: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, string>>>; status: z.ZodMiniTemplateLiteral<`0x${string}`>; to: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; transactionIndex: z.ZodMiniTemplateLiteral<`0x${string}`>; type: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; }, z.core.$loose>; }, z.core.$strip>; recipient: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; sender: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; status: z.ZodMiniEnum<{ reverted: "reverted"; success: "success"; }>; timestamp: z.ZodMiniNullable; transactionHash: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; transactionIndex: z.ZodMiniNumber; type: z.ZodMiniLazy>; }, z.core.$strip>; /** Schemas for the getReceipt operation. */ namespace getReceipt { /** Path parameters for receipt requests. */ const Params: z.ZodMiniObject<{ transactionHash: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; }, z.core.$strip>; /** Optional curated token fields that callers opt into via `include`. */ const Include: z.ZodMiniEnum<{ "feeToken.logoUri": "feeToken.logoUri"; "feeToken.verified": "feeToken.verified"; }>; /** * Parses a comma-separated `include` query value into a list of optional * token fields to embed. Curated lookups only run when explicitly requested. */ const includeQuery: z.ZodMiniPipe, z.ZodMiniTransform>, z.ZodMiniArray>>; /** Query parameters for receipt requests. */ const Query: z.ZodMiniObject<{ chainId: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>>; include: z.ZodMiniPipe, z.ZodMiniTransform>, z.ZodMiniArray>>; 'valuation.currency': z.ZodMiniOptional, z.ZodMiniTransform>>; }, z.core.$strict>; /** A humanized receipt, with the verbatim JSON-RPC payload under `meta.rpc`. */ const Response: z.ZodMiniObject<{ blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNumber; contractAddress: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; cumulativeGasUsed: z.ZodMiniNumber; effectiveGasPrice: z.ZodMiniString; feeAmount: z.ZodMiniObject<{ baseUnits: z.ZodMiniString; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; valuation: z.ZodMiniOptional; currency: z.ZodMiniString; }, z.core.$strip>>>; }, z.core.$strip>; feePayer: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; feeToken: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; logoUri: z.ZodMiniOptional>>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniOptional>; }, z.core.$strip>>>; gasUsed: z.ZodMiniNumber; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; logs: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNullable>; blockTimestamp: z.ZodMiniOptional>>; data: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; logIndex: z.ZodMiniNullable>; removed: z.ZodMiniBoolean; topics: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionIndex: z.ZodMiniNullable>; }, z.core.$loose>>; meta: z.ZodMiniObject<{ valuation: z.ZodMiniOptional; source: z.ZodMiniString; }, z.core.$strip>>; rpc: z.ZodMiniObject<{ blobGasPrice: z.ZodMiniOptional>; blobGasUsed: z.ZodMiniOptional>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniTemplateLiteral<`0x${string}`>; blockTimestamp: z.ZodMiniOptional>>; contractAddress: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; cumulativeGasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>; effectiveGasPrice: z.ZodMiniTemplateLiteral<`0x${string}`>; feePayer: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; feeToken: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; from: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; gasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>; logs: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNullable>; blockTimestamp: z.ZodMiniOptional>>; data: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; logIndex: z.ZodMiniNullable>; removed: z.ZodMiniBoolean; topics: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionIndex: z.ZodMiniNullable>; }, z.core.$loose>>; logsBloom: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, string>>>; root: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, string>>>; status: z.ZodMiniTemplateLiteral<`0x${string}`>; to: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; transactionIndex: z.ZodMiniTemplateLiteral<`0x${string}`>; type: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; }, z.core.$loose>; }, z.core.$strip>; recipient: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; sender: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; status: z.ZodMiniEnum<{ reverted: "reverted"; success: "success"; }>; timestamp: z.ZodMiniNullable; transactionHash: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; transactionIndex: z.ZodMiniNumber; type: z.ZodMiniLazy>; }, z.core.$strip>; } /** Schemas for the getReceipts (list) operation. */ namespace getReceipts { /** Optional fee-token fields and response-wide count metadata. */ const Include: z.ZodMiniEnum<{ "feeToken.logoUri": "feeToken.logoUri"; "feeToken.verified": "feeToken.verified"; totalCount: "totalCount"; }>; /** Parses the comma-separated `include` value for the receipt list. */ const includeQuery: z.ZodMiniPipe, z.ZodMiniTransform>, z.ZodMiniArray>>; /** Query parameters for receipt list requests. */ const Query: z.ZodMiniObject<{ address: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; 'blockNumber.from': z.ZodMiniOptional>; 'blockNumber.to': z.ZodMiniOptional>; chainId: z.ZodMiniOptional, z.ZodMiniTransform<4217 | 42431, "mainnet" | "testnet">>, z.ZodMiniPipe, z.ZodMiniTransform>]>, z.ZodMiniNumber>>; cursor: z.ZodMiniOptional>; feePayer: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; feeToken: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; include: z.ZodMiniPipe, z.ZodMiniTransform>, z.ZodMiniArray>>; limit: z.ZodMiniDefault, z.ZodMiniTransform>>; order: z.ZodMiniDefault>; page: z.ZodMiniOptional>; recipient: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; sender: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; status: z.ZodMiniOptional>; 'timestamp.from': z.ZodMiniOptional>>; 'timestamp.to': z.ZodMiniOptional>>; 'valuation.currency': z.ZodMiniOptional, z.ZodMiniTransform>>; }, z.core.$strict>; /** * Page of receipts. Each item reuses the humanized receipt returned by * `GET /transactions/:transactionHash/receipt`, so the list and detail endpoints expose one * identical shape. Indexed list rows are reconstructed from the indexer, * which stores neither the block hash nor the event logs, so those fields are * `null`/empty in the list `meta.rpc` payload. */ /** Page-level resources: opt-in counts plus valuation rate provenance. */ const Meta: z.ZodMiniObject<{ valuation: z.ZodMiniOptional; source: z.ZodMiniString; }, z.core.$strip>>; totalCount: z.ZodMiniOptional>; totalCountCapped: z.ZodMiniOptional>; }, z.core.$strip>; const Response: z.ZodMiniObject<{ data: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNumber; contractAddress: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; cumulativeGasUsed: z.ZodMiniNumber; effectiveGasPrice: z.ZodMiniString; feeAmount: z.ZodMiniObject<{ baseUnits: z.ZodMiniString; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; formatted: z.ZodMiniString; valuation: z.ZodMiniOptional; currency: z.ZodMiniString; }, z.core.$strip>>>; }, z.core.$strip>; feePayer: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; feeToken: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; currency: z.ZodMiniString; decimals: z.ZodMiniNumber; logoUri: z.ZodMiniOptional>>; name: z.ZodMiniString; symbol: z.ZodMiniString; verified: z.ZodMiniOptional>; }, z.core.$strip>>>; gasUsed: z.ZodMiniNumber; id: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; logs: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNullable>; blockTimestamp: z.ZodMiniOptional>>; data: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; logIndex: z.ZodMiniNullable>; removed: z.ZodMiniBoolean; topics: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionIndex: z.ZodMiniNullable>; }, z.core.$loose>>; meta: z.ZodMiniObject<{ valuation: z.ZodMiniOptional; source: z.ZodMiniString; }, z.core.$strip>>; rpc: z.ZodMiniObject<{ blobGasPrice: z.ZodMiniOptional>; blobGasUsed: z.ZodMiniOptional>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniTemplateLiteral<`0x${string}`>; blockTimestamp: z.ZodMiniOptional>>; contractAddress: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; cumulativeGasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>; effectiveGasPrice: z.ZodMiniTemplateLiteral<`0x${string}`>; feePayer: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; feeToken: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>>; from: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; gasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>; logs: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; blockHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; blockNumber: z.ZodMiniNullable>; blockTimestamp: z.ZodMiniOptional>>; data: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; logIndex: z.ZodMiniNullable>; removed: z.ZodMiniBoolean; topics: z.ZodMiniArray, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionIndex: z.ZodMiniNullable>; }, z.core.$loose>>; logsBloom: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, string>>>; root: z.ZodMiniOptional, z.ZodMiniTransform<`0x${string}`, string>>>; status: z.ZodMiniTemplateLiteral<`0x${string}`>; to: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; transactionHash: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; transactionIndex: z.ZodMiniTemplateLiteral<`0x${string}`>; type: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, string>>; }, z.core.$loose>; }, z.core.$strip>; recipient: z.ZodMiniNullable, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>>; sender: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; status: z.ZodMiniEnum<{ reverted: "reverted"; success: "success"; }>; timestamp: z.ZodMiniNullable; transactionHash: z.ZodMiniPipe, z.ZodMiniTransform<`0x${string}`, `0x${string}`>>; transactionIndex: z.ZodMiniNumber; type: z.ZodMiniLazy>; }, z.core.$strip>>; meta: z.ZodMiniOptional; source: z.ZodMiniString; }, z.core.$strip>>; totalCount: z.ZodMiniOptional>; totalCountCapped: z.ZodMiniOptional>; }, z.core.$strip>>; nextCursor: z.ZodMiniNullable>; }, z.core.$strip>; } } /** Creates receipt handlers. */ export declare function receipts(options?: receipts.Options): import("hono/hono-base").HonoBase; export declare namespace receipts { /** Options for the receipt handlers. */ type Options = { /** FX configuration backing fee valuation. */ fx?: Valuation.addresses.Fx | undefined; }; } /** * Lists humanized receipts with required fee-token metadata and optional curated fields. */ export declare function listReceipts(c: Context, options: listReceipts.Options): Promise<{ data: Transactions.enrichFeeTokens.Output>[]; nextCursor: string | null; }>; export declare namespace listReceipts { type Options = getReceipts.Options & { /** Optional curated fee-token fields to embed. */ include: readonly z.output[]; }; } export declare function getReceipts(c: Context, options: getReceipts.Options): Promise<{ data: humanizeReceipt.Output[]; nextCursor: string | null; }>; export declare namespace getReceipts { type Options = { address?: z.output | undefined; chainId: z.output; /** Opaque keyset cursor anchoring the page; omit for the head page. */ cursor?: string | undefined; feePayer?: z.output | undefined; feeToken?: z.output | undefined; fromBlock?: number | undefined; fromTimestamp?: string | undefined; limit: number; /** 1-indexed page number (positional pagination; exclusive with `cursor`). */ page?: number | undefined; order: 'asc' | 'desc'; recipient?: z.output | undefined; sender?: z.output | undefined; /** Only include receipts whose execution status matches. */ status?: 'reverted' | 'success' | undefined; toBlock?: number | undefined; toTimestamp?: string | undefined; }; } /** * Capped total count of receipts matching the same filters as the page. The * address scope reuses the page's `UNION` workaround. Fee-payer filters make a * direct `receipts.to` predicate selective; otherwise the `to` side resolves * hashes via the `txs` index. The deduped keyset avoids double-counting * self-receipts (`from = to`). * `totalCountCapped: true` is a lower bound — at least {@link Schema.countCap} matches. */ export declare function countReceipts(c: Context, options: countReceipts.Options): Promise>; export declare namespace countReceipts { /** Filters for {@link countReceipts}: the page filters minus pagination. */ type Options = Pick; } /** * Resolves humanized receipts — including their event logs — for a page of * transactions, keyed by lowercased transaction hash. Rows without a receipt * (pending, or not yet indexed) are simply absent from the map. * * Receipt rows come from the indexed `receipts` table (skipped when the caller * already paged receipts via the `status` path) and event logs from the raw * `logs` table, both fetched once for the whole page. No `Store.memoize` here: * the route-level response cache (`Cache.response`) already absorbs repeated * requests for the same page. */ export declare function embedReceipts(c: Context, options: embedReceipts.Options): Promise>>; export declare namespace embedReceipts { /** Options for {@link embedReceipts}. */ type Options = { /** Target chain id. */ chainId: z.output; /** Optional curated fee-token fields to embed. */ include: readonly string[]; /** * Pre-fetched humanized receipts for the page (the `status`-filtered * transactions path). When provided, the receipts query is skipped and only * the page's event logs are fetched and reattached. */ receipts?: readonly humanizeReceipt.Output[] | undefined; /** * The page's humanized transaction rows. Typed structurally (rather than as * the transactions schema output) so this module never touches the * transaction schemas eagerly across the import cycle. */ rows: readonly { /** Block number, or null if pending (pending rows have no receipt). */ blockNumber: number | null; /** Fee-token preference declared on the transaction. */ feeToken?: Hex.Hex | undefined; /** Transaction hash. */ hash: string; /** Verbatim RPC payload carrying the raw `type` byte. */ meta: { rpc: { type: Hex.Hex; }; }; }[]; }; } /** Resolves required RPC fee-token metadata and optional curated fields for receipts. */ export declare function enrichReceipts(c: Context, options: enrichReceipts.Options): Promise>[]>; export declare namespace enrichReceipts { /** Inputs for enriching humanized receipts. */ type Options = { /** Target chain id. */ chainId: z.output; /** Optional curated fee-token fields to embed. */ include: readonly string[]; /** Humanized receipts whose fee token is still an address. */ receipts: readonly humanizeReceipt.Output[]; }; } /** * Humanizes a JSON-RPC transaction receipt: decodes `status`/`type`, converts * gas price and fee values, converts block fields to numbers, and derives the * block `timestamp` from the top-level `blockTimestamp` (present when * reconstructed from the index) or the (shared) per-log timestamp — `null` when * neither is available. The verbatim payload is preserved under `meta.rpc` and * the raw logs under `logs`. Shared by the receipt detail (RPC source) and list * (reconstructed from the indexer) endpoints, so both expose an identical shape. */ export declare function humanizeReceipt(rpc: z.output): humanizeReceipt.Output; export declare namespace humanizeReceipt { /** Humanized receipt before its fee-token address is resolved to metadata. */ type Output = Omit, 'feeToken'> & { /** Address of the token used to pay the fee. */ feeToken?: z.output | undefined; }; } /** * Re-encodes a TIDX `receipts` row (joined to `txs`) into the JSON-RPC receipt * shape, which becomes the `rpc` payload the list endpoint humanizes through the * same path as the detail endpoint. Numeric columns become `0x` quantities; * fields the indexer does not store — the block hash, logs bloom, and event logs * — are null/empty since the `receipts` table records neither. */ export declare function toRpcReceipt(row: Record): { blockHash: null; blockNumber: `0x${string}` | undefined; blockTimestamp: `0x${string}` | undefined; contractAddress: string | null; cumulativeGasUsed: `0x${string}` | undefined; effectiveGasPrice: `0x${string}` | undefined; feePayer: string | undefined; feeToken: string | undefined; from: unknown; gasUsed: `0x${string}` | undefined; logs: never[]; status: `0x${string}` | undefined; to: string | null; transactionHash: unknown; transactionIndex: `0x${string}` | undefined; type: `0x${string}` | undefined; }; //# sourceMappingURL=receipts.d.ts.map