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

Type alias: FindDeployedContractOptions<PSS, PSK, C>

FindDeployedContractOptions<PSS, PSK, C>: Object

Configuration for findDeployedContract.

Type parameters

PSS extends PrivateStateSchema

PSK extends PrivateStateKey<PSS>

C extends Contract<PSS[PSK]>

Type declaration

contract

readonly contract: C

The contract to use to execute circuits.

contractAddress

readonly contractAddress: ContractAddress

The address of a previously deployed contract.

initialPrivateState?

optional readonly initialPrivateState: PSS[PSK]

The initial private state to use. If undefined findDeployedContract requires there to be a pre-existing private state at the privateStateKey. If defined findDeployedContract requires there not to be a pre-existing private state.

privateStateKey

readonly privateStateKey: PSK

An identifier for the private state of the contract being found.

signingKey?

optional readonly signingKey: SigningKey

The signing key to use to perform contract maintenance updates. If defined, the given signing key is stored for this contract address. This is useful when someone has already added the given signing key to the contract maintenance authority. If undefined, and there is an existing signing key for the contract address locally, the existing signing key is kept. This is useful when the contract was deployed locally. If undefined, and there is not an existing signing key for the contract address locally, a fresh signing key is generated and stored for the contract address locally. This is useful when you want to give a signing key to someone else to add you as a maintenance authority.