Skip to content

Commit 01fc52f

Browse files
committed
docs(express): lightning wallet payment v2
Ticket: WP-7003
1 parent befb86e commit 01fc52f

1 file changed

Lines changed: 13 additions & 22 deletions

File tree

modules/express/src/typedRoutes/api/v2/lightningPayment.ts

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,29 @@ import { BitgoExpressError } from '../../schemas/error';
77
* Path parameters for lightning payment API
88
*/
99
export const LightningPaymentParams = {
10-
/** The coin identifier (e.g., 'tlnbtc', 'lnbtc') */
10+
/** A lightning coin name. */
1111
coin: t.string,
12-
/** The wallet ID */
12+
/** The wallet ID. */
1313
id: t.string,
1414
} as const;
1515

1616
/**
1717
* Request body for paying a lightning invoice
1818
*/
1919
export const LightningPaymentRequestBody = {
20-
/** The BOLT #11 encoded lightning invoice to pay */
20+
/** The BOLT 11 invoice to pay */
2121
invoice: t.string,
22-
/** The wallet passphrase to decrypt signing keys */
22+
/** The wallet passphrase */
2323
passphrase: t.string,
24-
/** Amount to pay in millisatoshis (required for zero-amount invoices) */
24+
/** The amount to pay in millisatoshis. This is required if you're paying a zero value invoice. */
2525
amountMsat: optional(BigIntFromString),
26-
/** Maximum fee limit in millisatoshis */
26+
/** Optional maximum fee to pay in millisatoshis */
2727
feeLimitMsat: optional(BigIntFromString),
28-
/** Fee limit as a ratio of payment amount (e.g., 0.01 for 1%) */
28+
/** Optional maximum fee expressed as a ratio of the payment amount */
2929
feeLimitRatio: optional(t.number),
30-
/** Custom sequence ID for tracking this payment */
30+
/** Optional sequence ID for the payment transfer */
3131
sequenceId: optional(t.string),
32-
/** Comment or memo for this payment (not sent to recipient) */
32+
/** Optional comment for the payment transfer */
3333
comment: optional(t.string),
3434
} as const;
3535

@@ -191,9 +191,9 @@ const PendingApproval = t.intersection([
191191
*/
192192
export const LightningPaymentResponse = t.intersection([
193193
t.type({
194-
/** Payment request ID for tracking */
194+
/** Transaction request identifier */
195195
txRequestId: t.string,
196-
/** Status of the payment request ('delivered', 'pendingApproval', etc.) */
196+
/** Status of the txRequestState ('delivered', 'pendingApproval', etc.) */
197197
txRequestState: TxRequestState,
198198
}),
199199
t.partial({
@@ -215,20 +215,11 @@ export const LightningPaymentResponseObj = {
215215
} as const;
216216

217217
/**
218-
* Pay a Lightning Invoice
218+
* Pay a Lightning Network invoice from the given wallet.
219219
*
220-
* Submits a payment for a BOLT #11 lightning invoice. The payment is signed with the user's
221-
* authentication key and submitted to BitGo. If the payment requires additional approvals
222-
* (based on wallet policy), returns pending approval details. Otherwise, the payment is
223-
* immediately submitted to the Lightning Network.
224-
*
225-
* Fee limits can be controlled using either `feeLimitMsat` (absolute limit) or `feeLimitRatio`
226-
* (as a ratio of payment amount). If both are provided, the more restrictive limit applies.
227-
*
228-
* For zero-amount invoices (invoices without a specified amount), the `amountMsat` field is required.
229220
*
230221
* @operationId express.v2.wallet.lightningPayment
231-
* @tag express
222+
* @tag Express
232223
*/
233224
export const PostLightningWalletPayment = httpRoute({
234225
path: '/api/v2/{coin}/wallet/{id}/lightning/payment',

0 commit comments

Comments
 (0)