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/README.md +11 -9
- package/dist/{client-CzGZcByI.d.cts → bank-CEIuNhV_.d.cts} +191 -28
- package/dist/{client-Cc5gtjGV.d.ts → bank-M8flcMks.d.ts} +191 -28
- package/dist/bank.cjs +197 -0
- package/dist/bank.d.cts +4 -2
- package/dist/bank.d.ts +4 -2
- package/dist/bank.js +196 -0
- package/dist/{errors-Dmh-Uoh8.d.cts → errors-DriqW-lp.d.cts} +2 -2
- package/dist/{errors-0vbVoISA.d.ts → errors-ZEUT-MhO.d.ts} +2 -2
- package/dist/index.cjs +701 -310
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +701 -310
- package/dist/nwc.cjs +115 -31
- package/dist/nwc.d.cts +6 -4
- package/dist/nwc.d.ts +6 -4
- package/dist/nwc.js +112 -28
- package/dist/price.d.cts +2 -2
- package/dist/price.d.ts +2 -2
- package/dist/qr.cjs +20 -23
- package/dist/qr.js +20 -23
- package/dist/{types-BNPmVnA7.d.cts → types-DYZ9EkmJ.d.cts} +11 -2
- package/dist/{types-BNPmVnA7.d.ts → types-DYZ9EkmJ.d.ts} +11 -2
- package/openapi.yaml +29 -39
- package/package.json +1 -1
- package/dist/bank-B3mHISn1.d.cts +0 -92
- package/dist/bank-B3mHISn1.d.ts +0 -92
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,
|
|
3
|
-
export {
|
|
4
|
-
import { H as Handover, P as Payment } from './types-
|
|
5
|
-
export { A as Amount, C as Charge, F as FiatOptions,
|
|
6
|
-
export { b as
|
|
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(
|
|
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,
|
|
3
|
-
export {
|
|
4
|
-
import { H as Handover, P as Payment } from './types-
|
|
5
|
-
export { A as Amount, C as Charge, F as FiatOptions,
|
|
6
|
-
export { b as
|
|
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(
|
|
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 };
|