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 / createUnprovenCallTx

Function: createUnprovenCallTx()

createUnprovenCallTx<PSS, PSK, C, ICK>(publicDataProvider, privateStateProvider, walletProvider, options): Promise<UnsubmittedCallTxData<PSS[PSK], C, ICK>>

Calls a circuit using states fetched from the public data provider and private state provider, then creates an unbalanced, unproven, unsubmitted, call transaction.

Type parameters

PSS extends PrivateStateSchema

PSK extends string

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

ICK extends string

Parameters

publicDataProvider: PublicDataProvider

The provider to use to fetch the contract ledger and Zswap chain states.

privateStateProvider: PrivateStateProvider<PSS>

The provider to use to fetch the contract private state.

walletProvider: WalletProvider

The provider to use to fetch the current user's Zswap coin public key.

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

Configuration.

Returns

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

A promise that contains all data produced by the circuit call and an unproven transaction assembled from the call result.