WalletSendRequest class

FR-25 — the prefilled-send entry seam's typed request (ZIP-321-first).

A host with its OWN address-discovery channel (a messenger contact, a scanned QR, a zcash: deep link, an NFC tap) hands this to WalletSendEntry.push to open the package's send flow with fields populated, so the ENTIRE money path — validation, review, ceiling, authorizer — stays inside the audited package and the host contributes only the entry point (no host rebuilds a send form).

CONTRACT — prefilled ≠ pre-confirmed. A prefill only SEEDS the editable form; it runs the same prepare → propose → review → authorize path and the same gating (recipient validity, sync state, spendable balance, host ceiling) as an organic send. Fields stay user-editable unless lockRecipient is set (recipient-only — the amount and memo NEVER lock).

Pure, immutable value data — no network, no keys, no money movement. The ZIP-321 door is WalletSendRequest.fromUri; construct directly for a typed prefill.

Constructors

WalletSendRequest({required String address, int? amountZat, String? memo, String? label, bool lockRecipient = false, String? correlationId, WalletMachineMemo? machineMemo})
const
WalletSendRequest.fromUri(WalletSession session, String uri, {bool lockRecipient = false, String? correlationId})
Parse a ZIP-321 zcash: payment URI (a scanned QR, a deep link — HOSTILE input) into a prefill request, validated against THIS wallet's own network (the session is the sole network authority — a host can NOT coerce a wrong-network send; the same network-hiding seam as WalletSession.composePaymentUri). The audited core payment_uri parser is the single validator (DRY) — this never re-parses ZIP-321 in Dart.
factory

Properties

address → String
Recipient address, as the host discovered it. NOT pre-validated here — the send form classifies it against the wallet's own network on entry (a wrong-network / malformed typed address surfaces the same honest inline status an organic paste would). A URI-sourced request already carries the core-validated canonical encoding (see fromUri).
final
amountZat → int?
Requested amount in zatoshis (exact; max supply < 2^53). null = the requester left the amount to the sender (the donation-QR form) — the form opens with an empty, user-filled amount. A non-positive value (0 / negative) is treated as null — nothing is seeded.
final
correlationId → String?
FR-26 — an OPAQUE host token, echoed verbatim onto the WalletSendReport this request's flow produces. null = the host set none, and the report carries null.
final
hashCode → int
The hash code for this object.
no setterinherited
label → String?
The ZIP-321 label display field (a name the requester attached to the address), when the request came from a URI. Carried for the host's use — deliberately NOT auto-rendered by the send form: it is an attacker-controllable string from an untrusted QR/link (a phishing surface), so the host, which alone has trusted context (e.g. the contact it resolved), decides whether/how to show it. null for a typed request.
final
lockRecipient → bool
When true, the recipient field opens READ-ONLY (still selectable, so the user can verify who they're paying) — for a host that resolved the payee itself (pay-a-contact) and must not let the address be edited into a different one. Recipient-ONLY: the amount and memo always stay editable (the FR-25 contract). Default false — a fully editable prefill.
final
machineMemo → WalletMachineMemo?
FR-28 — opaque machine-memo bytes plus the purpose the user is shown.
final
memo → String?
Optional human-readable memo to seed the (editable) memo field. Only a TEXT memo is representable in the editable field; a machine (ZIP-302 0xFF) or reserved memo carried by a URI is rejected typed at fromUri rather than silently dropped (a payment-reference the recipient may need must not vanish). A memo to a transparent recipient is still dropped at compose by the existing send-form gate — a prefill does not bypass that.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited