beignet 0.6.0 → 0.6.2

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.
@@ -1476,8 +1476,11 @@ class BeignetNode extends events_1.EventEmitter {
1476
1476
  issues.push('PEER_DISCONNECTED: Channel partner not connected. They will mark the channel inactive.');
1477
1477
  if (!effectiveScid)
1478
1478
  issues.push('NO_USABLE_SCID: No SCID the remote peer recognizes. Need 6 confirmations for real SCID, or remote must send alias in channel_ready. Routing hints will be skipped — invoice will have no route.');
1479
- if (state.state !== 'NORMAL' && state.preReestablishState !== 'NORMAL') {
1480
- issues.push(`NOT_NORMAL: Channel state is ${state.state} (pre-reestablish: ${state.preReestablishState || 'none'}). Routing hints require NORMAL state.`);
1479
+ const htlcUsableThrough = channel.isHtlcUsable(true);
1480
+ if (state.state !== 'NORMAL' &&
1481
+ state.preReestablishState !== 'NORMAL' &&
1482
+ !htlcUsableThrough) {
1483
+ issues.push(`NOT_NORMAL: Channel state is ${state.state} (pre-reestablish: ${state.preReestablishState || 'none'}). Routing hints require a usable channel.`);
1481
1484
  }
1482
1485
  if (!state.announceChannel)
1483
1486
  issues.push('PRIVATE_CHANNEL: Channel is private (not announced). Routing hints are required for payments.');
@@ -1501,7 +1504,9 @@ class BeignetNode extends events_1.EventEmitter {
1501
1504
  shortChannelId: shortChannelId?.toString('hex') || null,
1502
1505
  effectiveScid: effectiveScid?.toString('hex') || null,
1503
1506
  willGenerateRoutingHint: !!effectiveScid &&
1504
- (state.state === 'NORMAL' || state.preReestablishState === 'NORMAL'),
1507
+ (state.state === 'NORMAL' ||
1508
+ state.preReestablishState === 'NORMAL' ||
1509
+ htlcUsableThrough),
1505
1510
  localBalanceSats: Number(state.localBalanceMsat / 1000n),
1506
1511
  remoteBalanceSats: Number(state.remoteBalanceMsat / 1000n),
1507
1512
  issues
@@ -1530,6 +1535,10 @@ class BeignetNode extends events_1.EventEmitter {
1530
1535
  info.htlcCount = ch.htlcCount;
1531
1536
  if (ch.pendingSpliceLocalBalanceMsat !== undefined)
1532
1537
  info.pendingSpliceLocalBalanceSats = Number(ch.pendingSpliceLocalBalanceMsat / 1000n);
1538
+ if (ch.htlcUsable !== undefined)
1539
+ info.htlcUsable = ch.htlcUsable;
1540
+ if (ch.payThroughSplice !== undefined)
1541
+ info.payThroughSplice = ch.payThroughSplice;
1533
1542
  if (ch.isPrivate !== undefined)
1534
1543
  info.isPrivate = ch.isPrivate;
1535
1544
  if (ch.feeBaseMsat !== undefined)