Skip to main content

constructorContext

@midnight-ntwrk/compact-runtime v0.9.0


@midnight-ntwrk/compact-runtime / constructorContext

Function: constructorContext()

function constructorContext<T>(initialPrivateState, coinPublicKey): ConstructorContext<T>;

Creates a new ConstructorContext with the given initial private state and an empty Zswap local state.

Type Parameters

T

T

Parameters

initialPrivateState

T

The private state to use to execute the contract's constructor.

coinPublicKey

string

The Zswap coin public key of the user executing the contract.

Returns

ConstructorContext<T>