Skip to main content

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

AsFieldsAndAux

Ƭ AsFieldsAndAux<T, TJson>: AsFieldsAndAux_<T, TJson>

Type parameters

Name
T
TJson

Defined in

index.ts:100


Callback

Ƭ Callback<Result>: Callback_<Result>

Type parameters

Name
Result

Defined in

index.ts:101

index.ts:102

Variables

Callback

Callback: typeof Callback = Experimental_.Callback

Defined in

index.ts:101

index.ts:102


MerkleTree

MerkleTree: typeof MerkleTree = Experimental_.MerkleTree

Defined in

index.ts:96

Functions

MerkleWitness

MerkleWitness(height): typeof BaseMerkleWitness

Returns a circuit-compatible Witness for a specific Tree height.

Parameters

NameTypeDescription
heightnumberHeight of the Merkle Tree that this Witness belongs to.

Returns

typeof BaseMerkleWitness

A circuit-compatible Merkle Witness.

Defined in

lib/merkle_tree.ts:215


Reducer

Reducer<T, A>(reducer): ReducerReturn<A>

Type parameters

NameType
Textends AsFieldElements<any, T>
Aextends any

Parameters

NameType
reducerObject
reducer.actionTypeT

Returns

ReducerReturn<A>

Defined in

lib/zkapp.ts:1243


ZkProgram

ZkProgram<PublicInputType, Types>(__namedParameters): { compile: () => Promise<{ verificationKey: string }> ; digest: () => string ; name: string ; publicInputType: PublicInputType ; verify: (proof: Proof<InferInstance<PublicInputType>>) => Promise<boolean> } & { [I in keyof Types]: Prover<InferInstance<PublicInputType>, Types[I]> }

Type parameters

NameType
PublicInputTypeextends AsFieldElements<any, PublicInputType>
Typesextends Object

Parameters

NameType
__namedParametersObject
__namedParameters.methods{ [I in string | number | symbol]: Method<InferInstance<PublicInputType>, Types[I]> }
__namedParameters.publicInputPublicInputType

Returns

{ compile: () => Promise<{ verificationKey: string }> ; digest: () => string ; name: string ; publicInputType: PublicInputType ; verify: (proof: Proof<InferInstance<PublicInputType>>) => Promise<boolean> } & { [I in keyof Types]: Prover<InferInstance<PublicInputType>, Types[I]> }

Defined in

lib/proof_system.ts:147


accountUpdateFromCallback

accountUpdateFromCallback(parentZkapp, childLayout, callback): AccountUpdate

Parameters

NameType
parentZkappSmartContract
childLayoutAccountUpdatesLayout
callbackCallback<any>

Returns

AccountUpdate

Defined in

lib/zkapp.ts:520


createChildAccountUpdate

createChildAccountUpdate(parent, childAddress, tokenId?): AccountUpdate

Parameters

NameType
parentAccountUpdate
childAddressPublicKey
tokenId?Field

Returns

AccountUpdate

Defined in

lib/account_update.ts:1214


makeChildAccountUpdate

makeChildAccountUpdate(parent, child): void

Parameters

NameType
parentAccountUpdate
childAccountUpdate

Returns

void

Defined in

lib/account_update.ts:1223


memoizeWitness

memoizeWitness<T>(type, compute): T

Like Circuit.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
typeAsFieldElements<T>
compute() => T

Returns

T

Defined in

lib/circuit_value.ts:662