SwapRecord class
One durable in-flight swap (W-swap-5, #366) — the home row written at
execute and listed by listInFlightSwaps after a process restart, screen
re-entry, or session swap. Lives in the wallet's encrypted store, in its
own table — records stay READABLE even when swap is disabled or killed
(local reads are not swap traffic, §3.5). The row asserts exactly "an
order was registered at execute" — plus, since #367, at most one PINNED
observed terminal (outcome): feed id to watchSwapStatus for live
provider truth, call recordSwapOutcome when the stream observes a
TERMINAL status, and call dismissSwapRecord only on USER intent (the
terminal card's Done after the outcome rendered, or an explicit Remove).
Constructors
- SwapRecord({required String id, required SwapRecordDirection direction, required PlatformInt64 createdAt, PlatformInt64? depositDeadline, required PlatformInt64 expiresAt, SwapOutcome? outcome})
-
const
Properties
- createdAt → int
-
Unix seconds, display-only.
final
- depositDeadline → PlatformInt64?
-
When the DEPOSIT must land (OutOfZec: the wallet's own clamped send
window; IntoZec: the window the USER must beat). Unix seconds,
display-only; absent if the recording build predates it.
final
- direction → SwapRecordDirection
-
final
- expiresAt → int
-
The record's self-lapse bound (execute-time + the settlement
ceiling): past this the row stops listing on its own. Unix seconds,
display-only.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
The SDK-minted swap id — THE re-attach handle for
watchSwapStatus. §5.4 render-never-log by policy; since S8 it is NEVER the provider's deposit address (ADR-0555: that is data inside the record).final - outcome → SwapOutcome?
-
The PINNED observed terminal (#367) —
nullwhile in flight (and for a pin written by a newer SDK this build doesn't recognize: fail-honest, the live poll re-reveals truth). Render the terminal row state from it.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.
override