import { AccountUpdate, AccountUpdateTree, AccountUpdateTreeDescription, ContextFreeAccountUpdateDescription, ContextFreeAccountUpdate, DynamicProvable } from '../account-update.js'; import { Account, AccountId } from '../account.js'; import { ProvableTuple, ProvableTupleInstances } from '../core.js'; import { StateDefinition, StateLayout, StateReader } from '../state.js'; import { ZkappCommandContext } from '../transaction.js'; import { Cache } from '../../../proof-system/cache.js'; import { Bool } from '../../../provable/bool.js'; import { Field } from '../../../provable/field.js'; import { UInt32 } from '../../../provable/int.js'; import { PublicKey } from '../../../provable/crypto/signature.js'; import { Unconstrained } from '../../../provable/types/unconstrained.js'; import { VerificationKey } from '../../../proof-system/verification-key.js'; import { MinaAmount } from '../currency.js'; export { MinaProgramEnv, MinaProgramMethodReturn, MinaProgramMethodImpl, MinaProgramMethodProver, MinaProgramDescription, MinaProgram, }; declare class MinaProgramEnv { State: StateDefinition; private account; private verificationKey; private expectedPreconditions; constructor(State: StateDefinition, account: Unconstrained>, verificationKey: Unconstrained); get accountId(): AccountId; get accountVerificationKeyHash(): Field; get programVerificationKey(): VerificationKey; get balance(): MinaAmount; get nonce(): UInt32; get receiptChainHash(): Field; get delegate(): PublicKey; get state(): StateReader; get actionState(): Field; get isProven(): Bool; static sizeInFields(): number; static toFields(_x: MinaProgramEnv): Field[]; static toAuxiliary(x?: MinaProgramEnv): any[]; static fromFields(_fields: Field[], aux: any[]): MinaProgramEnv<'GenericState'>; static toValue(x: MinaProgramEnv): MinaProgramEnv; static fromValue(x: MinaProgramEnv): MinaProgramEnv; static check(_x: MinaProgramEnv): void; } type MinaProgramMethodReturn = Omit, AccountUpdate>, 'authorizationKind'> | ContextFreeAccountUpdate; type MinaProgramMethodImpl = { privateInputs: PrivateInputs; method(env: MinaProgramEnv, ...args: ProvableTupleInstances): Promise>; }; type MinaProgramMethodProver = (env: ZkappCommandContext, accountId: AccountId, ...args: ProvableTupleInstances) => Promise, AccountUpdate>>; interface MinaProgramDescription { name: string; State: StateDefinition; Event: DynamicProvable; Action: DynamicProvable; methods: { [key in keyof MethodPrivateInputs]: MinaProgramMethodImpl; }; } type MinaProgram = { name: string; State: StateDefinition; Event: DynamicProvable; Action: DynamicProvable; compile(options?: { cache?: Cache; forceRecompile?: boolean; }): Promise<{ verificationKey: { data: string; hash: Field; }; }>; } & { [key in keyof MethodPrivateInputs]: MinaProgramMethodProver; }; declare function MinaProgram(descr: MinaProgramDescription): MinaProgram;