ContractBuilder

DSL builder for creating a MidnightContract.

Properties

Link copied to clipboard

Deployed contract address (64 hex chars).

Link copied to clipboard

Circuit verifier keys for deploy — map of circuit name to raw verifier key bytes. Load from the compiled contract's keys/{circuit}.verifier files. Required for deploy, not needed for call.

Link copied to clipboard

Coin public key (32 bytes). Required.

Link copied to clipboard

Arguments for the contract constructor, in declaration order, as Kotlin values (auto-marshaled to JS like circuit call args). Empty for a no-arg constructor (the counter/bboard case). A configurable contract — e.g. a multisig taking its signer set + threshold — passes them here.

Link copied to clipboard

Contract JavaScript as an InputStream. Accepts either:

Link copied to clipboard

Initial private state as a Kotlin map (auto-converted to JS).

Link copied to clipboard
var name: String?

Contract name (used for proving key management).

Functions

Link copied to clipboard
fun witness(name: String, provider: WitnessProvider)

Register a witness provider for a named witness.