diff --git a/example/pubspec.lock b/example/pubspec.lock index 003426b..ef5fdc5 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -37,8 +37,8 @@ packages: dependency: "direct main" description: path: "." - ref: "0.31.2" - resolved-ref: "1944db1e3cf8c8e909fb8d22079a1caaec512ab2" + ref: main + resolved-ref: "8a9bd981078eaa8692fc2bed869810acc9918a2c" url: "https://github.com/LtbLightning/bdk-flutter" source: git version: "0.31.2" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index d76f5b0..77cf38a 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -2,7 +2,7 @@ name: payjoin_flutter_example description: "Demonstrates how to use the payjoin plugin." # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +publish_to: "none" # Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.2.3 <4.0.0' + sdk: ">=3.2.3 <4.0.0" # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -45,8 +45,7 @@ dependencies: bdk_flutter: git: url: https://github.com/LtbLightning/bdk-flutter - ref: 0.31.2 - + ref: main google_fonts: ^6.2.1 @@ -60,4 +59,4 @@ dev_dependencies: flutter_lints: ^2.0.0 flutter: - uses-material-design: true \ No newline at end of file + uses-material-design: true diff --git a/ios/Classes/frb_generated.h b/ios/Classes/frb_generated.h index ffd8533..14a4248 100644 --- a/ios/Classes/frb_generated.h +++ b/ios/Classes/frb_generated.h @@ -18,15 +18,15 @@ typedef struct wire_cst_ffi_url { uintptr_t field0; } wire_cst_ffi_url; +typedef struct wire_cst_ffi_active_session { + uintptr_t field0; +} wire_cst_ffi_active_session; + typedef struct wire_cst_list_prim_u_8_loose { uint8_t *ptr; int32_t len; } wire_cst_list_prim_u_8_loose; -typedef struct wire_cst_ffi_active_session { - uintptr_t field0; -} wire_cst_ffi_active_session; - typedef struct wire_cst_ffi_client_response { uintptr_t field0; } wire_cst_ffi_client_response; @@ -292,8 +292,7 @@ typedef struct wire_cst_request_context_v_2 { void frbgen_payjoin_flutter_wire__crate__api__io__fetch_ohttp_keys(int64_t port_, struct wire_cst_ffi_url *ohttp_relay, - struct wire_cst_ffi_url *payjoin_directory, - struct wire_cst_list_prim_u_8_loose *cert_der); + struct wire_cst_ffi_url *payjoin_directory); void frbgen_payjoin_flutter_wire__crate__api__receive__ffi_active_session_extract_req(int64_t port_, struct wire_cst_ffi_active_session *ptr); diff --git a/lib/receive/v2.dart b/lib/receive/v2.dart index 032eb38..d550acf 100644 --- a/lib/receive/v2.dart +++ b/lib/receive/v2.dart @@ -46,7 +46,7 @@ class SessionInitializer extends FfiSessionInitializer { try { final res = await FfiSessionInitializer.extractReq(ptr: this); final request = - Request(await Url.fromString(res.$1.$1.query()!), res.$1.$2); + Request(await Url.fromString(res.$1.$1.asString()), res.$1.$2); return (request, ClientResponse._(field0: res.$2.field0)); } on error.PayjoinError catch (e) { throw mapPayjoinError(e); @@ -60,7 +60,7 @@ class ActiveSession extends FfiActiveSession { try { final res = await FfiActiveSession.extractReq(ptr: this); final request = - Request(await Url.fromString(res.$1.$1.query()!), res.$1.$2); + Request(await Url.fromString(res.$1.$1.asString()), res.$1.$2); return (request, ClientResponse._(field0: res.$2.field0)); } on error.PayjoinError catch (e) { throw mapPayjoinError(e); diff --git a/lib/src/generated/api/io.dart b/lib/src/generated/api/io.dart index d9a6de8..ab0c57d 100644 --- a/lib/src/generated/api/io.dart +++ b/lib/src/generated/api/io.dart @@ -21,10 +21,6 @@ import 'uri.dart'; /// * `cert_der` (optional): The DER-encoded certificate to use for local HTTPS connections. This /// parameter is only available when the "danger-local-https" feature is enabled. Future fetchOhttpKeys( - {required FfiUrl ohttpRelay, - required FfiUrl payjoinDirectory, - required List certDer}) => + {required FfiUrl ohttpRelay, required FfiUrl payjoinDirectory}) => core.instance.api.crateApiIoFetchOhttpKeys( - ohttpRelay: ohttpRelay, - payjoinDirectory: payjoinDirectory, - certDer: certDer); + ohttpRelay: ohttpRelay, payjoinDirectory: payjoinDirectory); diff --git a/lib/src/generated/frb_generated.dart b/lib/src/generated/frb_generated.dart index 0ce72f7..7a50e1e 100644 --- a/lib/src/generated/frb_generated.dart +++ b/lib/src/generated/frb_generated.dart @@ -73,9 +73,7 @@ class core extends BaseEntrypoint { abstract class coreApi extends BaseApi { Future crateApiIoFetchOhttpKeys( - {required FfiUrl ohttpRelay, - required FfiUrl payjoinDirectory, - required List certDer}); + {required FfiUrl ohttpRelay, required FfiUrl payjoinDirectory}); Future<((FfiUrl, Uint8List), FfiClientResponse)> crateApiReceiveFfiActiveSessionExtractReq( @@ -580,30 +578,26 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { @override Future crateApiIoFetchOhttpKeys( - {required FfiUrl ohttpRelay, - required FfiUrl payjoinDirectory, - required List certDer}) { + {required FfiUrl ohttpRelay, required FfiUrl payjoinDirectory}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_ffi_url(ohttpRelay); var arg1 = cst_encode_box_autoadd_ffi_url(payjoinDirectory); - var arg2 = cst_encode_list_prim_u_8_loose(certDer); - return wire.wire__crate__api__io__fetch_ohttp_keys( - port_, arg0, arg1, arg2); + return wire.wire__crate__api__io__fetch_ohttp_keys(port_, arg0, arg1); }, codec: DcoCodec( decodeSuccessData: dco_decode_ffi_ohttp_keys, decodeErrorData: dco_decode_payjoin_error, ), constMeta: kCrateApiIoFetchOhttpKeysConstMeta, - argValues: [ohttpRelay, payjoinDirectory, certDer], + argValues: [ohttpRelay, payjoinDirectory], apiImpl: this, )); } TaskConstMeta get kCrateApiIoFetchOhttpKeysConstMeta => const TaskConstMeta( debugName: "fetch_ohttp_keys", - argNames: ["ohttpRelay", "payjoinDirectory", "certDer"], + argNames: ["ohttpRelay", "payjoinDirectory"], ); @override diff --git a/lib/src/generated/frb_generated.io.dart b/lib/src/generated/frb_generated.io.dart index 853e2bf..08b0ecd 100644 --- a/lib/src/generated/frb_generated.io.dart +++ b/lib/src/generated/frb_generated.io.dart @@ -2638,31 +2638,23 @@ class coreWire implements BaseWire { int port_, ffi.Pointer ohttp_relay, ffi.Pointer payjoin_directory, - ffi.Pointer cert_der, ) { return _wire__crate__api__io__fetch_ohttp_keys( port_, ohttp_relay, payjoin_directory, - cert_der, ); } late final _wire__crate__api__io__fetch_ohttp_keysPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( 'frbgen_payjoin_flutter_wire__crate__api__io__fetch_ohttp_keys'); late final _wire__crate__api__io__fetch_ohttp_keys = _wire__crate__api__io__fetch_ohttp_keysPtr.asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function(int, ffi.Pointer, + ffi.Pointer)>(); void wire__crate__api__receive__ffi_active_session_extract_req( int port_, @@ -5735,6 +5727,11 @@ final class wire_cst_ffi_url extends ffi.Struct { external int field0; } +final class wire_cst_ffi_active_session extends ffi.Struct { + @ffi.UintPtr() + external int field0; +} + final class wire_cst_list_prim_u_8_loose extends ffi.Struct { external ffi.Pointer ptr; @@ -5742,11 +5739,6 @@ final class wire_cst_list_prim_u_8_loose extends ffi.Struct { external int len; } -final class wire_cst_ffi_active_session extends ffi.Struct { - @ffi.UintPtr() - external int field0; -} - final class wire_cst_ffi_client_response extends ffi.Struct { @ffi.UintPtr() external int field0; diff --git a/lib/uri.dart b/lib/uri.dart index ea19416..7800619 100644 --- a/lib/uri.dart +++ b/lib/uri.dart @@ -158,15 +158,15 @@ class OhttpKeys extends FfiOhttpKeys { /// /// * `certDer` (optional): The DER-encoded certificate to use for local HTTPS connections. This /// parameter is only available when the "danger-local-https" feature is enabled. -Future fetchOhttpKeys( - {required Url ohttpRelay, - required Url payjoinDirectory, - required List certDer}) async { +Future fetchOhttpKeys({ + required Url ohttpRelay, + required Url payjoinDirectory, +}) async { try { final res = await io.fetchOhttpKeys( - ohttpRelay: ohttpRelay, - payjoinDirectory: payjoinDirectory, - certDer: certDer); + ohttpRelay: ohttpRelay, + payjoinDirectory: payjoinDirectory, + ); return OhttpKeys._(field0: res.field0); } on error.PayjoinError catch (e) { throw mapPayjoinError(e); diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 761c621..2fd9b4f 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1773,8 +1773,8 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "payjoin" -version = "0.18.0" -source = "git+https://github.com/LtbLightning/rust-payjoin?branch=clone-pj-uri-builder#3b5bda95fc8ce63f506538f0ff9daed885810488" +version = "0.19.0" +source = "git+https://github.com/payjoin/rust-payjoin?rev=941a6798f52f60d72061fc0a02b5b42146321453#941a6798f52f60d72061fc0a02b5b42146321453" dependencies = [ "bhttp", "bip21", @@ -1793,7 +1793,7 @@ dependencies = [ [[package]] name = "payjoin_ffi" version = "0.18.0" -source = "git+https://github.com/LtbLightning/payjoin-ffi?branch=v0.18.0#610aed9239c6e1e28cc56118e9b94b5000ae6052" +source = "git+https://github.com/LtbLightning/payjoin-ffi?branch=main#f5d26ac3ff1a857ecdd36aecb8747b5d6124aede" dependencies = [ "base64 0.22.1", "hex", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 6fef0b1..d75e5bd 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -7,12 +7,16 @@ edition = "2021" crate-type = ["cdylib", "staticlib"] [dev-dependencies] -bdk = { version = "0.29.0", features = ["all-keys", "use-esplora-ureq", "keys-bip39"] } +bdk = { version = "0.29.0", features = [ + "all-keys", + "use-esplora-ureq", + "keys-bip39", +] } bitcoincore-rpc = "0.19.0" anyhow = "1.0.68" [dependencies] ohttp = { version = "0.5.1" } -payjoin_ffi = {git = "https://github.com/LtbLightning/payjoin-ffi", branch="v0.18.0"} +payjoin_ffi = { git = "https://github.com/LtbLightning/payjoin-ffi", branch = "main" } flutter_rust_bridge = "=2.0.0" anyhow = "1.0.68" tokio = "1.36.0" @@ -24,3 +28,6 @@ opt-level = "z" lto = true codegen-units = 1 panic = "abort" + +[features] +danger-local-https = ["payjoin_ffi/enable-danger-local-https"] diff --git a/rust/src/api/io.rs b/rust/src/api/io.rs index 5461c5d..dc9a738 100644 --- a/rust/src/api/io.rs +++ b/rust/src/api/io.rs @@ -15,14 +15,16 @@ use crate::utils::error::PayjoinError; pub async fn fetch_ohttp_keys( ohttp_relay: FfiUrl, payjoin_directory: FfiUrl, - cert_der: Vec, + #[cfg(feature = "danger-local-https")] cert_der: Vec, ) -> Result { - payjoin_ffi::io::fetch_ohttp_keys( + #[cfg(not(feature = "danger-local-https"))] + let res = + payjoin_ffi::io::fetch_ohttp_keys((*ohttp_relay.0).clone(), (*payjoin_directory.0).clone()); + #[cfg(feature = "danger-local-https")] + let res = payjoin_ffi::io::fetch_ohttp_keys( (*ohttp_relay.0).clone(), (*payjoin_directory.0).clone(), cert_der, - ) - .await - .map(|e| e.into()) - .map_err(|e| e.into()) + ); + res.await.map(|e| e.into()).map_err(|e| e.into()) } diff --git a/rust/src/api/uri.rs b/rust/src/api/uri.rs index b6ed300..c91ce4a 100644 --- a/rust/src/api/uri.rs +++ b/rust/src/api/uri.rs @@ -177,12 +177,13 @@ mod tests { let bech32_upper = "TB1Q6D3A2W975YNY0ASUVD9A67NER4NKS58FF0Q8G4"; let bech32_lower = "tb1q6d3a2w975yny0asuvd9a67ner4nks58ff0q8g4"; - for address in vec![base58, bech32_upper, bech32_lower] { - for pj in vec![https, onion] { - let builder = FfiPjUriBuilder::new( + for address in [base58, bech32_upper, bech32_lower] { + for pj in [https, onion] { + let builder = FfiPjUriBuilder::create( address.to_string(), FfiUrl::from_str(pj.to_string()).unwrap(), None, + None, ) .unwrap(); let uri = builder @@ -193,6 +194,18 @@ mod tests { .build(); // assert_eq!(uri.amount(), Some(bitcoin::Amount::ONE_BTC.to_btc())); print!("\n {}", uri.as_string()); + let expected_address = if address == base58 { + base58 + } else { + bech32_lower + }; + assert_eq!( + uri.as_string(), + format!( + "bitcoin:{}?amount=0.00000001&label=label&message=message&pj={}&pjos=1", + expected_address, pj + ), + ); } } } diff --git a/rust/src/frb_generated.io.rs b/rust/src/frb_generated.io.rs index b6d026a..147cc7c 100644 --- a/rust/src/frb_generated.io.rs +++ b/rust/src/frb_generated.io.rs @@ -1321,9 +1321,8 @@ pub extern "C" fn frbgen_payjoin_flutter_wire__crate__api__io__fetch_ohttp_keys( port_: i64, ohttp_relay: *mut wire_cst_ffi_url, payjoin_directory: *mut wire_cst_ffi_url, - cert_der: *mut wire_cst_list_prim_u_8_loose, ) { - wire__crate__api__io__fetch_ohttp_keys_impl(port_, ohttp_relay, payjoin_directory, cert_der) + wire__crate__api__io__fetch_ohttp_keys_impl(port_, ohttp_relay, payjoin_directory) } #[no_mangle] diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs index fb2ab99..4763197 100644 --- a/rust/src/frb_generated.rs +++ b/rust/src/frb_generated.rs @@ -50,7 +50,6 @@ fn wire__crate__api__io__fetch_ohttp_keys_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ohttp_relay: impl CstDecode, payjoin_directory: impl CstDecode, - cert_der: impl CstDecode>, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::( flutter_rust_bridge::for_generated::TaskInfo { @@ -61,14 +60,12 @@ fn wire__crate__api__io__fetch_ohttp_keys_impl( move || { let api_ohttp_relay = ohttp_relay.cst_decode(); let api_payjoin_directory = payjoin_directory.cst_decode(); - let api_cert_der = cert_der.cst_decode(); move |context| async move { transform_result_dco::<_, _, crate::utils::error::PayjoinError>( (move || async move { let output_ok = crate::api::io::fetch_ohttp_keys( api_ohttp_relay, api_payjoin_directory, - api_cert_der, ) .await?; Ok(output_ok) diff --git a/rust/src/frb_generated.web.rs b/rust/src/frb_generated.web.rs deleted file mode 100644 index 308f68c..0000000 --- a/rust/src/frb_generated.web.rs +++ /dev/null @@ -1,2088 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. - -// Section: imports - -use super::*; -use crate::api::receive::*; -use crate::api::send::*; -use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; -use flutter_rust_bridge::for_generated::transform_result_dco; -use flutter_rust_bridge::for_generated::wasm_bindgen; -use flutter_rust_bridge::for_generated::wasm_bindgen::prelude::*; -use flutter_rust_bridge::{Handler, IntoIntoDart}; - -// Section: boilerplate - -flutter_rust_bridge::frb_generated_boilerplate_web!(); - -// Section: dart2rust - -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> flutter_rust_bridge::DartOpaque { - unsafe { flutter_rust_bridge::for_generated::cst_decode_dart_opaque(self as _) } - } -} -impl CstDecode for String { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> String { - self - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::ClientResponse { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::ClientResponse(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::send::ContextV1 { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::send::ContextV1(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::send::ContextV2 { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::send::ContextV2(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::Enrolled { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::Enrolled(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::Enroller { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::Enroller(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::utils::types::Headers { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::utils::types::Headers { - map: self_.get(0).cst_decode(), - } - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - self.dyn_into::() - .unwrap() - .iter() - .map(CstDecode::cst_decode) - .collect() - } -} -impl CstDecode> for Box<[u64]> { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - self.into_vec() - } -} -impl CstDecode> for Box<[u8]> { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - self.into_vec() - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec<(String, String)> { - self.dyn_into::() - .unwrap() - .iter() - .map(CstDecode::cst_decode) - .collect() - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec<(u64, crate::utils::types::OutPoint)> { - self.dyn_into::() - .unwrap() - .iter() - .map(CstDecode::cst_decode) - .collect() - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::MaybeInputsOwned { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::MaybeInputsOwned(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::MaybeInputsSeen { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::MaybeInputsSeen(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::MaybeMixedInputScripts { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::MaybeMixedInputScripts(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::uri::OhttpKeys { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::uri::OhttpKeys(self_.get(0).cst_decode()) - } -} -impl CstDecode> for Option { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Option { - self.map(CstDecode::cst_decode) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::utils::types::OutPoint { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - crate::utils::types::OutPoint { - txid: self_.get(0).cst_decode(), - vout: self_.get(1).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::OutputsUnknown { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::OutputsUnknown(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::utils::error::PayjoinError { - let self_ = self.unchecked_into::(); - match self_.get(0).unchecked_into_f64() as _ { - 0 => crate::utils::error::PayjoinError::InvalidAddress { - message: self_.get(1).cst_decode(), - }, - 1 => crate::utils::error::PayjoinError::InvalidScript { - message: self_.get(1).cst_decode(), - }, - 2 => crate::utils::error::PayjoinError::NetworkValidation { - message: self_.get(1).cst_decode(), - }, - 3 => crate::utils::error::PayjoinError::PsbtParseError { - message: self_.get(1).cst_decode(), - }, - 4 => crate::utils::error::PayjoinError::ResponseError { - message: self_.get(1).cst_decode(), - }, - 5 => crate::utils::error::PayjoinError::RequestError { - message: self_.get(1).cst_decode(), - }, - 6 => crate::utils::error::PayjoinError::TransactionError { - message: self_.get(1).cst_decode(), - }, - 7 => crate::utils::error::PayjoinError::ServerError { - message: self_.get(1).cst_decode(), - }, - 8 => crate::utils::error::PayjoinError::SelectionError { - message: self_.get(1).cst_decode(), - }, - 9 => crate::utils::error::PayjoinError::CreateRequestError { - message: self_.get(1).cst_decode(), - }, - 10 => crate::utils::error::PayjoinError::PjParseError { - message: self_.get(1).cst_decode(), - }, - 11 => crate::utils::error::PayjoinError::PjNotSupported { - message: self_.get(1).cst_decode(), - }, - 12 => crate::utils::error::PayjoinError::ValidationError { - message: self_.get(1).cst_decode(), - }, - 13 => crate::utils::error::PayjoinError::V2Error { - message: self_.get(1).cst_decode(), - }, - 14 => crate::utils::error::PayjoinError::UnexpectedError { - message: self_.get(1).cst_decode(), - }, - 15 => crate::utils::error::PayjoinError::OhttpError { - message: self_.get(1).cst_decode(), - }, - 16 => crate::utils::error::PayjoinError::UrlError { - message: self_.get(1).cst_decode(), - }, - _ => unreachable!(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::PayjoinProposal { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::PayjoinProposal(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::ProvisionalProposal { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::ProvisionalProposal(self_.get(0).cst_decode()) - } -} -impl - CstDecode<( - (crate::api::uri::Url, Vec), - crate::api::receive::ClientResponse, - )> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode( - self, - ) -> ( - (crate::api::uri::Url, Vec), - crate::api::receive::ClientResponse, - ) { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - (self_.get(0).cst_decode(), self_.get(1).cst_decode()) - } -} -impl CstDecode<(String, String)> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> (String, String) { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - (self_.get(0).cst_decode(), self_.get(1).cst_decode()) - } -} -impl CstDecode<(u64, crate::utils::types::OutPoint)> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> (u64, crate::utils::types::OutPoint) { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - (self_.get(0).cst_decode(), self_.get(1).cst_decode()) - } -} -impl CstDecode<(crate::api::uri::Url, Vec)> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> (crate::api::uri::Url, Vec) { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - (self_.get(0).cst_decode(), self_.get(1).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::send::RequestBuilder { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::send::RequestBuilder(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::send::RequestContext { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::send::RequestContext(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::send::RequestContextV1 { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - crate::api::send::RequestContextV1 { - request: self_.get(0).cst_decode(), - context_v1: self_.get(1).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::send::RequestContextV2 { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - crate::api::send::RequestContextV2 { - request: self_.get(0).cst_decode(), - context_v2: self_.get(1).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::utils::types::TxOut { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - crate::utils::types::TxOut { - value: self_.get(0).cst_decode(), - script_pubkey: self_.get(1).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::UncheckedProposal { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::UncheckedProposal(self_.get(0).cst_decode()) - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::uri::Uri { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::uri::Uri(self_.get(0).cst_decode()) - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::uri::Url { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::uri::Url(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::V2MaybeInputsOwned { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::V2MaybeInputsOwned(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::V2MaybeInputsSeen { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::V2MaybeInputsSeen(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::V2MaybeMixedInputScripts { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::V2MaybeMixedInputScripts(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::V2OutputsUnknown { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::V2OutputsUnknown(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::V2PayjoinProposal { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::V2PayjoinProposal(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::V2ProvisionalProposal { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::V2ProvisionalProposal(self_.get(0).cst_decode()) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::receive::V2UncheckedProposal { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::receive::V2UncheckedProposal(self_.get(0).cst_decode()) - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> std::collections::HashMap { - let vec: Vec<(String, String)> = self.cst_decode(); - vec.into_iter().collect() - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> std::collections::HashMap { - let vec: Vec<(u64, crate::utils::types::OutPoint)> = self.cst_decode(); - vec.into_iter().collect() - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom>> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> String { - self.as_string().expect("non-UTF-8 string, or not a string") - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> bool { - self.is_truthy() - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> f64 { - self.unchecked_into_f64() as _ - } -} -impl CstDecode> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - let buf = self - .dyn_into::() - .unwrap(); - let buf = flutter_rust_bridge::for_generated::js_sys::Uint8Array::new(&buf.buffer()); - flutter_rust_bridge::for_generated::slice_from_byte_buffer(buf.to_vec()).into() - } -} -impl CstDecode> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - self.unchecked_into::() - .to_vec() - .into() - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> u32 { - self.unchecked_into_f64() as _ - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> u64 { - ::std::convert::TryInto::try_into( - self.dyn_into::() - .unwrap(), - ) - .unwrap() - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> u8 { - self.unchecked_into_f64() as _ - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> usize { - self.unchecked_into_f64() as _ - } -} - -#[wasm_bindgen] -pub fn wire_enrolled_extract_req( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_enrolled_extract_req_impl(port_, ptr) -} - -#[wasm_bindgen] -pub fn wire_enrolled_fallback_target( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_enrolled_fallback_target_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_enrolled_process_res( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - body: Box<[u8]>, - ctx: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_enrolled_process_res_impl(port_, that, body, ctx) -} - -#[wasm_bindgen] -pub fn wire_enroller_extract_req( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_enroller_extract_req_impl(port_, ptr) -} - -#[wasm_bindgen] -pub fn wire_enroller_from_directory_config( - port_: flutter_rust_bridge::for_generated::MessagePort, - directory: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - ohttp_keys: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - ohttp_relay: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_enroller_from_directory_config_impl(port_, directory, ohttp_keys, ohttp_relay) -} - -#[wasm_bindgen] -pub fn wire_enroller_process_res( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - body: Box<[u8]>, - ctx: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_enroller_process_res_impl(port_, that, body, ctx) -} - -#[wasm_bindgen] -pub fn wire_maybe_inputs_owned_check_inputs_not_owned( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - is_owned: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_maybe_inputs_owned_check_inputs_not_owned_impl(port_, ptr, is_owned) -} - -#[wasm_bindgen] -pub fn wire_maybe_inputs_seen_check_no_inputs_seen_before( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - is_known: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_maybe_inputs_seen_check_no_inputs_seen_before_impl(port_, ptr, is_known) -} - -#[wasm_bindgen] -pub fn wire_maybe_mixed_input_scripts_check_no_mixed_input_scripts( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_maybe_mixed_input_scripts_check_no_mixed_input_scripts_impl(port_, ptr) -} - -#[wasm_bindgen] -pub fn wire_outputs_unknown_identify_receiver_outputs( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - is_receiver_output: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_outputs_unknown_identify_receiver_outputs_impl(port_, ptr, is_receiver_output) -} - -#[wasm_bindgen] -pub fn wire_payjoin_proposal_is_output_substitution_disabled( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_payjoin_proposal_is_output_substitution_disabled_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_payjoin_proposal_owned_vouts( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_payjoin_proposal_owned_vouts_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_payjoin_proposal_psbt( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_payjoin_proposal_psbt_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_payjoin_proposal_utxos_to_be_locked( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_payjoin_proposal_utxos_to_be_locked_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_provisional_proposal_contribute_non_witness_input( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - tx: Box<[u8]>, - outpoint: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_provisional_proposal_contribute_non_witness_input_impl(port_, that, tx, outpoint) -} - -#[wasm_bindgen] -pub fn wire_provisional_proposal_contribute_witness_input( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - txo: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - outpoint: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_provisional_proposal_contribute_witness_input_impl(port_, that, txo, outpoint) -} - -#[wasm_bindgen] -pub fn wire_provisional_proposal_finalize_proposal( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - process_psbt: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - min_feerate_sat_per_vb: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_provisional_proposal_finalize_proposal_impl( - port_, - ptr, - process_psbt, - min_feerate_sat_per_vb, - ) -} - -#[wasm_bindgen] -pub fn wire_provisional_proposal_substitute_output_address( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - address: String, -) { - wire_provisional_proposal_substitute_output_address_impl(port_, that, address) -} - -#[wasm_bindgen] -pub fn wire_provisional_proposal_try_preserving_privacy( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - candidate_inputs: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_provisional_proposal_try_preserving_privacy_impl(port_, that, candidate_inputs) -} - -#[wasm_bindgen] -pub fn wire_unchecked_proposal_assume_interactive_receiver( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_unchecked_proposal_assume_interactive_receiver_impl(port_, ptr) -} - -#[wasm_bindgen] -pub fn wire_unchecked_proposal_check_broadcast_suitability( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - min_fee_rate: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - can_broadcast: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_unchecked_proposal_check_broadcast_suitability_impl( - port_, - ptr, - min_fee_rate, - can_broadcast, - ) -} - -#[wasm_bindgen] -pub fn wire_unchecked_proposal_extract_tx_to_schedule_broadcast( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_unchecked_proposal_extract_tx_to_schedule_broadcast_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_unchecked_proposal_from_request( - port_: flutter_rust_bridge::for_generated::MessagePort, - body: Box<[u8]>, - query: String, - headers: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_unchecked_proposal_from_request_impl(port_, body, query, headers) -} - -#[wasm_bindgen] -pub fn wire_v_2_maybe_inputs_owned_check_inputs_not_owned( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - is_owned: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_maybe_inputs_owned_check_inputs_not_owned_impl(port_, that, is_owned) -} - -#[wasm_bindgen] -pub fn wire_v_2_maybe_inputs_seen_check_no_inputs_seen_before( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - is_known: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_maybe_inputs_seen_check_no_inputs_seen_before_impl(port_, that, is_known) -} - -#[wasm_bindgen] -pub fn wire_v_2_maybe_mixed_input_scripts_check_no_mixed_input_scripts( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_maybe_mixed_input_scripts_check_no_mixed_input_scripts_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_v_2_outputs_unknown_identify_receiver_outputs( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - is_receiver_output: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_outputs_unknown_identify_receiver_outputs_impl(port_, that, is_receiver_output) -} - -#[wasm_bindgen] -pub fn wire_v_2_payjoin_proposal_deserialize_res( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - res: Box<[u8]>, - ohttp_context: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_payjoin_proposal_deserialize_res_impl(port_, that, res, ohttp_context) -} - -#[wasm_bindgen] -pub fn wire_v_2_payjoin_proposal_extract_v1_req( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_payjoin_proposal_extract_v1_req_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_v_2_payjoin_proposal_extract_v2_req( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_payjoin_proposal_extract_v2_req_impl(port_, ptr) -} - -#[wasm_bindgen] -pub fn wire_v_2_payjoin_proposal_is_output_substitution_disabled( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_payjoin_proposal_is_output_substitution_disabled_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_v_2_payjoin_proposal_owned_vouts( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_payjoin_proposal_owned_vouts_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_v_2_payjoin_proposal_psbt( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_payjoin_proposal_psbt_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_v_2_payjoin_proposal_utxos_to_be_locked( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_payjoin_proposal_utxos_to_be_locked_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_v_2_provisional_proposal_contribute_non_witness_input( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - tx: Box<[u8]>, - outpoint: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_provisional_proposal_contribute_non_witness_input_impl(port_, that, tx, outpoint) -} - -#[wasm_bindgen] -pub fn wire_v_2_provisional_proposal_contribute_witness_input( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - txo: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - outpoint: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_provisional_proposal_contribute_witness_input_impl(port_, that, txo, outpoint) -} - -#[wasm_bindgen] -pub fn wire_v_2_provisional_proposal_finalize_proposal( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - process_psbt: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - min_feerate_sat_per_vb: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_provisional_proposal_finalize_proposal_impl( - port_, - that, - process_psbt, - min_feerate_sat_per_vb, - ) -} - -#[wasm_bindgen] -pub fn wire_v_2_provisional_proposal_substitute_output_address( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - address: String, -) { - wire_v_2_provisional_proposal_substitute_output_address_impl(port_, that, address) -} - -#[wasm_bindgen] -pub fn wire_v_2_provisional_proposal_try_preserving_privacy( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - candidate_inputs: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_provisional_proposal_try_preserving_privacy_impl(port_, that, candidate_inputs) -} - -#[wasm_bindgen] -pub fn wire_v_2_unchecked_proposal_assume_interactive_receiver( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_unchecked_proposal_assume_interactive_receiver_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_v_2_unchecked_proposal_check_broadcast_suitability( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - min_fee_rate: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - can_broadcast: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_unchecked_proposal_check_broadcast_suitability_impl( - port_, - that, - min_fee_rate, - can_broadcast, - ) -} - -#[wasm_bindgen] -pub fn wire_v_2_unchecked_proposal_extract_tx_to_schedule_broadcast( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_v_2_unchecked_proposal_extract_tx_to_schedule_broadcast_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_context_v_1_process_response( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - response: Box<[u8]>, -) { - wire_context_v_1_process_response_impl(port_, that, response) -} - -#[wasm_bindgen] -pub fn wire_context_v_2_process_response( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - response: Box<[u8]>, -) { - wire_context_v_2_process_response_impl(port_, that, response) -} - -#[wasm_bindgen] -pub fn wire_request_builder_always_disable_output_substitution( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - disable: bool, -) { - wire_request_builder_always_disable_output_substitution_impl(port_, that, disable) -} - -#[wasm_bindgen] -pub fn wire_request_builder_build_non_incentivizing( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_request_builder_build_non_incentivizing_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_request_builder_build_recommended( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - min_fee_rate: u64, -) { - wire_request_builder_build_recommended_impl(port_, that, min_fee_rate) -} - -#[wasm_bindgen] -pub fn wire_request_builder_build_with_additional_fee( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - max_fee_contribution: u64, - change_index: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - min_fee_rate: u64, - clamp_fee_contribution: bool, -) { - wire_request_builder_build_with_additional_fee_impl( - port_, - that, - max_fee_contribution, - change_index, - min_fee_rate, - clamp_fee_contribution, - ) -} - -#[wasm_bindgen] -pub fn wire_request_builder_from_psbt_and_uri( - port_: flutter_rust_bridge::for_generated::MessagePort, - psbt_base64: String, - uri: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_request_builder_from_psbt_and_uri_impl(port_, psbt_base64, uri) -} - -#[wasm_bindgen] -pub fn wire_request_context_extract_v1( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_request_context_extract_v1_impl(port_, ptr) -} - -#[wasm_bindgen] -pub fn wire_request_context_extract_v2( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - ohttp_proxy_url: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_request_context_extract_v2_impl(port_, ptr, ohttp_proxy_url) -} - -#[wasm_bindgen] -pub fn wire_ohttp_keys_decode( - port_: flutter_rust_bridge::for_generated::MessagePort, - bytes: Box<[u8]>, -) { - wire_ohttp_keys_decode_impl(port_, bytes) -} - -#[wasm_bindgen] -pub fn wire_uri_address( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_uri_address_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_uri_amount( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_uri_amount_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_uri_from_str(port_: flutter_rust_bridge::for_generated::MessagePort, uri: String) { - wire_uri_from_str_impl(port_, uri) -} - -#[wasm_bindgen] -pub fn wire_url_as_string( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_url_as_string_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_url_from_str(port_: flutter_rust_bridge::for_generated::MessagePort, url: String) { - wire_url_from_str_impl(port_, url) -} - -#[wasm_bindgen] -pub fn wire_url_query( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_url_query_impl(port_, that) -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffireceivev1MaybeInputsOwned( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffireceivev1MaybeInputsOwned( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffireceivev1MaybeInputsSeen( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffireceivev1MaybeInputsSeen( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffireceivev1MaybeMixedInputScripts( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count( - ptr as _, - ); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffireceivev1MaybeMixedInputScripts( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count( - ptr as _, - ); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffireceivev1OutputsUnknown( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffireceivev1OutputsUnknown( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffireceivev1PayjoinProposal( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffireceivev1PayjoinProposal( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffireceivev1ProvisionalProposal( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count( - ptr as _, - ); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffireceivev1ProvisionalProposal( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count( - ptr as _, - ); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffireceivev2Enrolled( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffireceivev2Enrolled( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffireceivev2V2MaybeInputsOwned( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count( - ptr as _, - ); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffireceivev2V2MaybeInputsOwned( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count( - ptr as _, - ); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffireceivev2V2MaybeInputsSeen( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count( - ptr as _, - ); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffireceivev2V2MaybeInputsSeen( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count( - ptr as _, - ); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffireceivev2V2MaybeMixedInputScripts( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count( - ptr as _, - ); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffireceivev2V2MaybeMixedInputScripts( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count( - ptr as _, - ); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffireceivev2V2OutputsUnknown( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffireceivev2V2OutputsUnknown( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffireceivev2V2PayjoinProposal( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count( - ptr as _, - ); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffireceivev2V2PayjoinProposal( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count( - ptr as _, - ); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffireceivev2V2ProvisionalProposal( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count( - ptr as _, - ); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffireceivev2V2ProvisionalProposal( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count( - ptr as _, - ); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffisendv1ContextV1( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffisendv1ContextV1( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffisendv1RequestBuilder( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffisendv1RequestBuilder( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffisendv1RequestContext( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffisendv1RequestContext( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffisendv2ContextV2( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffisendv2ContextV2( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffiuriUri( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffiuriUri( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_Arcpayjoin_ffiuriUrl( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_Arcpayjoin_ffiuriUrl( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_MutexOptionohttpClientResponse( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_MutexOptionohttpClientResponse( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_payjoin_ffireceivev1UncheckedProposal( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_payjoin_ffireceivev1UncheckedProposal( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_payjoin_ffireceivev2Enroller( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_payjoin_ffireceivev2Enroller( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_payjoin_ffireceivev2V2UncheckedProposal( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_payjoin_ffireceivev2V2UncheckedProposal( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_payjoin_ffitypesOhttpKeys( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_payjoin_ffitypesOhttpKeys( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -}