Skip to main content

Experimental

o1js / Modules / Experimental

Namespace: Experimental

This module exposes APIs that are unstable, in the sense that the API surface is expected to change. (Not unstable in the sense that they are less functional or tested than other parts.)

Table of contents

Type Aliases

Variables

Functions

Type Aliases

Callback

Ƭ Callback\<Result>: Callback_\<Result>

Type parameters

Name
Result

Defined in

index.ts:126

index.ts:127

Variables

Callback

Callback: typeof Callback = Experimental_.Callback

Defined in

index.ts:126

index.ts:127

Functions

ZkProgram

ZkProgram\<StatementType, Types>(config): { analyzeMethods: () => { [I in string | number | symbol]: Object } ; compile: (options?: { cache?: Cache ; forceRecompile?: boolean }) => Promise\<{ verificationKey: { data: string ; hash: Field } }> ; digest: () => string ; name: string ; privateInputTypes: { [I in string | number | symbol]: Method\<InferProvableOrUndefined\<Get\<StatementType, "publicInput">>, InferProvableOrVoid\<Get\<StatementType, "publicOutput">>, Types[I]>["privateInputs"] } ; publicInputType: ProvableOrUndefined\<Get\<StatementType, "publicInput">> ; publicOutputType: ProvableOrVoid\<Get\<StatementType, "publicOutput">> ; rawMethods: { [I in string | number | symbol]: Method\<InferProvableOrUndefined\<Get\<StatementType, "publicInput">>, InferProvableOrVoid\<Get\<StatementType, "publicOutput">>, Types[I]>["method"] } ; verify: (proof: Proof\<InferProvableOrUndefined\<Get\<StatementType, "publicInput">>, InferProvableOrVoid\<Get\<StatementType, "publicOutput">>>) => Promise\<boolean> } & { [I in string | number | symbol]: Prover\<InferProvableOrUndefined\<Get\<StatementType, "publicInput">>, InferProvableOrVoid\<Get\<StatementType, "publicOutput">>, Types[I]> }

Type parameters

NameType
StatementTypeextends Object
Typesextends Object

Parameters

NameType
configStatementType & { methods: { [I in string | number | symbol]: Method\<InferProvableOrUndefined\<Get\<StatementType, "publicInput">>, InferProvableOrVoid\<Get\<StatementType, "publicOutput">>, Types[I]> } ; name?: string ; overrideWrapDomain?: 0 | 2 | 1 }

Returns

{ analyzeMethods: () => { [I in string | number | symbol]: Object } ; compile: (options?: { cache?: Cache ; forceRecompile?: boolean }) => Promise\<{ verificationKey: { data: string ; hash: Field } }> ; digest: () => string ; name: string ; privateInputTypes: { [I in string | number | symbol]: Method\<InferProvableOrUndefined\<Get\<StatementType, "publicInput">>, InferProvableOrVoid\<Get\<StatementType, "publicOutput">>, Types[I]>["privateInputs"] } ; publicInputType: ProvableOrUndefined\<Get\<StatementType, "publicInput">> ; publicOutputType: ProvableOrVoid\<Get\<StatementType, "publicOutput">> ; rawMethods: { [I in string | number | symbol]: Method\<InferProvableOrUndefined\<Get\<StatementType, "publicInput">>, InferProvableOrVoid\<Get\<StatementType, "publicOutput">>, Types[I]>["method"] } ; verify: (proof: Proof\<InferProvableOrUndefined\<Get\<StatementType, "publicInput">>, InferProvableOrVoid\<Get\<StatementType, "publicOutput">>>) => Promise\<boolean> } & { [I in string | number | symbol]: Prover\<InferProvableOrUndefined\<Get\<StatementType, "publicInput">>, InferProvableOrVoid\<Get\<StatementType, "publicOutput">>, Types[I]> }

Deprecated

ZkProgram has moved out of the Experimental namespace and is now directly available as a top-level import ZkProgram. The old Experimental.ZkProgram API has been deprecated in favor of the new ZkProgram top-level import.

Defined in

lib/proof_system.ts:1128


createChildAccountUpdate

createChildAccountUpdate(parent, childAddress, tokenId?): AccountUpdate

Parameters

NameType
parentAccountUpdate
childAddressPublicKey
tokenId?Field

Returns

AccountUpdate

Defined in

lib/account_update.ts:1743


memoizeWitness

memoizeWitness\<T>(type, compute): T

Like Provable.witness, but memoizes the witness during transaction construction for reuse by the prover. This is needed to witness non-deterministic values.

Type parameters

Name
T

Parameters

NameType
typeFlexibleProvable\<T>
compute() => T

Returns

T

Defined in

lib/provable.ts:465