registerForDustGeneration

Register this wallet's NIGHT key to generate dust against its public dust key.

Dust is the fee token Midnight generates from NIGHT holdings over time, but the generated dust is only spendable by a wallet that has registered its DUST public key against its NIGHT signing key on-chain. Newly-funded wallets must call this once before they can pay fees on any subsequent transaction — including contract calls.

Inputs are pulled from the SDK's already-derived state: NIGHT private key for the signature, dust seed for the dust pubkey, current NIGHT UTXOs for the guaranteed_unshielded_offer. The unshielded-tx subscription started at SDK build time keeps utxoManager populated, so this method picks up NIGHT UTXOs the moment a faucet/transfer credits the wallet.

Submission uses TransactionSubmitter.submitPrebuiltTransaction with ProvingMode.LOCAL — same local-prove → seal → submit path that contract calls already use; no proof server required.

Precondition: the wallet address must hold at least one NIGHT UTXO. The chain rejects registration with no NIGHT to back the generation. Call MidnightWallet.waitForFunding first if the wallet is fresh.

Return

SubmissionResult.Success when the registration tx is finalized on chain. SubmissionResult.Pending if the tx made it into a block but the wait for finalization timed out (it'll usually finalize shortly after). SubmissionResult.Failed if the chain rejected the tx, or no NIGHT UTXOs are available, or the FFI builder returned null.