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

Function: submitRemoveVerifierKeyTx()

submitRemoveVerifierKeyTx<PSS, PSK>(providers, privateStateKey, contractAddress, circuitId): Promise<FinalizedTxData>

Constructs and submits a transaction that removes the current verifier key stored on the blockchain for the given circuit ID at the given contract address.

Type parameters

PSS extends PrivateStateSchema

PSK extends string

Parameters

providers: MidnightProviders<string, PrivateStateSchema>

The providers to use to manage the transaction lifecycle.

privateStateKey: PSK

The private state key for the contract.

contractAddress: string

The address of the contract containing the circuit for which the verifier key should be removed.

circuitId: string

The circuit for which the verifier key should be removed.

Returns

Promise<FinalizedTxData>

A promise that resolves with the finalized transaction data, or rejects if an error occurs along the way.

TODO: We'll likely want to modify ZKConfigProvider provider so that the verifier keys are automatically rotated in this function. This likely involves storing key versions along with keys in ZKConfigProvider. By default, artifacts for the latest version would be fetched to build transactions.