@moneydevkit/lightning-js 0.1.69 → 0.1.72
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/index.d.ts +15 -2
- package/package.json +14 -14
package/index.d.ts
CHANGED
|
@@ -35,6 +35,18 @@ export interface ReceivedPayment {
|
|
|
35
35
|
paymentHash: string
|
|
36
36
|
amount: number
|
|
37
37
|
}
|
|
38
|
+
/** Result of a successful outbound payment. */
|
|
39
|
+
export interface PaymentResult {
|
|
40
|
+
/** Opaque payment identifier. Always present - can be used to correlate async BOLT12 payments. */
|
|
41
|
+
paymentId: string
|
|
42
|
+
/**
|
|
43
|
+
* The payment hash from the invoice/offer (identifies the HTLC).
|
|
44
|
+
* Available immediately for BOLT11; populated from the PaymentSuccessful event for BOLT12.
|
|
45
|
+
*/
|
|
46
|
+
paymentHash?: string
|
|
47
|
+
/** The payment preimage (proof of payment). Available after the payment succeeds. */
|
|
48
|
+
preimage?: string
|
|
49
|
+
}
|
|
38
50
|
export interface PaymentEvent {
|
|
39
51
|
eventType: PaymentEventType
|
|
40
52
|
paymentHash: string
|
|
@@ -92,6 +104,7 @@ export declare class MdkNode {
|
|
|
92
104
|
* snapshot will be updated from the last known sync point.
|
|
93
105
|
*/
|
|
94
106
|
syncRgs(doFullSync: boolean): number
|
|
107
|
+
updateChainTip(): void
|
|
95
108
|
receivePayment(minThresholdMs: number, quietThresholdMs: number): Array<ReceivedPayment>
|
|
96
109
|
getInvoice(amount: number, description: string, expirySecs: number): PaymentMetadata
|
|
97
110
|
/**
|
|
@@ -147,7 +160,7 @@ export declare class MdkNode {
|
|
|
147
160
|
destination: string,
|
|
148
161
|
amountMsat?: number | undefined | null,
|
|
149
162
|
waitForPaymentSecs?: number | undefined | null,
|
|
150
|
-
):
|
|
163
|
+
): PaymentResult
|
|
151
164
|
/**
|
|
152
165
|
* Unified payment method that auto-detects the destination type.
|
|
153
166
|
* Use this when the node is already running via start_receiving().
|
|
@@ -165,5 +178,5 @@ export declare class MdkNode {
|
|
|
165
178
|
destination: string,
|
|
166
179
|
amountMsat?: number | undefined | null,
|
|
167
180
|
waitForPaymentSecs?: number | undefined | null,
|
|
168
|
-
):
|
|
181
|
+
): PaymentResult
|
|
169
182
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneydevkit/lightning-js",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.72",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"index.d.ts",
|
|
@@ -80,18 +80,18 @@
|
|
|
80
80
|
"packageManager": "yarn@4.9.1",
|
|
81
81
|
"repository": "https://github.com/moneydevkit/lightning-js",
|
|
82
82
|
"optionalDependencies": {
|
|
83
|
-
"@moneydevkit/lightning-js-win32-x64-msvc": "0.1.
|
|
84
|
-
"@moneydevkit/lightning-js-darwin-x64": "0.1.
|
|
85
|
-
"@moneydevkit/lightning-js-linux-x64-gnu": "0.1.
|
|
86
|
-
"@moneydevkit/lightning-js-linux-x64-musl": "0.1.
|
|
87
|
-
"@moneydevkit/lightning-js-linux-arm64-gnu": "0.1.
|
|
88
|
-
"@moneydevkit/lightning-js-win32-ia32-msvc": "0.1.
|
|
89
|
-
"@moneydevkit/lightning-js-linux-arm-gnueabihf": "0.1.
|
|
90
|
-
"@moneydevkit/lightning-js-darwin-arm64": "0.1.
|
|
91
|
-
"@moneydevkit/lightning-js-android-arm64": "0.1.
|
|
92
|
-
"@moneydevkit/lightning-js-freebsd-x64": "0.1.
|
|
93
|
-
"@moneydevkit/lightning-js-linux-arm64-musl": "0.1.
|
|
94
|
-
"@moneydevkit/lightning-js-win32-arm64-msvc": "0.1.
|
|
95
|
-
"@moneydevkit/lightning-js-android-arm-eabi": "0.1.
|
|
83
|
+
"@moneydevkit/lightning-js-win32-x64-msvc": "0.1.72",
|
|
84
|
+
"@moneydevkit/lightning-js-darwin-x64": "0.1.72",
|
|
85
|
+
"@moneydevkit/lightning-js-linux-x64-gnu": "0.1.72",
|
|
86
|
+
"@moneydevkit/lightning-js-linux-x64-musl": "0.1.72",
|
|
87
|
+
"@moneydevkit/lightning-js-linux-arm64-gnu": "0.1.72",
|
|
88
|
+
"@moneydevkit/lightning-js-win32-ia32-msvc": "0.1.72",
|
|
89
|
+
"@moneydevkit/lightning-js-linux-arm-gnueabihf": "0.1.72",
|
|
90
|
+
"@moneydevkit/lightning-js-darwin-arm64": "0.1.72",
|
|
91
|
+
"@moneydevkit/lightning-js-android-arm64": "0.1.72",
|
|
92
|
+
"@moneydevkit/lightning-js-freebsd-x64": "0.1.72",
|
|
93
|
+
"@moneydevkit/lightning-js-linux-arm64-musl": "0.1.72",
|
|
94
|
+
"@moneydevkit/lightning-js-win32-arm64-msvc": "0.1.72",
|
|
95
|
+
"@moneydevkit/lightning-js-android-arm-eabi": "0.1.72"
|
|
96
96
|
}
|
|
97
97
|
}
|