import { ReceiptField, ReceiptSubquery } from "@axiom-crypto/tools"; import { CircuitValue, RawCircuitInput, CircuitValue256 } from "@axiom-crypto/halo2-lib-js"; import { Halo2LibWasm } from "@axiom-crypto/halo2-lib-js/wasm/web"; import { PrepData } from "./utils"; /** * Represents a log entry in a receipt. */ export interface Log { /** * Retrieves the value of a specific topic in the log entry. * * @param topicIdx - The index of the topic. * @param eventSchema - The event schema. * @returns A `CircuitValue` representing the value of the topic. */ topic: (topicIdx: RawCircuitInput | CircuitValue, eventSchema?: string | CircuitValue256) => CircuitValue256; /** * Retrieves the address a log was emitted from * * @returns A `CircuitValue` representing `Log.address`. */ address: () => CircuitValue256; /** * Retrieves a 32 byte chunk of a log's data field. * * @param dataIdx - The index of the 32 byte chunk * @returns A `CircuitValue256` representing the 32 byte chunk of the log data. */ data: (dataIdx: CircuitValue | RawCircuitInput, eventSchema?: string | CircuitValue256) => CircuitValue256; } type ReceiptEnumKeys = Uncapitalize; type ReceiptEnumKeyFieldsUnfiltered = { [key in ReceiptEnumKeys]: () => CircuitValue256; }; type ReceiptEnumKeyFields = Omit; declare enum SpecialReceiptField { TxType = 51, BlockNumber = 52, TxIdx = 53 } type SpecialReceiptKeys = Uncapitalize; type SpecialReceiptKeyFields = { [key in SpecialReceiptKeys]: () => CircuitValue256; }; /** * Represents a receipt. */ export interface Receipt extends ReceiptEnumKeyFields, SpecialReceiptKeyFields { /** * Retrieves a log entry in the receipt. * * @param logIdx - The index of the log entry. * @returns A `Log` object representing the log entry. */ log: (logIdx: RawCircuitInput | CircuitValue) => Log; /** * Retrieves a 32 byte chunk of the logs bloom. * * @param logsBloomIdx - The index of the 32 byte chunk in [0,8) * @returns A `CircuitValue256` representing the 32 byte chunk of the logs bloom. */ logsBloom: (logsBloomIdx: RawCircuitInput) => CircuitValue256; } export declare const buildReceipt: (blockNumber: CircuitValue, txIdx: CircuitValue, halo2Lib: Halo2LibWasm, prepData: PrepData) => Readonly; export {}; //# sourceMappingURL=receipt.d.ts.map