diff --git a/lnd_methods/invoices/create_invoice.d.ts b/lnd_methods/invoices/create_invoice.d.ts index 1cb1f31..5466497 100644 --- a/lnd_methods/invoices/create_invoice.d.ts +++ b/lnd_methods/invoices/create_invoice.d.ts @@ -13,6 +13,8 @@ export type CreateInvoiceArgs = AuthenticatedLightningArgs<{ description_hash?: string; /** Expires At ISO 8601 Date */ expires_at?: string; + /** Use Blinded Paths For Inbound Routes */ + is_encrypting_routes?: boolean; /** Is Fallback Address Included */ is_fallback_included?: boolean; /** Is Fallback Address Nested */ diff --git a/lnd_methods/offchain/subscribe_to_past_payment.d.ts b/lnd_methods/offchain/subscribe_to_past_payment.d.ts index 2730190..fb252c0 100644 --- a/lnd_methods/offchain/subscribe_to_past_payment.d.ts +++ b/lnd_methods/offchain/subscribe_to_past_payment.d.ts @@ -58,6 +58,8 @@ export type SubscribeToPastPaymentConfirmedEvent = { export type SubscribeToPastPaymentFailedEvent = { /** Payment Hash Hex */ id: string; + /** Payment Canceled */ + is_canceled: boolean; /** Failed Due To Lack of Balance */ is_insufficient_balance: boolean; /** Failed Due to Payment Rejected At Destination */ diff --git a/lnd_methods/offchain/subscribe_to_pay.d.ts b/lnd_methods/offchain/subscribe_to_pay.d.ts index ea39848..bdf689c 100644 --- a/lnd_methods/offchain/subscribe_to_pay.d.ts +++ b/lnd_methods/offchain/subscribe_to_pay.d.ts @@ -140,7 +140,9 @@ export type SubscribeToPayConfirmedEvent = { export type SubscribeToPayFailedEvent = { /** Payment Hash Hex */ id: string; - /** Failed Due To Lack of Balance Bool> */ + /** Payment Canceled */ + is_canceled: boolean; + /** Failed Due To Lack of Balance */ is_insufficient_balance: boolean; /** Failed Due to Invalid Payment Bool> */ is_invalid_payment: boolean; diff --git a/lnd_methods/offchain/subscribe_to_payments.d.ts b/lnd_methods/offchain/subscribe_to_payments.d.ts index 0cc3300..9d01c27 100644 --- a/lnd_methods/offchain/subscribe_to_payments.d.ts +++ b/lnd_methods/offchain/subscribe_to_payments.d.ts @@ -7,10 +7,145 @@ import type {SubscribeToPastPaymentsPaymentEvent} from './subscribe_to_past_paym export type SubscribeToPaymentsArgs = AuthenticatedLightningArgs; -export type SubscribeToPaymentsErrorEvent = LightningError; +/** A confirmed payment event + * @event 'confirmed' + */ +export interface SubscribeToPaymentsConfirmedEvent { + /** Payment Confirmed At ISO 8601 Date String */ + confirmed_at: string; + /** Payment Created At ISO 8601 Date String */ + created_at: string; + /** Payment Destination Hex String */ + destination: string; + /** Total Fee Tokens Paid Rounded Down Number */ + fee: number; + /** Total Fee Millitokens Paid String */ + fee_mtokens: string; + /** Payment Hash Hex String */ + id: string; + /** Total Millitokens Paid String */ + mtokens: string; + /** Payment paths */ + paths?: Array<{ + /** Total Fee Tokens Paid Number */ + fee: number; + /** Total Fee Millitokens Paid String */ + fee_mtokens: string; + /** Hops in the path */ + hops: Array<{ + /** Standard Format Channel Id String */ + channel: string; + /** Channel Capacity Tokens Number */ + channel_capacity: number; + /** Fee Tokens Rounded Down Number */ + fee: number; + /** Fee Millitokens String */ + fee_mtokens: string; + /** Forward Tokens Number */ + forward: number; + /** Forward Millitokens String */ + forward_mtokens: string; + /** Public Key Hex String */ + public_key: string; + /** Timeout Block Height Number */ + timeout: number; + }>; + /** Total Millitokens Paid String */ + mtokens: string; + /** Total Fee Tokens Paid Rounded Up Number */ + safe_fee: number; + /** Total Tokens Paid, Rounded Up Number */ + safe_tokens: number; + /** Expiration Block Height Number */ + timeout: number; + }>; + /** BOLT 11 Encoded Payment Request String */ + request?: string; + /** Total Fee Tokens Paid Rounded Up Number */ + safe_fee: number; + /** Total Tokens Paid, Rounded Up Number */ + safe_tokens: number; + /** Payment Preimage Hex String */ + secret: string; + /** Expiration Block Height Number */ + timeout: number; + /** Total Tokens Paid Rounded Down Number */ + tokens: number; +} + +/** A failed payment event + * @event 'failed' + */ +export interface SubscribeToPaymentsFailedEvent { + /** Payment Hash Hex String */ + id: string; + /** Payment Canceled Bool */ + is_canceled: boolean; + /** Failed Due To Lack of Balance Bool */ + is_insufficient_balance: boolean; + /** Failed Due to Payment Rejected At Destination Bool */ + is_invalid_payment: boolean; + /** Failed Due to Pathfinding Timeout Bool */ + is_pathfinding_timeout: boolean; + /** Failed Due to Absence of Path Through Graph Bool */ + is_route_not_found: boolean; +} -export type SubscribeToPaymentsPaymentEvent = - SubscribeToPastPaymentsPaymentEvent; +/** A paying (in-progress) payment event + * @event 'paying' + */ +export interface SubscribeToPaymentsPayingEvent { + /** Payment Created At ISO 8601 Date String */ + created_at: string; + /** Payment Destination Hex String */ + destination: string; + /** Payment Hash Hex String */ + id: string; + /** Total Millitokens Pending String */ + mtokens: string; + /** Payment paths */ + paths?: Array<{ + /** Total Fee Tokens Pending Number */ + fee: number; + /** Total Fee Millitokens Pending String */ + fee_mtokens: string; + /** Hops in the path */ + hops: Array<{ + /** Standard Format Channel Id String */ + channel: string; + /** Channel Capacity Tokens Number */ + channel_capacity: number; + /** Fee Tokens Rounded Down Number */ + fee: number; + /** Fee Millitokens String */ + fee_mtokens: string; + /** Forward Tokens Number */ + forward: number; + /** Forward Millitokens String */ + forward_mtokens: string; + /** Public Key Hex String */ + public_key: string; + /** Timeout Block Height Number */ + timeout: number; + }>; + /** Total Millitokens Pending String */ + mtokens: string; + /** Total Fee Tokens Pending Rounded Up Number */ + safe_fee: number; + /** Total Tokens Pending, Rounded Up Number */ + safe_tokens: number; + /** Expiration Block Height Number */ + timeout: number; + }>; + /** BOLT 11 Encoded Payment Request String */ + request?: string; + /** Total Tokens Pending, Rounded Up Number */ + safe_tokens: number; + /** Expiration Block Height Number */ + timeout?: number; + /** Total Tokens Pending Rounded Down Number */ + tokens: number; +} /** * Subscribe to outgoing payments