thunder-bridge 1.5.0 → 2.1.1

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.
package/dist/index.d.cts CHANGED
@@ -1,16 +1,16 @@
1
1
  export { R as Resolved } from './qr-CF-YeXU1.cjs';
2
- import { T as ThunderBridge, b as ThunderBridgeOptions, W as WaitOptions } from './client-CzGZcByI.cjs';
3
- export { B as BankRailConfig, c as BlindLightningRailConfig, C as CreateOptions, F as FollowOptions, H as Handler, L as Leg, d as LightningRailConfig, e as LightningVerifyConfig, M as Minted, O as Order, P as PaymentRequest, f as PaymentRequestInit, g as PaymentRequestOptions, h as Provable, i as Proven, a as Rail, R as RailConfig, j as Rails, k as Range, l as Relayed, S as Send, m as Serve, n as TicketOptions, o as TriggerConfig, p as WatchTicketConfig, q as WebhookCredential, r as WebhookHandlers, s as WebhookOptions, t as WrapAllowance, u as answerVerifyChallenge, v as carriesProof, w as invoiceFrom, x as proveOrigin, y as proveSettlement, z as proveWrapped, A as relayedVerifyUrl, D as wrapFeeCeiling } from './client-CzGZcByI.cjs';
4
- import { H as Handover, P as Payment } from './types-BNPmVnA7.cjs';
5
- export { A as Amount, C as Charge, F as FiatOptions, e as MintedPayment, f as Msat, g as PaymentStatus, h as Priced, Q as Quote, S as Settlement, i as SocketTicket, W as WalletFailure, j as WalletReason, l as WatchedPayment, n as fiat, o as msat, s as sats } from './types-BNPmVnA7.cjs';
6
- export { b as BankVerifyConfig } from './bank-B3mHISn1.cjs';
7
- export { A as AmountError, a as AmountFault, G as GatewayCheatCode, b as GatewayCheatError, I as IdempotencyConflict, c as IdempotencyConflictError, N as NoWalletAvailableError, P as ProblemError, U as UnverifiedRecipientError, W as WrapRefusalCode, d as WrapRefusedError } from './errors-Dmh-Uoh8.cjs';
2
+ import { T as ThunderBridge, g as ThunderBridgeOptions, W as WaitOptions } from './bank-CEIuNhV_.cjs';
3
+ export { A as AttendOptions, h as BankRailConfig, d as BankVerifyConfig, i as BlindLightningRailConfig, j as CreateOptions, F as FollowOptions, H as Handler, L as Leg, k as LightningRailConfig, l as LightningVerifyConfig, M as Minted, O as Order, P as PaymentRequest, m as PaymentRequestInit, n as PaymentRequestOptions, o as Provable, p as Proven, f as Rail, R as RailConfig, q as Rails, r as Range, s as Relayed, t as Send, u as Serve, v as TicketOptions, w as TriggerConfig, x as WatchTicketConfig, y as WebhookCredential, z as WebhookHandlers, D as WebhookOptions, E as WrapAllowance, G as answerVerifyChallenge, I as carriesProof, J as invoiceFrom, K as proveOrigin, N as proveSettlement, Q as proveWrapped, U as relayedVerifyUrl, V as wrapFeeCeiling } from './bank-CEIuNhV_.cjs';
4
+ import { H as Handover, P as Payment, e as Held } from './types-DYZ9EkmJ.cjs';
5
+ export { A as Amount, C as Charge, F as FiatOptions, f as MintedPayment, g as Msat, h as PaymentStatus, i as Priced, Q as Quote, S as Settlement, j as SocketTicket, W as WalletFailure, l as WalletReason, n as WatchedPayment, o as fiat, p as msat, s as sats } from './types-DYZ9EkmJ.cjs';
6
+ export { A as AmountError, a as AmountFault, G as GatewayCheatCode, b as GatewayCheatError, I as IdempotencyConflict, c as IdempotencyConflictError, N as NoWalletAvailableError, P as ProblemError, U as UnverifiedRecipientError, W as WrapRefusalCode, d as WrapRefusedError } from './errors-DriqW-lp.cjs';
8
7
 
9
8
  /** What a BOLT11 invoice says about itself, every field null when it does not carry one */
10
9
  interface Invoice {
11
10
  paymentHash: string | null;
12
11
  descriptionHash: string | null;
13
12
  amountMsat: number | null;
13
+ issuedAt: number | null;
14
14
  expiresAt: number | null;
15
15
  }
16
16
  /**
@@ -26,13 +26,13 @@ declare function preimageMatchesHash(preimage: string, paymentHash: string): boo
26
26
  * stores the result and hands it back untouched, so anything readable you put
27
27
  * in `sealed` is something you told it, which is what blind mode exists to avoid
28
28
  */
29
- declare function seal(secret: string, plaintext: string): Promise<string>;
29
+ declare function seal(secret: string, plaintext: string, paymentHash?: string): Promise<string>;
30
30
  /**
31
31
  * Read a sealed blob back, null when it was sealed with another secret, edited
32
32
  * on the way, or is not one of ours. A secret too short to be a key throws,
33
33
  * because that is your bug rather than someone else's input
34
34
  */
35
- declare function unseal(secret: string, sealed: string): Promise<string | null>;
35
+ declare function unseal(secret: string, sealed: string, paymentHash?: string): Promise<string | null>;
36
36
 
37
37
  /** The client's own options, plus what to do about a gateway that will not take the watch */
38
38
  interface GatewaysOptions extends ThunderBridgeOptions {
@@ -72,7 +72,7 @@ declare class Gateways {
72
72
  * saying so. When they all end without a payment, the first ending is the answer,
73
73
  * and when they all fail, the first failure is thrown
74
74
  */
75
- settled(id: string, options?: WaitOptions): Promise<Payment>;
75
+ settled(held: Held, options?: WaitOptions): Promise<Payment>;
76
76
  }
77
77
 
78
- export { Gateways, type GatewaysOptions, Handover, type Invoice, Payment, ThunderBridge, ThunderBridgeOptions, WaitOptions, decodeInvoice, preimageMatchesHash, seal, unseal };
78
+ export { Gateways, type GatewaysOptions, Handover, Held, type Invoice, Payment, ThunderBridge, ThunderBridgeOptions, WaitOptions, decodeInvoice, preimageMatchesHash, seal, unseal };
package/dist/index.d.ts CHANGED
@@ -1,16 +1,16 @@
1
1
  export { R as Resolved } from './qr-CF-YeXU1.js';
2
- import { T as ThunderBridge, b as ThunderBridgeOptions, W as WaitOptions } from './client-Cc5gtjGV.js';
3
- export { B as BankRailConfig, c as BlindLightningRailConfig, C as CreateOptions, F as FollowOptions, H as Handler, L as Leg, d as LightningRailConfig, e as LightningVerifyConfig, M as Minted, O as Order, P as PaymentRequest, f as PaymentRequestInit, g as PaymentRequestOptions, h as Provable, i as Proven, a as Rail, R as RailConfig, j as Rails, k as Range, l as Relayed, S as Send, m as Serve, n as TicketOptions, o as TriggerConfig, p as WatchTicketConfig, q as WebhookCredential, r as WebhookHandlers, s as WebhookOptions, t as WrapAllowance, u as answerVerifyChallenge, v as carriesProof, w as invoiceFrom, x as proveOrigin, y as proveSettlement, z as proveWrapped, A as relayedVerifyUrl, D as wrapFeeCeiling } from './client-Cc5gtjGV.js';
4
- import { H as Handover, P as Payment } from './types-BNPmVnA7.js';
5
- export { A as Amount, C as Charge, F as FiatOptions, e as MintedPayment, f as Msat, g as PaymentStatus, h as Priced, Q as Quote, S as Settlement, i as SocketTicket, W as WalletFailure, j as WalletReason, l as WatchedPayment, n as fiat, o as msat, s as sats } from './types-BNPmVnA7.js';
6
- export { b as BankVerifyConfig } from './bank-B3mHISn1.js';
7
- export { A as AmountError, a as AmountFault, G as GatewayCheatCode, b as GatewayCheatError, I as IdempotencyConflict, c as IdempotencyConflictError, N as NoWalletAvailableError, P as ProblemError, U as UnverifiedRecipientError, W as WrapRefusalCode, d as WrapRefusedError } from './errors-0vbVoISA.js';
2
+ import { T as ThunderBridge, g as ThunderBridgeOptions, W as WaitOptions } from './bank-M8flcMks.js';
3
+ export { A as AttendOptions, h as BankRailConfig, d as BankVerifyConfig, i as BlindLightningRailConfig, j as CreateOptions, F as FollowOptions, H as Handler, L as Leg, k as LightningRailConfig, l as LightningVerifyConfig, M as Minted, O as Order, P as PaymentRequest, m as PaymentRequestInit, n as PaymentRequestOptions, o as Provable, p as Proven, f as Rail, R as RailConfig, q as Rails, r as Range, s as Relayed, t as Send, u as Serve, v as TicketOptions, w as TriggerConfig, x as WatchTicketConfig, y as WebhookCredential, z as WebhookHandlers, D as WebhookOptions, E as WrapAllowance, G as answerVerifyChallenge, I as carriesProof, J as invoiceFrom, K as proveOrigin, N as proveSettlement, Q as proveWrapped, U as relayedVerifyUrl, V as wrapFeeCeiling } from './bank-M8flcMks.js';
4
+ import { H as Handover, P as Payment, e as Held } from './types-DYZ9EkmJ.js';
5
+ export { A as Amount, C as Charge, F as FiatOptions, f as MintedPayment, g as Msat, h as PaymentStatus, i as Priced, Q as Quote, S as Settlement, j as SocketTicket, W as WalletFailure, l as WalletReason, n as WatchedPayment, o as fiat, p as msat, s as sats } from './types-DYZ9EkmJ.js';
6
+ export { A as AmountError, a as AmountFault, G as GatewayCheatCode, b as GatewayCheatError, I as IdempotencyConflict, c as IdempotencyConflictError, N as NoWalletAvailableError, P as ProblemError, U as UnverifiedRecipientError, W as WrapRefusalCode, d as WrapRefusedError } from './errors-ZEUT-MhO.js';
8
7
 
9
8
  /** What a BOLT11 invoice says about itself, every field null when it does not carry one */
10
9
  interface Invoice {
11
10
  paymentHash: string | null;
12
11
  descriptionHash: string | null;
13
12
  amountMsat: number | null;
13
+ issuedAt: number | null;
14
14
  expiresAt: number | null;
15
15
  }
16
16
  /**
@@ -26,13 +26,13 @@ declare function preimageMatchesHash(preimage: string, paymentHash: string): boo
26
26
  * stores the result and hands it back untouched, so anything readable you put
27
27
  * in `sealed` is something you told it, which is what blind mode exists to avoid
28
28
  */
29
- declare function seal(secret: string, plaintext: string): Promise<string>;
29
+ declare function seal(secret: string, plaintext: string, paymentHash?: string): Promise<string>;
30
30
  /**
31
31
  * Read a sealed blob back, null when it was sealed with another secret, edited
32
32
  * on the way, or is not one of ours. A secret too short to be a key throws,
33
33
  * because that is your bug rather than someone else's input
34
34
  */
35
- declare function unseal(secret: string, sealed: string): Promise<string | null>;
35
+ declare function unseal(secret: string, sealed: string, paymentHash?: string): Promise<string | null>;
36
36
 
37
37
  /** The client's own options, plus what to do about a gateway that will not take the watch */
38
38
  interface GatewaysOptions extends ThunderBridgeOptions {
@@ -72,7 +72,7 @@ declare class Gateways {
72
72
  * saying so. When they all end without a payment, the first ending is the answer,
73
73
  * and when they all fail, the first failure is thrown
74
74
  */
75
- settled(id: string, options?: WaitOptions): Promise<Payment>;
75
+ settled(held: Held, options?: WaitOptions): Promise<Payment>;
76
76
  }
77
77
 
78
- export { Gateways, type GatewaysOptions, Handover, type Invoice, Payment, ThunderBridge, ThunderBridgeOptions, WaitOptions, decodeInvoice, preimageMatchesHash, seal, unseal };
78
+ export { Gateways, type GatewaysOptions, Handover, Held, type Invoice, Payment, ThunderBridge, ThunderBridgeOptions, WaitOptions, decodeInvoice, preimageMatchesHash, seal, unseal };