DeferredPayment class
Read model of a deferred payment. Never deleted (only a wallet deletion removes it): resolved payments stay listable with their state.
Constructors
-
DeferredPayment({required String walletId, required String txid, String? invoiceId, String? purpose, List<
String> recipientAddresses = const [], required BigInt amount, required BigInt fee, List<DeferredPaymentInput> heldInputs = const [], DeferredPaymentState state = DeferredPaymentState.outstanding, String? lastNetworkStatus, String? lastNetworkStatusSource, DateTime? lastCheckedAt, List<String> competingTxids = const [], required DateTime createdAt, required DateTime updatedAt, DateTime? resolvedAt, String? resolutionReason, bool inferred = false, DateTime? deadline}) -
const
Properties
- amount → BigInt
-
Amount paid to the recipients.
final
-
competingTxids
→ List<
String> -
The competing transactions ARC named (
competingTxs) when it reported DOUBLE_SPEND_ATTEMPTED for this payment (bead libspiffy-pkum): every txid reported so far, in the order first reported. Kept when a later status names none and after the payment resolves; empty when ARC named none, or for a status journaled before they were recorded.final - createdAt → DateTime
-
When the payment was recorded (handed over).
final
- deadline → DateTime?
-
When the wallet reclaims this payment by itself if it is still
outstanding (bead libspiffy-8442): a half the counterparty has not
completed, a payment the recipient has not broadcast. Null: never by
itself. The deadline bounds the option the payment gives its holder;
it does not end it: the option lasts until the reclaim is mined.
final
- fee → BigInt
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
-
heldInputs
→ List<
DeferredPaymentInput> -
The inputs the payment held when it was recorded. They stay listed
after resolution (as history); state says whether they are still held.
final
- heldInputsJson → String
-
JSON of heldInputs (storage backends keep it in one column).
no setter
- heldSatoshis → BigInt
-
Total of heldInputs.
no setter
- inferred → bool
-
True for a payment inferred from a journal written before deferred
holds were journaled.
final
- invoiceId → String?
-
Invoice the payment paid, when it came from
PayInvoiceCommand.final - isOutstanding → bool
-
no setter
- lastCheckedAt → DateTime?
-
When lastNetworkStatus was observed. The periodic status scan records
a status only when it changes; explicit checks and broadcasts always.
final
- lastNetworkStatus → String?
-
Last network status recorded (ARC's wire name, or
DeferredNetworkStatus.notFound); null if never checked.
final
- lastNetworkStatusSource → String?
-
arcordataSource.final - purpose → String?
-
What recorded it:
invoice-payment,provisioning-split,provisioning-earmark,channel-funding,legacy(inferred from a journal written before holds existed), or null.final -
recipientAddresses
→ List<
String> -
final
- resolutionReason → String?
-
Why it was failed or cancelled.
final
- resolvedAt → DateTime?
-
When it left DeferredPaymentState.outstanding.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → DeferredPaymentState
-
final
- txid → String
-
final
- updatedAt → DateTime
-
final
- walletId → String
-
final
Methods
-
copyWith(
{DeferredPaymentState? state, Object? lastNetworkStatus = _unset, Object? lastNetworkStatusSource = _unset, Object? lastCheckedAt = _unset, List< String> ? competingTxids, DateTime? updatedAt, Object? resolvedAt = _unset, Object? resolutionReason = _unset, List<DeferredPaymentInput> ? heldInputs, Object? deadline = _unset}) → DeferredPayment -
isDue(
DateTime now) → bool -
Whether deadline is set and has passed at
now: an outstanding payment the wallet reclaims by itself. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
completedBy(
String completedTxid) → String -
The resolution reason recorded when a half-signed payment is completed
by its counterparty as
completedTxid. -
heldInputsFromJson(
String? json) → List< DeferredPaymentInput> -
mergeCompetingTxids(
List< Object?> ? known, List<String> reported) → List<String> ? -
knownfollowed by the txids ofreportedit does not hold, or null whenreportedadds none: how a new report of competing transactions joins the ones recorded (bead libspiffy-pkum). -
reclaimedBy(
String reclaimTxid) → String -
The resolution reason recorded when a payment is reclaimed by the
wallet's own self-spend
reclaimTxid(bead libspiffy-87a). -
reclaimLostRace(
String utxoKey, String spentInTxId) → String -
The resolution reason recorded when a reclaim's self-spend lost the
race:
spentInTxId— in practice the recipient's copy of the payment being reclaimed — spent the held inpututxoKeyfirst (bead libspiffy-wfvi). -
stateFromName(
String? name) → DeferredPaymentState