Skip to main content

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


Midnight.js API Reference v0.2.5 / @midnight-ntwrk/midnight-js-contracts / submitCallTx

Function: submitCallTx()

submitCallTx<PSS, PSK, C, ICKS, ICK>(providers, options): Promise<FinalizedCallTxData<PSS[PSK], C, ICK>>

Creates and submits a transaction for the invocation of a circuit on a given contract.

Type parameters

PSS extends PrivateStateSchema

PSK extends string

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

ICKS extends string

ICK extends string

Parameters

providers: MidnightProviders<ICKS, PSS>

The providers used to manage the invocation lifecycle.

options: CallTxOptions<PSS, PSK, C, ICK>

Configuration.

Returns

Promise<FinalizedCallTxData<PSS[PSK], C, ICK>>

A Promise that resolves with the finalized transaction data for the invocation of circuitId on contract with the given args; or rejects with an error if the invocation fails.