Builder
Builder for MidnightSdk.
Required: network, seed. Optional: accountIndex (default 0), provingMode (default LOCAL), proofServerUrl (default null → network's local-dev proof server).
Functions
Set the HD wallet account index (default 0).
Build the SDK. This is a blocking operation on first launch:
Optional cross-device dust backup. The factory is invoked once during build with the derived address + dust seed (so the coordinator can derive its encryption key); the resulting DustCloudBackup is wired into both the dust-sync cold-start (restore) and the wallet (upload). Omit it (the default) and dust backup is simply absent.
Set the Midnight network (PREPROD, PREVIEW, UNDEPLOYED).
Override the proof-server URL used when provingMode is REMOTE. Null (default) means "use the network's default proof-server URL" (NetworkConfig.forNetwork(network).proofServerUrl, which points at a local proof server on localhost:6300 for every network the SDK supports). Pass an explicit URL to point at a hosted prover.
Pick how transactions are proved. Defaults to ProvingMode.LOCAL — on-device proving with cached keys, no network round-trip per tx.