Skip to content

Commit

Permalink
chore: update flutter-rust-bridge to 1.82.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Sep 20, 2023
1 parent d8f5ba5 commit 24368e0
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 23 deletions.
10 changes: 6 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flutter/lib/generated/bridge_definitions.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTO GENERATED FILE, DO NOT EDIT.
// Generated by `flutter_rust_bridge`@ 1.80.1.
// Generated by `flutter_rust_bridge`@ 1.82.1.
// ignore_for_file: non_constant_identifier_names, unused_element, duplicate_ignore, directives_ordering, curly_braces_in_flow_control_structures, unnecessary_lambdas, slash_for_doc_comments, prefer_const_literals_to_create_immutables, implicit_dynamic_list_literal, duplicate_import, unused_import, unnecessary_import, prefer_single_quotes, prefer_const_constructors, use_super_parameters, always_use_package_imports, annotate_overrides, invalid_use_of_protected_member, constant_identifier_names, invalid_use_of_internal_member, prefer_is_empty, unnecessary_const

import 'bridge_generated.io.dart' if (dart.library.html) 'bridge_generated.web.dart';
Expand Down
19 changes: 18 additions & 1 deletion flutter/lib/generated/bridge_generated.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTO GENERATED FILE, DO NOT EDIT.
// Generated by `flutter_rust_bridge`@ 1.80.1.
// Generated by `flutter_rust_bridge`@ 1.82.1.
// ignore_for_file: non_constant_identifier_names, unused_element, duplicate_ignore, directives_ordering, curly_braces_in_flow_control_structures, unnecessary_lambdas, slash_for_doc_comments, prefer_const_literals_to_create_immutables, implicit_dynamic_list_literal, duplicate_import, unused_import, unnecessary_import, prefer_single_quotes, prefer_const_constructors, use_super_parameters, always_use_package_imports, annotate_overrides, invalid_use_of_protected_member, constant_identifier_names, invalid_use_of_internal_member, prefer_is_empty, unnecessary_const

import "bridge_definitions.dart";
Expand All @@ -21,6 +21,7 @@ class NativeImpl implements Native {
return _platform.executeNormal(FlutterRustBridgeTask(
callFfi: (port_) => _platform.inner.wire_init_cashu(port_),
parseSuccessData: _wire2api_String,
parseErrorData: _wire2api_FrbAnyhowException,
constMeta: kInitCashuConstMeta,
argValues: [],
hint: hint,
Expand All @@ -36,6 +37,7 @@ class NativeImpl implements Native {
return _platform.executeStream(FlutterRustBridgeTask(
callFfi: (port_) => _platform.inner.wire_get_cashu_balance(port_),
parseSuccessData: _wire2api_u64,
parseErrorData: null,
constMeta: kGetCashuBalanceConstMeta,
argValues: [],
hint: hint,
Expand All @@ -53,6 +55,7 @@ class NativeImpl implements Native {
return _platform.executeStream(FlutterRustBridgeTask(
callFfi: (port_) => _platform.inner.wire_cashu_mint_tokens(port_, arg0, arg1),
parseSuccessData: _wire2api_u64,
parseErrorData: null,
constMeta: kCashuMintTokensConstMeta,
argValues: [amount, hash],
hint: hint,
Expand All @@ -69,6 +72,7 @@ class NativeImpl implements Native {
return _platform.executeStream(FlutterRustBridgeTask(
callFfi: (port_) => _platform.inner.wire_get_cashu_mint_payment_request(port_, arg0),
parseSuccessData: _wire2api_flutter_payment_request,
parseErrorData: null,
constMeta: kGetCashuMintPaymentRequestConstMeta,
argValues: [amount],
hint: hint,
Expand All @@ -85,6 +89,7 @@ class NativeImpl implements Native {
return _platform.executeSync(FlutterRustBridgeSyncTask(
callFfi: () => _platform.inner.wire_decode_invoice(arg0),
parseSuccessData: _wire2api_flutter_invoice,
parseErrorData: _wire2api_FrbAnyhowException,
constMeta: kDecodeInvoiceConstMeta,
argValues: [invoice],
hint: hint,
Expand All @@ -101,6 +106,7 @@ class NativeImpl implements Native {
return _platform.executeStream(FlutterRustBridgeTask(
callFfi: (port_) => _platform.inner.wire_cashu_pay_invoice(port_, arg0),
parseSuccessData: _wire2api_bool,
parseErrorData: null,
constMeta: kCashuPayInvoiceConstMeta,
argValues: [invoice],
hint: hint,
Expand All @@ -117,6 +123,7 @@ class NativeImpl implements Native {
return _platform.executeNormal(FlutterRustBridgeTask(
callFfi: (port_) => _platform.inner.wire_join_federation(port_, arg0),
parseSuccessData: _wire2api_unit,
parseErrorData: _wire2api_FrbAnyhowException,
constMeta: kJoinFederationConstMeta,
argValues: [federation],
hint: hint,
Expand All @@ -133,6 +140,7 @@ class NativeImpl implements Native {
return _platform.executeStream(FlutterRustBridgeTask(
callFfi: (port_) => _platform.inner.wire_get_fedimint_payment_request(port_, arg0),
parseSuccessData: _wire2api_fedimint_payment_request,
parseErrorData: null,
constMeta: kGetFedimintPaymentRequestConstMeta,
argValues: [amount],
hint: hint,
Expand All @@ -150,6 +158,7 @@ class NativeImpl implements Native {
return _platform.executeStream(FlutterRustBridgeTask(
callFfi: (port_) => _platform.inner.wire_fedimint_mint_tokens(port_, arg0, arg1),
parseSuccessData: _wire2api_u64,
parseErrorData: null,
constMeta: kFedimintMintTokensConstMeta,
argValues: [amount, operationId],
hint: hint,
Expand All @@ -165,6 +174,7 @@ class NativeImpl implements Native {
return _platform.executeStream(FlutterRustBridgeTask(
callFfi: (port_) => _platform.inner.wire_get_fedimint_balance(port_),
parseSuccessData: _wire2api_u64,
parseErrorData: null,
constMeta: kGetFedimintBalanceConstMeta,
argValues: [],
hint: hint,
Expand All @@ -181,6 +191,7 @@ class NativeImpl implements Native {
return _platform.executeStream(FlutterRustBridgeTask(
callFfi: (port_) => _platform.inner.wire_fedimint_pay_invoice(port_, arg0),
parseSuccessData: _wire2api_bool,
parseErrorData: null,
constMeta: kFedimintPayInvoiceConstMeta,
argValues: [invoice],
hint: hint,
Expand All @@ -197,6 +208,7 @@ class NativeImpl implements Native {
return _platform.executeStream(FlutterRustBridgeTask(
callFfi: (port_) => _platform.inner.wire_receive_token(port_, arg0),
parseSuccessData: _wire2api_u64,
parseErrorData: null,
constMeta: kReceiveTokenConstMeta,
argValues: [token],
hint: hint,
Expand All @@ -212,6 +224,7 @@ class NativeImpl implements Native {
return _platform.executeStream(FlutterRustBridgeTask(
callFfi: (port_) => _platform.inner.wire_get_btcprice(port_),
parseSuccessData: _wire2api_f64,
parseErrorData: null,
constMeta: kGetBtcpriceConstMeta,
argValues: [],
hint: hint,
Expand All @@ -228,6 +241,10 @@ class NativeImpl implements Native {
}
// Section: wire2api

FrbAnyhowException _wire2api_FrbAnyhowException(dynamic raw) {
return FrbAnyhowException(raw as String);
}

String _wire2api_String(dynamic raw) {
return raw as String;
}
Expand Down
2 changes: 1 addition & 1 deletion flutter/lib/generated/bridge_generated.io.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTO GENERATED FILE, DO NOT EDIT.
// Generated by `flutter_rust_bridge`@ 1.80.1.
// Generated by `flutter_rust_bridge`@ 1.82.1.
// ignore_for_file: non_constant_identifier_names, unused_element, duplicate_ignore, directives_ordering, curly_braces_in_flow_control_structures, unnecessary_lambdas, slash_for_doc_comments, prefer_const_literals_to_create_immutables, implicit_dynamic_list_literal, duplicate_import, unused_import, unnecessary_import, prefer_single_quotes, prefer_const_constructors, use_super_parameters, always_use_package_imports, annotate_overrides, invalid_use_of_protected_member, constant_identifier_names, invalid_use_of_internal_member, prefer_is_empty, unnecessary_const

import "bridge_definitions.dart";
Expand Down
2 changes: 1 addition & 1 deletion flutter/lib/generated/bridge_generated.web.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTO GENERATED FILE, DO NOT EDIT.
// Generated by `flutter_rust_bridge`@ 1.80.1.
// Generated by `flutter_rust_bridge`@ 1.82.1.
// ignore_for_file: non_constant_identifier_names, unused_element, duplicate_ignore, directives_ordering, curly_braces_in_flow_control_structures, unnecessary_lambdas, slash_for_doc_comments, prefer_const_literals_to_create_immutables, implicit_dynamic_list_literal, duplicate_import, unused_import, unnecessary_import, prefer_single_quotes, prefer_const_constructors, use_super_parameters, always_use_package_imports, annotate_overrides, invalid_use_of_protected_member, constant_identifier_names, invalid_use_of_internal_member, prefer_is_empty, unnecessary_const

import "bridge_definitions.dart";
Expand Down
2 changes: 1 addition & 1 deletion flutter/native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ moksha-fedimint = { path = "../../moksha-fedimint" }
tracing = "0.1.37"
anyhow = { version = "1.0.75", features = ["backtrace"] }
thiserror = "1.0.48"
flutter_rust_bridge = "1.81.0"
flutter_rust_bridge = "1.82.1"
lightning-invoice = "0.24.0"
async-trait = "0.1.72"
url = "2.4.1"
Expand Down
26 changes: 13 additions & 13 deletions flutter/native/src/bridge_generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
clippy::too_many_arguments
)]
// AUTO GENERATED FILE, DO NOT EDIT.
// Generated by `flutter_rust_bridge`@ 1.80.1.
// Generated by `flutter_rust_bridge`@ 1.82.1.

use crate::api::*;
use core::panic::UnwindSafe;
Expand All @@ -23,7 +23,7 @@ use std::sync::Arc;
// Section: wire functions

fn wire_init_cashu_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, String>(
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, String, _>(
WrapInfo {
debug_name: "init_cashu",
port: Some(port_),
Expand All @@ -33,7 +33,7 @@ fn wire_init_cashu_impl(port_: MessagePort) {
)
}
fn wire_get_cashu_balance_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ()>(
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "get_cashu_balance",
port: Some(port_),
Expand All @@ -47,7 +47,7 @@ fn wire_cashu_mint_tokens_impl(
amount: impl Wire2Api<u64> + UnwindSafe,
hash: impl Wire2Api<String> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ()>(
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "cashu_mint_tokens",
port: Some(port_),
Expand All @@ -66,7 +66,7 @@ fn wire_get_cashu_mint_payment_request_impl(
port_: MessagePort,
amount: impl Wire2Api<u64> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ()>(
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "get_cashu_mint_payment_request",
port: Some(port_),
Expand Down Expand Up @@ -99,7 +99,7 @@ fn wire_decode_invoice_impl(
)
}
fn wire_cashu_pay_invoice_impl(port_: MessagePort, invoice: impl Wire2Api<String> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ()>(
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "cashu_pay_invoice",
port: Some(port_),
Expand All @@ -114,7 +114,7 @@ fn wire_cashu_pay_invoice_impl(port_: MessagePort, invoice: impl Wire2Api<String
)
}
fn wire_join_federation_impl(port_: MessagePort, federation: impl Wire2Api<String> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ()>(
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "join_federation",
port: Some(port_),
Expand All @@ -130,7 +130,7 @@ fn wire_get_fedimint_payment_request_impl(
port_: MessagePort,
amount: impl Wire2Api<u64> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ()>(
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "get_fedimint_payment_request",
port: Some(port_),
Expand All @@ -152,7 +152,7 @@ fn wire_fedimint_mint_tokens_impl(
amount: impl Wire2Api<u64> + UnwindSafe,
operation_id: impl Wire2Api<String> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ()>(
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "fedimint_mint_tokens",
port: Some(port_),
Expand All @@ -172,7 +172,7 @@ fn wire_fedimint_mint_tokens_impl(
)
}
fn wire_get_fedimint_balance_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ()>(
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "get_fedimint_balance",
port: Some(port_),
Expand All @@ -182,7 +182,7 @@ fn wire_get_fedimint_balance_impl(port_: MessagePort) {
)
}
fn wire_fedimint_pay_invoice_impl(port_: MessagePort, invoice: impl Wire2Api<String> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ()>(
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "fedimint_pay_invoice",
port: Some(port_),
Expand All @@ -197,7 +197,7 @@ fn wire_fedimint_pay_invoice_impl(port_: MessagePort, invoice: impl Wire2Api<Str
)
}
fn wire_receive_token_impl(port_: MessagePort, token: impl Wire2Api<String> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ()>(
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "receive_token",
port: Some(port_),
Expand All @@ -210,7 +210,7 @@ fn wire_receive_token_impl(port_: MessagePort, token: impl Wire2Api<String> + Un
)
}
fn wire_get_btcprice_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ()>(
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "get_btcprice",
port: Some(port_),
Expand Down
2 changes: 1 addition & 1 deletion flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
ffi: ^2.0.1
flutter_rust_bridge: 1.81.0
flutter_rust_bridge: 1.82.1
meta: ^1.8.0
qr_flutter: ^4.1.0
share_plus: ^7.0.2
Expand Down

0 comments on commit 24368e0

Please sign in to comment.