proposeShield method
Propose shielding the wallet's detected TRANSPARENT funds into its shielded pool (Recv-3 — the companion to currentTransparentAddress). Exchange withdrawals + swap-in deliveries land transparent; this is the privacy-POSITIVE "move them shielded" action. DETERMINISTIC, LOCAL like propose: no keys, no proofs, no network, no DB writes — NOTHING is sent.
Returns a SendProposal (isShield == true) when there is ≥ the 0.001-ZEC
shielding threshold to shield — confirm it, then pass its proposalId to
send (the SAME one-shot token the send path consumes; the shield reuses
the send pipeline whole). Returns null when there is nothing worth
shielding yet (below the threshold or no transparent funds) — the host hides
the "shield now" action. Throws only a typed WalletApiError (proposal-stale
⇒ wait for sync, invalid-state on a closed handle). NO key material crosses.
Implementation
@override
Future<SendProposal?> proposeShield() async {
proposeShieldCount++;
final gate = proposeShieldGate;
if (gate != null) await gate.future;
if (proposeShieldNeverCompletes) return Completer<SendProposal?>().future;
if (proposeShieldThrows != null) throw proposeShieldThrows!;
return proposeShieldResult;
}