thunder-bridge 0.8.10 → 1.1.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.
- package/README.md +66 -62
- package/dist/index.cjs +291 -118
- package/dist/index.d.cts +63 -17
- package/dist/index.d.ts +63 -17
- package/dist/index.js +287 -118
- package/dist/{rail-J8QoYbSr.d.cts → rail-Dp8bs6uZ.d.cts} +54 -6
- package/dist/{rail-J8QoYbSr.d.ts → rail-Dp8bs6uZ.d.ts} +54 -6
- package/dist/server.cjs +3 -2
- package/dist/server.d.cts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +2 -2
- package/openapi.yaml +43 -1
- package/package.json +1 -1
|
@@ -23,7 +23,6 @@ interface CreatePaymentParams {
|
|
|
23
23
|
lnAddresses: string[];
|
|
24
24
|
amountMsat: number;
|
|
25
25
|
webhookUrl?: string;
|
|
26
|
-
webhookSecret?: string;
|
|
27
26
|
}
|
|
28
27
|
/**
|
|
29
28
|
* `lnAddresses` is the same priority list `createPayment` takes, and quoting it
|
|
@@ -78,7 +77,6 @@ interface WatchPaymentParams {
|
|
|
78
77
|
trigger?: string;
|
|
79
78
|
sealed?: string;
|
|
80
79
|
webhookUrl?: string;
|
|
81
|
-
webhookSecret?: string;
|
|
82
80
|
}
|
|
83
81
|
/** Why one wallet in the list could not be used */
|
|
84
82
|
type WalletReason = "address-unusable" | "unreachable" | "amount-not-accepted" | "cannot-prove-delivery" | "invoice-refused";
|
|
@@ -86,6 +84,17 @@ interface WalletFailure {
|
|
|
86
84
|
address: string;
|
|
87
85
|
reason: WalletReason;
|
|
88
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* What a delivery carries. Everything needed to act on a settlement and to check
|
|
89
|
+
* it, and nothing else, so a retry is the same size every time
|
|
90
|
+
*/
|
|
91
|
+
interface Settlement {
|
|
92
|
+
id: string;
|
|
93
|
+
status: PaymentStatus;
|
|
94
|
+
paymentHash: string;
|
|
95
|
+
preimage: string | null;
|
|
96
|
+
settledAt: number;
|
|
97
|
+
}
|
|
89
98
|
|
|
90
99
|
interface ThunderBridgeOptions {
|
|
91
100
|
/**
|
|
@@ -101,6 +110,13 @@ interface ThunderBridgeOptions {
|
|
|
101
110
|
* through a ticket
|
|
102
111
|
*/
|
|
103
112
|
token?: string;
|
|
113
|
+
/**
|
|
114
|
+
* The same long lived server side secret your rail derives its preimages from.
|
|
115
|
+
* Given here, every call carries a signature the gateway reads as your identity,
|
|
116
|
+
* so a payment you create is handed back to you and to nobody else. Withheld,
|
|
117
|
+
* you are anonymous and any holder of an id can read what it names
|
|
118
|
+
*/
|
|
119
|
+
secret?: string;
|
|
104
120
|
}
|
|
105
121
|
interface WaitOptions {
|
|
106
122
|
/** Give up when this aborts, `AbortSignal.timeout(ms)` covers the usual case */
|
|
@@ -159,7 +175,9 @@ declare class ThunderBridge {
|
|
|
159
175
|
private readonly baseUrl;
|
|
160
176
|
private readonly verify;
|
|
161
177
|
private readonly token;
|
|
178
|
+
private readonly secret;
|
|
162
179
|
private strangers;
|
|
180
|
+
private speaks;
|
|
163
181
|
constructor(baseUrl: string, options?: ThunderBridgeOptions);
|
|
164
182
|
/**
|
|
165
183
|
* Whether a token was given, which is what makes an instance yours: a gateway
|
|
@@ -262,6 +280,14 @@ declare class ThunderBridge {
|
|
|
262
280
|
* the watcher needs goes in `sealed`, which the gateway cannot read
|
|
263
281
|
*/
|
|
264
282
|
watchPayment(params: WatchPaymentParams): Promise<TriggerEvent>;
|
|
283
|
+
/**
|
|
284
|
+
* What this payment is called, which you can work out before any gateway has
|
|
285
|
+
* heard of it. Every gateway you hand the same invoice to answers with the same
|
|
286
|
+
* name, so watching at several of them adds up to one payment rather than
|
|
287
|
+
* several, and no gateway's key is in the answer. Null when no secret was given,
|
|
288
|
+
* because then the gateway names the payment and only it can
|
|
289
|
+
*/
|
|
290
|
+
nameFor(paymentHash: string): Promise<string | null>;
|
|
265
291
|
/**
|
|
266
292
|
* Follow every payment made to one trigger, replayed from the recent ones on
|
|
267
293
|
* connect and then live, reconnecting on its own until the returned function
|
|
@@ -272,10 +298,25 @@ declare class ThunderBridge {
|
|
|
272
298
|
private wsTicket;
|
|
273
299
|
private sending;
|
|
274
300
|
private reading;
|
|
301
|
+
private speaking;
|
|
275
302
|
private proven;
|
|
276
303
|
private checked;
|
|
277
304
|
}
|
|
278
305
|
|
|
306
|
+
type Resolved = {
|
|
307
|
+
address: string;
|
|
308
|
+
bolt11: string;
|
|
309
|
+
verifyUrl: string;
|
|
310
|
+
paymentHash: string;
|
|
311
|
+
expiresAt: number;
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* Bech32-encode a pay endpoint as the `LNURL1` string LUD-01 defines, uppercase
|
|
315
|
+
* because that is the form it asks a QR to carry. An onion endpoint is http
|
|
316
|
+
* rather than https, which LUD-17 spells out, so both are taken here
|
|
317
|
+
*/
|
|
318
|
+
declare function toLnurl(endpoint: string): string;
|
|
319
|
+
|
|
279
320
|
/** What a shop knows about a sale before any rail exists */
|
|
280
321
|
interface Order {
|
|
281
322
|
/** The bank matches it on the statement, and Lightning keys idempotency on it */
|
|
@@ -324,7 +365,6 @@ interface BankRailConfig {
|
|
|
324
365
|
/** Up to ten digits, for accounting systems that still want one */
|
|
325
366
|
variableSymbol?: (order: Order) => string | undefined;
|
|
326
367
|
webhookUrl?: string;
|
|
327
|
-
webhookSecret?: string;
|
|
328
368
|
/** Register on a gateway you do not own anyway, on the terms `bankTransfer` sets out */
|
|
329
369
|
allowPublicGateway?: boolean;
|
|
330
370
|
/** What `Leg.rail` reads, for a shop running more than one account */
|
|
@@ -345,7 +385,6 @@ interface LightningRailConfig {
|
|
|
345
385
|
*/
|
|
346
386
|
idempotencyKey?: (order: Order) => string | undefined;
|
|
347
387
|
webhookUrl?: string;
|
|
348
|
-
webhookSecret?: string;
|
|
349
388
|
/** What `Leg.rail` reads, for a shop running more than one wallet */
|
|
350
389
|
name?: string;
|
|
351
390
|
}
|
|
@@ -361,7 +400,6 @@ interface BlindLightningRailConfig {
|
|
|
361
400
|
/** Only a watched leg has anywhere to carry this */
|
|
362
401
|
sealed?: (order: Order) => string | Promise<string>;
|
|
363
402
|
webhookUrl?: string;
|
|
364
|
-
webhookSecret?: string;
|
|
365
403
|
/**
|
|
366
404
|
* Where your own `lightningVerifyEndpoint` is mounted, and the secret it
|
|
367
405
|
* unseals with. Set both and the gateway is handed your URL rather than the
|
|
@@ -396,5 +434,15 @@ declare function lightningRail(config: LightningRailConfig): Rail;
|
|
|
396
434
|
* refusing everyone.
|
|
397
435
|
*/
|
|
398
436
|
declare function blindLightningRail(config: BlindLightningRailConfig): Rail;
|
|
437
|
+
/**
|
|
438
|
+
* A provable invoice from the first address on the list that will issue one, which
|
|
439
|
+
* is what a client mints for itself rather than asking a gateway to. Everything the
|
|
440
|
+
* gateway needs to watch it comes back with everything you need to prove it came
|
|
441
|
+
* from the address you asked for, so you can hand over the first and keep the second.
|
|
442
|
+
*
|
|
443
|
+
* Server side: it resolves hostnames and refuses a private one, which no browser can
|
|
444
|
+
* do. Throws `NoWalletAvailableError` when no address on the list would serve
|
|
445
|
+
*/
|
|
446
|
+
declare function invoiceFrom(lnAddresses: string[], amountMsat: number): Promise<Resolved>;
|
|
399
447
|
|
|
400
|
-
export { type BankRailConfig as B, type CreatePaymentParams as C, type FollowOptions as F, type Leg as L, type Order as O, type Payment as P, type Quote as Q, type Rail as R, ThunderBridge as T, type
|
|
448
|
+
export { type BankRailConfig as B, type CreatePaymentParams as C, type FollowOptions as F, type Leg as L, type Order as O, type Payment as P, type Quote as Q, type Rail as R, type Settlement as S, ThunderBridge as T, type WatchPaymentParams as W, type ThunderBridgeOptions as a, type TriggerEvent as b, type WaitOptions as c, type WalletFailure as d, type CreateOptions as e, type CreateQuoteParams as f, type LightningRailConfig as g, type PaymentKind as h, type PaymentStatus as i, type WalletReason as j, bankRail as k, lightningRail as l, type BlindLightningRailConfig as m, type Resolved as n, blindLightningRail as o, invoiceFrom as p, toLnurl as t };
|
|
@@ -23,7 +23,6 @@ interface CreatePaymentParams {
|
|
|
23
23
|
lnAddresses: string[];
|
|
24
24
|
amountMsat: number;
|
|
25
25
|
webhookUrl?: string;
|
|
26
|
-
webhookSecret?: string;
|
|
27
26
|
}
|
|
28
27
|
/**
|
|
29
28
|
* `lnAddresses` is the same priority list `createPayment` takes, and quoting it
|
|
@@ -78,7 +77,6 @@ interface WatchPaymentParams {
|
|
|
78
77
|
trigger?: string;
|
|
79
78
|
sealed?: string;
|
|
80
79
|
webhookUrl?: string;
|
|
81
|
-
webhookSecret?: string;
|
|
82
80
|
}
|
|
83
81
|
/** Why one wallet in the list could not be used */
|
|
84
82
|
type WalletReason = "address-unusable" | "unreachable" | "amount-not-accepted" | "cannot-prove-delivery" | "invoice-refused";
|
|
@@ -86,6 +84,17 @@ interface WalletFailure {
|
|
|
86
84
|
address: string;
|
|
87
85
|
reason: WalletReason;
|
|
88
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* What a delivery carries. Everything needed to act on a settlement and to check
|
|
89
|
+
* it, and nothing else, so a retry is the same size every time
|
|
90
|
+
*/
|
|
91
|
+
interface Settlement {
|
|
92
|
+
id: string;
|
|
93
|
+
status: PaymentStatus;
|
|
94
|
+
paymentHash: string;
|
|
95
|
+
preimage: string | null;
|
|
96
|
+
settledAt: number;
|
|
97
|
+
}
|
|
89
98
|
|
|
90
99
|
interface ThunderBridgeOptions {
|
|
91
100
|
/**
|
|
@@ -101,6 +110,13 @@ interface ThunderBridgeOptions {
|
|
|
101
110
|
* through a ticket
|
|
102
111
|
*/
|
|
103
112
|
token?: string;
|
|
113
|
+
/**
|
|
114
|
+
* The same long lived server side secret your rail derives its preimages from.
|
|
115
|
+
* Given here, every call carries a signature the gateway reads as your identity,
|
|
116
|
+
* so a payment you create is handed back to you and to nobody else. Withheld,
|
|
117
|
+
* you are anonymous and any holder of an id can read what it names
|
|
118
|
+
*/
|
|
119
|
+
secret?: string;
|
|
104
120
|
}
|
|
105
121
|
interface WaitOptions {
|
|
106
122
|
/** Give up when this aborts, `AbortSignal.timeout(ms)` covers the usual case */
|
|
@@ -159,7 +175,9 @@ declare class ThunderBridge {
|
|
|
159
175
|
private readonly baseUrl;
|
|
160
176
|
private readonly verify;
|
|
161
177
|
private readonly token;
|
|
178
|
+
private readonly secret;
|
|
162
179
|
private strangers;
|
|
180
|
+
private speaks;
|
|
163
181
|
constructor(baseUrl: string, options?: ThunderBridgeOptions);
|
|
164
182
|
/**
|
|
165
183
|
* Whether a token was given, which is what makes an instance yours: a gateway
|
|
@@ -262,6 +280,14 @@ declare class ThunderBridge {
|
|
|
262
280
|
* the watcher needs goes in `sealed`, which the gateway cannot read
|
|
263
281
|
*/
|
|
264
282
|
watchPayment(params: WatchPaymentParams): Promise<TriggerEvent>;
|
|
283
|
+
/**
|
|
284
|
+
* What this payment is called, which you can work out before any gateway has
|
|
285
|
+
* heard of it. Every gateway you hand the same invoice to answers with the same
|
|
286
|
+
* name, so watching at several of them adds up to one payment rather than
|
|
287
|
+
* several, and no gateway's key is in the answer. Null when no secret was given,
|
|
288
|
+
* because then the gateway names the payment and only it can
|
|
289
|
+
*/
|
|
290
|
+
nameFor(paymentHash: string): Promise<string | null>;
|
|
265
291
|
/**
|
|
266
292
|
* Follow every payment made to one trigger, replayed from the recent ones on
|
|
267
293
|
* connect and then live, reconnecting on its own until the returned function
|
|
@@ -272,10 +298,25 @@ declare class ThunderBridge {
|
|
|
272
298
|
private wsTicket;
|
|
273
299
|
private sending;
|
|
274
300
|
private reading;
|
|
301
|
+
private speaking;
|
|
275
302
|
private proven;
|
|
276
303
|
private checked;
|
|
277
304
|
}
|
|
278
305
|
|
|
306
|
+
type Resolved = {
|
|
307
|
+
address: string;
|
|
308
|
+
bolt11: string;
|
|
309
|
+
verifyUrl: string;
|
|
310
|
+
paymentHash: string;
|
|
311
|
+
expiresAt: number;
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* Bech32-encode a pay endpoint as the `LNURL1` string LUD-01 defines, uppercase
|
|
315
|
+
* because that is the form it asks a QR to carry. An onion endpoint is http
|
|
316
|
+
* rather than https, which LUD-17 spells out, so both are taken here
|
|
317
|
+
*/
|
|
318
|
+
declare function toLnurl(endpoint: string): string;
|
|
319
|
+
|
|
279
320
|
/** What a shop knows about a sale before any rail exists */
|
|
280
321
|
interface Order {
|
|
281
322
|
/** The bank matches it on the statement, and Lightning keys idempotency on it */
|
|
@@ -324,7 +365,6 @@ interface BankRailConfig {
|
|
|
324
365
|
/** Up to ten digits, for accounting systems that still want one */
|
|
325
366
|
variableSymbol?: (order: Order) => string | undefined;
|
|
326
367
|
webhookUrl?: string;
|
|
327
|
-
webhookSecret?: string;
|
|
328
368
|
/** Register on a gateway you do not own anyway, on the terms `bankTransfer` sets out */
|
|
329
369
|
allowPublicGateway?: boolean;
|
|
330
370
|
/** What `Leg.rail` reads, for a shop running more than one account */
|
|
@@ -345,7 +385,6 @@ interface LightningRailConfig {
|
|
|
345
385
|
*/
|
|
346
386
|
idempotencyKey?: (order: Order) => string | undefined;
|
|
347
387
|
webhookUrl?: string;
|
|
348
|
-
webhookSecret?: string;
|
|
349
388
|
/** What `Leg.rail` reads, for a shop running more than one wallet */
|
|
350
389
|
name?: string;
|
|
351
390
|
}
|
|
@@ -361,7 +400,6 @@ interface BlindLightningRailConfig {
|
|
|
361
400
|
/** Only a watched leg has anywhere to carry this */
|
|
362
401
|
sealed?: (order: Order) => string | Promise<string>;
|
|
363
402
|
webhookUrl?: string;
|
|
364
|
-
webhookSecret?: string;
|
|
365
403
|
/**
|
|
366
404
|
* Where your own `lightningVerifyEndpoint` is mounted, and the secret it
|
|
367
405
|
* unseals with. Set both and the gateway is handed your URL rather than the
|
|
@@ -396,5 +434,15 @@ declare function lightningRail(config: LightningRailConfig): Rail;
|
|
|
396
434
|
* refusing everyone.
|
|
397
435
|
*/
|
|
398
436
|
declare function blindLightningRail(config: BlindLightningRailConfig): Rail;
|
|
437
|
+
/**
|
|
438
|
+
* A provable invoice from the first address on the list that will issue one, which
|
|
439
|
+
* is what a client mints for itself rather than asking a gateway to. Everything the
|
|
440
|
+
* gateway needs to watch it comes back with everything you need to prove it came
|
|
441
|
+
* from the address you asked for, so you can hand over the first and keep the second.
|
|
442
|
+
*
|
|
443
|
+
* Server side: it resolves hostnames and refuses a private one, which no browser can
|
|
444
|
+
* do. Throws `NoWalletAvailableError` when no address on the list would serve
|
|
445
|
+
*/
|
|
446
|
+
declare function invoiceFrom(lnAddresses: string[], amountMsat: number): Promise<Resolved>;
|
|
399
447
|
|
|
400
|
-
export { type BankRailConfig as B, type CreatePaymentParams as C, type FollowOptions as F, type Leg as L, type Order as O, type Payment as P, type Quote as Q, type Rail as R, ThunderBridge as T, type
|
|
448
|
+
export { type BankRailConfig as B, type CreatePaymentParams as C, type FollowOptions as F, type Leg as L, type Order as O, type Payment as P, type Quote as Q, type Rail as R, type Settlement as S, ThunderBridge as T, type WatchPaymentParams as W, type ThunderBridgeOptions as a, type TriggerEvent as b, type WaitOptions as c, type WalletFailure as d, type CreateOptions as e, type CreateQuoteParams as f, type LightningRailConfig as g, type PaymentKind as h, type PaymentStatus as i, type WalletReason as j, bankRail as k, lightningRail as l, type BlindLightningRailConfig as m, type Resolved as n, blindLightningRail as o, invoiceFrom as p, toLnurl as t };
|
package/dist/server.cjs
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var server_exports = {};
|
|
32
32
|
__export(server_exports, {
|
|
33
33
|
blindLightningRail: () => blindLightningRail,
|
|
34
|
+
invoiceFrom: () => invoiceFrom,
|
|
34
35
|
lightningVerifyEndpoint: () => lightningVerifyEndpoint,
|
|
35
36
|
lnurlPayEndpoint: () => lnurlPayEndpoint,
|
|
36
37
|
relayedVerifyUrl: () => relayedVerifyUrl
|
|
@@ -926,8 +927,7 @@ function blindLightningRail(config) {
|
|
|
926
927
|
expiresAt: resolved2.expiresAt,
|
|
927
928
|
trigger: config.trigger,
|
|
928
929
|
sealed: await config.sealed?.(order),
|
|
929
|
-
webhookUrl: config.webhookUrl
|
|
930
|
-
webhookSecret: config.webhookSecret
|
|
930
|
+
webhookUrl: config.webhookUrl
|
|
931
931
|
});
|
|
932
932
|
return {
|
|
933
933
|
id: watched.id,
|
|
@@ -951,6 +951,7 @@ async function invoiceFrom(lnAddresses, amountMsat) {
|
|
|
951
951
|
// Annotate the CommonJS export names for ESM import in node:
|
|
952
952
|
0 && (module.exports = {
|
|
953
953
|
blindLightningRail,
|
|
954
|
+
invoiceFrom,
|
|
954
955
|
lightningVerifyEndpoint,
|
|
955
956
|
lnurlPayEndpoint,
|
|
956
957
|
relayedVerifyUrl
|
package/dist/server.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as ThunderBridge } from './rail-
|
|
2
|
-
export { m as BlindLightningRailConfig, n as blindLightningRail } from './rail-
|
|
1
|
+
import { T as ThunderBridge } from './rail-Dp8bs6uZ.cjs';
|
|
2
|
+
export { m as BlindLightningRailConfig, n as Resolved, o as blindLightningRail, p as invoiceFrom } from './rail-Dp8bs6uZ.cjs';
|
|
3
3
|
|
|
4
4
|
interface TriggerConfig {
|
|
5
5
|
/** The gateway that quotes the addresses and mints the invoice */
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as ThunderBridge } from './rail-
|
|
2
|
-
export { m as BlindLightningRailConfig, n as blindLightningRail } from './rail-
|
|
1
|
+
import { T as ThunderBridge } from './rail-Dp8bs6uZ.js';
|
|
2
|
+
export { m as BlindLightningRailConfig, n as Resolved, o as blindLightningRail, p as invoiceFrom } from './rail-Dp8bs6uZ.js';
|
|
3
3
|
|
|
4
4
|
interface TriggerConfig {
|
|
5
5
|
/** The gateway that quotes the addresses and mints the invoice */
|
package/dist/server.js
CHANGED
|
@@ -887,8 +887,7 @@ function blindLightningRail(config) {
|
|
|
887
887
|
expiresAt: resolved2.expiresAt,
|
|
888
888
|
trigger: config.trigger,
|
|
889
889
|
sealed: await config.sealed?.(order),
|
|
890
|
-
webhookUrl: config.webhookUrl
|
|
891
|
-
webhookSecret: config.webhookSecret
|
|
890
|
+
webhookUrl: config.webhookUrl
|
|
892
891
|
});
|
|
893
892
|
return {
|
|
894
893
|
id: watched.id,
|
|
@@ -911,6 +910,7 @@ async function invoiceFrom(lnAddresses, amountMsat) {
|
|
|
911
910
|
}
|
|
912
911
|
export {
|
|
913
912
|
blindLightningRail,
|
|
913
|
+
invoiceFrom,
|
|
914
914
|
lightningVerifyEndpoint,
|
|
915
915
|
lnurlPayEndpoint,
|
|
916
916
|
relayedVerifyUrl
|
package/openapi.yaml
CHANGED
|
@@ -2,7 +2,7 @@ openapi: 3.1.0
|
|
|
2
2
|
|
|
3
3
|
info:
|
|
4
4
|
title: thunder-bridge, the endpoint your own service serves
|
|
5
|
-
version:
|
|
5
|
+
version: 1.1.0
|
|
6
6
|
license:
|
|
7
7
|
name: MIT
|
|
8
8
|
identifier: MIT
|
|
@@ -207,6 +207,48 @@ paths:
|
|
|
207
207
|
schema:
|
|
208
208
|
$ref: "#/components/schemas/unsettled"
|
|
209
209
|
|
|
210
|
+
post:
|
|
211
|
+
tags: [bank-transfer]
|
|
212
|
+
operationId: answerVerifyChallenge
|
|
213
|
+
summary: Agree to be polled, before the gateway will watch anything pointed here
|
|
214
|
+
description: |
|
|
215
|
+
The gateway will not poll a URL a caller merely named. It POSTs a nonce here first and
|
|
216
|
+
watches nothing unless this endpoint hands the same nonce back, which is how a caller
|
|
217
|
+
shows the endpoint consented to the traffic rather than being volunteered for it. A
|
|
218
|
+
registration whose verify URL will not answer is refused with `verify-unconsented`.
|
|
219
|
+
|
|
220
|
+
Every verify endpoint the SDK builds answers this as its first line, before it parses
|
|
221
|
+
its own query, so `bankVerifyEndpoint`, `lightningVerifyEndpoint` and anything wrapping
|
|
222
|
+
`answerVerifyChallengeRequest` already do it.
|
|
223
|
+
|
|
224
|
+
There is nothing to sign. Echoing a nonce grants the asker nothing, so this holds no
|
|
225
|
+
secret and checks none.
|
|
226
|
+
requestBody:
|
|
227
|
+
required: true
|
|
228
|
+
content:
|
|
229
|
+
application/json:
|
|
230
|
+
schema:
|
|
231
|
+
type: object
|
|
232
|
+
properties:
|
|
233
|
+
type:
|
|
234
|
+
type: string
|
|
235
|
+
enum: [verify-challenge]
|
|
236
|
+
nonce:
|
|
237
|
+
type: string
|
|
238
|
+
pattern: "^[0-9a-f]{64}$"
|
|
239
|
+
required: [type, nonce]
|
|
240
|
+
responses:
|
|
241
|
+
"200":
|
|
242
|
+
description: The same nonce, and nothing else.
|
|
243
|
+
content:
|
|
244
|
+
application/json:
|
|
245
|
+
schema:
|
|
246
|
+
type: object
|
|
247
|
+
properties:
|
|
248
|
+
nonce:
|
|
249
|
+
type: string
|
|
250
|
+
required: [nonce]
|
|
251
|
+
|
|
210
252
|
components:
|
|
211
253
|
schemas:
|
|
212
254
|
settlement:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thunder-bridge",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Trustless JavaScript client for the Thunder Bridge Lightning payment gateway. Proves the invoice came from your own wallet before the payer sees it.",
|
|
5
5
|
"author": "i-am-fatik",
|
|
6
6
|
"homepage": "https://agora.gripe/en/tools/thunder-bridge",
|