Skip to content

Commit b5b9427

Browse files
Merge pull request #5770 from BitGo/BTC-0-add-pay-invoice-doc
featai(abstract-lightning): add dev docs for pay invoice function
2 parents 1f4cf69 + 8214e9e commit b5b9427

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

modules/abstract-lightning/src/wallet/lightning.ts

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,39 @@ import {
2828
import { LightningPaymentIntent, LightningPaymentRequest } from '@bitgo/public-types';
2929

3030
export type PayInvoiceResponse = {
31+
/**
32+
* Unique identifier for the payment request submitted to BitGo.
33+
*/
3134
txRequestId: string;
35+
36+
/**
37+
* Status of the payment request submission to BitGo.
38+
* - `'delivered'`: Successfully received by BitGo, but may or may not have been sent to the Lightning Network yet.
39+
* - For the actual payment status, refer to `paymentStatus` and track `transfer`.
40+
*/
3241
txRequestState: TxRequestState;
42+
43+
/**
44+
* Pending approval details, if applicable.
45+
* - If present, the payment has not been initiated yet.
46+
*/
3347
pendingApproval?: PendingApprovalData;
34-
// Absent if there's a pending approval
48+
49+
/**
50+
* Current snapshot of payment status (if available).
51+
* - **`'in_flight'`**: Payment is in progress.
52+
* - **`'settled'`**: Payment was successfully completed.
53+
* - **`'failed'`**: Payment failed.
54+
* This field is absent if approval is required before processing.
55+
*/
3556
paymentStatus?: LndCreatePaymentResponse;
57+
58+
/**
59+
* Latest transfer details for this payment request (if available).
60+
* - Provides the current state of the transfer.
61+
* - To track the final payment status, monitor `transfer` asynchronously.
62+
* This field is absent if approval is required before processing.
63+
*/
3664
transfer?: any;
3765
};
3866

0 commit comments

Comments
 (0)