mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2025-12-23 08:54:22 +01:00
Add support for paying to BOLT12 (#549)
Add support for paying to BOLT12
This commit is contained in:
@@ -617,10 +617,11 @@ sealed class PaymentDetails with _$PaymentDetails {
|
||||
/// In case of a Send swap, this is the preimage of the paid invoice (proof of payment).
|
||||
String? preimage,
|
||||
|
||||
/// Represents the invoice associated with a payment
|
||||
/// Represents the Bolt11 invoice associated with a payment
|
||||
/// In the case of a Send payment, this is the invoice paid by the swapper
|
||||
/// In the case of a Receive payment, this is the invoice paid by the user
|
||||
String? bolt11,
|
||||
String? bolt12Offer,
|
||||
|
||||
/// The payment hash of the invoice
|
||||
String? paymentHash,
|
||||
@@ -1007,7 +1008,7 @@ class PrepareRefundResponse {
|
||||
/// An argument when calling [crate::sdk::LiquidSdk::prepare_send_payment].
|
||||
class PrepareSendRequest {
|
||||
/// The destination we intend to pay to.
|
||||
/// Supports BIP21 URIs, BOLT11 invoices and Liquid addresses
|
||||
/// Supports BIP21 URIs, BOLT11 invoices, BOLT12 offers and Liquid addresses
|
||||
final String destination;
|
||||
|
||||
/// Should only be set when paying directly onchain or to a BIP21 URI
|
||||
@@ -1263,6 +1264,10 @@ sealed class SendDestination with _$SendDestination {
|
||||
const factory SendDestination.bolt11({
|
||||
required LNInvoice invoice,
|
||||
}) = SendDestination_Bolt11;
|
||||
const factory SendDestination.bolt12({
|
||||
required LNOffer offer,
|
||||
required BigInt receiverAmountSat,
|
||||
}) = SendDestination_Bolt12;
|
||||
}
|
||||
|
||||
/// An argument when calling [crate::sdk::LiquidSdk::send_payment].
|
||||
|
||||
Reference in New Issue
Block a user