beignet 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,9 +37,8 @@ the depth exists to protect against.
37
37
  Requirements:
38
38
 
39
39
  - An acceptor MUST NOT honour a `lock_depth` larger than it is prepared to
40
- wait: until the lock the channel cannot cooperatively close and a force
41
- close cannot adopt the splice, so the depth is how long the initiator alone
42
- could close the channel. Beignet honours at most 6
40
+ wait: until the lock the channel cannot cooperatively close, so the depth is
41
+ how long it has only a unilateral exit. Beignet honours at most 6
43
42
  (`SPLICE_LOCK_DEPTH_ACCEPT_MAX`), asks for at most 6, and answers a larger
44
43
  request with `tx_abort` before any input is added.
45
44
  - A node that sent or echoed `lock_depth` MUST NOT send `splice_locked` for
@@ -57,6 +56,32 @@ Beignet: `ISpliceInFlight.lockAtDepth`, set through
57
56
  `LightningNode.spliceInWithInputs(..., { lockAtDepth })`; the direct-funding
58
57
  receiver sets it for an unpaired payer (`unpairedSpliceDepth`, default 3).
59
58
 
59
+ ### Closing inside the window (issue #764)
60
+
61
+ Being on chain and being locked are two facts, and the close paths need the
62
+ first one on its own. The moment the splice is mined the pre-splice funding
63
+ output is spent, so every commitment built against it is unconfirmable, while
64
+ `splice_locked` still owes the chain another `lock_depth - 1` blocks. An
65
+ ordinary splice has the same window, between its first confirmation and
66
+ `minimum_depth`.
67
+
68
+ - The funding watch reports both: `funding:seen` (in a block, at any depth,
69
+ stamped on the record as `confirmedHeight`) and `funding:confirmed`
70
+ (`max(minimum_depth, lock_depth)` reached, which is what sends the lock).
71
+ - A force close planned in the window is built against the SPLICE: the peer's
72
+ signature over the post-splice commitment is on the in-flight record, so the
73
+ commitment exists whether or not the lock was ever sent.
74
+ - It is a broadcast decision, not an adoption. The channel stays on the
75
+ pre-splice funding, because a splice at one confirmation can still be reorged
76
+ out, and only an unmoved channel can still build the pre-splice commitment.
77
+ `closeSpendsSpliceTxid` records which of the two fundings the transaction on
78
+ the network spends; `funding:unseen` retracts the sighting and re-drives the
79
+ close on the old funding. The adoption proper still happens at the lock
80
+ depth, and re-drives the same close onto identical bytes.
81
+ - Cooperative close still waits for the lock: `shutdown` is refused for the
82
+ whole SPLICING window rather than negotiating against a funding that can
83
+ change under the negotiation.
84
+
60
85
  ## 2. Conflicted-splice revert
61
86
 
62
87
  ### Problem
@@ -168,3 +193,11 @@ The same depth class the rest of the node treats as final.
168
193
  second channel. A reverted splice fails the request behind it.
169
194
  - Just-in-time receives: a held payment never rides a depth-locked splice; a
170
195
  hold arriving while any splice is pending fails fast with nothing fronted.
196
+ - HTLC deadlines: the per-block backstops that force close to claim an inbound
197
+ HTLC whose preimage we hold, to time out an offered HTLC the peer sits on
198
+ past its expiry, or to move an unresolved forward on chain all run on a
199
+ SPLICING channel exactly as on NORMAL, in every phase of the splice (issue
200
+ #774). The close is planned against whichever funding the chain has. The
201
+ off-chain fail those scans prefer needs update traffic, which only the
202
+ pending-lock window of an ECDSA splice carries; before that the scans wait
203
+ for it rather than close, and the on-chain backstops stand behind them.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beignet",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "A self-custodial, JS Bitcoin wallet + Lightning Network management library.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {