Skip to main content

@midnight-ntwrk/midnight-js-contracts v0.1.15 • API


Midnight.js API Reference v0.1.15 / @midnight-ntwrk/midnight-js-contracts / createContractCircuitsInterface

Function: createContractCircuitsInterface()

createContractCircuitsInterface<PSS, PSK, C, ICK>(providers, contract, contractAddress, privateStateKey): ContractCircuitsInterface<PSS, PSK, C>

Creates a contract circuit interface.

Type parameters

PSS extends PrivateStateSchema

PSK extends string | number | symbol

C extends Contract<StateWithZswap<PSS[PSK]>, Witnesses<StateWithZswap<PSS[PSK]>>>

ICK extends string

Parameters

providers: MidnightProviders<ICK, PSS>

The providers to use to build transactions.

contract: C

The contract to use to execute circuits.

contractAddress: string

The ledger address of the contract.

privateStateKey: PSK

The address of the state of the witnesses of the contract.

Returns

ContractCircuitsInterface<PSS, PSK, C>