import { Provable, ProvableHashable, ProvablePure, ProvableType, ToProvable } from './provable-intf.js'; import type { Field } from '../wrapped.js'; import { NonMethods, InferProvable as GenericInferProvable, InferJson, InferredProvable as GenericInferredProvable, IsPure as GenericIsPure, NestedProvable as GenericNestedProvable, Constructor, InferValue, InferJsonNested, InferValueNested, InferProvableNested } from '../../../bindings/lib/provable-generic.js'; import { Tuple } from '../../util/types.js'; import { GenericHashInput } from '../../../bindings/lib/generic.js'; export { ProvableExtended, ProvableInferPureFrom, provable, provablePure, provableTuple, provableFromClass, provableExtends, }; export { NonMethods, HashInput, InferProvable, InferProvableType, InferJson, InferredProvable, IsPure, NestedProvable, mapValue, }; type ProvableExtension = { toInput: (x: T) => { fields?: Field[]; packed?: [Field, number][]; }; toJSON: (x: T) => TJson; fromJSON: (x: TJson) => T; empty: () => T; }; type ProvableExtended = Provable & ProvableExtension; type ProvablePureExtended = ProvablePure & ProvableExtension; type InferProvable = GenericInferProvable; type InferProvableType = InferProvable>; type InferredProvable = GenericInferredProvable; type IsPure = GenericIsPure; type ProvableInferPureFrom = IsPure extends true ? ProvablePure : Provable; type HashInput = GenericHashInput; declare const HashInput: { readonly empty: {}; append(input1: GenericHashInput, input2: GenericHashInput): GenericHashInput; }; type NestedProvable = GenericNestedProvable; declare const provable: import("../../../bindings/lib/provable-generic.js").ProvableConstructor; declare function provablePure(typeObj: A): ProvablePureExtended, InferValue, InferJson>; declare function provableTuple>(types: T): InferredProvable; declare function provableFromClass, V extends InferValueNested, J extends InferJsonNested>(Class: Constructor & { check?: (x: T) => void; empty?: () => T; }, typeObj: A): IsPure extends true ? ProvablePureExtended : ProvableExtended; declare function provableExtends, T extends InferProvable, S extends T>(S: new (t: T) => S, base: A): { sizeInFields(): number; toFields(value: S | T): import("../field.js").Field[]; toAuxiliary(value?: S | T): any[]; fromFields(fields: import("../field.js").Field[], aux: any[]): S; check(value: S | T): void; toValue(value: S | T): any; fromValue(value: S | InferValue): S; empty(): S; toInput(value: S | T): { fields?: import("../field.js").Field[] | undefined; packed?: [import("../field.js").Field, number][] | undefined; }; }; declare function mapValue, V extends InferValue, W, T extends InferProvable>(provable: A, there: (x: V) => W, back: (x: W | T) => V | T): ProvableHashable;