beignet 0.21.4 → 0.21.6

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.
@@ -3696,6 +3696,7 @@ class BeignetNode extends events_1.EventEmitter {
3696
3696
  fforEpochView(channelIdHex, f) {
3697
3697
  const K = f.params.maxPayments;
3698
3698
  const settledBit = (k) => f.settledBitmap !== null && (0, messages_1.bitmapGet)(f.settledBitmap, k);
3699
+ const invoices = f.role === 'R' ? this.node.fforSlotInvoices(channelIdHex) : [];
3699
3700
  const slots = Array.from({ length: K }, (_, i) => {
3700
3701
  const k = i + 1;
3701
3702
  let state;
@@ -3719,11 +3720,13 @@ class BeignetNode extends events_1.EventEmitter {
3719
3720
  else {
3720
3721
  state = 'unissued';
3721
3722
  }
3723
+ const bolt11 = invoices[i] ?? null;
3722
3724
  return {
3723
3725
  k,
3724
3726
  amountMsat: f.params.voucherAmountsMsat[i].toString(),
3725
3727
  paymentHash: f.paymentHashes[i]?.toString('hex') ?? null,
3726
- state
3728
+ state,
3729
+ ...(bolt11 ? { bolt11 } : {})
3727
3730
  };
3728
3731
  });
3729
3732
  return {