import * as BindingsLeaves from './leaves.js'; import { ProvableSerializable } from './util.js'; import { Provable } from '../../../lib/provable/provable.js'; import { HashInput } from '../../../lib/provable/types/provable-derivers.js'; declare abstract class ProvableBindingsType { abstract Type(): ProvableSerializable; sizeInFields(): number; toJSON(x: T): any; toInput(x: T): HashInput; toFields(x: T): BindingsLeaves.Field[]; toAuxiliary(x?: T): any[]; fromFields(fields: BindingsLeaves.Field[], aux: any[]): T; toValue(x: T): T; fromValue(x: T): T; check(x: T): void; } export type BindingsType = BindingsType.Leaf | BindingsType.Object | BindingsType.Option | BindingsType.Array; export declare namespace BindingsType { class Object implements Provable { readonly _T: T extends { [key: string]: any; } ? void : never; readonly name: string; readonly keys: (keyof T)[]; readonly entries: T extends { [key: string]: any; } ? { [key in keyof T]: BindingsType; } : never; constructor({ name, keys, entries, }: { name: Object['name']; keys: Object['keys']; entries: Object['entries']; }); sizeInFields(): number; toJSON(x: T): any; toInput(x: T): HashInput; toFields(x: T): BindingsLeaves.Field[]; toAuxiliary(x?: T): any[]; fromFields(fields: BindingsLeaves.Field[], aux: any[]): T; toValue(x: T): T; fromValue(x: T): T; check(_x: T): void; } class Array implements Provable { readonly _T: T extends any[] ? void : never; readonly staticLength: number | null; readonly inner: T extends (infer U)[] ? BindingsType : never; constructor({ staticLength, inner, }: { staticLength: Array['staticLength']; inner: Array['inner']; }); sizeInFields(): number; toJSON(x: T extends any[] ? T : never): any; toInput(x: T): HashInput; toFields(x: T): BindingsLeaves.Field[]; toAuxiliary(x?: T): any[]; fromFields(fields: BindingsLeaves.Field[], aux: any[]): T; toValue(x: T): T; fromValue(x: T): T; check(_x: T): void; } type Option = Option.OrUndefined | Option.Flagged | Option.ClosedInterval; namespace Option { class OrUndefined implements Provable { readonly inner: T extends infer U | undefined ? BindingsType : never; readonly _T: T extends infer _U | undefined ? void : never; constructor(inner: T extends infer U | undefined ? BindingsType : never); sizeInFields(): number; toJSON(x: T): any; toInput(_x: T): any; toFields(_x: T): BindingsLeaves.Field[]; toAuxiliary(x?: T): any[]; fromFields(fields: BindingsLeaves.Field[], aux: any[]): T; toValue(x: T): T; fromValue(x: T): T; check(_x: T): void; } class Flagged extends ProvableBindingsType> { readonly inner: T extends BindingsLeaves.Option ? BindingsType : never; readonly _T: T extends BindingsLeaves.Option ? void : never; constructor(inner: T extends BindingsLeaves.Option ? BindingsType : never); Type(): { sizeInFields(): number; toJSON(x: BindingsLeaves.Option): any; toInput(x: BindingsLeaves.Option): HashInput; toFields(x: BindingsLeaves.Option): BindingsLeaves.Field[]; toAuxiliary(x?: BindingsLeaves.Option | undefined): any[]; fromFields(fields: BindingsLeaves.Field[], aux: any[]): BindingsLeaves.Option; toValue(x: BindingsLeaves.Option): BindingsLeaves.Option; fromValue(x: BindingsLeaves.Option): BindingsLeaves.Option; check(_x: BindingsLeaves.Option): never; }; } class ClosedInterval extends ProvableBindingsType>> { readonly inner: T extends BindingsLeaves.Option> ? BindingsType : never; readonly _T: T extends BindingsLeaves.Option> ? void : never; constructor(inner: T extends BindingsLeaves.Option> ? BindingsType : never); Type(): { sizeInFields(): number; toJSON(x: BindingsLeaves.Option<{ lower: any; upper: any; }>): any; toInput(x: BindingsLeaves.Option<{ lower: any; upper: any; }>): HashInput; toFields(x: BindingsLeaves.Option<{ lower: any; upper: any; }>): BindingsLeaves.Field[]; toAuxiliary(x?: BindingsLeaves.Option<{ lower: any; upper: any; }> | undefined): any[]; fromFields(fields: BindingsLeaves.Field[], aux: any[]): BindingsLeaves.Option<{ lower: any; upper: any; }>; toValue(x: BindingsLeaves.Option<{ lower: any; upper: any; }>): BindingsLeaves.Option<{ lower: any; upper: any; }>; fromValue(x: BindingsLeaves.Option<{ lower: any; upper: any; }>): BindingsLeaves.Option<{ lower: any; upper: any; }>; check(_x: BindingsLeaves.Option<{ lower: any; upper: any; }>): never; }; } } type Leaf = Leaf.Number | Leaf.String | Leaf.Actions | Leaf.AuthRequired | Leaf.Bool | Leaf.Events | Leaf.Field | Leaf.Int64 | Leaf.PublicKey | Leaf.Sign | Leaf.StateHash | Leaf.TokenId | Leaf.TokenSymbol | Leaf.UInt32 | Leaf.UInt64 | Leaf.ZkappUri; namespace Leaf { abstract class AuxiliaryLeaf { constructor(); sizeInFields(): number; toJSON(x: T): any; toInput(_x: T): HashInput; toFields(_x: T): BindingsLeaves.Field[]; toAuxiliary(x?: T): any[]; fromFields(_fields: BindingsLeaves.Field[], aux: any[]): T; toValue(x: T): T; fromValue(x: T): T; check(_x: T): void; } export class Number extends AuxiliaryLeaf { readonly _T: T extends number ? void : never; readonly type: 'number'; } export class String extends AuxiliaryLeaf { readonly _T: T extends string ? void : never; readonly type: 'string'; } export class Actions extends ProvableBindingsType { readonly _T: T extends number ? void : never; readonly type: 'number'; Type(): ProvableSerializable; } export class AuthRequired extends ProvableBindingsType { readonly _T: T extends BindingsLeaves.AuthRequired ? void : never; readonly type: 'AuthRequired'; Type(): { empty(): BindingsLeaves.AuthRequired; isImpossible(x: BindingsLeaves.AuthRequired): BindingsLeaves.Bool; isNone(x: BindingsLeaves.AuthRequired): BindingsLeaves.Bool; isProof(x: BindingsLeaves.AuthRequired): BindingsLeaves.Bool; isSignature(x: BindingsLeaves.AuthRequired): BindingsLeaves.Bool; isEither(x: BindingsLeaves.AuthRequired): BindingsLeaves.Bool; identifier(x: BindingsLeaves.AuthRequired): BindingsLeaves.AuthRequiredIdentifier; toJSON(x: BindingsLeaves.AuthRequired): any; toFields: (value: BindingsLeaves.AuthRequired) => BindingsLeaves.Field[]; toAuxiliary: (value?: BindingsLeaves.AuthRequired | undefined) => any[]; fromFields: (fields: BindingsLeaves.Field[], aux: any[]) => BindingsLeaves.AuthRequired; sizeInFields(): number; check: (value: BindingsLeaves.AuthRequired) => void; toValue: (x: BindingsLeaves.AuthRequired) => BindingsLeaves.AuthRequired; fromValue: (x: BindingsLeaves.AuthRequired) => BindingsLeaves.AuthRequired; toCanonical?: ((x: BindingsLeaves.AuthRequired) => BindingsLeaves.AuthRequired) | undefined; toInput(x: BindingsLeaves.AuthRequired): HashInput; }; } export class Bool extends ProvableBindingsType { readonly _T: T extends BindingsLeaves.Bool ? void : never; readonly type: 'Bool'; Type(): typeof BindingsLeaves.Bool; } export class Events extends ProvableBindingsType { readonly _T: T extends number ? void : never; readonly type: 'number'; Type(): ProvableSerializable; } export class Field extends ProvableBindingsType { readonly _T: T extends BindingsLeaves.Field ? void : never; readonly type: 'Field'; Type(): typeof BindingsLeaves.Field; } export class Int64 extends ProvableBindingsType { readonly _T: T extends BindingsLeaves.Int64 ? void : never; readonly type: 'Int64'; Type(): typeof BindingsLeaves.Int64; } export class PublicKey extends ProvableBindingsType { readonly _T: T extends BindingsLeaves.PublicKey ? void : never; readonly type: 'PublicKey'; Type(): typeof BindingsLeaves.PublicKey; } export class Sign extends ProvableBindingsType { readonly _T: T extends BindingsLeaves.Sign ? void : never; readonly type: 'Sign'; Type(): typeof BindingsLeaves.Sign; } export class StateHash extends ProvableBindingsType { readonly _T: T extends BindingsLeaves.StateHash ? void : never; readonly type: 'StateHash'; Type(): ProvableSerializable; } export class TokenId implements Provable { readonly _T: T extends BindingsLeaves.TokenId ? void : never; readonly type: 'TokenId'; constructor(); sizeInFields(): number; toJSON(x: T): any; toInput(x: T): HashInput; toFields(x: T): BindingsLeaves.Field[]; toAuxiliary(_x?: T): any[]; fromFields(fields: BindingsLeaves.Field[], _aux: any[]): T; toValue(x: T): T; fromValue(x: T): T; check(_x: T): void; } export class TokenSymbol extends ProvableBindingsType { readonly _T: T extends BindingsLeaves.TokenId ? void : never; readonly type: 'TokenId'; Type(): ProvableSerializable; } export class UInt32 extends ProvableBindingsType { readonly _T: T extends BindingsLeaves.UInt32 ? void : never; readonly type: 'UInt32'; Type(): typeof BindingsLeaves.UInt32; } export class UInt64 extends ProvableBindingsType { readonly _T: T extends BindingsLeaves.UInt64 ? void : never; readonly type: 'UInt64'; Type(): typeof BindingsLeaves.UInt64; } export class ZkappUri extends ProvableBindingsType { readonly _T: T extends BindingsLeaves.ZkappUri ? void : never; readonly type: 'ZkappUri'; Type(): ProvableSerializable; } export {}; } } export {};