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

Function: createUnprovenDeployTx()

createUnprovenDeployTx<PS, C>(zkConfigProvider, walletProvider, options): Promise<UnsubmittedDeployTxData<PS>>

Calls a contract constructor and creates an unbalanced, unproven, unsubmitted, deploy transaction from the constructor results.

Type parameters

PS

C extends Contract<PS, Witnesses<PS>>

Parameters

zkConfigProvider: ZKConfigProvider<ImpureCircuitId<C>>

The provider to use to fetch ZK artifacts.

walletProvider: WalletProvider

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

options: DeployTxOptions<PS, C>

Configuration.

Returns

Promise<UnsubmittedDeployTxData<PS>>

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