DeferredPaymentState enum
Lifecycle of a deferred payment.
recorded (deferSpend)
|
v
+-----------+ ARC/data source SEEN_ON_NETWORK or MINED,
|outstanding| or an input spent by the transaction
+-----------+ -------------------------------------+
| | |
ARC REJECTED | | CancelDeferredSpendCommand v
| | (network does not know it, or ARC +------+
v v reports DOUBLE_SPEND_ATTEMPTED) | seen |
+------+ +---------+ network reports it later +------+
|failed| |cancelled| ---------------------------> | ^
+------+ +---------+ | |
| verified proof | | confirmation
+-------------- (network reports it later) ------> v | reverted
+-----+
|mined|
+-----+
+-----------+ ReclaimDeferredSpendCommand: the wallet's
|outstanding| own self-spend of the held inputs is
+-----------+ recorded and broadcast; once the network
| has THAT transaction (it is seen or mined)
v
+---------+
|reclaimed| terminal; the inputs are back in the wallet
+---------+
Inputs are held only while outstanding. failed and cancelled released them; seen and mined spent them. Evidence from the network wins: a failed or cancelled payment the network later reports is seen.
reclaimed is the one resolution that spends the held inputs elsewhere:
the wallet built and broadcast its own transaction paying them back to
itself (bead libspiffy-87a). It is reached only once that self-spend is
on the network, so until then the payment is still outstanding with the
reclaim in flight. The original payment, its signed transaction and its
raw hex are kept; the reclaim's own record names it (its purpose is
reclaim:<txid>, see DeferredPaymentPurpose).
ARC's DOUBLE_SPEND_ATTEMPTED (a competing transaction spends an input) is not final: either transaction may still be mined. The payment stays outstanding with its inputs held and the status recorded (bead libspiffy-ey2); ARC keeps being polled. Journals written before that, where DOUBLE_SPEND_ATTEMPTED failed the payment, replay as they were.
Values
- outstanding → const DeferredPaymentState
-
Signed and handed over; not yet known to be on the network. Inputs held.
- seen → const DeferredPaymentState
-
On the network (ARC SEEN_ON_NETWORK / MINED, a data source knows the transaction, or one of its inputs was spent by it). Not a confirmation.
- mined → const DeferredPaymentState
-
Confirmed by a merkle proof checked against the local header chain.
- failed → const DeferredPaymentState
-
ARC reported REJECTED (or, in a journal written before bead libspiffy-ey2, DOUBLE_SPEND_ATTEMPTED); inputs released.
- cancelled → const DeferredPaymentState
-
Cancelled by the user while the network did not know the transaction; inputs released. The recipient still holds the signed transaction.
- reclaimed → const DeferredPaymentState
-
The wallet spent the held inputs back to itself and the network has that self-spend (bead libspiffy-87a). Terminal: the signed transaction the recipient holds can no longer be mined, because its inputs are gone. Reached only when the self-spend is seen or mined, never at broadcast time.
Appended after cancelled: states are journaled and stored by name, so a journal or a row written before this state replays unchanged.
- completed → const DeferredPaymentState
-
The wallet signed only some inputs of this transaction, and the counterparty completed it by signing the others (
CompleteDeferredSpendCommand): the completed transaction, with another txid, took over the hold. Terminal: this half was never broadcastable, and its own pending outputs are voided. The completed transaction's record names it (purposecompletion:<txid>).Appended after reclaimed, for the same reason.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - 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
Constants
-
values
→ const List<
DeferredPaymentState> - A constant List of the values in this enum, in order of their declaration.