Skip to main content

createConstructorContext

@midnight-ntwrk/compact-runtime v0.14.0


@midnight-ntwrk/compact-runtime / createConstructorContext

Function: createConstructorContext()

function createConstructorContext<PS>(initialPrivateState, coinPublicKey): ConstructorContext<PS>;

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

Type Parameters

PS

PS

Parameters

initialPrivateState

PS

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

coinPublicKey

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

string | EncodedCoinPublicKey

Returns

ConstructorContext<PS>