WalletConfig

data class WalletConfig(val network: MidnightNetwork, val provingMode: ProvingMode = ProvingMode.DEFAULT, val proofServerUrl: String? = null)

Snapshot of every wallet-level toggle that affects SDK construction.

This is the canonical config for the embedded wallet. It lives in sdk:wallet-runtime (next to MidnightSdkProvider, the thing that consumes it) rather than in any UI module — the SDK owner is the single source of truth for "which network / proving mode am I on", and UI is just one of several consumers (the wallet panel, BBoard, Kicks).

Passed to MidnightSdkProvider.ensureSdk. When any field differs from what the live SDK was built with, the provider tears down the current SDK (cancels its subscriptions, wipes seed material) and builds a fresh one. Equality is by-value so the rebuild check is a single !=.

Why one struct instead of three parameters:

  • Network + proving mode + proof-server URL all affect SDK construction. Bundling them avoids "added a new knob, missed updating two of three call sites" bugs.

  • The Compose side can remember(network, provingMode, proofServerUrl) { WalletConfig(...) } to avoid object-identity thrash in LaunchedEffect keys.

Constructors

Link copied to clipboard
constructor(network: MidnightNetwork, provingMode: ProvingMode = ProvingMode.DEFAULT, proofServerUrl: String? = null)

Properties

Link copied to clipboard

Which Midnight network the wallet talks to.

Link copied to clipboard
val proofServerUrl: String? = null

Override for ProvingMode.REMOTE — null = use the network's default proof-server URL (NetworkConfig.forNetwork(...).proofServerUrl). Ignored when provingMode is ProvingMode.LOCAL.

Link copied to clipboard

How transactions are proved (on-device vs hosted prover).