Skip to main content

@midnight-ntwrk/compact-runtime v0.7.0Readme | API


@midnight-ntwrk/compact-runtime v0.7.0 / constructorContext

Function: constructorContext()

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

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>