Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing dart bindings #644

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ typedef struct wire_cst_list_prim_u_8_strict {
int32_t len;
} wire_cst_list_prim_u_8_strict;

typedef struct wire_cst_fetch_payment_proposed_fees_response {
struct wire_cst_list_prim_u_8_strict *swap_id;
uint64_t fees_sat;
uint64_t payer_amount_sat;
uint64_t receiver_amount_sat;
} wire_cst_fetch_payment_proposed_fees_response;

typedef struct wire_cst_accept_payment_proposed_fees_request {
struct wire_cst_fetch_payment_proposed_fees_response response;
} wire_cst_accept_payment_proposed_fees_request;

typedef struct wire_cst_backup_request {
struct wire_cst_list_prim_u_8_strict *backup_path;
} wire_cst_backup_request;
Expand All @@ -65,6 +76,10 @@ typedef struct wire_cst_check_message_request {
struct wire_cst_list_prim_u_8_strict *signature;
} wire_cst_check_message_request;

typedef struct wire_cst_fetch_payment_proposed_fees_request {
struct wire_cst_list_prim_u_8_strict *swap_id;
} wire_cst_fetch_payment_proposed_fees_request;

typedef struct wire_cst_GetPaymentRequest_Lightning {
struct wire_cst_list_prim_u_8_strict *payment_hash;
} wire_cst_GetPaymentRequest_Lightning;
Expand Down Expand Up @@ -1076,6 +1091,10 @@ typedef struct wire_cst_sign_message_response {
struct wire_cst_list_prim_u_8_strict *signature;
} wire_cst_sign_message_response;

void frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_accept_payment_proposed_fees(int64_t port_,
uintptr_t that,
struct wire_cst_accept_payment_proposed_fees_request *req);

void frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_add_event_listener(int64_t port_,
uintptr_t that,
struct wire_cst_list_prim_u_8_strict *listener);
Expand Down Expand Up @@ -1104,6 +1123,10 @@ void frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_fetch_lightning
void frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_fetch_onchain_limits(int64_t port_,
uintptr_t that);

void frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_fetch_payment_proposed_fees(int64_t port_,
uintptr_t that,
struct wire_cst_fetch_payment_proposed_fees_request *req);

void frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_get_info(int64_t port_,
uintptr_t that);

Expand Down Expand Up @@ -1218,6 +1241,8 @@ void frbgen_breez_liquid_rust_arc_increment_strong_count_RustOpaque_flutter_rust

void frbgen_breez_liquid_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingLiquidSdk(const void *ptr);

struct wire_cst_accept_payment_proposed_fees_request *frbgen_breez_liquid_cst_new_box_autoadd_accept_payment_proposed_fees_request(void);

struct wire_cst_aes_success_action_data *frbgen_breez_liquid_cst_new_box_autoadd_aes_success_action_data(void);

struct wire_cst_aes_success_action_data_decrypted *frbgen_breez_liquid_cst_new_box_autoadd_aes_success_action_data_decrypted(void);
Expand All @@ -1242,6 +1267,8 @@ struct wire_cst_connect_request *frbgen_breez_liquid_cst_new_box_autoadd_connect

double *frbgen_breez_liquid_cst_new_box_autoadd_f_64(double value);

struct wire_cst_fetch_payment_proposed_fees_request *frbgen_breez_liquid_cst_new_box_autoadd_fetch_payment_proposed_fees_request(void);

struct wire_cst_get_payment_request *frbgen_breez_liquid_cst_new_box_autoadd_get_payment_request(void);

int64_t *frbgen_breez_liquid_cst_new_box_autoadd_i_64(int64_t value);
Expand Down Expand Up @@ -1349,6 +1376,7 @@ struct wire_cst_list_route_hint *frbgen_breez_liquid_cst_new_list_route_hint(int
struct wire_cst_list_route_hint_hop *frbgen_breez_liquid_cst_new_list_route_hint_hop(int32_t len);
static int64_t dummy_method_to_enforce_bundling(void) {
int64_t dummy_var = 0;
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_cst_new_box_autoadd_accept_payment_proposed_fees_request);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_cst_new_box_autoadd_aes_success_action_data);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_cst_new_box_autoadd_aes_success_action_data_decrypted);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_cst_new_box_autoadd_aes_success_action_data_result);
Expand All @@ -1361,6 +1389,7 @@ static int64_t dummy_method_to_enforce_bundling(void) {
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_cst_new_box_autoadd_check_message_request);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_cst_new_box_autoadd_connect_request);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_cst_new_box_autoadd_f_64);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_cst_new_box_autoadd_fetch_payment_proposed_fees_request);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_cst_new_box_autoadd_get_payment_request);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_cst_new_box_autoadd_i_64);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_cst_new_box_autoadd_liquid_address_data);
Expand Down Expand Up @@ -1416,6 +1445,7 @@ static int64_t dummy_method_to_enforce_bundling(void) {
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_cst_new_list_route_hint_hop);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingLiquidSdk);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingLiquidSdk);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_accept_payment_proposed_fees);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_add_event_listener);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_backup);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_buy_bitcoin);
Expand All @@ -1425,6 +1455,7 @@ static int64_t dummy_method_to_enforce_bundling(void) {
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_fetch_fiat_rates);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_fetch_lightning_limits);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_fetch_onchain_limits);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_fetch_payment_proposed_fees);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_get_info);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_get_payment);
dummy_var ^= ((int64_t) (void*) frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_list_fiat_currencies);
Expand Down
14 changes: 14 additions & 0 deletions lib/core/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,20 @@ impl BindingLiquidSdk {
self.sdk.get_payment(&req).await
}

pub async fn fetch_payment_proposed_fees(
&self,
req: FetchPaymentProposedFeesRequest,
) -> Result<FetchPaymentProposedFeesResponse, SdkError> {
self.sdk.fetch_payment_proposed_fees(&req).await
}

pub async fn accept_payment_proposed_fees(
&self,
req: AcceptPaymentProposedFeesRequest,
) -> Result<(), PaymentError> {
self.sdk.accept_payment_proposed_fees(&req).await
}

pub async fn prepare_lnurl_pay(
&self,
req: PrepareLnUrlPayRequest,
Expand Down
Loading
Loading