Skip to main content

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


Midnight.js API Reference v0.1.15 / @midnight-ntwrk/midnight-js-types / ProofProvider

Interface: ProofProvider<K>

Interface for a proof server running in a trusted environment.

Type parameters

K extends string

The type of the circuit ID used by the provider.

Methods

proveTx()

proveTx(tx, zkConfig?): Promise<UnbalancedTransaction>

Creates call proofs for an unproven transaction. The resulting transaction is unbalanced and must be balanced using the WalletProvider interface.

Parameters

tx: UnprovenTransaction

The transaction to be proved. Prior to version 1.0.0, unproven transactions always only contain a single contract call.

zkConfig?: ZKConfig<K>

The zero-knowledge configuration for the circuit that was called in tx. Undefined if tx is a deployment transaction.

Returns

Promise<UnbalancedTransaction>