ChannelTiming class
The timing a node holds its payment channels to.
A channel's refund becomes valid at its lock time and returns the whole funding output to the client. The server's payments exist only once its settlement is on the network before then: BSV has no replacement and the first spend seen wins. So:
- no payment is made or acknowledged within settlementMargin of the lock time, and the server settles the channel when that margin begins;
- a channel is requested or accepted only with at least minimumLifetime to run.
The margin must cover the broadcast, clock skew between the parties, and that nLockTime is judged by the median time of the last eleven blocks rather than by the clock. Both are the operator's to choose: the library supplies no default.
Constructors
- ChannelTiming({required Duration settlementMargin, required Duration minimumLifetime})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- minimumLifetime → Duration
-
The least time from now to the lock time a channel is opened with.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settlementMargin → Duration
-
How long before the lock time payments stop and the server settles.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
settleByUnix(
int lockTimeUnix) → int -
The Unix time from which a channel locked until
lockTimeUnixtakes no payment and is settled. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited