import { SpongeBlob } from '@aztec/blob-lib/types'; import { Fr } from '@aztec/foundation/curves/bn254'; import { BufferReader } from '@aztec/foundation/serialize'; import { PartialStateReference } from '../tx/partial_state_reference.js'; import { BlockConstantData } from './block_constant_data.js'; /** * Output of the base and merge rollup circuits. */ export declare class TxRollupPublicInputs { /** * Number of txs in this rollup. */ numTxs: number; /** * Data which is forwarded through the rollup circuits unchanged. */ constants: BlockConstantData; /** * Partial state reference at the start of the rollup circuit. */ startTreeSnapshots: PartialStateReference; /** * Partial state reference at the end of the rollup circuit. */ endTreeSnapshots: PartialStateReference; /** * Sponge state to absorb blob inputs at the start of the rollup circuit. */ startSpongeBlob: SpongeBlob; /** * Sponge state to absorb blob inputs at the end of the rollup circuit. */ endSpongeBlob: SpongeBlob; /** * SHA256 hash of L2 to L1 messages. Used to make public inputs constant-sized (to then be opened onchain). * Note: Truncated to 31 bytes to fit in Fr. */ outHash: Fr; /** * The summed `transaction_fee` of the constituent transactions. */ accumulatedFees: Fr; /** * The summed `mana_used` of the constituent transactions. */ accumulatedManaUsed: Fr; constructor( /** * Number of txs in this rollup. */ numTxs: number, /** * Data which is forwarded through the rollup circuits unchanged. */ constants: BlockConstantData, /** * Partial state reference at the start of the rollup circuit. */ startTreeSnapshots: PartialStateReference, /** * Partial state reference at the end of the rollup circuit. */ endTreeSnapshots: PartialStateReference, /** * Sponge state to absorb blob inputs at the start of the rollup circuit. */ startSpongeBlob: SpongeBlob, /** * Sponge state to absorb blob inputs at the end of the rollup circuit. */ endSpongeBlob: SpongeBlob, /** * SHA256 hash of L2 to L1 messages. Used to make public inputs constant-sized (to then be opened onchain). * Note: Truncated to 31 bytes to fit in Fr. */ outHash: Fr, /** * The summed `transaction_fee` of the constituent transactions. */ accumulatedFees: Fr, /** * The summed `mana_used` of the constituent transactions. */ accumulatedManaUsed: Fr); /** Returns an empty instance. */ static empty(): TxRollupPublicInputs; /** * Deserializes from a buffer or reader. * Note: Corresponds to a write in cpp. * @param buffer - Buffer or reader to read from. * @returns The deserialized public inputs. */ static fromBuffer(buffer: Buffer | BufferReader): TxRollupPublicInputs; /** * Serialize this as a buffer. * @returns The buffer. */ toBuffer(): Buffer; /** * Serialize this as a hex string. * @returns - The hex string. */ toString(): `0x${string}`; /** * Deserializes from a hex string. * @param str - A hex string to deserialize from. * @returns A new TxRollupPublicInputs instance. */ static fromString(str: string): TxRollupPublicInputs; /** Returns a buffer representation for JSON serialization. */ toJSON(): Buffer; /** Creates an instance from a hex string. */ static get schema(): import("zod").ZodType; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHhfcm9sbHVwX3B1YmxpY19pbnB1dHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yb2xsdXAvdHhfcm9sbHVwX3B1YmxpY19pbnB1dHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ25ELE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUVwRCxPQUFPLEVBQUUsWUFBWSxFQUFxQixNQUFNLDZCQUE2QixDQUFDO0FBRzlFLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLGtDQUFrQyxDQUFDO0FBQ3pFLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRTdEOztHQUVHO0FBQ0gscUJBQWEsb0JBQW9CO0lBRTdCOztPQUVHO0lBQ0ksTUFBTSxFQUFFLE1BQU07SUFDckI7O09BRUc7SUFDSSxTQUFTLEVBQUUsaUJBQWlCO0lBQ25DOztPQUVHO0lBQ0ksa0JBQWtCLEVBQUUscUJBQXFCO0lBQ2hEOztPQUVHO0lBQ0ksZ0JBQWdCLEVBQUUscUJBQXFCO0lBQzlDOztPQUVHO0lBQ0ksZUFBZSxFQUFFLF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