Skip to content

Commit

Permalink
[skip ci] Define interface
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgranhao committed Dec 18, 2024
1 parent d1046d4 commit b71db0b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions lib/bindings/src/breez_sdk_liquid.udl
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ dictionary Config {
string? cache_dir;
u64? zero_conf_max_amount_sat;
sequence<ExternalInputParser>? external_input_parsers = null;
u32? onchain_fee_rate_leeway_sat_per_vbyte;
};

enum LiquidNetwork {
Expand Down Expand Up @@ -537,6 +538,20 @@ interface GetPaymentRequest {
Lightning(string payment_hash);
};

dictionary FetchPaymentProposedFeesRequest {
string swap_id;
};

dictionary FetchPaymentProposedFeesResponse {
string swap_id;
u64 fees_sat;
u64 payer_amount_sat;
};

dictionary AcceptPaymentProposedFeesRequest {
FetchPaymentProposedFeesResponse response;
};

[Enum]
interface PaymentDetails {
Lightning(string swap_id, string description, string? preimage, string? bolt11, string? bolt12_offer, string? payment_hash, string? refund_tx_id, u64? refund_tx_amount_sat);
Expand Down Expand Up @@ -569,6 +584,7 @@ enum PaymentState {
"TimedOut",
"Refundable",
"RefundPending",
"WaitingUserAction",
};

dictionary RefundableSwap {
Expand Down Expand Up @@ -615,6 +631,7 @@ interface SdkEvent {
PaymentRefundPending(Payment details);
PaymentSucceeded(Payment details);
PaymentWaitingConfirmation(Payment details);
PaymentWaitingFeeAcceptance(Payment details);
Synced();
};

Expand Down Expand Up @@ -734,6 +751,12 @@ interface BindingLiquidSdk {
[Throws=PaymentError]
Payment? get_payment(GetPaymentRequest req);

[Throws=SdkError]
FetchPaymentProposedFeesResponse fetch_payment_proposed_fees(FetchPaymentProposedFeesRequest req);

[Throws=SdkError]
void accept_payment_proposed_fees(AcceptPaymentProposedFeesRequest req);

[Throws=SdkError]
sequence<RefundableSwap> list_refundables();

Expand Down

0 comments on commit b71db0b

Please sign in to comment.