import { Fr } from '@aztec/foundation/curves/bn254'; import { z } from 'zod'; import { AztecAddress } from '../../aztec-address/index.js'; import { PublicKeys } from '../../keys/public_keys.js'; declare const VERSION: 1; /** * A contract instance is a concrete deployment of a contract class. It always references a contract class, * which dictates what code it executes when called. It has state (both private and public), as well as an * address that acts as its identifier. It can be called into. It may have encryption and nullifying public keys. */ export interface ContractInstance { /** Version identifier. Initially one, bumped for any changes to the contract instance struct. */ version: typeof VERSION; /** User-generated pseudorandom value for uniqueness. */ salt: Fr; /** Optional deployer address or zero if this was a universal deploy. */ deployer: AztecAddress; /** Identifier of the contract class for this instance. */ currentContractClassId: Fr; /** Identifier of the original (at deployment) contract class for this instance */ originalContractClassId: Fr; /** Hash of the selector and arguments to the constructor. */ initializationHash: Fr; /** Public keys associated with this instance. */ publicKeys: PublicKeys; } export type ContractInstanceWithAddress = ContractInstance & { address: AztecAddress; }; export declare const ContractInstanceSchema: z.ZodObject<{ version: z.ZodLiteral<1>; salt: import("../../schemas/index.js").ZodFor; deployer: import("../../schemas/index.js").ZodFor; currentContractClassId: import("../../schemas/index.js").ZodFor; originalContractClassId: import("../../schemas/index.js").ZodFor; initializationHash: import("../../schemas/index.js").ZodFor; publicKeys: z.ZodEffects; masterIncomingViewingPublicKey: z.ZodType; masterOutgoingViewingPublicKey: z.ZodType; masterTaggingPublicKey: z.ZodType; }, "strip", z.ZodTypeAny, { masterNullifierPublicKey: import("@aztec/foundation/schemas").Point; masterIncomingViewingPublicKey: import("@aztec/foundation/schemas").Point; masterOutgoingViewingPublicKey: import("@aztec/foundation/schemas").Point; masterTaggingPublicKey: import("@aztec/foundation/schemas").Point; }, { masterNullifierPublicKey: string; masterIncomingViewingPublicKey: string; masterOutgoingViewingPublicKey: string; masterTaggingPublicKey: string; }>, PublicKeys, { masterNullifierPublicKey: string; masterIncomingViewingPublicKey: string; masterOutgoingViewingPublicKey: string; masterTaggingPublicKey: string; }>; }, "strip", z.ZodTypeAny, { version: 1; salt: Fr; deployer: AztecAddress; currentContractClassId: Fr; originalContractClassId: Fr; initializationHash: Fr; publicKeys: PublicKeys; }, { version: 1; salt?: any; deployer?: any; currentContractClassId?: any; originalContractClassId?: any; initializationHash?: any; publicKeys: { masterNullifierPublicKey: string; masterIncomingViewingPublicKey: string; masterOutgoingViewingPublicKey: string; masterTaggingPublicKey: string; }; }>; export declare const ContractInstanceWithAddressSchema: z.ZodIntersection; salt: import("../../schemas/index.js").ZodFor; deployer: import("../../schemas/index.js").ZodFor; currentContractClassId: import("../../schemas/index.js").ZodFor; originalContractClassId: import("../../schemas/index.js").ZodFor; initializationHash: import("../../schemas/index.js").ZodFor; publicKeys: z.ZodEffects; masterIncomingViewingPublicKey: z.ZodType; masterOutgoingViewingPublicKey: z.ZodType; masterTaggingPublicKey: z.ZodType; }, "strip", z.ZodTypeAny, { masterNullifierPublicKey: import("@aztec/foundation/schemas").Point; masterIncomingViewingPublicKey: import("@aztec/foundation/schemas").Point; masterOutgoingViewingPublicKey: import("@aztec/foundation/schemas").Point; masterTaggingPublicKey: import("@aztec/foundation/schemas").Point; }, { masterNullifierPublicKey: string; masterIncomingViewingPublicKey: string; masterOutgoingViewingPublicKey: string; masterTaggingPublicKey: string; }>, PublicKeys, { masterNullifierPublicKey: string; masterIncomingViewingPublicKey: string; masterOutgoingViewingPublicKey: string; masterTaggingPublicKey: string; }>; }, "strip", z.ZodTypeAny, { version: 1; salt: Fr; deployer: AztecAddress; currentContractClassId: Fr; originalContractClassId: Fr; initializationHash: Fr; publicKeys: PublicKeys; }, { version: 1; salt?: any; deployer?: any; currentContractClassId?: any; originalContractClassId?: any; initializationHash?: any; publicKeys: { masterNullifierPublicKey: string; masterIncomingViewingPublicKey: string; masterOutgoingViewingPublicKey: string; masterTaggingPublicKey: string; }; }>, z.ZodObject<{ address: import("../../schemas/index.js").ZodFor; }, "strip", z.ZodTypeAny, { address: AztecAddress; }, { address?: any; }>>; /** * Creates a ContractInstance from a plain object without Zod validation. * Suitable for deserializing trusted data (e.g., from C++ via MessagePack). */ export declare function contractInstanceFromPlainObject(obj: any): ContractInstance; /** * Creates a ContractInstanceWithAddress from a plain object without Zod validation. * Suitable for deserializing trusted data (e.g., from C++ via MessagePack). */ export declare function contractInstanceWithAddressFromPlainObject(address: AztecAddress, obj: any): ContractInstanceWithAddress; export {}; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3RfaW5zdGFuY2UuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb250cmFjdC9pbnRlcmZhY2VzL2NvbnRyYWN0X2luc3RhbmNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUVwRCxPQUFPLEVBQUUsQ0FBQyxFQUFFLE1BQU0sS0FBSyxDQUFDO0FBRXhCLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUM1RCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFHdkQsUUFBQSxNQUFNLE9BQU8sR0FBYSxDQUFDO0FBRTNCOzs7O0dBSUc7QUFDSCxNQUFNLFdBQVcsZ0JBQWdCO0lBQy9CLGlHQUFpRztJQUNqRyxPQUFPLEVBQUUsT0FBTyxPQUFPLENBQUM7SUFDeEIsd0RBQXdEO0lBQ3hELElBQUksRUFBRSxFQUFFLENBQUM7SUFDVCx3RUFBd0U7SUFDeEUsUUFBUSxFQUFFLFlBQVksQ0FBQztJQUN2QiwwREFBMEQ7SUFDMUQsc0JBQXNCLEVBQUUsRUFBRSxDQUFDO0lBQzNCLGtGQUFrRjtJQUNsRix1QkFBdUIsRUFBRSxFQUFFLENBQUM7SUFDNUIsNkRBQTZEO0lBQzdELGtCQUFrQixFQUFFLEVBQUUsQ0FBQztJQUN2QixpREFBaUQ7SU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