diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8cb6905b..c5fb8abe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2 with: - flutter-version: '3.29.2' + flutter-version: '3.35.4' channel: 'stable' cache: true cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} @@ -73,7 +73,7 @@ jobs: # - uses: actions/checkout@v3 # - uses: subosito/flutter-action@v2 # with: - # flutter-version: '3.29.2' + # flutter-version: '3.35.4' # channel: 'stable' # cache: true # cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} @@ -127,7 +127,7 @@ jobs: # - uses: actions/checkout@v4 # - uses: subosito/flutter-action@v2 # with: - # flutter-version: '3.29.2' + # flutter-version: '3.35.4' # channel: 'stable' # cache: true # cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 43422853..063195da 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -31,7 +31,7 @@ jobs: git config user.email "odrin666@gmail.com" - uses: subosito/flutter-action@v2 with: - flutter-version: '3.29.2' + flutter-version: '3.35.4' channel: 'stable' cache: true cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} diff --git a/.github/workflows/publish-release-fnb.yml b/.github/workflows/publish-release-fnb.yml index 6b870cd6..220629be 100644 --- a/.github/workflows/publish-release-fnb.yml +++ b/.github/workflows/publish-release-fnb.yml @@ -28,7 +28,7 @@ jobs: - uses: dart-lang/setup-dart@v1 - uses: subosito/flutter-action@v2 with: - flutter-version: '3.29.2' + flutter-version: '3.35.4' channel: 'stable' cache: true cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} diff --git a/.github/workflows/publish-release-nb.yml b/.github/workflows/publish-release-nb.yml index 251257e9..10f34e2e 100644 --- a/.github/workflows/publish-release-nb.yml +++ b/.github/workflows/publish-release-nb.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2 with: - flutter-version: '3.29.2' + flutter-version: '3.35.4' channel: 'stable' cache: true cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} @@ -54,7 +54,7 @@ jobs: - uses: dart-lang/setup-dart@v1 - uses: subosito/flutter-action@v2 with: - flutter-version: '3.29.2' + flutter-version: '3.35.4' channel: 'stable' cache: true cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} diff --git a/.gitignore b/.gitignore index d3caca53..a8f1275f 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,6 @@ build/ *_generated.rs #*.freezed.dart #*.g.dart -#*.reflectable.dart # js-related **/node_modules/ diff --git a/CHANGELOG.md b/CHANGELOG.md index fe372e98..7bae4c3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,43 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 2025-10-06 + +### Changes + +--- + +Packages with breaking changes: + + - There are no breaking changes in this release. + +Packages with other changes: + + - [`flutter_nekoton_bridge` - `v4.0.0-dev.2`](#flutter_nekoton_bridge---v400-dev2) + - [`flutter_nekoton_bridge_example` - `v3.0.0-dev.2`](#flutter_nekoton_bridge_example---v300-dev2) + - [`nekoton_bridge` - `v4.0.0-dev.2`](#nekoton_bridge---v400-dev2) + +--- + +#### `flutter_nekoton_bridge` - `v4.0.0-dev.2` + + - **REFACTOR**: remove redundant json converters. + - **FIX**: change `remainingGasTo` parameter type to `Address`. + - **FEAT**: add support for libraries in local execution and getter functions. + - **FEAT**: add `remainingGasTo` parameter to `prepareTransfer` method in `TokenWallet`. + - **FEAT**: add WalletV5R1 specific methods. + +#### `flutter_nekoton_bridge_example` - `v3.0.0-dev.2` + + - **FEAT**: add support for libraries in local execution and getter functions. + +#### `nekoton_bridge` - `v4.0.0-dev.2` + + - **FEAT**: add support for libraries in local execution and getter functions. + - **FEAT**: add `remainingGasTo` parameter to `prepareTransfer` method in `TokenWallet`. + - **FEAT**: add WalletV5R1 specific methods. + + ## 2025-10-02 ### Changes @@ -103,6 +140,58 @@ Packages with dependency updates only: Packages with breaking changes: + - [`flutter_nekoton_bridge` - `v4.0.0-dev.1`](#flutter_nekoton_bridge---v400-dev1) + - [`flutter_nekoton_bridge_example` - `v3.0.0-dev.1`](#flutter_nekoton_bridge_example---v300-dev1) + - [`nekoton_bridge` - `v4.0.0-dev.1`](#nekoton_bridge---v400-dev1) + +Packages with other changes: + + - There are no other changes in this release. + +--- + +#### `flutter_nekoton_bridge` - `v4.0.0-dev.1` + + - **BREAKING** **CHORE**: sdk >=3.9.0; flutter >=3.35.0. + +#### `flutter_nekoton_bridge_example` - `v3.0.0-dev.1` + + - **BREAKING** **CHORE**: sdk >=3.9.0; flutter >=3.35.0. + +#### `nekoton_bridge` - `v4.0.0-dev.1` + + - **BREAKING** **CHORE**: sdk >=3.9.0; flutter >=3.35.0. + + +## 2025-08-27 + +### Changes + +--- + +Packages with breaking changes: + + - [`flutter_nekoton_bridge` - `v4.0.0-dev.0`](#flutter_nekoton_bridge---v400-dev0) + - [`flutter_nekoton_bridge_example` - `v3.0.0-dev.0`](#flutter_nekoton_bridge_example---v300-dev0) + - [`nekoton_bridge` - `v4.0.0-dev.0`](#nekoton_bridge---v400-dev0) + +Packages with other changes: + + - There are no other changes in this release. + +--- + +#### `flutter_nekoton_bridge` - `v4.0.0-dev.0` + + - **BREAKING** **CHORE**: remove `reflectable`. ([30e7a3d3](https://github.com/broxus/nekoton_bridge/commit/30e7a3d3885096004327fa1ddb9ee67eb2c298ef)) + +#### `flutter_nekoton_bridge_example` - `v3.0.0-dev.0` + + - **BREAKING** **CHORE**: remove `reflectable`. ([30e7a3d3](https://github.com/broxus/nekoton_bridge/commit/30e7a3d3885096004327fa1ddb9ee67eb2c298ef)) + +#### `nekoton_bridge` - `v4.0.0-dev.0` + + - **BREAKING** **CHORE**: remove `reflectable`. ([30e7a3d3](https://github.com/broxus/nekoton_bridge/commit/30e7a3d3885096004327fa1ddb9ee67eb2c298ef)) - There are no breaking changes in this release. Packages with other changes: diff --git a/Cargo.lock b/Cargo.lock index da913255..e8412bca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aead" @@ -34,7 +34,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom 0.3.2", + "getrandom 0.3.3", "once_cell", "version_check", "zerocopy", @@ -74,21 +74,9 @@ checksum = "84521a3cf562bc62942e294181d9eef17eb38ceb8c68677bc49f144e4c3d4f8d" [[package]] name = "android_logger" -version = "0.13.3" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c494134f746c14dc653a35a4ea5aca24ac368529da5370ecf41fe0341c35772f" -dependencies = [ - "android_log-sys", - "env_logger", - "log", - "once_cell", -] - -[[package]] -name = "android_logger" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f39be698127218cca460cb624878c9aa4e2b47dba3b277963d2bf00bad263b" +checksum = "dbb4e440d04be07da1f1bf44fb4495ebd58669372fe0cffa6e48595ac5bd88a3" dependencies = [ "android_log-sys", "env_filter", @@ -106,9 +94,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" dependencies = [ "anstyle", "anstyle-parse", @@ -121,44 +109,44 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" [[package]] name = "anstyle-parse" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.7" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" dependencies = [ "anstyle", - "once_cell", - "windows-sys 0.59.0", + "once_cell_polyfill", + "windows-sys 0.60.2", ] [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" dependencies = [ "backtrace", ] @@ -171,13 +159,13 @@ checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "async-trait" -version = "0.1.88" +version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -188,9 +176,9 @@ checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "backtrace" @@ -233,9 +221,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "34efbcccd345379ca2868b2b2c9d3782e9cc58ba87bc7d79d5b53d9c9ae6f25d" [[package]] name = "block-buffer" @@ -273,15 +261,15 @@ checksum = "832133bbabbbaa9fbdba793456a2827627a7d2b8fb96032fa1e7666d7895832b" [[package]] name = "bumpalo" -version = "3.17.0" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "bytemuck" -version = "1.23.0" +version = "1.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c" +checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" [[package]] name = "byteorder" @@ -297,9 +285,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "camino" -version = "1.1.9" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +checksum = "dd0b03af37dad7a14518b7691d81acb0f8222604ad3d1b02f6b4bed5188c0cd5" dependencies = [ "serde", ] @@ -333,7 +321,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fbd1fe9db3ebf71b89060adaf7b0504c2d6a425cf061313099547e382c2e472" dependencies = [ "serde", - "toml 0.8.22", + "toml 0.8.23", ] [[package]] @@ -349,25 +337,25 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.101", + "syn 2.0.106", "tempfile", - "toml 0.8.22", + "toml 0.8.23", ] [[package]] name = "cc" -version = "1.2.21" +version = "1.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8691782945451c1c383942c4874dbe63814f61cb57ef773cda2972682b7bb3c0" +checksum = "42bc4aea80032b7bf409b0bc7ccad88853858911b7713a8062fdc0623867bedc" dependencies = [ "shlex", ] [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "chacha20" @@ -420,9 +408,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.37" +version = "4.5.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" +checksum = "2c5e4fcf9c21d2e544ca1ee9d8552de13019a42aa7dbf32747fa7aaf1df76e57" dependencies = [ "clap_builder", "clap_derive", @@ -430,9 +418,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.37" +version = "4.5.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" +checksum = "fecb53a0e6fcfb055f686001bc2e2592fa527efaf38dbe81a6a9563562e57d41" dependencies = [ "anstream", "anstyle", @@ -442,27 +430,27 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.32" +version = "4.5.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +checksum = "14cb31bb0a7d536caef2639baa7fad459e15c3144efefa6dbd1c84562c4739f6" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "clap_lex" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "colorchoice" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "colored" @@ -477,15 +465,15 @@ dependencies = [ [[package]] name = "console" -version = "0.15.11" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +checksum = "2e09ced7ebbccb63b4c65413d821f2e00ce54c5ca4514ddc6b3c892fdbcbc69d" dependencies = [ "encode_unicode", "libc", "once_cell", "unicode-width", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -582,9 +570,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-common" @@ -639,16 +627,6 @@ dependencies = [ "cc", ] -[[package]] -name = "dashmap" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" -dependencies = [ - "cfg-if", - "num_cpus", -] - [[package]] name = "dashmap" version = "5.5.3" @@ -670,7 +648,7 @@ checksum = "51aac4c99b2e6775164b412ea33ae8441b2fde2dbf05a20bc0052a63d08c475b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -703,7 +681,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -745,9 +723,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "ed25519" @@ -800,7 +778,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -812,7 +790,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -825,16 +803,6 @@ dependencies = [ "regex", ] -[[package]] -name = "env_logger" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" -dependencies = [ - "log", - "regex", -] - [[package]] name = "equivalent" version = "1.0.2" @@ -852,12 +820,12 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.11" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -879,21 +847,21 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.25" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" +checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" dependencies = [ "cfg-if", "libc", "libredox", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "flutter_nekoton_bridge" version = "0.0.0" dependencies = [ - "android_logger 0.15.0", + "android_logger", "anyhow", "async-trait", "base64 0.22.1", @@ -909,7 +877,7 @@ dependencies = [ "nekoton-abi", "nekoton-jetton", "nekoton-utils", - "oslog 0.2.0", + "oslog", "parking_lot", "rerun_except", "secstr", @@ -917,7 +885,7 @@ dependencies = [ "serde_json", "sha2 0.10.9", "simplelog", - "thiserror 2.0.12", + "thiserror 2.0.16", "tokio", "ton_abi", "ton_block", @@ -929,12 +897,12 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1d2ad18166cead8c1b92b1c00e64aacc32e6ebd1ac95f77089c276c9c6bd8c" +checksum = "dde126295b2acc5f0a712e265e91b6fdc0ed38767496483e592ae7134db83725" dependencies = [ "allo-isolate", - "android_logger 0.13.3", + "android_logger", "anyhow", "build-target", "bytemuck", @@ -947,7 +915,7 @@ dependencies = [ "js-sys", "lazy_static", "log", - "oslog 0.1.0", + "oslog", "portable-atomic", "threadpool", "tokio", @@ -958,9 +926,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge_codegen" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f9092110d6f6dc82421bb00c5adc23f1595fc9146074ff856cb17c3af647407" +checksum = "8196d44913683419189948ec655f23f6d6166883ec0e5081ba443c62e5570260" dependencies = [ "anyhow", "cargo_metadata", @@ -995,7 +963,7 @@ dependencies = [ "sha1", "strum", "strum_macros", - "syn 2.0.101", + "syn 2.0.106", "tempfile", "toml 0.5.11", "topological-sort", @@ -1003,15 +971,15 @@ dependencies = [ [[package]] name = "flutter_rust_bridge_macros" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36cf75fba54902e67db5eef4a520df1c9f604db6f71f106fbc012477e2d81542" +checksum = "d5f0420326b13675321b194928bb7830043b68cf8b810e1c651285c747abb080" dependencies = [ "hex", "md-5", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -1079,7 +1047,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -1130,14 +1098,14 @@ checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", ] [[package]] name = "getrandom" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "libc", @@ -1153,9 +1121,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "globset" @@ -1178,9 +1146,9 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hashbrown" -version = "0.15.3" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" [[package]] name = "heck" @@ -1196,15 +1164,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hermit-abi" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f154ce46856750ed433c8649605bf7ed2de3bc35fd9d2a9f30cddd873c80cb08" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hex" @@ -1319,24 +1281,24 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9" dependencies = [ "equivalent", - "hashbrown 0.15.3", + "hashbrown 0.15.5", ] [[package]] name = "indicatif" -version = "0.17.11" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" +checksum = "70a646d946d06bedbbc4cac4c218acf4bbf2d87757a784857025f4d447e4e1cd" dependencies = [ "console", - "number_prefix", "portable-atomic", "unicode-width", + "unit-prefix", "web-time", ] @@ -1379,13 +1341,24 @@ dependencies = [ "generic-array", ] +[[package]] +name = "io-uring" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" +dependencies = [ + "bitflags 2.9.3", + "cfg-if", + "libc", +] + [[package]] name = "is-terminal" version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ - "hermit-abi 0.5.1", + "hermit-abi", "libc", "windows-sys 0.59.0", ] @@ -1449,17 +1422,17 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.172" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libredox" -version = "0.1.3" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.3", "libc", "redox_syscall", ] @@ -1516,9 +1489,9 @@ checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" dependencies = [ "autocfg", "scopeguard", @@ -1555,9 +1528,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "memzero" @@ -1567,9 +1540,9 @@ checksum = "93c0d11ac30a033511ae414355d80f70d9f29a44a49140face477117a1ee90db" [[package]] name = "miniz_oxide" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", ] @@ -1582,19 +1555,19 @@ checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.48.0", ] [[package]] name = "mio" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", ] [[package]] @@ -1754,7 +1727,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.3", "crossbeam-channel", "filetime", "fsevent-sys", @@ -1870,11 +1843,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", ] @@ -1887,12 +1860,6 @@ dependencies = [ "libc", ] -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - [[package]] name = "object" version = "0.36.7" @@ -1912,21 +1879,16 @@ dependencies = [ ] [[package]] -name = "opaque-debug" -version = "0.3.1" +name = "once_cell_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" [[package]] -name = "oslog" -version = "0.1.0" +name = "opaque-debug" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8343ce955f18e7e68c0207dd0ea776ec453035685395ababd2ea651c569728b3" -dependencies = [ - "cc", - "dashmap 4.0.2", - "log", -] +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "oslog" @@ -1935,15 +1897,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80d2043d1f61d77cb2f4b1f7b7b2295f40507f5f8e9d1c8bf10a1ca5f97a3969" dependencies = [ "cc", - "dashmap 5.5.3", + "dashmap", "log", ] [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" dependencies = [ "lock_api", "parking_lot_core", @@ -1951,9 +1913,9 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", @@ -2018,9 +1980,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" [[package]] name = "powerfmt" @@ -2039,9 +2001,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] @@ -2054,7 +2016,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", "version_check", "yansi", ] @@ -2105,9 +2067,9 @@ dependencies = [ [[package]] name = "r-efi" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "rand" @@ -2122,9 +2084,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -2165,23 +2127,23 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", ] [[package]] name = "redox_syscall" -version = "0.5.12" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.3", ] [[package]] name = "regex" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" dependencies = [ "aho-corasick", "memchr", @@ -2191,9 +2153,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" dependencies = [ "aho-corasick", "memchr", @@ -2202,9 +2164,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "rerun_except" @@ -2217,9 +2179,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -2238,22 +2200,22 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.3", "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "rustversion" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" @@ -2312,14 +2274,14 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.143" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" dependencies = [ "itoa", "memchr", @@ -2329,9 +2291,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ "serde", ] @@ -2355,7 +2317,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" dependencies = [ - "dashmap 5.5.3", + "dashmap", "futures", "lazy_static", "log", @@ -2371,7 +2333,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -2417,9 +2379,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.5" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] @@ -2443,12 +2405,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "slip10_ed25519" @@ -2461,18 +2420,18 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.5.9" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2497,7 +2456,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -2525,9 +2484,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.101" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", @@ -2536,15 +2495,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.19.1" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" +checksum = "15b61f8f20e3a6f7e0649d825294eaf317edce30f82cf6026e7e4cb9222a7d1e" dependencies = [ "fastrand", - "getrandom 0.3.2", + "getrandom 0.3.3", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -2567,11 +2526,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.16", ] [[package]] @@ -2582,18 +2541,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -2682,9 +2641,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" dependencies = [ "tinyvec_macros", ] @@ -2697,20 +2656,22 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.45.0" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2513ca694ef9ede0fb23fe71a4ee4107cb102b9dc1930f6d0fd77aae068ae165" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", - "mio 1.0.3", + "mio 1.0.4", "parking_lot", "pin-project-lite", "signal-hook-registry", + "slab", "socket2", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2721,7 +2682,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -2735,9 +2696,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", @@ -2747,18 +2708,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.9" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.26" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap", "serde", @@ -2770,9 +2731,9 @@ dependencies = [ [[package]] name = "toml_write" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "ton_abi" @@ -2840,7 +2801,7 @@ dependencies = [ "base64 0.13.1", "countme", "crc", - "dashmap 5.5.3", + "dashmap", "hex", "log", "num", @@ -2903,9 +2864,15 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.2.0" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" + +[[package]] +name = "unit-prefix" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +checksum = "323402cff2dd658f39ca17c789b502021b3f18707c91cdf22e3838e1b4023817" [[package]] name = "universal-hash" @@ -2931,24 +2898,26 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.16.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" +checksum = "f33196643e165781c20a5ead5582283a7dacbb87855d867fbc2df3f81eddc1be" dependencies = [ - "getrandom 0.3.2", - "rand 0.9.1", + "getrandom 0.3.3", + "js-sys", + "rand 0.9.2", "uuid-macro-internal", + "wasm-bindgen", ] [[package]] name = "uuid-macro-internal" -version = "1.16.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72dcd78c4f979627a754f5522cea6e6a25e55139056535fe6e69c506cd64a862" +checksum = "22b7ad00068276db5fea436dba78daa7891b8d60db76e4f51cbdefbdecdab97e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -2975,9 +2944,9 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" @@ -3010,7 +2979,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", "wasm-bindgen-shared", ] @@ -3045,7 +3014,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3097,11 +3066,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +checksum = "0978bf7171b3d90bac376700cb56d606feb40f251a475a5d6634613564460b22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -3112,9 +3081,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.61.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", @@ -3131,7 +3100,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3142,29 +3111,29 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "windows-link" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] name = "windows-result" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ "windows-link", ] @@ -3180,20 +3149,20 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.52.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ "windows-targets 0.52.6", ] [[package]] name = "windows-sys" -version = "0.59.0" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.52.6", + "windows-targets 0.53.3", ] [[package]] @@ -3220,13 +3189,30 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -3239,6 +3225,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -3251,6 +3243,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -3263,12 +3261,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -3281,6 +3291,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -3293,6 +3309,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -3305,6 +3327,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -3317,11 +3345,17 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winnow" -version = "0.7.10" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] @@ -3332,7 +3366,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.3", ] [[package]] @@ -3343,22 +3377,22 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "zerocopy" -version = "0.8.25" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.25" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3378,5 +3412,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] diff --git a/melos.yaml b/melos.yaml deleted file mode 100644 index a20b1892..00000000 --- a/melos.yaml +++ /dev/null @@ -1,87 +0,0 @@ -name: nekoton_bridge - -repository: https://github.com/broxus/nekoton_bridge - -packages: - - packages/** - -scripts: - analyze: - exec: flutter analyze . - description: Analyze a specific package in this project. - - check-format: - exec: dart format --set-exit-if-changed . - description: Check the format of a specific package in this project. - - check-rust: - exec: rustfmt --check --edition 2021 rust/src/lib.rs && cargo clippy -- -D warnings - description: Check the format of a rust code. - packageFilters: - dirExists: rust - - format: - exec: dart format . - description: Format a specific package in this project. - - build: - run: melos run build:ios && melos run build:android - description: Build all native libraries for the project. - - codegen: - run: bash scripts/codegen.sh - description: Generate code. - - git-check: - run: bash scripts/git-check.sh - description: Check if some code changed during build - - build:ios: - run: bash scripts/build-ios.sh - description: Build the XCFramework for iOS. - - build:android: - run: bash scripts/build-android.sh - description: Build the .tar.gz for Android. - - test: - run: melos run test:dart --no-select && melos run test:flutter --no-select - description: Run all Dart & Flutter tests in this project. - - test:dart: - run: melos exec -c 1 --fail-fast -- "dart test test" - description: Run Dart tests for a specific package in this project. - packageFilters: - flutter: false - dirExists: test - - test:flutter: - run: melos exec -c 1 --fail-fast -- "flutter test test" - description: Run Flutter tests for a specific package in this project. - packageFilters: - flutter: true - dirExists: test - - test:integration: - run: melos exec -c 1 --fail-fast -- "flutter test integration_test" - description: Run Flutter teintegration teststs for a specific package in this project. - packageFilters: - flutter: true - dirExists: integration_test - - check-all: - description: Prepare to commit by checking all things - run: melos analyze && melos check-format && melos check-rust && melos test && melos test:integration - - clean-example: - run: bash scripts/clean-example.sh - description: Clean example for rebuilding after FNB update - -command: - clean: - hooks: - post: bash scripts/clean.sh - version: - updateGitTagRefs: true - hooks: - preCommit: bash scripts/version.sh diff --git a/packages/flutter_nekoton_bridge/CHANGELOG.md b/packages/flutter_nekoton_bridge/CHANGELOG.md index ca8c6e58..378ce8a8 100644 --- a/packages/flutter_nekoton_bridge/CHANGELOG.md +++ b/packages/flutter_nekoton_bridge/CHANGELOG.md @@ -1,3 +1,22 @@ +## 4.0.0-dev.2 + + - **REFACTOR**: remove redundant json converters. + - **FIX**: change `remainingGasTo` parameter type to `Address`. + - **FEAT**: add support for libraries in local execution and getter functions. + - **FEAT**: add `remainingGasTo` parameter to `prepareTransfer` method in `TokenWallet`. + - **FEAT**: add WalletV5R1 specific methods. + +## 4.0.0-dev.1 + +> Note: This release has breaking changes. + + - **BREAKING** **CHORE**: sdk >=3.9.0; flutter >=3.35.0. + +## 4.0.0-dev.0 + +> Note: This release has breaking changes. + + - **BREAKING** **CHORE**: remove `reflectable`. ([30e7a3d3](https://github.com/broxus/nekoton_bridge/commit/30e7a3d3885096004327fa1ddb9ee67eb2c298ef)) ## 3.6.0 - **FEAT**: add support for libraries in local execution and getter functions. ([79f1f4c2](https://github.com/broxus/nekoton_bridge/commit/79f1f4c2a26a5e70f21122c5d197c030be974870)) diff --git a/packages/flutter_nekoton_bridge/analysis_options.yaml b/packages/flutter_nekoton_bridge/analysis_options.yaml index 32d8d28e..ab75b418 100644 --- a/packages/flutter_nekoton_bridge/analysis_options.yaml +++ b/packages/flutter_nekoton_bridge/analysis_options.yaml @@ -8,7 +8,6 @@ analyzer: - '**.freezed.dart' - '**.g.dart' - '**_generated**.dart' - - '**.reflectable.dart' language: strict-inference: true strict-raw-types: true diff --git a/packages/flutter_nekoton_bridge/android/CMakeLists.txt b/packages/flutter_nekoton_bridge/android/CMakeLists.txt index 04f13754..806c3545 100644 --- a/packages/flutter_nekoton_bridge/android/CMakeLists.txt +++ b/packages/flutter_nekoton_bridge/android/CMakeLists.txt @@ -1,4 +1,4 @@ -set(LibraryVersion "nekoton_bridge-v3.6.0") # generated; do not edit +set(LibraryVersion "nekoton_bridge-v4.0.0-dev.2") # generated; do not edit # Unlike the Windows & Linux CMakeLists.txt, this Android equivalent is just here # to download the Android binaries into src/main/jniLibs/ and does not build anything. diff --git a/packages/flutter_nekoton_bridge/android/build.gradle b/packages/flutter_nekoton_bridge/android/build.gradle index 4e6be1b7..146ea845 100644 --- a/packages/flutter_nekoton_bridge/android/build.gradle +++ b/packages/flutter_nekoton_bridge/android/build.gradle @@ -11,7 +11,7 @@ buildscript { dependencies { // The Android Gradle Plugin knows how to build native code with the NDK. - classpath 'com.android.tools.build:gradle:7.3.0' + classpath 'com.android.tools.build:gradle:8.9.1' } } @@ -24,45 +24,12 @@ rootProject.allprojects { apply plugin: 'com.android.library' -// android { -// // Bumping the plugin compileSdkVersion requires all clients of this plugin -// // to bump the version in their app. -// compileSdkVersion 31 - -// // Bumping the plugin ndkVersion requires all clients of this plugin to bump -// // the version in their app and to download a newer version of the NDK. -// ndkVersion "21.1.6352462" - -// // Invoke the shared CMake build with the Android Gradle Plugin. -// externalNativeBuild { -// cmake { -// path "../src/CMakeLists.txt" - -// // The default CMake version for the Android Gradle Plugin is 3.10.2. -// // https://developer.android.com/studio/projects/install-ndk#vanilla_cmake -// // -// // The Flutter tooling requires that developers have CMake 3.10 or later -// // installed. You should not increase this version, as doing so will cause -// // the plugin to fail to compile for some customers of the plugin. -// // version "3.10.2" -// } -// } - -// compileOptions { -// sourceCompatibility JavaVersion.VERSION_1_8 -// targetCompatibility JavaVersion.VERSION_1_8 -// } - -// defaultConfig { -// minSdkVersion 16 -// } -// } android { namespace = "com.broxus.flutter_nekoton_bridge.flutter_nekoton_bridge" compileSdkVersion 33 defaultConfig { - minSdkVersion 19 + minSdkVersion 21 } // Trigger the binary download/update over in CMakeLists.txt diff --git a/packages/flutter_nekoton_bridge/build.yaml b/packages/flutter_nekoton_bridge/build.yaml index b45b1610..cf2dce40 100644 --- a/packages/flutter_nekoton_bridge/build.yaml +++ b/packages/flutter_nekoton_bridge/build.yaml @@ -9,18 +9,3 @@ targets: json_serializable: options: explicit_to_json: true - reflectable: - generate_for: - - lib/example_related/caller_wrapper.dart - - lib/example_related/caller_test_class_wrapper.dart - - lib/nekoton/external/gql_connection.dart - - lib/nekoton/external/proto_connection.dart - - lib/nekoton/external/jrpc_connection.dart - - lib/nekoton/external/ledger_connection.dart - - lib/nekoton/external/storage.dart - - lib/nekoton/core/ton_wallet/ton_wallet.dart - - lib/nekoton/core/token_wallet/token_wallet.dart - - lib/nekoton/core/jetton_wallet/jetton_wallet.dart - - lib/nekoton/core/generic_contract/generic_contract.dart - options: - formatted: true diff --git a/packages/flutter_nekoton_bridge/example/CHANGELOG.md b/packages/flutter_nekoton_bridge/example/CHANGELOG.md index 47d116c2..0796bbc5 100644 --- a/packages/flutter_nekoton_bridge/example/CHANGELOG.md +++ b/packages/flutter_nekoton_bridge/example/CHANGELOG.md @@ -1,3 +1,18 @@ +## 3.0.0-dev.2 + + - **FEAT**: add support for libraries in local execution and getter functions. + +## 3.0.0-dev.1 + +> Note: This release has breaking changes. + + - **BREAKING** **CHORE**: sdk >=3.9.0; flutter >=3.35.0. + +## 3.0.0-dev.0 + +> Note: This release has breaking changes. + + - **BREAKING** **CHORE**: remove `reflectable`. ([30e7a3d3](https://github.com/broxus/nekoton_bridge/commit/30e7a3d3885096004327fa1ddb9ee67eb2c298ef)) ## 2.3.0 - **FEAT**: add support for libraries in local execution and getter functions. ([79f1f4c2](https://github.com/broxus/nekoton_bridge/commit/79f1f4c2a26a5e70f21122c5d197c030be974870)) diff --git a/packages/flutter_nekoton_bridge/example/android/settings.gradle b/packages/flutter_nekoton_bridge/example/android/settings.gradle index b9e43bd3..b507b943 100644 --- a/packages/flutter_nekoton_bridge/example/android/settings.gradle +++ b/packages/flutter_nekoton_bridge/example/android/settings.gradle @@ -18,8 +18,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.1.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false + id "com.android.application" version "8.9.1" apply false + id "org.jetbrains.kotlin.android" version "2.1.0" apply false } include ":app" diff --git a/packages/flutter_nekoton_bridge/example/integration_test/abi_test.dart b/packages/flutter_nekoton_bridge/example/integration_test/abi_test.dart index fcfda848..6832b211 100644 --- a/packages/flutter_nekoton_bridge/example/integration_test/abi_test.dart +++ b/packages/flutter_nekoton_bridge/example/integration_test/abi_test.dart @@ -56,7 +56,6 @@ void main() { group('ABI test', () { testWidgets('decodeTransaction', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final decoded = await decodeTransaction( transaction: Transaction.fromJson(jsonDecode(json)), @@ -69,7 +68,6 @@ void main() { testWidgets('repackAddress', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final repackedRaw = repackAddress(raw); final repackedWithBounce = repackAddress(withBounce); @@ -80,7 +78,6 @@ void main() { testWidgets('packAddress', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final packed = packAddress(raw); @@ -89,7 +86,6 @@ void main() { testWidgets('encodeComment', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final encoded = encodeComment('test comment'); @@ -100,58 +96,47 @@ void main() { testWidgets('parseKnownPayload', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final knownTokenTransactionPayload = - parseKnownPayload(tokenTransferPayload); - final knownJettonTransactionPayload = - parseKnownPayload(jettonTransferPayload); + final knownTokenTransactionPayload = parseKnownPayload( + tokenTransferPayload, + ); + final knownJettonTransactionPayload = parseKnownPayload( + jettonTransferPayload, + ); final unknownPayload = parseKnownPayload(r'!@#$%^&*()_+invalid_base64'); expect(unknownPayload, isNull); expect(knownTokenTransactionPayload, isNotNull); - expect( - switch (knownTokenTransactionPayload!) { - KnownPayloadTokenOutgoingTransfer(data: final data) => data, - _ => null, - }, - isNotNull, - ); - expect( - switch (knownTokenTransactionPayload) { - KnownPayloadTokenOutgoingTransfer(data: final data) => data.tokens, - _ => null, - }, - BigInt.parse('1000000000'), - ); + expect(switch (knownTokenTransactionPayload!) { + KnownPayloadTokenOutgoingTransfer(data: final data) => data, + _ => null, + }, isNotNull); + expect(switch (knownTokenTransactionPayload) { + KnownPayloadTokenOutgoingTransfer(data: final data) => data.tokens, + _ => null, + }, BigInt.parse('1000000000')); expect(knownJettonTransactionPayload, isNotNull); - expect( - switch (knownJettonTransactionPayload!) { - KnownPayloadJettonOutgoingTransfer(data: final data) => data, - _ => null, - }, - isNotNull, - ); - expect( - switch (knownJettonTransactionPayload) { - KnownPayloadJettonOutgoingTransfer(data: final data) => data.tokens, - _ => null, - }, - BigInt.parse('10000'), - ); + expect(switch (knownJettonTransactionPayload!) { + KnownPayloadJettonOutgoingTransfer(data: final data) => data, + _ => null, + }, isNotNull); + expect(switch (knownJettonTransactionPayload) { + KnownPayloadJettonOutgoingTransfer(data: final data) => data.tokens, + _ => null, + }, BigInt.parse('10000')); }); testWidgets('computeTonWalletAddress', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final tonWalletAddress = computeTonWalletAddress( walletType: const WalletType.everWallet(), publicKey: const PublicKey( - publicKey: - '6c2f9514c1c0f2ec54cffe1ac2ba0e85268e76442c14205581ebc808fe7ee52c'), + publicKey: + '6c2f9514c1c0f2ec54cffe1ac2ba0e85268e76442c14205581ebc808fe7ee52c', + ), workchain: 0, ); @@ -163,7 +148,6 @@ void main() { testWidgets('getContractTypeNumber', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final ew = getContractTypeNumber(const WalletType.everWallet()); final v3 = getContractTypeNumber(const WalletType.walletV3()); @@ -178,7 +162,6 @@ void main() { testWidgets('runLocalWithLibs', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); const testLibraryAbi = '{"ABI version":2,"version":"2.7","header":["time","expire"],"functions":[{"name":"testAddGetter","inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"outputs":[{"name":"value0","type":"uint256"}]}],"getters":[],"events":[],"fields":[]}'; @@ -235,18 +218,9 @@ void main() { }); test('operator ==', () { - expect( - const Address(address: raw1), - const Address(address: raw1), - ); - expect( - const Address(address: raw1), - isNot(const Address(address: raw2)), - ); - expect( - const Address(address: raw1), - const Address(address: bounceable1), - ); + expect(const Address(address: raw1), const Address(address: raw1)); + expect(const Address(address: raw1), isNot(const Address(address: raw2))); + expect(const Address(address: raw1), const Address(address: bounceable1)); }); test('isValid', () { diff --git a/packages/flutter_nekoton_bridge/example/integration_test/app_test.dart b/packages/flutter_nekoton_bridge/example/integration_test/app_test.dart index c9658467..ced7c4b7 100644 --- a/packages/flutter_nekoton_bridge/example/integration_test/app_test.dart +++ b/packages/flutter_nekoton_bridge/example/integration_test/app_test.dart @@ -15,7 +15,7 @@ void main() { app.main(); await tester.pumpAndSettleWithTimeout(); - expect(find.textContaining('logger-related'), findsOneWidget); + expect(find.textContaining('Hello World'), findsOneWidget); }); }); } diff --git a/packages/flutter_nekoton_bridge/example/integration_test/caller_test.dart b/packages/flutter_nekoton_bridge/example/integration_test/caller_test.dart deleted file mode 100644 index 9dc489df..00000000 --- a/packages/flutter_nekoton_bridge/example/integration_test/caller_test.dart +++ /dev/null @@ -1,114 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter_nekoton_bridge_example/main.dart' as app; -import 'package:flutter_test/flutter_test.dart'; -import 'package:integration_test/integration_test.dart'; - -import 'timeout_utils.dart'; - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - group('caller test', () { - testWidgets('async and sync call without and with result', - (WidgetTester tester) async { - final List log = []; - - app.main(); - await tester.pumpAndSettleWithTimeout(); - - final DebugPrintCallback originalDebugPrint = debugPrint; - - // We can't move this init to setUp() because it should be after app init - debugPrint = (String? s, {int? wrapWidth}) { - // Ignore 'This may or may not be a problem. It will happen normally if hot-reload Flutter app.' - if (s != null && !s.contains('hot-reload')) log.add(s); - }; - - expect(log, isEmpty); - await tester.tap(find.text('initDartCaller')); - await tester.pumpAndSettleWithTimeout(); - expect(log, hasLength(0)); - log.clear(); - - expect(log, isEmpty); - await tester.tap(find.text('Test0Async')); - await tester.pumpAndSettleWithTimeout(); - expect(log, hasLength(2)); - expect( - log, - contains(contains( - 'test_caller_call_test0_async testCallerCallTest0Async false'))); - expect(log[1], contains('result null')); - log.clear(); - - expect(log, isEmpty); - await tester.tap(find.text('Test0AsyncResult')); - await tester.pumpAndSettleWithTimeout(); - expect(log, hasLength(2)); - expect( - log, - contains(contains( - 'test_caller_call_test0_async testCallerCallTest0Async true'))); - expect(log[1], contains('result testCallerCallTest0Async true')); - log.clear(); - - expect(log, isEmpty); - await tester.tap(find.text('Test0Sync')); - await tester.pumpAndSettleWithTimeout(); - expect(log, hasLength(2)); - expect( - log, - contains(contains( - 'test_caller_call_test0_sync testCallerCallTest0Sync false'))); - expect(log, contains('result null')); - log.clear(); - - debugPrint = originalDebugPrint; - }); - -// TODO: This test always fails on github and I don't know how to fix it. - testWidgets('async mulptiple parallel execution', skip: true, - (WidgetTester tester) async { - final List log = []; - - app.main(); - await tester.pumpAndSettleWithTimeout(); - - final DebugPrintCallback originalDebugPrint = debugPrint; - - // We can't move this init to setUp() because it should be after app init - debugPrint = (String? s, {int? wrapWidth}) { - // Ignore 'This may or may not be a problem. It will happen normally if hot-reload Flutter app.' - if (s != null && !s.contains('hot-reload')) log.add(s); - }; - - expect(log, isEmpty); - await tester.tap(find.text('initDartCaller')); - await tester.pumpAndSettleWithTimeout(); - expect(log, hasLength(0)); - log.clear(); - - expect(log, isEmpty); - await tester.tap(find.text('Test1AsyncResult')); - await tester.pumpAndSettleWithTimeout(const Duration(seconds: 2)); - expect(log, hasLength(14), - reason: 'failed log entry count, found ${log.length}, should be 14'); - count(String substring) => log.fold( - 0, (count, string) => count += string.contains(substring) ? 1 : 0); - - expect( - count('test_caller_call_test1_async testCallerCallTest1Async true'), - 7, - reason: 'failed log rust entry count, found ${log.length}, should be 7', - ); - expect( - count('result testCallerCallTest1Async true'), - 7, - reason: 'failed log dart entry count, found ${log.length}, should be 7', - ); - log.clear(); - - debugPrint = originalDebugPrint; - }); - }); -} diff --git a/packages/flutter_nekoton_bridge/example/integration_test/core/accounts_storage_test.dart b/packages/flutter_nekoton_bridge/example/integration_test/core/accounts_storage_test.dart index 0e0ca6d5..9984c744 100644 --- a/packages/flutter_nekoton_bridge/example/integration_test/core/accounts_storage_test.dart +++ b/packages/flutter_nekoton_bridge/example/integration_test/core/accounts_storage_test.dart @@ -12,17 +12,11 @@ class MockedStorageMethods { return data[key]; } - Future set({ - required String key, - required String value, - }) async { + Future set({required String key, required String value}) async { data[key] = value; } - void setUnchecked({ - required String key, - required String value, - }) { + void setUnchecked({required String key, required String value}) { data[key] = value; } @@ -68,7 +62,6 @@ void main() { ), ); runApp(Container()); - await initRustToDartCaller(); }); setUpAll(() async { diff --git a/packages/flutter_nekoton_bridge/example/integration_test/core/generic_contract_test.dart b/packages/flutter_nekoton_bridge/example/integration_test/core/generic_contract_test.dart index 6e36f8f9..7d766173 100644 --- a/packages/flutter_nekoton_bridge/example/integration_test/core/generic_contract_test.dart +++ b/packages/flutter_nekoton_bridge/example/integration_test/core/generic_contract_test.dart @@ -14,8 +14,9 @@ void main() { const endpoint = 'https://jrpc.everwallet.net/proto'; const address = Address( - address: - '0:d92c91860621eb5397957ee3f426860e2c21d7d4410626885f35db88a46a87c2'); + address: + '0:d92c91860621eb5397957ee3f426860e2c21d7d4410626885f35db88a46a87c2', + ); const jrpcSettings = ProtoNetworkSettings(endpoint: endpoint); late ProtoTransport transport; @@ -32,8 +33,6 @@ void main() { runApp(Container()); - await initRustToDartCaller(); - final connection = ProtoConnection.create( client: TestProtoClient(), settings: jrpcSettings, @@ -91,26 +90,25 @@ void main() { expect(contract.contractState.isDeployed, isTrue); }); - testWidgets( - 'subscribing new instance after disposing old one', - (WidgetTester tester) async { - await tester.pumpAndSettleWithTimeout(); - - for (var i = 0; i < 10; i++) { - final contract = await GenericContract.subscribe( - transport: transport, - address: address, - preloadTransactions: true, - ); - - expect(contract, isNotNull); - expect(contract.address, address); - expect(contract.contractState.balance, isNot(BigInt.parse('0'))); - expect(contract.contractState.isDeployed, isTrue); - - contract.dispose(); - } - }, - ); + testWidgets('subscribing new instance after disposing old one', ( + WidgetTester tester, + ) async { + await tester.pumpAndSettleWithTimeout(); + + for (var i = 0; i < 10; i++) { + final contract = await GenericContract.subscribe( + transport: transport, + address: address, + preloadTransactions: true, + ); + + expect(contract, isNotNull); + expect(contract.address, address); + expect(contract.contractState.balance, isNot(BigInt.parse('0'))); + expect(contract.contractState.isDeployed, isTrue); + + contract.dispose(); + } + }); }); } diff --git a/packages/flutter_nekoton_bridge/example/integration_test/core/jetton_wallet_test.dart b/packages/flutter_nekoton_bridge/example/integration_test/core/jetton_wallet_test.dart index 382d9a73..d79ba8dd 100644 --- a/packages/flutter_nekoton_bridge/example/integration_test/core/jetton_wallet_test.dart +++ b/packages/flutter_nekoton_bridge/example/integration_test/core/jetton_wallet_test.dart @@ -14,14 +14,17 @@ void main() { const endpoint = 'https://jrpc-ton.broxus.com'; const address = Address( - address: - '0:6ca35273892588b4c5f4ae898dc1983eec9662dffebeacdbe82103a1d1dcac60'); - const usdtTokenRoot = Address( - address: - '0:b113a994b5024a16719f69139328eb759596c38a25f59028b146fecdc3621dfe'); + address: + '0:2cf545d69ef7331c637cbcbaa358c7d58277a1b5713788736d62435dfa050ced', + ); + const hamsterTokenRoot = Address( + address: + '0:09f2e59dec406ab26a5259a45d7ff23ef11f3e5c7c21de0b0d2a1cbe52b76b3d', + ); const tokenWallet = Address( - address: - '0:2de4b60d57c1b6de29557922139212ee44c2eac5c5fd0cef51c73611e27b1a00'); + address: + '0:2932b05d620dd0520a66b1371e33b04ff4911886afef9b4b0a31f70560067469', + ); const jrpcSettings = ProtoNetworkSettings(endpoint: endpoint); late ProtoTransport transport; @@ -38,8 +41,6 @@ void main() { runApp(Container()); - await initRustToDartCaller(); - final connection = ProtoConnection.create( client: TestProtoClient(), settings: jrpcSettings, @@ -64,13 +65,13 @@ void main() { final wallet = await JettonWallet.subscribe( transport: transport, owner: address, - rootTokenContract: usdtTokenRoot, + rootTokenContract: hamsterTokenRoot, ); expect(wallet, isNotNull); expect(wallet.owner, address); expect(wallet.tokenAddress, tokenWallet); - expect(wallet.rootTokenContract, usdtTokenRoot); + expect(wallet.rootTokenContract, hamsterTokenRoot); expect(wallet.contractState.balance, isNot(BigInt.zero)); wallet.dispose(); @@ -86,7 +87,7 @@ void main() { final wallet = await JettonWallet.subscribe( transport: transport, owner: address, - rootTokenContract: usdtTokenRoot, + rootTokenContract: hamsterTokenRoot, ); final amount = await wallet.estimateMinAttachedAmount( @@ -103,11 +104,11 @@ void main() { final wallet = await JettonWallet.subscribe( transport: transport, owner: address, - rootTokenContract: usdtTokenRoot, + rootTokenContract: hamsterTokenRoot, ); final message = await wallet.prepareTransfer( - destination: usdtTokenRoot, + destination: hamsterTokenRoot, amount: BigInt.parse('10000'), callbackValue: BigInt.one, remainingGasTo: address, @@ -128,17 +129,19 @@ void main() { expect(details.$1.balance, isNot(BigInt.zero)); expect(details.$1.ownerAddress, address); - expect(details.$1.rootAddress, usdtTokenRoot); + expect(details.$1.rootAddress, hamsterTokenRoot); expect( details.$2.adminAddress, const Address( - address: - '0:6440fe3c69410383963945173c4b11479bf0b9b4d7090e58777bda581c2f9998'), + address: + '0:bbf13a702490ae3b853fde3849b8e7dc1b5f548807a9158753046496a4aed324', + ), ); }); - testWidgets('getJettonRootDetailsFromJettonWallet', - (WidgetTester tester) async { + testWidgets('getJettonRootDetailsFromJettonWallet', ( + WidgetTester tester, + ) async { await tester.pumpAndSettleWithTimeout(); final details = await JettonWallet.getJettonRootDetailsFromJettonWallet( @@ -146,12 +149,13 @@ void main() { address: tokenWallet, ); - expect(details.$1, usdtTokenRoot); + expect(details.$1, hamsterTokenRoot); expect( details.$2.adminAddress, const Address( - address: - '0:6440fe3c69410383963945173c4b11479bf0b9b4d7090e58777bda581c2f9998'), + address: + '0:bbf13a702490ae3b853fde3849b8e7dc1b5f548807a9158753046496a4aed324', + ), ); }); @@ -160,14 +164,15 @@ void main() { final details = await JettonWallet.getJettonRootDetails( transport: transport, - tokenRoot: usdtTokenRoot, + tokenRoot: hamsterTokenRoot, ); expect( details.adminAddress, const Address( - address: - '0:6440fe3c69410383963945173c4b11479bf0b9b4d7090e58777bda581c2f9998'), + address: + '0:bbf13a702490ae3b853fde3849b8e7dc1b5f548807a9158753046496a4aed324', + ), ); }); @@ -177,13 +182,13 @@ void main() { final wallet = await JettonWallet.subscribe( transport: transport, owner: address, - rootTokenContract: usdtTokenRoot, + rootTokenContract: hamsterTokenRoot, ); expect(wallet, isNotNull); expect(wallet.owner, address); expect(wallet.tokenAddress, tokenWallet); - expect(wallet.rootTokenContract, usdtTokenRoot); + expect(wallet.rootTokenContract, hamsterTokenRoot); expect(wallet.contractState.balance, isNot(BigInt.zero)); final fut = expectLater(wallet.fieldUpdatesStream, emits(null)); @@ -193,34 +198,33 @@ void main() { expect(wallet, isNotNull); expect(wallet.owner, address); expect(wallet.tokenAddress, tokenWallet); - expect(wallet.rootTokenContract, usdtTokenRoot); + expect(wallet.rootTokenContract, hamsterTokenRoot); expect(wallet.contractState.balance, isNot(BigInt.zero)); wallet.dispose(); }); - testWidgets( - 'subscribing new instance after disposing old one', - (WidgetTester tester) async { - await tester.pumpAndSettleWithTimeout(); - - for (var i = 0; i < 10; i++) { - final wallet = await JettonWallet.subscribe( - transport: transport, - owner: address, - rootTokenContract: usdtTokenRoot, - ); - - expect(wallet, isNotNull); - expect(wallet.owner, address); - expect(wallet.tokenAddress, tokenWallet); - expect(wallet.rootTokenContract, usdtTokenRoot); - expect(wallet.contractState.balance, isNot(BigInt.zero)); - - wallet.dispose(); - } - }, - ); + testWidgets('subscribing new instance after disposing old one', ( + WidgetTester tester, + ) async { + await tester.pumpAndSettleWithTimeout(); + + for (var i = 0; i < 10; i++) { + final wallet = await JettonWallet.subscribe( + transport: transport, + owner: address, + rootTokenContract: hamsterTokenRoot, + ); + + expect(wallet, isNotNull); + expect(wallet.owner, address); + expect(wallet.tokenAddress, tokenWallet); + expect(wallet.rootTokenContract, hamsterTokenRoot); + expect(wallet.contractState.balance, isNot(BigInt.zero)); + + wallet.dispose(); + } + }); testWidgets('preloadTransactions: true', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); @@ -228,14 +232,12 @@ void main() { final wallet = await JettonWallet.subscribe( transport: transport, owner: address, - rootTokenContract: usdtTokenRoot, + rootTokenContract: hamsterTokenRoot, preloadTransactions: true, ); var events = 0; - wallet.onTransactionsFoundStream.listen( - (data) => events++, - ); + wallet.onTransactionsFoundStream.listen((data) => events++); expect(wallet, isNotNull); expect(wallet.isTransactionsPreloaded, true); @@ -251,14 +253,12 @@ void main() { final wallet = await JettonWallet.subscribe( transport: transport, owner: address, - rootTokenContract: usdtTokenRoot, + rootTokenContract: hamsterTokenRoot, preloadTransactions: false, ); var events = 0; - wallet.onTransactionsFoundStream.listen( - (data) => events++, - ); + wallet.onTransactionsFoundStream.listen((data) => events++); expect(wallet, isNotNull); expect(wallet.isTransactionsPreloaded, false); diff --git a/packages/flutter_nekoton_bridge/example/integration_test/core/keystore_test.dart b/packages/flutter_nekoton_bridge/example/integration_test/core/keystore_test.dart index 6875176b..d133e1fa 100644 --- a/packages/flutter_nekoton_bridge/example/integration_test/core/keystore_test.dart +++ b/packages/flutter_nekoton_bridge/example/integration_test/core/keystore_test.dart @@ -14,17 +14,11 @@ class MockedStorageMethods { return data[key]; } - Future set({ - required String key, - required String value, - }) async { + Future set({required String key, required String value}) async { data[key] = value; } - void setUnchecked({ - required String key, - required String value, - }) { + void setUnchecked({required String key, required String value}) { data[key] = value; } @@ -50,11 +44,13 @@ void main() { const password = 'password'; const labsKey = PublicKey( - publicKey: - '43c77e697042c96481336afd84a858079d97b3223dcb1228ec70112d89ecbf93'); + publicKey: + '43c77e697042c96481336afd84a858079d97b3223dcb1228ec70112d89ecbf93', + ); const legacyKey = PublicKey( - publicKey: - '69fb667f274805ca5341afa06c4ba1227c37cd52f3a253f39426d211428fd78b'); + publicKey: + '69fb667f274805ca5341afa06c4ba1227c37cd52f3a253f39426d211428fd78b', + ); const inputLabsData = DerivedKeyCreateInputImport( keyName: 'KeyNameLabs', @@ -110,8 +106,6 @@ void main() { ); runApp(Container()); - - await initRustToDartCaller(); }); setUpAll(() async { @@ -248,17 +242,14 @@ void main() { final addedKey1 = await keystore.addKey(addKeyInputLabs); final addedKey2 = await keystore.addKey(addKeyInputLegacy); - final entries = - (await keystore.getEntries()).map((e) => e.publicKey).toList(); + final entries = (await keystore.getEntries()) + .map((e) => e.publicKey) + .toList(); /// sort needs to avoid random order of keys expect( - jsonEncode( - entries..sort((a, b) => a.compareTo(b)), - ), - jsonEncode( - [addedKey1, addedKey2]..sort((a, b) => a.compareTo(b)), - ), + jsonEncode(entries..sort((a, b) => a.compareTo(b))), + jsonEncode([addedKey1, addedKey2]..sort((a, b) => a.compareTo(b))), ); expect(storageMethods.data.isNotEmpty, isTrue); }); @@ -357,10 +348,14 @@ void main() { ); final key = await keystore.addKey(addKeyInputLabs); - final exported = (await keystore.exportSeed(DerivedKeyExportSeedParams( - password: inputLabsData.password, - masterKey: key, - ))) as DerivedKeyExportOutput; + final exported = + (await keystore.exportSeed( + DerivedKeyExportSeedParams( + password: inputLabsData.password, + masterKey: key, + ), + )) + as DerivedKeyExportOutput; expect(exported.phrase, inputLabsData.phrase); }); @@ -382,12 +377,14 @@ void main() { ); final key = await keystore.addKey(addKeyInputLabs); - final keys = await keystore.getPublicKeys(DerivedKeyGetPublicKeys( - masterKey: key, - password: inputLabsData.password, - offset: 0, - limit: 5, - )); + final keys = await keystore.getPublicKeys( + DerivedKeyGetPublicKeys( + masterKey: key, + password: inputLabsData.password, + offset: 0, + limit: 5, + ), + ); expect(keys.length, 5); expect(keys[0], key); @@ -410,13 +407,15 @@ void main() { ); final key = await keystore.addKey(addKeyInputLabs); - await keystore.updateKey(DerivedKeyUpdateParams.renameKey( - DerivedKeyUpdateParamsRenameKey( - name: 'Renamed', - publicKey: key, - masterKey: key, + await keystore.updateKey( + DerivedKeyUpdateParams.renameKey( + DerivedKeyUpdateParamsRenameKey( + name: 'Renamed', + publicKey: key, + masterKey: key, + ), ), - )); + ); final entry = (await keystore.getEntries()).first; expect(entry.name, 'Renamed'); diff --git a/packages/flutter_nekoton_bridge/example/integration_test/core/token_wallet_test.dart b/packages/flutter_nekoton_bridge/example/integration_test/core/token_wallet_test.dart index 88965316..63c99bce 100644 --- a/packages/flutter_nekoton_bridge/example/integration_test/core/token_wallet_test.dart +++ b/packages/flutter_nekoton_bridge/example/integration_test/core/token_wallet_test.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; +import 'package:money2/money2.dart'; import '../test_helpers.dart'; import '../timeout_utils.dart'; @@ -14,11 +15,13 @@ void main() { const endpoint = 'https://jrpc.everwallet.net'; const stEverRootContract = Address( - address: - '0:6d42d0bc4a6568120ea88bf642edb653d727cfbd35868c47877532de128e71f2'); + address: + '0:6d42d0bc4a6568120ea88bf642edb653d727cfbd35868c47877532de128e71f2', + ); const address = Address( - address: - '0:d92c91860621eb5397957ee3f426860e2c21d7d4410626885f35db88a46a87c2'); + address: + '0:d92c91860621eb5397957ee3f426860e2c21d7d4410626885f35db88a46a87c2', + ); const jrpcSettings = ProtoNetworkSettings(endpoint: endpoint); late ProtoTransport transport; @@ -35,8 +38,6 @@ void main() { runApp(Container()); - await initRustToDartCaller(); - final connection = ProtoConnection.create( client: TestProtoClient(), settings: jrpcSettings, @@ -69,8 +70,9 @@ void main() { expect( wallet.tokenAddress, const Address( - address: - '0:ecfb1d0edbcbe0409763fa8ad8ad7f2727749f6cf29e0e6bcba9fdc752d3ae01'), + address: + '0:ecfb1d0edbcbe0409763fa8ad8ad7f2727749f6cf29e0e6bcba9fdc752d3ae01', + ), ); expect(wallet.rootTokenContract, stEverRootContract); expect(wallet.contractState.balance, BigInt.parse('89399257')); @@ -147,8 +149,9 @@ void main() { final details = await TokenWallet.getTokenWalletDetails( transport: transport, address: const Address( - address: - '0:ecfb1d0edbcbe0409763fa8ad8ad7f2727749f6cf29e0e6bcba9fdc752d3ae01'), + address: + '0:ecfb1d0edbcbe0409763fa8ad8ad7f2727749f6cf29e0e6bcba9fdc752d3ae01', + ), ); expect(details.$1.balance, BigInt.parse('1826241428')); @@ -157,30 +160,34 @@ void main() { expect( details.$2.ownerAddress, const Address( - address: - '0:675a6d63f27e3f24d41d286043a9286b2e3eb6b84fa4c3308cc2833ef6f54d68'), + address: + '0:675a6d63f27e3f24d41d286043a9286b2e3eb6b84fa4c3308cc2833ef6f54d68', + ), ); expect(details.$2.version, TokenWalletVersion.tip3); expect(details.$2.symbol, 'STEVER'); }); - testWidgets('getTokenRootDetailsFromTokenWallet', - (WidgetTester tester) async { + testWidgets('getTokenRootDetailsFromTokenWallet', ( + WidgetTester tester, + ) async { await tester.pumpAndSettleWithTimeout(); final details = await TokenWallet.getTokenRootDetailsFromTokenWallet( transport: transport, address: const Address( - address: - '0:ecfb1d0edbcbe0409763fa8ad8ad7f2727749f6cf29e0e6bcba9fdc752d3ae01'), + address: + '0:ecfb1d0edbcbe0409763fa8ad8ad7f2727749f6cf29e0e6bcba9fdc752d3ae01', + ), ); expect(details.$1, stEverRootContract); expect( details.$2.ownerAddress, const Address( - address: - '0:675a6d63f27e3f24d41d286043a9286b2e3eb6b84fa4c3308cc2833ef6f54d68'), + address: + '0:675a6d63f27e3f24d41d286043a9286b2e3eb6b84fa4c3308cc2833ef6f54d68', + ), ); expect(details.$2.version, TokenWalletVersion.tip3); expect(details.$2.symbol, 'STEVER'); @@ -192,15 +199,17 @@ void main() { final details = await TokenWallet.getTokenRootDetails( transport: transport, tokenRoot: const Address( - address: - '0:09c0dda26e4e3f3a80a5a730e86bed8a557d3aaa1bf8e40be0e48ac544307477'), + address: + '0:09c0dda26e4e3f3a80a5a730e86bed8a557d3aaa1bf8e40be0e48ac544307477', + ), ); expect( details.ownerAddress, const Address( - address: - '0:f9f575258120bff21afd8c798a5c9e9a2ef0b251e11d9c85fbf43bec968a57c6'), + address: + '0:f9f575258120bff21afd8c798a5c9e9a2ef0b251e11d9c85fbf43bec968a57c6', + ), ); expect(details.version, TokenWalletVersion.tip3); expect(details.symbol, 'TEST'); @@ -221,8 +230,9 @@ void main() { expect( wallet.tokenAddress, const Address( - address: - '0:ecfb1d0edbcbe0409763fa8ad8ad7f2727749f6cf29e0e6bcba9fdc752d3ae01'), + address: + '0:ecfb1d0edbcbe0409763fa8ad8ad7f2727749f6cf29e0e6bcba9fdc752d3ae01', + ), ); expect(wallet.rootTokenContract, stEverRootContract); expect(wallet.contractState.balance, BigInt.parse('89399257')); @@ -241,8 +251,9 @@ void main() { expect( wallet.tokenAddress, const Address( - address: - '0:ecfb1d0edbcbe0409763fa8ad8ad7f2727749f6cf29e0e6bcba9fdc752d3ae01'), + address: + '0:ecfb1d0edbcbe0409763fa8ad8ad7f2727749f6cf29e0e6bcba9fdc752d3ae01', + ), ); expect(wallet.rootTokenContract, stEverRootContract); expect(wallet.contractState.balance, BigInt.parse('89399257')); @@ -254,59 +265,56 @@ void main() { wallet.dispose(); }); - testWidgets( - 'subscribing new instance after disposing old one', - (WidgetTester tester) async { - await tester.pumpAndSettleWithTimeout(); - - for (var i = 0; i < 10; i++) { - final wallet = await TokenWallet.subscribe( - transport: transport, - owner: address, - rootTokenContract: stEverRootContract, - ); - - expect(wallet, isNotNull); - expect(wallet.owner, address); - expect( - wallet.tokenAddress, - const Address( - address: - '0:ecfb1d0edbcbe0409763fa8ad8ad7f2727749f6cf29e0e6bcba9fdc752d3ae01'), - ); - expect(wallet.rootTokenContract, stEverRootContract); - expect(wallet.contractState.balance, BigInt.parse('89399257')); - expect(wallet.symbol.decimals, 9); - expect(wallet.symbol.rootTokenContract, stEverRootContract); - expect(wallet.symbol.name, 'STEVER'); - expect(wallet.version, TokenWalletVersion.tip3); - - wallet.dispose(); - } - }, - ); - - testWidgets( - 'Currency creation', - (WidgetTester tester) async { - await tester.pumpAndSettleWithTimeout(); + testWidgets('subscribing new instance after disposing old one', ( + WidgetTester tester, + ) async { + await tester.pumpAndSettleWithTimeout(); + for (var i = 0; i < 10; i++) { final wallet = await TokenWallet.subscribe( transport: transport, owner: address, rootTokenContract: stEverRootContract, ); + expect(wallet, isNotNull); + expect(wallet.owner, address); + expect( + wallet.tokenAddress, + const Address( + address: + '0:ecfb1d0edbcbe0409763fa8ad8ad7f2727749f6cf29e0e6bcba9fdc752d3ae01', + ), + ); + expect(wallet.rootTokenContract, stEverRootContract); + expect(wallet.contractState.balance, BigInt.parse('89399257')); + expect(wallet.symbol.decimals, 9); + expect(wallet.symbol.rootTokenContract, stEverRootContract); expect(wallet.symbol.name, 'STEVER'); - expect(wallet.currency.isoCode, 'STEVER'); - expect(wallet.currency.symbol, 'STEVER'); - expect(Currencies().find('STEVER'), isNotNull); - - expect(wallet.moneyBalance.currency.isoCode, 'STEVER'); + expect(wallet.version, TokenWalletVersion.tip3); wallet.dispose(); - }, - ); + } + }); + + testWidgets('Currency creation', (WidgetTester tester) async { + await tester.pumpAndSettleWithTimeout(); + + final wallet = await TokenWallet.subscribe( + transport: transport, + owner: address, + rootTokenContract: stEverRootContract, + ); + + expect(wallet.symbol.name, 'STEVER'); + expect(wallet.currency.isoCode, 'STEVER'); + expect(wallet.currency.symbol, 'STEVER'); + expect(Currencies().find('STEVER'), isNotNull); + + expect(wallet.moneyBalance.currency.isoCode, 'STEVER'); + + wallet.dispose(); + }); testWidgets('preloadTransactions: true', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); @@ -319,9 +327,7 @@ void main() { ); var events = 0; - wallet.onTransactionsFoundStream.listen( - (data) => events++, - ); + wallet.onTransactionsFoundStream.listen((data) => events++); expect(wallet, isNotNull); expect(wallet.isTransactionsPreloaded, true); @@ -342,9 +348,7 @@ void main() { ); var events = 0; - wallet.onTransactionsFoundStream.listen( - (data) => events++, - ); + wallet.onTransactionsFoundStream.listen((data) => events++); expect(wallet, isNotNull); expect(wallet.isTransactionsPreloaded, false); diff --git a/packages/flutter_nekoton_bridge/example/integration_test/core/ton_wallet_test.dart b/packages/flutter_nekoton_bridge/example/integration_test/core/ton_wallet_test.dart index b4b22533..feba6092 100644 --- a/packages/flutter_nekoton_bridge/example/integration_test/core/ton_wallet_test.dart +++ b/packages/flutter_nekoton_bridge/example/integration_test/core/ton_wallet_test.dart @@ -13,17 +13,11 @@ class MockedStorageMethods { return data[key]; } - Future set({ - required String key, - required String value, - }) async { + Future set({required String key, required String value}) async { data[key] = value; } - void setUnchecked({ - required String key, - required String value, - }) { + void setUnchecked({required String key, required String value}) { data[key] = value; } @@ -44,14 +38,17 @@ void main() { const endpoint = 'https://jrpc.everwallet.net/proto'; const stEverContractVault = Address( - address: - '0:675a6d63f27e3f24d41d286043a9286b2e3eb6b84fa4c3308cc2833ef6f54d68'); + address: + '0:675a6d63f27e3f24d41d286043a9286b2e3eb6b84fa4c3308cc2833ef6f54d68', + ); const publicKey = PublicKey( - publicKey: - 'ad158ac64c5deff5abd4d5e86a81d954716445c45e31f17a9dfe780f9cef7602'); + publicKey: + 'ad158ac64c5deff5abd4d5e86a81d954716445c45e31f17a9dfe780f9cef7602', + ); const address = Address( - address: - '0:d92c91860621eb5397957ee3f426860e2c21d7d4410626885f35db88a46a87c2'); + address: + '0:d92c91860621eb5397957ee3f426860e2c21d7d4410626885f35db88a46a87c2', + ); const workchainId = 0; const walletType = WalletType.walletV3(); const expiration = Expiration.timeout(60); @@ -71,8 +68,6 @@ void main() { runApp(Container()); - await initRustToDartCaller(); - final connection = ProtoConnection.create( client: TestProtoClient(), settings: jrpcSettings, @@ -298,8 +293,9 @@ void main() { final custodians2 = await TonWallet.getWalletCustodians( transport: transport, address: const Address( - address: - '0:91b689ad990660249eb00140577e6a98d70043ccaa7f63acfc0436336bdbd80f'), + address: + '0:91b689ad990660249eb00140577e6a98d70043ccaa7f63acfc0436336bdbd80f', + ), ); /// For not multisig wallet custodians contains public key of wallet @@ -334,29 +330,28 @@ void main() { expect(wallet.workchain, 0); }); - testWidgets( - 'subscribing new instance after disposing old one', - (WidgetTester tester) async { - await tester.pumpAndSettleWithTimeout(); - - for (var i = 0; i < 10; i++) { - final wallet = await TonWallet.subscribe( - transport: transport, - workchainId: workchainId, - publicKey: publicKey, - walletType: walletType, - ); - - expect(wallet, isNotNull); - expect(wallet.address, address); - expect(wallet.publicKey, publicKey); - expect(wallet.walletType, walletType); - expect(wallet.workchain, 0); - - wallet.dispose(); - } - }, - ); + testWidgets('subscribing new instance after disposing old one', ( + WidgetTester tester, + ) async { + await tester.pumpAndSettleWithTimeout(); + + for (var i = 0; i < 10; i++) { + final wallet = await TonWallet.subscribe( + transport: transport, + workchainId: workchainId, + publicKey: publicKey, + walletType: walletType, + ); + + expect(wallet, isNotNull); + expect(wallet.address, address); + expect(wallet.publicKey, publicKey); + expect(wallet.walletType, walletType); + expect(wallet.workchain, 0); + + wallet.dispose(); + } + }); testWidgets('estimateFees', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); diff --git a/packages/flutter_nekoton_bridge/example/integration_test/logger_test.dart b/packages/flutter_nekoton_bridge/example/integration_test/logger_test.dart deleted file mode 100644 index b33872e3..00000000 --- a/packages/flutter_nekoton_bridge/example/integration_test/logger_test.dart +++ /dev/null @@ -1,94 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter_nekoton_bridge_example/main.dart' as app; -import 'package:flutter_test/flutter_test.dart'; -import 'package:integration_test/integration_test.dart'; - -import 'timeout_utils.dart'; - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - group('logger test', () { - testWidgets('info, debug, warn, error', (WidgetTester tester) async { - final List log = []; - - app.main(); - await tester.pumpAndSettleWithTimeout(); - - final DebugPrintCallback originalDebugPrint = debugPrint; - - // We can't move this init to setUp() because it should be after app init - debugPrint = (String? s, {int? wrapWidth}) { - // Ignore 'This may or may not be a problem. It will happen normally if hot-reload Flutter app.' - if (s != null && !s.contains('hot-reload')) log.add(s); - }; - - expect(log, isEmpty); - await tester.tap(find.text('i')); - await tester.pumpAndSettleWithTimeout(); - expect(log, hasLength(1)); - expect(log[0], contains('Info: test logger: info')); - log.clear(); - - expect(log, isEmpty); - await tester.tap(find.text('d')); - await tester.pumpAndSettleWithTimeout(); - expect(log, hasLength(1)); - expect(log[0], contains('Debug: test logger: debug')); - log.clear(); - - expect(log, isEmpty); - await tester.tap(find.text('w')); - await tester.pumpAndSettleWithTimeout(); - expect(log, hasLength(1)); - expect(log[0], contains('Warn: test logger: warn')); - log.clear(); - - expect(log, isEmpty); - await tester.tap(find.text('e')); - await tester.pumpAndSettleWithTimeout(); - expect(log, hasLength(1)); - expect(log[0], contains('Error: test logger: error')); - log.clear(); - - debugPrint = originalDebugPrint; - }); - -// TODO: This test always fails because I don't know how to catch exception here. -// Error mesage is: -// 'package:flutter_test/src/binding.dart': Failed assertion: line 903 pos 14: '_pendingExceptionDetails != null': -// A test overrode FlutterError.onError but either failed to return it to its original state, or had unexpected -// additional errors that it could not handle. Typically, this is caused by using expect() before restoring -// FlutterError.onError. - testWidgets('panic', skip: true, (WidgetTester tester) async { - final List log = []; - - app.main(); - await tester.pumpAndSettleWithTimeout(); - - final DebugPrintCallback originalDebugPrint = debugPrint; - - // We can't move this init to setUp() because it should be after app init - debugPrint = (String? s, {int? wrapWidth}) { - // Ignore 'This may or may not be a problem. It will happen normally if hot-reload Flutter app.' - if (s != null && !s.contains('hot-reload')) log.add(s); - }; - - expect(log, isEmpty); - - final FlutterExceptionHandler? originalOnError = FlutterError.onError; - FlutterError.onError = (details) {}; - - await tester.tap(find.text('p')); - await tester.pumpAndSettleWithTimeout(); - - FlutterError.onError = originalOnError; - - expect(log, hasLength(1)); - expect(log[0], contains('Panic: test logger: panic')); - log.clear(); - - debugPrint = originalDebugPrint; - }); - }); -} diff --git a/packages/flutter_nekoton_bridge/example/integration_test/transport/gql_transport_test.dart b/packages/flutter_nekoton_bridge/example/integration_test/transport/gql_transport_test.dart index d2f15845..a3814754 100644 --- a/packages/flutter_nekoton_bridge/example/integration_test/transport/gql_transport_test.dart +++ b/packages/flutter_nekoton_bridge/example/integration_test/transport/gql_transport_test.dart @@ -51,8 +51,9 @@ void main() { /// System account address const accountAddress = Address( - address: - '-1:0000000000000000000000000000000000000000000000000000000000000000'); + address: + '-1:0000000000000000000000000000000000000000000000000000000000000000', + ); const accountTransaction = 'd0a278d82e699a63adeaede7e602ff6da8168c333ceb4f2344f42cb739c28940'; @@ -86,8 +87,6 @@ void main() { testWidgets('Create GqlTransport', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = GqlConnection.create( client: HttpClient(), settings: gqlSettings, @@ -102,8 +101,6 @@ void main() { testWidgets('getSignatureId ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = GqlConnection.create( client: HttpClient(), settings: gqlSettings, @@ -120,8 +117,6 @@ void main() { testWidgets('getTransactions ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = GqlConnection.create( client: HttpClient(), settings: gqlSettings, @@ -141,8 +136,6 @@ void main() { testWidgets('getTransaction ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = GqlConnection.create( client: HttpClient(), settings: gqlSettings, @@ -163,8 +156,6 @@ void main() { testWidgets('getDstTransaction', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = GqlConnection.create( client: HttpClient(), settings: gqlSettings, @@ -190,8 +181,6 @@ void main() { testWidgets('multiple calls ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = GqlConnection.create( client: HttpClient(), settings: gqlSettings, @@ -200,23 +189,23 @@ void main() { ); final transport = await GqlTransport.create(gqlConnection: connection); - expect( - await transport.getTransaction(accountTransaction), - isNotNull, - ); + expect(await transport.getTransaction(accountTransaction), isNotNull); expect( await transport.getTransaction( - 'f90074116294f0a4295d7ab368af8a1cc75654aad557d3ffd6edb7e8b2020c39'), + 'f90074116294f0a4295d7ab368af8a1cc75654aad557d3ffd6edb7e8b2020c39', + ), isNotNull, ); expect( await transport.getTransaction( - '74773423c867ce433d39612f8c14c49e835500263ced3e045ca560c4383ea6fc'), + '74773423c867ce433d39612f8c14c49e835500263ced3e045ca560c4383ea6fc', + ), isNotNull, ); expect( await transport.getTransaction( - '5c229b34601836743083acf9fd87f164039b75ac7b513b756a06da0e7051fffd'), + '5c229b34601836743083acf9fd87f164039b75ac7b513b756a06da0e7051fffd', + ), isNotNull, ); }); @@ -224,8 +213,6 @@ void main() { testWidgets('getContractState ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = GqlConnection.create( client: HttpClient(), settings: gqlSettings, @@ -237,22 +224,15 @@ void main() { final state = await transport.getContractState(accountAddress); expect(state, isNotNull); - expect( - switch (state) { - RawContractStateExists(:final data) => data, - RawContractStateNotExists() => null, - }, - isNotNull, - ); + expect(switch (state) { + RawContractStateExists(:final data) => data, + RawContractStateNotExists() => null, + }, isNotNull); }); - testWidgets('getFullContractState ', ( - WidgetTester tester, - ) async { + testWidgets('getFullContractState ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = GqlConnection.create( client: HttpClient(), settings: gqlSettings, @@ -268,13 +248,9 @@ void main() { expect(state.isDeployed, true); }); - testWidgets('getContractFields', ( - WidgetTester tester, - ) async { + testWidgets('getContractFields', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = GqlConnection.create( client: HttpClient(), settings: gqlSettings, @@ -298,7 +274,6 @@ void main() { testWidgets('getNetworkId ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final connection = GqlConnection.create( client: HttpClient(), @@ -313,7 +288,6 @@ void main() { testWidgets('getBlockchainConfig ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final connection = GqlConnection.create( client: HttpClient(), @@ -331,7 +305,6 @@ void main() { testWidgets('simulateTransactionTree ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final connection = GqlConnection.create( client: HttpClient(), @@ -351,14 +324,16 @@ void main() { final message = await wallet.prepareTransfer( contractState: await transport.getContractState(address), publicKey: const PublicKey( - publicKey: - '6c2f9514c1c0f2ec54cffe1ac2ba0e85268e76442c14205581ebc808fe7ee52c'), + publicKey: + '6c2f9514c1c0f2ec54cffe1ac2ba0e85268e76442c14205581ebc808fe7ee52c', + ), expiration: const Expiration.timeout(60), params: [ TonWalletTransferParams( destination: const Address( - address: - '-1:06eec9c3a6f122c29697d27ae987e4b911d4dadc937e23c7aa58bbf1e484b20f'), + address: + '-1:06eec9c3a6f122c29697d27ae987e4b911d4dadc937e23c7aa58bbf1e484b20f', + ), amount: BigInt.parse('1000000000'), bounce: false, ), @@ -378,8 +353,6 @@ void main() { testWidgets('getFeeFactors', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = GqlConnection.create( client: HttpClient(), settings: gqlSettings, diff --git a/packages/flutter_nekoton_bridge/example/integration_test/transport/jrpc_transport_test.dart b/packages/flutter_nekoton_bridge/example/integration_test/transport/jrpc_transport_test.dart index a68fbe9e..a26e28bd 100644 --- a/packages/flutter_nekoton_bridge/example/integration_test/transport/jrpc_transport_test.dart +++ b/packages/flutter_nekoton_bridge/example/integration_test/transport/jrpc_transport_test.dart @@ -38,8 +38,9 @@ void main() { /// System account address const accountAddress = Address( - address: - '-1:0000000000000000000000000000000000000000000000000000000000000000'); + address: + '-1:0000000000000000000000000000000000000000000000000000000000000000', + ); const accountTransaction = 'd0a278d82e699a63adeaede7e602ff6da8168c333ceb4f2344f42cb739c28940'; @@ -67,8 +68,6 @@ void main() { testWidgets('Create JrpcTransport', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = JrpcConnection.create( client: HttpClient(), settings: jrpcSettings, @@ -83,8 +82,6 @@ void main() { testWidgets('getSignatureId ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = JrpcConnection.create( client: HttpClient(), settings: jrpcSettings, @@ -101,7 +98,6 @@ void main() { testWidgets('getSignatureId venom ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); const venomEndpoint = 'https://jrpc.venom.foundation'; final connection = JrpcConnection.create( @@ -120,8 +116,6 @@ void main() { testWidgets('getTransactions ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = JrpcConnection.create( client: HttpClient(), settings: jrpcSettings, @@ -141,8 +135,6 @@ void main() { testWidgets('getTransaction ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = JrpcConnection.create( client: HttpClient(), settings: jrpcSettings, @@ -163,8 +155,6 @@ void main() { testWidgets('getDstTransaction', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = JrpcConnection.create( client: HttpClient(), settings: jrpcSettings, @@ -191,8 +181,6 @@ void main() { testWidgets('multiple calls ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = JrpcConnection.create( client: HttpClient(), settings: jrpcSettings, @@ -201,23 +189,23 @@ void main() { ); final transport = await JrpcTransport.create(jrpcConnection: connection); - expect( - await transport.getTransaction(accountTransaction), - isNotNull, - ); + expect(await transport.getTransaction(accountTransaction), isNotNull); expect( await transport.getTransaction( - 'f90074116294f0a4295d7ab368af8a1cc75654aad557d3ffd6edb7e8b2020c39'), + 'f90074116294f0a4295d7ab368af8a1cc75654aad557d3ffd6edb7e8b2020c39', + ), isNotNull, ); expect( await transport.getTransaction( - '74773423c867ce433d39612f8c14c49e835500263ced3e045ca560c4383ea6fc'), + '74773423c867ce433d39612f8c14c49e835500263ced3e045ca560c4383ea6fc', + ), isNotNull, ); expect( await transport.getTransaction( - '5c229b34601836743083acf9fd87f164039b75ac7b513b756a06da0e7051fffd'), + '5c229b34601836743083acf9fd87f164039b75ac7b513b756a06da0e7051fffd', + ), isNotNull, ); }); @@ -225,8 +213,6 @@ void main() { testWidgets('getContractState ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = JrpcConnection.create( client: HttpClient(), settings: jrpcSettings, @@ -238,22 +224,15 @@ void main() { final state = await transport.getContractState(accountAddress); expect(state, isNotNull); - expect( - switch (state) { - RawContractStateExists(:final data) => data, - RawContractStateNotExists() => null, - }, - isNotNull, - ); + expect(switch (state) { + RawContractStateExists(:final data) => data, + RawContractStateNotExists() => null, + }, isNotNull); }); - testWidgets('getFullContractState ', ( - WidgetTester tester, - ) async { + testWidgets('getFullContractState ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = JrpcConnection.create( client: HttpClient(), settings: jrpcSettings, @@ -269,13 +248,9 @@ void main() { expect(state.isDeployed, true); }); - testWidgets('getContractFields', ( - WidgetTester tester, - ) async { + testWidgets('getContractFields', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = JrpcConnection.create( client: HttpClient(), settings: jrpcSettings, @@ -299,7 +274,6 @@ void main() { testWidgets('getNetworkId ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final connection = JrpcConnection.create( client: HttpClient(), @@ -314,7 +288,7 @@ void main() { testWidgets('getNetworkId venom ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); + const venomEndpoint = 'https://jrpc.venom.foundation'; final connection = JrpcConnection.create( @@ -330,7 +304,6 @@ void main() { testWidgets('getBlockchainConfig ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final connection = JrpcConnection.create( client: HttpClient(), @@ -348,7 +321,6 @@ void main() { testWidgets('simulateTransactionTree ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final connection = JrpcConnection.create( client: HttpClient(), @@ -368,14 +340,16 @@ void main() { final message = await wallet.prepareTransfer( contractState: await transport.getContractState(address), publicKey: const PublicKey( - publicKey: - '6c2f9514c1c0f2ec54cffe1ac2ba0e85268e76442c14205581ebc808fe7ee52c'), + publicKey: + '6c2f9514c1c0f2ec54cffe1ac2ba0e85268e76442c14205581ebc808fe7ee52c', + ), expiration: const Expiration.timeout(60), params: [ TonWalletTransferParams( destination: const Address( - address: - '-1:06eec9c3a6f122c29697d27ae987e4b911d4dadc937e23c7aa58bbf1e484b20f'), + address: + '-1:06eec9c3a6f122c29697d27ae987e4b911d4dadc937e23c7aa58bbf1e484b20f', + ), amount: BigInt.parse('1000000000'), bounce: false, ), @@ -395,8 +369,6 @@ void main() { testWidgets('getFeeFactors', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = JrpcConnection.create( client: HttpClient(), settings: jrpcSettings, @@ -434,17 +406,19 @@ void main() { await transport.dispose(); }); - testWidgets('simulateTransactionTree (WalletV4R2)', - (WidgetTester tester) async { + testWidgets('simulateTransactionTree (WalletV4R2)', ( + WidgetTester tester, + ) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); const from = Address( - address: - '0:453163ef9b6f68e7c815a77a8d013bd791bb696e6fa4a0de0eb6df19cc0e373b'); + address: + '0:453163ef9b6f68e7c815a77a8d013bd791bb696e6fa4a0de0eb6df19cc0e373b', + ); const pk = PublicKey( - publicKey: - '1b2267c29f37b05470bfa593ed1f03c1b5f682bc6282f4896494b5f4c8fe66c8'); + publicKey: + '1b2267c29f37b05470bfa593ed1f03c1b5f682bc6282f4896494b5f4c8fe66c8', + ); const to = Address( address: '0:f9f575258120bff21afd8c798a5c9e9a2ef0b251e11d9c85fbf43bec968a57c6', @@ -476,17 +450,19 @@ void main() { expect(errors, isEmpty); }); - testWidgets('simulateTransactionTree (jetton: usdt)', - (WidgetTester tester) async { + testWidgets('simulateTransactionTree (jetton: usdt)', ( + WidgetTester tester, + ) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); const owner = Address( - address: - '0:6ca35273892588b4c5f4ae898dc1983eec9662dffebeacdbe82103a1d1dcac60'); + address: + '0:6ca35273892588b4c5f4ae898dc1983eec9662dffebeacdbe82103a1d1dcac60', + ); const usdtTokenRoot = Address( - address: - '0:b113a994b5024a16719f69139328eb759596c38a25f59028b146fecdc3621dfe'); + address: + '0:b113a994b5024a16719f69139328eb759596c38a25f59028b146fecdc3621dfe', + ); final wallet = await TonWallet.subscribeByAddress( transport: transport, @@ -507,8 +483,9 @@ void main() { final message = await wallet.prepareTransfer( contractState: await transport.getContractState(owner), publicKey: const PublicKey( - publicKey: - '9107a65271437e1a982bb98404bd9a82c434f31ee30c621b6596702bb59bf0a0'), + publicKey: + '9107a65271437e1a982bb98404bd9a82c434f31ee30c621b6596702bb59bf0a0', + ), expiration: const Expiration.timeout(60), params: [ TonWalletTransferParams( @@ -533,17 +510,19 @@ void main() { jettonWallet.dispose(); }); - testWidgets('simulateTransactionTree (jetton: mintless points)', - (WidgetTester tester) async { + testWidgets('simulateTransactionTree (jetton: mintless points)', ( + WidgetTester tester, + ) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); const owner = Address( - address: - '0:6ca35273892588b4c5f4ae898dc1983eec9662dffebeacdbe82103a1d1dcac60'); + address: + '0:6ca35273892588b4c5f4ae898dc1983eec9662dffebeacdbe82103a1d1dcac60', + ); const pointsTokenRoot = Address( - address: - '0:fa67d0c7739331fbc3c8f08e018c65f47763616a969100ad760a0b2dc1e36832'); + address: + '0:fa67d0c7739331fbc3c8f08e018c65f47763616a969100ad760a0b2dc1e36832', + ); final wallet = await TonWallet.subscribeByAddress( transport: transport, @@ -564,8 +543,9 @@ void main() { final message = await wallet.prepareTransfer( contractState: await transport.getContractState(owner), publicKey: const PublicKey( - publicKey: - '9107a65271437e1a982bb98404bd9a82c434f31ee30c621b6596702bb59bf0a0'), + publicKey: + '9107a65271437e1a982bb98404bd9a82c434f31ee30c621b6596702bb59bf0a0', + ), expiration: const Expiration.timeout(60), params: [ TonWalletTransferParams( diff --git a/packages/flutter_nekoton_bridge/example/integration_test/transport/proto_transport_test.dart b/packages/flutter_nekoton_bridge/example/integration_test/transport/proto_transport_test.dart index 52d7cbd1..ab4b5ccb 100644 --- a/packages/flutter_nekoton_bridge/example/integration_test/transport/proto_transport_test.dart +++ b/packages/flutter_nekoton_bridge/example/integration_test/transport/proto_transport_test.dart @@ -38,8 +38,9 @@ void main() { /// System account address const accountAddress = Address( - address: - '-1:0000000000000000000000000000000000000000000000000000000000000000'); + address: + '-1:0000000000000000000000000000000000000000000000000000000000000000', + ); const accountTransaction = 'd0a278d82e699a63adeaede7e602ff6da8168c333ceb4f2344f42cb739c28940'; @@ -67,16 +68,15 @@ void main() { testWidgets('Create ProtoTransport', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = ProtoConnection.create( client: HttpClient(), settings: protoSettings, name: name, group: networkGroup, ); - final transport = - await ProtoTransport.create(protoConnection: connection); + final transport = await ProtoTransport.create( + protoConnection: connection, + ); expect(transport.transport, isNotNull); }); @@ -84,16 +84,15 @@ void main() { testWidgets('getSignatureId ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = ProtoConnection.create( client: HttpClient(), settings: protoSettings, name: name, group: networkGroup, ); - final transport = - await ProtoTransport.create(protoConnection: connection); + final transport = await ProtoTransport.create( + protoConnection: connection, + ); final signature = await transport.getSignatureId(); @@ -103,7 +102,6 @@ void main() { testWidgets('getSignatureId venom ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); const venomEndpoint = 'https://jrpc.venom.foundation'; final connection = ProtoConnection.create( @@ -112,8 +110,9 @@ void main() { name: 'Venom', group: 'venom', ); - final transport = - await ProtoTransport.create(protoConnection: connection); + final transport = await ProtoTransport.create( + protoConnection: connection, + ); final signature = await transport.getSignatureId(); @@ -123,16 +122,15 @@ void main() { testWidgets('getTransactions ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = ProtoConnection.create( client: HttpClient(), settings: protoSettings, name: name, group: networkGroup, ); - final transport = - await ProtoTransport.create(protoConnection: connection); + final transport = await ProtoTransport.create( + protoConnection: connection, + ); final transactions = await transport.getTransactions( address: accountAddress, @@ -145,16 +143,15 @@ void main() { testWidgets('getTransaction ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = ProtoConnection.create( client: HttpClient(), settings: protoSettings, name: name, group: networkGroup, ); - final transport = - await ProtoTransport.create(protoConnection: connection); + final transport = await ProtoTransport.create( + protoConnection: connection, + ); final transaction = await transport.getTransaction(accountTransaction); @@ -168,16 +165,15 @@ void main() { testWidgets('getDstTransaction', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = ProtoConnection.create( client: HttpClient(), settings: protoSettings, name: name, group: networkGroup, ); - final transport = - await ProtoTransport.create(protoConnection: connection); + final transport = await ProtoTransport.create( + protoConnection: connection, + ); const hash = '248ddcef0742827eaa2c25eeb1daa3c94c61dc286c6066f4e7508dcbeb4fa038'; @@ -197,34 +193,33 @@ void main() { testWidgets('multiple calls ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = ProtoConnection.create( client: HttpClient(), settings: protoSettings, name: name, group: networkGroup, ); - final transport = - await ProtoTransport.create(protoConnection: connection); - - expect( - await transport.getTransaction(accountTransaction), - isNotNull, + final transport = await ProtoTransport.create( + protoConnection: connection, ); + + expect(await transport.getTransaction(accountTransaction), isNotNull); expect( await transport.getTransaction( - 'f90074116294f0a4295d7ab368af8a1cc75654aad557d3ffd6edb7e8b2020c39'), + 'f90074116294f0a4295d7ab368af8a1cc75654aad557d3ffd6edb7e8b2020c39', + ), isNotNull, ); expect( await transport.getTransaction( - '74773423c867ce433d39612f8c14c49e835500263ced3e045ca560c4383ea6fc'), + '74773423c867ce433d39612f8c14c49e835500263ced3e045ca560c4383ea6fc', + ), isNotNull, ); expect( await transport.getTransaction( - '5c229b34601836743083acf9fd87f164039b75ac7b513b756a06da0e7051fffd'), + '5c229b34601836743083acf9fd87f164039b75ac7b513b756a06da0e7051fffd', + ), isNotNull, ); }); @@ -232,44 +227,37 @@ void main() { testWidgets('getContractState ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = ProtoConnection.create( client: HttpClient(), settings: protoSettings, name: name, group: networkGroup, ); - final transport = - await ProtoTransport.create(protoConnection: connection); + final transport = await ProtoTransport.create( + protoConnection: connection, + ); final state = await transport.getContractState(accountAddress); expect(state, isNotNull); - expect( - switch (state) { - RawContractStateExists(:final data) => data, - RawContractStateNotExists() => null, - }, - isNotNull, - ); + expect(switch (state) { + RawContractStateExists(:final data) => data, + RawContractStateNotExists() => null, + }, isNotNull); }); - testWidgets('getFullContractState ', ( - WidgetTester tester, - ) async { + testWidgets('getFullContractState ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = ProtoConnection.create( client: HttpClient(), settings: protoSettings, name: name, group: networkGroup, ); - final transport = - await ProtoTransport.create(protoConnection: connection); + final transport = await ProtoTransport.create( + protoConnection: connection, + ); final state = await transport.getFullContractState(accountAddress); @@ -278,21 +266,18 @@ void main() { expect(state.isDeployed, true); }); - testWidgets('getContractFields', ( - WidgetTester tester, - ) async { + testWidgets('getContractFields', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = ProtoConnection.create( client: HttpClient(), settings: protoSettings, name: name, group: networkGroup, ); - final transport = - await ProtoTransport.create(protoConnection: connection); + final transport = await ProtoTransport.create( + protoConnection: connection, + ); final (fields, state) = await transport.getContractFields( address: const Address( @@ -309,7 +294,6 @@ void main() { testWidgets('getNetworkId ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final connection = ProtoConnection.create( client: HttpClient(), @@ -317,15 +301,16 @@ void main() { name: name, group: networkGroup, ); - final transport = - await ProtoTransport.create(protoConnection: connection); + final transport = await ProtoTransport.create( + protoConnection: connection, + ); final id = await transport.getNetworkId(); expect(id, 42); }); testWidgets('getNetworkId venom ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); + const venomEndpoint = 'https://jrpc.venom.foundation'; final connection = ProtoConnection.create( @@ -334,15 +319,15 @@ void main() { name: 'Venom', group: 'venom', ); - final transport = - await ProtoTransport.create(protoConnection: connection); + final transport = await ProtoTransport.create( + protoConnection: connection, + ); final id = await transport.getNetworkId(); expect(id, 1); }); testWidgets('getBlockchainConfig ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final connection = ProtoConnection.create( client: HttpClient(), @@ -350,8 +335,9 @@ void main() { name: name, group: networkGroup, ); - final transport = - await ProtoTransport.create(protoConnection: connection); + final transport = await ProtoTransport.create( + protoConnection: connection, + ); final config = await transport.getBlockchainConfig(); expect(config.config, isNotEmpty); @@ -361,7 +347,6 @@ void main() { testWidgets('simulateTransactionTree ', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); final connection = ProtoConnection.create( client: HttpClient(), @@ -369,8 +354,9 @@ void main() { name: name, group: networkGroup, ); - final transport = - await ProtoTransport.create(protoConnection: connection); + final transport = await ProtoTransport.create( + protoConnection: connection, + ); const address = Address( address: '0:f9f575258120bff21afd8c798a5c9e9a2ef0b251e11d9c85fbf43bec968a57c6', @@ -382,14 +368,16 @@ void main() { final message = await wallet.prepareTransfer( contractState: await transport.getContractState(address), publicKey: const PublicKey( - publicKey: - '6c2f9514c1c0f2ec54cffe1ac2ba0e85268e76442c14205581ebc808fe7ee52c'), + publicKey: + '6c2f9514c1c0f2ec54cffe1ac2ba0e85268e76442c14205581ebc808fe7ee52c', + ), expiration: const Expiration.timeout(60), params: [ TonWalletTransferParams( destination: const Address( - address: - '-1:06eec9c3a6f122c29697d27ae987e4b911d4dadc937e23c7aa58bbf1e484b20f'), + address: + '-1:06eec9c3a6f122c29697d27ae987e4b911d4dadc937e23c7aa58bbf1e484b20f', + ), amount: BigInt.parse('1000000000'), bounce: false, ), @@ -409,16 +397,15 @@ void main() { testWidgets('getFeeFactors', (WidgetTester tester) async { await tester.pumpAndSettleWithTimeout(); - await initRustToDartCaller(); - final connection = ProtoConnection.create( client: HttpClient(), settings: protoSettings, name: name, group: networkGroup, ); - final transport = - await ProtoTransport.create(protoConnection: connection); + final transport = await ProtoTransport.create( + protoConnection: connection, + ); final feeFactors = await transport.getFeeFactors(isMasterchain: true); expect(feeFactors, isNotNull); diff --git a/packages/flutter_nekoton_bridge/example/lib/caller_impl.dart b/packages/flutter_nekoton_bridge/example/lib/caller_impl.dart deleted file mode 100644 index aec5c7b9..00000000 --- a/packages/flutter_nekoton_bridge/example/lib/caller_impl.dart +++ /dev/null @@ -1,56 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_nekoton_bridge/example_related/example_related_lib.dart'; -import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart'; - -class CallerImpl extends AbstractCaller { - // TODO: remove all non-integration test related things FROM here - @override - String func0(String string, int i, double d, - {required int arg0, required double arg1}) { - debugPrint('Call: func0: $string $i $d $arg0 $arg1'); - - return 'Return: Call: func0: $string $i $d $arg0 $arg1'; - } - - @override - Future func1( - String string, - int i, - double d, { - required int arg0, - required double arg1, - }) async { - debugPrint('---------Call: func1: $string $i $d $arg0 $arg1'); - await Future.delayed(const Duration(seconds: 1), () {}); - debugPrint('+++++++++Call: func1: $string $i $d $arg0 $arg1'); - - return 'Return: Call: func1: $string $i $d $arg0 $arg1'; - } - - @override - DynamicValue func2(MegaStruct megaStruct) { - debugPrint('---------Call: func2: $megaStruct'); - final toSendDynamicValue = MegaStruct( - name: 'Seen in Dart ${megaStruct.name}', - coords: const Coords(x: 33.33, y: 44.44, z: 55.55), - props: { - ...megaStruct.props, - ...{'KeyFromDart': 'ValFromDart'}, - }); - return DynamicValueConvert.megaStruct(toSendDynamicValue); - } - // TODO: remove all non-integration test related things TO here - - // These methods SHOULD NOT be removed - // or altered because it used in integration tests - @override - Future test0(String string) async { - return DynamicValue.string(string); - } - - @override - Future test1(String string) async { - await Future.delayed(const Duration(milliseconds: 1000), () {}); - return DynamicValue.string(string); - } -} diff --git a/packages/flutter_nekoton_bridge/example/lib/main.dart b/packages/flutter_nekoton_bridge/example/lib/main.dart index ca13b1df..255aedf3 100644 --- a/packages/flutter_nekoton_bridge/example/lib/main.dart +++ b/packages/flutter_nekoton_bridge/example/lib/main.dart @@ -1,12 +1,8 @@ import 'dart:async'; -import 'dart:math'; import 'package:flutter/material.dart'; -import 'package:flutter_nekoton_bridge/example_related/example_related_lib.dart'; import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart'; -import 'caller_impl.dart'; - Future main() async { await NekotonBridge.init(); runApp(const MyApp()); @@ -20,15 +16,11 @@ class MyApp extends StatefulWidget { } class _MyAppState extends State { - late int sumResult; - late Future sumAsyncResult; String? fromMyClass; @override void initState() { super.initState(); - sumResult = simpleAdderSync(a: 1, b: 2); - sumAsyncResult = simpleAdder(a: 3, b: 4); // This setup thing SHOULD NOT be removed or altered because it used in integration tests setupLogger( @@ -40,274 +32,12 @@ class _MyAppState extends State { ); } - // TODO: remove all non-integration test related things FROM here - - void _onPressed() async { - fromMyClass = await queryMyClass(); - setState(() {}); - } - - void _onPressedLog() async { - debugPrint('Log!'); - simpleLog(string: 'From dart: ${DateTime.now().toIso8601String()}'); - } - - void _onPressedPanic() async { - debugPrint('Panic!'); - simplePanic(); - } - - /// Cached instance - /// ignore: unused_field - CallerWrapper? _caller; - - void _onPressedInitDartCaller() async { - initRustToDartCaller(); - _caller = initCallerWrapper(CallerImpl()); - } - - List testCallers = []; - - void _onPressedAddTestCaller() async { - testCallers.add(await initCallerTestClassWrapper(Random().nextInt(1000))); - setState(() {}); - } - - void _onPressedTriggerTestCallers() { - for (var c in testCallers) { - c.caller.callSomeFunc(); - } - } - - void _onPressedDartCallFunc0(bool needResult) async { - simpleCallFunc0(needResult: needResult); - } - - void _onPressedDartCallFunc1(bool needResult) async { - simpleCallFunc1(needResult: needResult); - } - - void _onPressedDartCallFunc2() async { - simpleCallFunc2(); - } - - void _onPressedDartCallFunc3() async { - simpleCallFunc3(); - simpleCallFunc3(); - simpleCallFunc3(); - simpleCallFunc3(); - simpleCallFunc3(); - simpleCallFunc3(); - simpleCallFunc3(); - simpleCallFunc3(); - simpleCallFunc3(); - simpleCallFunc3(); - simpleCallFunc3(); - simpleCallFunc3(); - } - - // TODO: remove all non-integration test related things TO here - - // These buttons (with *Test* callbacks) SHOULD NOT be removed - // or altered because it used in integration tests - void _onPressedTestInfo() async { - testLoggerInfo(string: 'test logger: info'); - } - - void _onPressedTestDebug() async { - testLoggerDebug(string: 'test logger: debug'); - } - - void _onPressedTestWarn() async { - testLoggerWarn(string: 'test logger: warn'); - } - - void _onPressedTestError() async { - testLoggerError(string: 'test logger: error'); - } - - void _onPressedTestPanic() async { - testLoggerPanic(string: 'test logger: panic'); - } - - void _testCallerCallTest0Async(bool needResult) async { - final result = await testCallerCallTest0Async( - string: 'testCallerCallTest0Async $needResult', - needResult: needResult, - ); - debugPrint('result ${result.toDynamic()}'); - } - - void _testCallerCallTest0Sync(bool needResult) { - final result = testCallerCallTest0Sync( - string: 'testCallerCallTest0Sync $needResult', - needResult: needResult, - ); - debugPrint('result ${result.toDynamic()}'); - } - - void _testCallerCallTest1Async(bool needResult) async { - final futures = >[]; - for (int i = 0; i < 7; i++) { - futures.add(testCallerCallTest1Async( - string: 'testCallerCallTest1Async $needResult', - needResult: needResult, - )); - } - final results = await Future.wait(futures); - for (var result in results) { - debugPrint('result ${result.toDynamic()}'); - } - } - @override Widget build(BuildContext context) { - const textStyle = TextStyle(fontSize: 25); - const spacerSmall = SizedBox(height: 10); return MaterialApp( home: Scaffold( - appBar: AppBar( - title: const Text('Native Packages'), - ), - body: SingleChildScrollView( - child: Container( - padding: const EdgeInsets.all(10), - child: Column( - children: [ - const Text( - 'logger-related', - style: textStyle, - ), - Wrap( - children: [ - // These buttons (with *Test* callbacks) SHOULD NOT be removed - // or altered because it used in integration tests - TextButton( - onPressed: () => _onPressedTestInfo(), - child: const Text('i'), - ), - TextButton( - onPressed: () => _onPressedTestDebug(), - child: const Text('d'), - ), - TextButton( - onPressed: () => _onPressedTestWarn(), - child: const Text('w'), - ), - TextButton( - onPressed: () => _onPressedTestError(), - child: const Text('e'), - ), - TextButton( - onPressed: () => _onPressedTestPanic(), - child: const Text('p'), - ), - ], - ), - const Text( - 'caller-related', - style: textStyle, - ), - Wrap( - children: [ - // These buttons (with *Test* callbacks) SHOULD NOT be removed - // or altered because it used in integration tests - TextButton( - onPressed: _onPressedInitDartCaller, - child: const Text('initDartCaller'), - ), - TextButton( - onPressed: () => _testCallerCallTest0Async(false), - child: const Text('Test0Async'), - ), - TextButton( - onPressed: () => _testCallerCallTest0Async(true), - child: const Text('Test0AsyncResult'), - ), - TextButton( - onPressed: () => _testCallerCallTest0Sync(false), - child: const Text('Test0Sync'), - ), - // WARNING! You should not run a method synchronously, - // waiting for its result!!! - TextButton( - onPressed: () => _testCallerCallTest0Sync(true), - child: const Text('Test0SyncResult'), - ), - TextButton( - onPressed: () => _testCallerCallTest1Async(true), - child: const Text('Test1AsyncResult'), - ), - ], - ), - // TODO: remove all non-integration test related things FROM here - Text( - 'sum(1, 2) = $sumResult', - style: textStyle, - textAlign: TextAlign.center, - ), - spacerSmall, - FutureBuilder( - future: sumAsyncResult, - builder: (BuildContext context, AsyncSnapshot value) { - final displayValue = - (value.hasData) ? value.data : 'loading'; - return Text( - 'await sumAsync(3, 4) = $displayValue', - style: textStyle, - textAlign: TextAlign.center, - ); - }, - ), - TextButton( - onPressed: _onPressed, - child: Text('From MyClass $fromMyClass'), - ), - TextButton( - onPressed: _onPressedLog, - child: const Text('Log'), - ), - TextButton( - onPressed: _onPressedPanic, - child: const Text('Panic'), - ), - TextButton( - onPressed: () => _onPressedDartCallFunc0(true), - child: const Text('CallFunc0 WITH result'), - ), - TextButton( - onPressed: () => _onPressedDartCallFunc1(true), - child: const Text('CallFunc1 WITH result'), - ), - TextButton( - onPressed: () => _onPressedDartCallFunc0(false), - child: const Text('CallFunc0 WITHOUT result'), - ), - TextButton( - onPressed: () => _onPressedDartCallFunc1(false), - child: const Text('CallFunc1 WITHOUT result'), - ), - TextButton( - onPressed: () => _onPressedDartCallFunc2(), - child: const Text('CallFunc2'), - ), - TextButton( - onPressed: () => _onPressedAddTestCaller(), - child: const Text('Add test caller'), - ), - TextButton( - onPressed: () => _onPressedTriggerTestCallers(), - child: const Text('Trigger test callers'), - ), - TextButton( - onPressed: () => _onPressedDartCallFunc3(), - child: const Text('CallFunc3'), - ), - // TODO: remove all non-integration test related things TO here - ], - ), - ), - ), + appBar: AppBar(title: const Text('Native Packages')), + body: const Text('Hello World'), ), ); } diff --git a/packages/flutter_nekoton_bridge/example/pubspec.yaml b/packages/flutter_nekoton_bridge/example/pubspec.yaml index 7ec464a6..4c7b7c64 100644 --- a/packages/flutter_nekoton_bridge/example/pubspec.yaml +++ b/packages/flutter_nekoton_bridge/example/pubspec.yaml @@ -1,5 +1,6 @@ name: flutter_nekoton_bridge_example description: Demonstrates how to use the flutter_nekoton_bridge plugin. +resolution: workspace # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. @@ -17,10 +18,10 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 2.3.0 +version: 3.0.0-dev.2 environment: - sdk: ^3.5.0 + sdk: ^3.9.0 # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -43,7 +44,8 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.8 - freezed_annotation: '>=3.0.0 <3.1.0' + freezed_annotation: ^3.1.0 + money2: ^6.0.0 dev_dependencies: # Used for tests @@ -58,9 +60,9 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 build_runner: ^2.3.3 - freezed: '>=3.0.0 <3.1.0' + freezed: ^3.1.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/flutter_nekoton_bridge/ios/Classes/frb.h b/packages/flutter_nekoton_bridge/ios/Classes/frb.h index 45ded48b..2e1a3141 100644 --- a/packages/flutter_nekoton_bridge/ios/Classes/frb.h +++ b/packages/flutter_nekoton_bridge/ios/Classes/frb.h @@ -32,74 +32,6 @@ typedef struct wire_cst_storage_dart_wrapper { uintptr_t inner_storage; } wire_cst_storage_dart_wrapper; -typedef struct wire_cst_DynamicValue_U16 { - uint16_t field0; -} wire_cst_DynamicValue_U16; - -typedef struct wire_cst_DynamicValue_U32 { - uint32_t field0; -} wire_cst_DynamicValue_U32; - -typedef struct wire_cst_DynamicValue_I32 { - int32_t field0; -} wire_cst_DynamicValue_I32; - -typedef struct wire_cst_DynamicValue_U64 { - uint64_t field0; -} wire_cst_DynamicValue_U64; - -typedef struct wire_cst_DynamicValue_I64 { - int64_t field0; -} wire_cst_DynamicValue_I64; - -typedef struct wire_cst_DynamicValue_F32 { - float field0; -} wire_cst_DynamicValue_F32; - -typedef struct wire_cst_DynamicValue_F64 { - double field0; -} wire_cst_DynamicValue_F64; - -typedef struct wire_cst_DynamicValue_String { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DynamicValue_String; - -typedef struct wire_cst_DynamicValue_VecU8 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DynamicValue_VecU8; - -typedef struct wire_cst_DynamicValue_MegaStruct { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_DynamicValue_MegaStruct; - -typedef struct wire_cst_DynamicValue_Error { - int32_t field0; -} wire_cst_DynamicValue_Error; - -typedef union DynamicValueKind { - struct wire_cst_DynamicValue_U16 U16; - struct wire_cst_DynamicValue_U32 U32; - struct wire_cst_DynamicValue_I32 I32; - struct wire_cst_DynamicValue_U64 U64; - struct wire_cst_DynamicValue_I64 I64; - struct wire_cst_DynamicValue_F32 F32; - struct wire_cst_DynamicValue_F64 F64; - struct wire_cst_DynamicValue_String String; - struct wire_cst_DynamicValue_VecU8 VecU8; - struct wire_cst_DynamicValue_MegaStruct MegaStruct; - struct wire_cst_DynamicValue_Error Error; -} DynamicValueKind; - -typedef struct wire_cst_dynamic_value { - int32_t tag; - union DynamicValueKind kind; -} wire_cst_dynamic_value; - -typedef struct wire_cst_caller_test_class { - struct wire_cst_list_prim_u_8_strict *instance_hash; - int32_t value; -} wire_cst_caller_test_class; - typedef struct wire_cst_generic_contract_dart_wrapper { uintptr_t inner_contract; } wire_cst_generic_contract_dart_wrapper; @@ -159,10 +91,6 @@ typedef struct wire_cst_unsigned_message_impl { uintptr_t inner_message; } wire_cst_unsigned_message_impl; -typedef struct wire_cst_my_class { - int32_t val; -} wire_cst_my_class; - typedef struct wire_cst_bip_39_mnemonic_data { uint16_t account_id; int32_t path; @@ -200,28 +128,6 @@ typedef struct wire_cst_proto_connection_dart_wrapper { uintptr_t inner_connection; } wire_cst_proto_connection_dart_wrapper; -typedef struct wire_cst_list_dynamic_value { - struct wire_cst_dynamic_value *ptr; - int32_t len; -} wire_cst_list_dynamic_value; - -typedef struct wire_cst_dynamic_named_value { - struct wire_cst_list_prim_u_8_strict *name; - struct wire_cst_dynamic_value *value; -} wire_cst_dynamic_named_value; - -typedef struct wire_cst_list_dynamic_named_value { - struct wire_cst_dynamic_named_value *ptr; - int32_t len; -} wire_cst_list_dynamic_named_value; - -typedef struct wire_cst_dart_call_stub { - struct wire_cst_list_prim_u_8_strict *instance_hash; - struct wire_cst_list_prim_u_8_strict *fn_name; - struct wire_cst_list_dynamic_value *args; - struct wire_cst_list_dynamic_named_value *named_args; -} wire_cst_dart_call_stub; - typedef struct wire_cst_token_wallet_dart_wrapper { uintptr_t inner_wallet; } wire_cst_token_wallet_dart_wrapper; @@ -240,11 +146,6 @@ typedef struct wire_cst_list_prim_i_32_strict { int32_t len; } wire_cst_list_prim_i_32_strict; -typedef struct wire_cst_dart_call_stub_registred { - struct wire_cst_list_prim_u_8_strict *id; - struct wire_cst_dart_call_stub stub; -} wire_cst_dart_call_stub_registred; - typedef struct wire_cst_generated_key_g { struct wire_cst_list_String *words; struct wire_cst_mnemonic_type account_type; @@ -256,10 +157,6 @@ typedef struct wire_cst_latest_block { uint32_t gen_utime; } wire_cst_latest_block; -typedef struct wire_cst_ledger_connection_impl { - struct wire_cst_list_prim_u_8_strict *instance_hash; -} wire_cst_ledger_connection_impl; - typedef struct wire_cst_log_entry { int64_t time_millis; int32_t level; @@ -286,9 +183,147 @@ typedef struct wire_cst_signed_data_raw { struct wire_cst_signature_parts signature_parts; } wire_cst_signed_data_raw; -typedef struct wire_cst_storage_impl { - struct wire_cst_list_prim_u_8_strict *instance_hash; -} wire_cst_storage_impl; +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_expired(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_sent(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_state_changed(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_expired(uintptr_t that, + uintptr_t on_message_expired); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_sent(uintptr_t that, + uintptr_t on_message_sent); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_state_changed(uintptr_t that, + uintptr_t on_state_changed); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found(uintptr_t that, + uintptr_t on_transactions_found); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_is_local(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_on_post(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_is_local(uintptr_t that, + bool is_local); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_on_post(uintptr_t that, + uintptr_t on_post); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed(uintptr_t that, + uintptr_t on_balance_changed); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found(uintptr_t that, + uintptr_t on_transactions_found); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_get_on_post(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_set_on_post(uintptr_t that, + uintptr_t on_post); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_get_public_key(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign_transaction(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_get_public_key(uintptr_t that, + uintptr_t on_get_public_key); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign(uintptr_t that, + uintptr_t on_sign); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign_transaction(uintptr_t that, + uintptr_t on_sign_transaction); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_get_on_post(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_set_on_post(uintptr_t that, + uintptr_t on_post); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_get(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove_unchecked(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set_unchecked(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_get(uintptr_t that, + uintptr_t on_get); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove(uintptr_t that, + uintptr_t on_remove); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove_unchecked(uintptr_t that, + uintptr_t on_remove_unchecked); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set(uintptr_t that, + uintptr_t on_set); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set_unchecked(uintptr_t that, + uintptr_t on_set_unchecked); + +void frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_new(int64_t port_, + uintptr_t on_get, + uintptr_t on_set, + uintptr_t on_set_unchecked, + uintptr_t on_remove, + uintptr_t on_remove_unchecked); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed(uintptr_t that, + uintptr_t on_balance_changed); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found(uintptr_t that, + uintptr_t on_transactions_found); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_custodians_changed(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_details_changed(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_expired(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_sent(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_state_changed(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_unconfirmed_transactions_changed(uintptr_t that); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_custodians_changed(uintptr_t that, + uintptr_t on_custodians_changed); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_details_changed(uintptr_t that, + uintptr_t on_details_changed); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_expired(uintptr_t that, + uintptr_t on_message_expired); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_sent(uintptr_t that, + uintptr_t on_message_sent); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_state_changed(uintptr_t that, + uintptr_t on_state_changed); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found(uintptr_t that, + uintptr_t on_transactions_found); + +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_unconfirmed_transactions_changed(uintptr_t that, + uintptr_t on_unconfirmed_transactions_changed); void frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_add_account(int64_t port_, struct wire_cst_accounts_storage_impl *that, @@ -350,16 +385,6 @@ void frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_renam void frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_verify_data(int64_t port_, struct wire_cst_list_prim_u_8_strict *data); -WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__call_send_result(struct wire_cst_list_prim_u_8_strict *id, - struct wire_cst_dynamic_value *value); - -void frbgen_nekoton_bridge_wire__crate__api__merged__caller_test_class_call_some_func(int64_t port_, - struct wire_cst_caller_test_class *that); - -void frbgen_nekoton_bridge_wire__crate__api__merged__caller_test_class_new(int64_t port_, - struct wire_cst_list_prim_u_8_strict *instance_hash, - int32_t value); - void frbgen_nekoton_bridge_wire__crate__api__merged__create_log_stream(int64_t port_, struct wire_cst_list_prim_u_8_strict *s); @@ -400,13 +425,16 @@ void frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapp struct wire_cst_list_prim_u_8_strict *signed_message); void frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_subscribe(int64_t port_, - struct wire_cst_list_prim_u_8_strict *instance_hash, struct wire_cst_list_prim_u_8_strict *address, bool preload_transactions, - uintptr_t transport); + uintptr_t transport, + const void *on_message_sent, + const void *on_message_expired, + const void *on_state_changed, + const void *on_transactions_found); WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__gql_connection_dart_wrapper_new(bool is_local, - struct wire_cst_list_prim_u_8_strict *instance_hash); + const void *on_post); void frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_accounts_by_code_hash(int64_t port_, struct wire_cst_gql_transport_impl *that, @@ -472,9 +500,6 @@ void frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_wait_for struct wire_cst_list_prim_u_8_strict *address, uint64_t timeout); -void frbgen_nekoton_bridge_wire__crate__api__merged__init_caller(int64_t port_, - struct wire_cst_list_prim_u_8_strict *stream_sink); - void frbgen_nekoton_bridge_wire__crate__api__merged__init_logger(int64_t port_, int32_t level, bool mobile_logger); @@ -529,13 +554,14 @@ void frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_ struct wire_cst_jetton_wallet_dart_wrapper *that); void frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_subscribe(int64_t port_, - struct wire_cst_list_prim_u_8_strict *instance_hash, struct wire_cst_list_prim_u_8_strict *owner, struct wire_cst_list_prim_u_8_strict *root_token_contract, uintptr_t transport, - bool preload_transactions); + bool preload_transactions, + const void *on_balance_changed, + const void *on_transactions_found); -WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_connection_dart_wrapper_new(struct wire_cst_list_prim_u_8_strict *instance_hash); +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_connection_dart_wrapper_new(const void *on_post); void frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_accounts_by_code_hash(int64_t port_, struct wire_cst_jrpc_transport_impl *that, @@ -679,14 +705,9 @@ void frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_verif struct wire_cst_ledger_connection_dart_wrapper *ledger_connection, struct wire_cst_list_prim_u_8_strict *data); -WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__ledger_connection_dart_wrapper_new(struct wire_cst_list_prim_u_8_strict *instance_hash); - -WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__ledger_connection_impl_new(struct wire_cst_list_prim_u_8_strict *instance_hash); - -void frbgen_nekoton_bridge_wire__crate__api__merged__my_class_my_format(int64_t port_, - struct wire_cst_my_class *that); - -void frbgen_nekoton_bridge_wire__crate__api__merged__my_class_new(int64_t port_, int32_t a); +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__ledger_connection_dart_wrapper_new(const void *on_get_public_key, + const void *on_sign, + const void *on_sign_transaction); WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__nt_check_public_key(struct wire_cst_list_prim_u_8_strict *public_key); @@ -881,7 +902,7 @@ void frbgen_nekoton_bridge_wire__crate__api__merged__nt_verify_signature(int64_t struct wire_cst_list_prim_u_8_strict *signature, int32_t *signature_id); -WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__proto_connection_dart_wrapper_new(struct wire_cst_list_prim_u_8_strict *instance_hash); +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__proto_connection_dart_wrapper_new(const void *on_post); void frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_accounts_by_code_hash(int64_t port_, struct wire_cst_proto_transport_impl *that, @@ -936,67 +957,11 @@ void frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_simula void frbgen_nekoton_bridge_wire__crate__api__merged__set_clock_offset(int64_t port_, int64_t offset_ms); -void frbgen_nekoton_bridge_wire__crate__api__merged__simple_adder(int64_t port_, - int32_t a, - int32_t b); - -WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__simple_adder_sync(int32_t a, - int32_t b); - -void frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_dart(int64_t port_); - -void frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_func0(int64_t port_, - bool need_result); - -void frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_func1(int64_t port_, - bool need_result); - -void frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_func2(int64_t port_); - -void frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_func3(int64_t port_); - -void frbgen_nekoton_bridge_wire__crate__api__merged__simple_log(int64_t port_, - struct wire_cst_list_prim_u_8_strict *string); - -void frbgen_nekoton_bridge_wire__crate__api__merged__simple_panic(int64_t port_); - -WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__storage_dart_wrapper_new(struct wire_cst_list_prim_u_8_strict *instance_hash); - -void frbgen_nekoton_bridge_wire__crate__api__merged__storage_impl_new(int64_t port_, - struct wire_cst_list_prim_u_8_strict *instance_hash); - -void frbgen_nekoton_bridge_wire__crate__api__merged__stub_call_dart(int64_t port_, - struct wire_cst_dart_call_stub *stub); - -void frbgen_nekoton_bridge_wire__crate__api__merged__stub_dcs(int64_t port_); - -void frbgen_nekoton_bridge_wire__crate__api__merged__stub_dv(int64_t port_); - -void frbgen_nekoton_bridge_wire__crate__api__merged__test_caller_call_test0_async(int64_t port_, - struct wire_cst_list_prim_u_8_strict *string, - bool need_result); - -WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__test_caller_call_test0_sync(struct wire_cst_list_prim_u_8_strict *string, - bool need_result); - -void frbgen_nekoton_bridge_wire__crate__api__merged__test_caller_call_test1_async(int64_t port_, - struct wire_cst_list_prim_u_8_strict *string, - bool need_result); - -void frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_debug(int64_t port_, - struct wire_cst_list_prim_u_8_strict *string); - -void frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_error(int64_t port_, - struct wire_cst_list_prim_u_8_strict *string); - -void frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_info(int64_t port_, - struct wire_cst_list_prim_u_8_strict *string); - -void frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_panic(int64_t port_, - struct wire_cst_list_prim_u_8_strict *string); - -void frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_warn(int64_t port_, - struct wire_cst_list_prim_u_8_strict *string); +WireSyncRust2DartDco frbgen_nekoton_bridge_wire__crate__api__merged__storage_dart_wrapper_new(const void *on_get, + const void *on_set, + const void *on_set_unchecked, + const void *on_remove, + const void *on_remove_unchecked); void frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_address(int64_t port_, struct wire_cst_token_wallet_dart_wrapper *that); @@ -1050,11 +1015,12 @@ void frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_r struct wire_cst_token_wallet_dart_wrapper *that); void frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_subscribe(int64_t port_, - struct wire_cst_list_prim_u_8_strict *instance_hash, struct wire_cst_list_prim_u_8_strict *owner, struct wire_cst_list_prim_u_8_strict *root_token_contract, uintptr_t transport, - bool preload_transactions); + bool preload_transactions, + const void *on_balance_changed, + const void *on_transactions_found); void frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_symbol(int64_t port_, struct wire_cst_token_wallet_dart_wrapper *that); @@ -1169,21 +1135,39 @@ void frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_sen struct wire_cst_list_prim_u_8_strict *signed_message); void frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe(int64_t port_, - struct wire_cst_list_prim_u_8_strict *instance_hash, int8_t workchain_id, struct wire_cst_list_prim_u_8_strict *public_key, struct wire_cst_list_prim_u_8_strict *wallet_type, - uintptr_t transport); + uintptr_t transport, + const void *on_message_sent, + const void *on_message_expired, + const void *on_state_changed, + const void *on_transactions_found, + const void *on_details_changed, + const void *on_custodians_changed, + const void *on_unconfirmed_transactions_changed); void frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address(int64_t port_, - struct wire_cst_list_prim_u_8_strict *instance_hash, struct wire_cst_list_prim_u_8_strict *address, - uintptr_t transport); + uintptr_t transport, + const void *on_message_sent, + const void *on_message_expired, + const void *on_state_changed, + const void *on_transactions_found, + const void *on_details_changed, + const void *on_custodians_changed, + const void *on_unconfirmed_transactions_changed); void frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing(int64_t port_, - struct wire_cst_list_prim_u_8_strict *instance_hash, struct wire_cst_list_prim_u_8_strict *existing_wallet, - uintptr_t transport); + uintptr_t transport, + const void *on_message_sent, + const void *on_message_expired, + const void *on_state_changed, + const void *on_transactions_found, + const void *on_details_changed, + const void *on_custodians_changed, + const void *on_unconfirmed_transactions_changed); void frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions(int64_t port_, struct wire_cst_ton_wallet_dart_wrapper *that); @@ -1262,17 +1246,79 @@ void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynUnsi void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait(const void *ptr); -struct wire_cst_accounts_storage_impl *frbgen_nekoton_bridge_cst_new_box_autoadd_accounts_storage_impl(void); +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync(const void *ptr); -struct wire_cst_bip_39_mnemonic_data *frbgen_nekoton_bridge_cst_new_box_autoadd_bip_39_mnemonic_data(void); +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync(const void *ptr); -bool *frbgen_nekoton_bridge_cst_new_box_autoadd_bool(bool value); +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync(const void *ptr); -struct wire_cst_caller_test_class *frbgen_nekoton_bridge_cst_new_box_autoadd_caller_test_class(void); +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync(const void *ptr); -struct wire_cst_dart_call_stub *frbgen_nekoton_bridge_cst_new_box_autoadd_dart_call_stub(void); +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync(const void *ptr); -struct wire_cst_dynamic_value *frbgen_nekoton_bridge_cst_new_box_autoadd_dynamic_value(void); +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl(const void *ptr); + +void frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl(const void *ptr); + +struct wire_cst_accounts_storage_impl *frbgen_nekoton_bridge_cst_new_box_autoadd_accounts_storage_impl(void); + +struct wire_cst_bip_39_mnemonic_data *frbgen_nekoton_bridge_cst_new_box_autoadd_bip_39_mnemonic_data(void); + +bool *frbgen_nekoton_bridge_cst_new_box_autoadd_bool(bool value); struct wire_cst_generic_contract_dart_wrapper *frbgen_nekoton_bridge_cst_new_box_autoadd_generic_contract_dart_wrapper(void); @@ -1296,8 +1342,6 @@ struct wire_cst_ledger_connection_dart_wrapper *frbgen_nekoton_bridge_cst_new_bo struct wire_cst_mnemonic_type *frbgen_nekoton_bridge_cst_new_box_autoadd_mnemonic_type(void); -struct wire_cst_my_class *frbgen_nekoton_bridge_cst_new_box_autoadd_my_class(void); - struct wire_cst_proto_connection_dart_wrapper *frbgen_nekoton_bridge_cst_new_box_autoadd_proto_connection_dart_wrapper(void); struct wire_cst_proto_transport_impl *frbgen_nekoton_bridge_cst_new_box_autoadd_proto_transport_impl(void); @@ -1314,10 +1358,6 @@ struct wire_cst_unsigned_message_impl *frbgen_nekoton_bridge_cst_new_box_autoadd struct wire_cst_list_String *frbgen_nekoton_bridge_cst_new_list_String(int32_t len); -struct wire_cst_list_dynamic_named_value *frbgen_nekoton_bridge_cst_new_list_dynamic_named_value(int32_t len); - -struct wire_cst_list_dynamic_value *frbgen_nekoton_bridge_cst_new_list_dynamic_value(int32_t len); - struct wire_cst_list_key_signer *frbgen_nekoton_bridge_cst_new_list_key_signer(int32_t len); struct wire_cst_list_opt_String *frbgen_nekoton_bridge_cst_new_list_opt_String(int32_t len); @@ -1334,9 +1374,6 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_accounts_storage_impl); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_bip_39_mnemonic_data); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_bool); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_caller_test_class); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_dart_call_stub); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_dynamic_value); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_generic_contract_dart_wrapper); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_gql_connection_dart_wrapper); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_gql_transport_impl); @@ -1348,7 +1385,6 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_keystore_dart_wrapper); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_ledger_connection_dart_wrapper); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_mnemonic_type); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_my_class); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_proto_connection_dart_wrapper); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_proto_transport_impl); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_storage_dart_wrapper); @@ -1357,8 +1393,6 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_u_32); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_box_autoadd_unsigned_message_impl); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_list_String); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_list_dynamic_named_value); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_list_dynamic_value); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_list_key_signer); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_list_opt_String); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_cst_new_list_prim_i_32_loose); @@ -1378,6 +1412,23 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait); @@ -1391,6 +1442,78 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_expired); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_sent); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_state_changed); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_expired); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_sent); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_state_changed); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_is_local); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_on_post); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_is_local); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_on_post); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_get_on_post); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_set_on_post); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_get_public_key); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign_transaction); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_get_public_key); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign_transaction); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_get_on_post); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_set_on_post); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_get); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove_unchecked); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set_unchecked); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_get); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove_unchecked); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set_unchecked); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_new); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_custodians_changed); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_details_changed); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_expired); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_sent); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_state_changed); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_unconfirmed_transactions_changed); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_custodians_changed); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_details_changed); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_expired); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_sent); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_state_changed); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found); + dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_unconfirmed_transactions_changed); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_add_account); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_add_accounts); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_add_token_wallet); @@ -1405,9 +1528,6 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_remove_token_wallets); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_rename_account); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_verify_data); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__call_send_result); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__caller_test_class_call_some_func); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__caller_test_class_new); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__create_log_stream); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_address); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_contract_state); @@ -1436,7 +1556,6 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_new); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_simulate_transaction_tree); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_wait_for_next_block); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__init_caller); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__init_logger); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_address); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_balance); @@ -1483,9 +1602,6 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_update_key); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_verify_data); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__ledger_connection_dart_wrapper_new); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__ledger_connection_impl_new); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__my_class_my_format); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__my_class_new); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__nt_check_public_key); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__nt_code_to_tvc); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__nt_compute_storage_fee); @@ -1543,28 +1659,7 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_new); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__set_clock_offset); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__simple_adder); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__simple_adder_sync); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_dart); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_func0); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_func1); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_func2); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_func3); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__simple_log); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__simple_panic); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__storage_dart_wrapper_new); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__storage_impl_new); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__stub_call_dart); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__stub_dcs); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__stub_dv); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__test_caller_call_test0_async); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__test_caller_call_test0_sync); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__test_caller_call_test1_async); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_debug); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_error); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_info); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_panic); - dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_warn); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_address); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_balance); dummy_var ^= ((int64_t) (void*) frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_contract_state); diff --git a/packages/flutter_nekoton_bridge/ios/flutter_nekoton_bridge.podspec b/packages/flutter_nekoton_bridge/ios/flutter_nekoton_bridge.podspec index 2572f3bc..cab952f8 100644 --- a/packages/flutter_nekoton_bridge/ios/flutter_nekoton_bridge.podspec +++ b/packages/flutter_nekoton_bridge/ios/flutter_nekoton_bridge.podspec @@ -1,4 +1,4 @@ -release_tag_name = 'nekoton_bridge-v3.6.0' # generated; do not edit +release_tag_name = 'nekoton_bridge-v4.0.0-dev.2' # generated; do not edit # # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. # # Run `pod lib lint flutter_nekoton_bridge.podspec` to validate before publishing. # # diff --git a/packages/flutter_nekoton_bridge/lib/dynamic_value.dart b/packages/flutter_nekoton_bridge/lib/dynamic_value.dart deleted file mode 100644 index 1444bf1a..00000000 --- a/packages/flutter_nekoton_bridge/lib/dynamic_value.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'dart:convert'; - -import 'package:flutter_nekoton_bridge/example_related/mega_struct.dart'; -import 'package:nekoton_bridge/nekoton_bridge.dart'; - -extension DynamicValueConvert on DynamicValue { - dynamic toDynamic() { - if (this is DynamicValue_U16) return (this as DynamicValue_U16).field0; - if (this is DynamicValue_U32) return (this as DynamicValue_U32).field0; - if (this is DynamicValue_I32) return (this as DynamicValue_I32).field0; - if (this is DynamicValue_U64) return (this as DynamicValue_U64).field0; - if (this is DynamicValue_I64) return (this as DynamicValue_I64).field0; - if (this is DynamicValue_F32) return (this as DynamicValue_F32).field0; - if (this is DynamicValue_F64) return (this as DynamicValue_F64).field0; - - if (this is DynamicValue_String) { - return (this as DynamicValue_String).field0; - } - if (this is DynamicValue_VecU8) { - return (this as DynamicValue_VecU8).field0; - } - - if (this is DynamicValue_MegaStruct) { - return MegaStruct.fromJson( - json.decode((this as DynamicValue_MegaStruct).field0)); - } - - if (this is DynamicValue_None) return null; - - if (this is DynamicValue_Error) return (this as DynamicValue_Error).field0; - - return null; - } - - // TODO: remove all non-integration test related things FROM here - static DynamicValue megaStruct(MegaStruct megaStruct) { - return DynamicValue.megaStruct( - json.encode( - megaStruct.toJson(), - ), - ); - } - // TODO: remove all non-integration test related things TO here - - static DynamicValue error(ErrorCode errorCode) { - return DynamicValue.error(errorCode); - } -} diff --git a/packages/flutter_nekoton_bridge/lib/example_related/abstract_caller.dart b/packages/flutter_nekoton_bridge/lib/example_related/abstract_caller.dart deleted file mode 100644 index 143c7229..00000000 --- a/packages/flutter_nekoton_bridge/lib/example_related/abstract_caller.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:flutter_nekoton_bridge/example_related/example_related_lib.dart'; -import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart'; -import 'package:nekoton_bridge/nekoton_bridge.dart'; - -abstract class AbstractCaller { - // TODO: remove all non-integration test related things FROM here - String func0( - String string, - int i, - double d, { - required int arg0, - required double arg1, - }); - - Future func1( - String string, - int i, - double d, { - required int arg0, - required double arg1, - }); - - DynamicValue func2( - MegaStruct megaStruct, - ); - // TODO: remove all non-integration test related things TO here - - // These methods SHOULD NOT be removed - // or altered because it used in integration tests - - Future test0(String string); - - Future test1(String string); -} diff --git a/packages/flutter_nekoton_bridge/lib/example_related/caller_test_class_wrapper.dart b/packages/flutter_nekoton_bridge/lib/example_related/caller_test_class_wrapper.dart deleted file mode 100644 index 4bfd584f..00000000 --- a/packages/flutter_nekoton_bridge/lib/example_related/caller_test_class_wrapper.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart'; -import 'package:flutter_nekoton_bridge/rust_to_dart/rust_to_dart_caller.dart'; -import 'package:nekoton_bridge/nekoton_bridge.dart'; -import 'package:reflectable/reflectable.dart'; -import 'caller_test_class_wrapper.reflectable.dart'; - -/// Example of class that could have multiple instances and react to messages from [caller.callSomeFunc] -/// that calls callback that should be implemented on [caller] instance. -@reflector -class CallerTestClassWrapper extends RustToDartMirrorInterface { - late CallerTestClass caller; - - CallerTestClassWrapper._(); - - static Future create(int value) async { - final instance = CallerTestClassWrapper._(); - - instance.caller = await CallerTestClass.newInstance( - instanceHash: instance.instanceHash, - value: value, - ); - - return instance; - } - - Future request(String requestOption) async { - debugPrint('REQUEST CALL FROM: $instanceHash'); - return 'HANDLED REQUEST OF $instanceHash'; - } - - @override - InstanceMirror initializeMirror() { - initializeReflectable(); - return reflector.reflect(this); - } -} - -// TODO: Fucking reflectable doesn't want to generate code without main() -void main() {} diff --git a/packages/flutter_nekoton_bridge/lib/example_related/caller_test_class_wrapper.reflectable.dart b/packages/flutter_nekoton_bridge/lib/example_related/caller_test_class_wrapper.reflectable.dart deleted file mode 100644 index e7cf730b..00000000 --- a/packages/flutter_nekoton_bridge/lib/example_related/caller_test_class_wrapper.reflectable.dart +++ /dev/null @@ -1,89 +0,0 @@ -// This file has been generated by the reflectable package. -// https://github.com/dart-lang/reflectable. -import 'dart:core'; -import 'caller_test_class_wrapper.dart' as prefix1; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart' as prefix0; - -// ignore_for_file: camel_case_types -// ignore_for_file: implementation_imports -// ignore_for_file: prefer_adjacent_string_concatenation -// ignore_for_file: prefer_collection_literals -// ignore_for_file: unnecessary_const -// ignore_for_file: unused_import -// ignore_for_file: sdk_version_since - -import 'package:reflectable/mirrors.dart' as m; -import 'package:reflectable/src/reflectable_builder_based.dart' as r; -import 'package:reflectable/reflectable.dart' as r show Reflectable; - -final _data = { - const prefix0.Reflector(): r.ReflectorData( - [ - r.NonGenericClassMirrorImpl( - r'CallerTestClassWrapper', - r'.CallerTestClassWrapper', - 134217735, - 0, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix1.CallerTestClassWrapper.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 0, - r'toString': 1, - r'noSuchMethod': 0, - r'hashCode': 1, - r'runtimeType': 1, - r'init': 1, - r'dispose': 1, - r'instanceHash': 1, - r'avoidCall': 1, - r'request': 0, - r'initializeMirror': 1, - r'caller': 1, - r'caller=': 0, - r'create': 0, - }, - ), - ], - null, - null, - [prefix1.CallerTestClassWrapper], - 1, - { - r'==': (dynamic instance) => (x) => instance == x, - r'toString': (dynamic instance) => instance.toString, - r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, - r'hashCode': (dynamic instance) => instance.hashCode, - r'runtimeType': (dynamic instance) => instance.runtimeType, - r'init': (dynamic instance) => instance.init, - r'dispose': (dynamic instance) => instance.dispose, - r'instanceHash': (dynamic instance) => instance.instanceHash, - r'avoidCall': (dynamic instance) => instance.avoidCall, - r'request': (dynamic instance) => instance.request, - r'initializeMirror': (dynamic instance) => instance.initializeMirror, - r'caller': (dynamic instance) => instance.caller, - }, - {r'caller=': (dynamic instance, value) => instance.caller = value}, - null, - [ - const [1, 0, null], - const [0, 0, null], - ], - ), -}; - -final _memberSymbolMap = null; - -void initializeReflectable() { - r.data = _data; - r.memberSymbolMap = _memberSymbolMap; -} diff --git a/packages/flutter_nekoton_bridge/lib/example_related/caller_wrapper.dart b/packages/flutter_nekoton_bridge/lib/example_related/caller_wrapper.dart deleted file mode 100644 index 6be5f930..00000000 --- a/packages/flutter_nekoton_bridge/lib/example_related/caller_wrapper.dart +++ /dev/null @@ -1,64 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter_nekoton_bridge/example_related/abstract_caller.dart'; -import 'package:flutter_nekoton_bridge/example_related/mega_struct.dart'; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart'; -import 'package:reflectable/reflectable.dart'; -import '../flutter_nekoton_bridge.dart'; -import 'caller_wrapper.reflectable.dart'; - -@reflector -class CallerWrapper extends RustToDartMirrorInterface { - final AbstractCaller caller; - - /// Override - CallerWrapper(this.caller) : super('0'); - - // TODO: remove all non-integration test related things FROM here - String func0( - String string, - int i, - double d, { - required int arg0, - required double arg1, - }) { - debugPrint('CallerWrapper: func0($instanceHash)'); - return caller.func0(string, i, d, arg0: arg0, arg1: arg1); - } - - Future func1( - String string, - int i, - double d, { - required int arg0, - required double arg1, - }) async { - debugPrint('CallerWrapper: func1($instanceHash)'); - return caller.func1(string, i, d, arg0: arg0, arg1: arg1); - } - - DynamicValue func2(MegaStruct megaStruct) { - debugPrint('CallerWrapper: func2($instanceHash)'); - return caller.func2(megaStruct); - } - // TODO: remove all non-integration test related things TO here - - // These methods SHOULD NOT be removed - // or altered because it used in integration tests - - Future test0(String string) { - return caller.test0(string); - } - - Future test1(String string) { - return caller.test1(string); - } - - @override - InstanceMirror initializeMirror() { - initializeReflectable(); - return reflector.reflect(this); - } -} - -// TODO: Fucking reflectable doesn't want to generate code without main() -void main() {} diff --git a/packages/flutter_nekoton_bridge/lib/example_related/caller_wrapper.reflectable.dart b/packages/flutter_nekoton_bridge/lib/example_related/caller_wrapper.reflectable.dart deleted file mode 100644 index 7af12566..00000000 --- a/packages/flutter_nekoton_bridge/lib/example_related/caller_wrapper.reflectable.dart +++ /dev/null @@ -1,894 +0,0 @@ -// This file has been generated by the reflectable package. -// https://github.com/dart-lang/reflectable. -import 'dart:core'; -import 'caller_wrapper.dart' as prefix1; -import 'package:flutter_nekoton_bridge/example_related/caller_test_class_wrapper.dart' - as prefix2; -import 'package:flutter_nekoton_bridge/nekoton/core/generic_contract/generic_contract.dart' - as prefix8; -import 'package:flutter_nekoton_bridge/nekoton/core/jetton_wallet/jetton_wallet.dart' - as prefix10; -import 'package:flutter_nekoton_bridge/nekoton/core/token_wallet/token_wallet.dart' - as prefix9; -import 'package:flutter_nekoton_bridge/nekoton/core/ton_wallet/ton_wallet.dart' - as prefix11; -import 'package:flutter_nekoton_bridge/nekoton/external/gql_connection.dart' - as prefix3; -import 'package:flutter_nekoton_bridge/nekoton/external/jrpc_connection.dart' - as prefix5; -import 'package:flutter_nekoton_bridge/nekoton/external/ledger_connection.dart' - as prefix6; -import 'package:flutter_nekoton_bridge/nekoton/external/proto_connection.dart' - as prefix4; -import 'package:flutter_nekoton_bridge/nekoton/external/storage.dart' - as prefix7; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart' as prefix0; - -// ignore_for_file: camel_case_types -// ignore_for_file: implementation_imports -// ignore_for_file: prefer_adjacent_string_concatenation -// ignore_for_file: prefer_collection_literals -// ignore_for_file: unnecessary_const -// ignore_for_file: unused_import -// ignore_for_file: sdk_version_since - -import 'package:reflectable/mirrors.dart' as m; -import 'package:reflectable/src/reflectable_builder_based.dart' as r; -import 'package:reflectable/reflectable.dart' as r show Reflectable; - -final _data = { - const prefix0.Reflector(): r.ReflectorData( - [ - r.NonGenericClassMirrorImpl( - r'CallerWrapper', - r'.CallerWrapper', - 134217735, - 0, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {}, - {}, - { - r'': (bool b) => (caller) => b ? prefix1.CallerWrapper(caller) : null, - }, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 2, - r'noSuchMethod': 1, - r'hashCode': 2, - r'runtimeType': 2, - r'init': 2, - r'dispose': 2, - r'instanceHash': 2, - r'avoidCall': 2, - r'func0': 0, - r'func1': 0, - r'func2': 1, - r'test0': 1, - r'test1': 1, - r'initializeMirror': 2, - r'caller': 2, - }, - ), - r.NonGenericClassMirrorImpl( - r'CallerTestClassWrapper', - r'.CallerTestClassWrapper', - 134217735, - 1, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix2.CallerTestClassWrapper.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 2, - r'noSuchMethod': 1, - r'hashCode': 2, - r'runtimeType': 2, - r'init': 2, - r'dispose': 2, - r'instanceHash': 2, - r'avoidCall': 2, - r'request': 1, - r'initializeMirror': 2, - r'caller': 2, - r'caller=': 1, - r'create': 1, - }, - ), - r.NonGenericClassMirrorImpl( - r'GqlConnection', - r'.GqlConnection', - 134217735, - 2, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix3.GqlConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 2, - r'noSuchMethod': 1, - r'hashCode': 2, - r'runtimeType': 2, - r'init': 2, - r'dispose': 2, - r'instanceHash': 2, - r'avoidCall': 2, - r'post': 1, - r'initializeMirror': 2, - r'connection': 2, - r'connection=': 1, - r'settings': 2, - r'type': 2, - r'name': 2, - r'group': 2, - r'create': 3, - }, - ), - r.NonGenericClassMirrorImpl( - r'ProtoConnection', - r'.ProtoConnection', - 134217735, - 3, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix4.ProtoConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 2, - r'noSuchMethod': 1, - r'hashCode': 2, - r'runtimeType': 2, - r'init': 2, - r'dispose': 2, - r'instanceHash': 2, - r'avoidCall': 2, - r'post': 1, - r'initializeMirror': 2, - r'connection': 2, - r'connection=': 1, - r'settings': 2, - r'type': 2, - r'name': 2, - r'group': 2, - r'create': 3, - }, - ), - r.NonGenericClassMirrorImpl( - r'JrpcConnection', - r'.JrpcConnection', - 134217735, - 4, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix5.JrpcConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 2, - r'noSuchMethod': 1, - r'hashCode': 2, - r'runtimeType': 2, - r'init': 2, - r'dispose': 2, - r'instanceHash': 2, - r'avoidCall': 2, - r'post': 1, - r'initializeMirror': 2, - r'connection': 2, - r'connection=': 1, - r'settings': 2, - r'type': 2, - r'name': 2, - r'group': 2, - r'create': 3, - }, - ), - r.NonGenericClassMirrorImpl( - r'LedgerConnection', - r'.LedgerConnection', - 134217735, - 5, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix6.LedgerConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 2, - r'noSuchMethod': 1, - r'hashCode': 2, - r'runtimeType': 2, - r'init': 2, - r'dispose': 2, - r'instanceHash': 2, - r'avoidCall': 2, - r'getPublicKey': 1, - r'sign': 0, - r'signTransaction': 4, - r'initializeMirror': 2, - r'connection': 2, - r'connection=': 1, - r'create': 1, - }, - ), - r.NonGenericClassMirrorImpl( - r'Storage', - r'.Storage', - 134217735, - 6, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix7.Storage.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 2, - r'noSuchMethod': 1, - r'hashCode': 2, - r'runtimeType': 2, - r'init': 2, - r'dispose': 2, - r'instanceHash': 2, - r'avoidCall': 2, - r'get': 1, - r'set': 6, - r'setUnchecked': 6, - r'remove': 6, - r'removeUnchecked': 6, - r'initializeMirror': 2, - r'storage': 2, - r'storage=': 1, - r'create': 5, - }, - ), - r.NonGenericClassMirrorImpl( - r'GenericContract', - r'.GenericContract', - 134217735, - 7, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'subscribe': () => prefix8.GenericContract.subscribe}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 2, - r'noSuchMethod': 1, - r'hashCode': 2, - r'runtimeType': 2, - r'init': 2, - r'dispose': 2, - r'instanceHash': 2, - r'avoidCall': 2, - r'getContractState': 2, - r'getPendingTransactions': 2, - r'getPollingMethod': 2, - r'executeTransactionLocally': 8, - r'estimateFees': 8, - r'send': 8, - r'refresh': 2, - r'preloadTransactions': 9, - r'handleBlock': 10, - r'onMessageSent': 1, - r'onMessageExpired': 1, - r'onStateChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 2, - r'contract': 2, - r'contract=': 1, - r'transport': 2, - r'address': 2, - r'address=': 1, - r'contractState': 2, - r'pendingTransactions': 2, - r'pollingMethod': 2, - r'fieldUpdatesStream': 2, - r'onMessageSentStream': 2, - r'onMessageExpiredStream': 2, - r'onStateChangedStream': 2, - r'onTransactionsFoundStream': 2, - r'refreshDescription': 2, - r'subscribe': 7, - }, - ), - r.NonGenericClassMirrorImpl( - r'TokenWallet', - r'.TokenWallet', - 134217735, - 8, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix9.TokenWallet.subscribe, - r'getTokenWalletDetails': () => - prefix9.TokenWallet.getTokenWalletDetails, - r'getTokenRootDetailsFromTokenWallet': () => - prefix9.TokenWallet.getTokenRootDetailsFromTokenWallet, - r'getTokenRootDetails': () => prefix9.TokenWallet.getTokenRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 2, - r'noSuchMethod': 1, - r'hashCode': 2, - r'runtimeType': 2, - r'init': 2, - r'dispose': 2, - r'instanceHash': 2, - r'avoidCall': 2, - r'getContractState': 2, - r'estimateMinAttachedAmount': 12, - r'prepareTransfer': 13, - r'refresh': 2, - r'preloadTransactions': 14, - r'handleBlock': 10, - r'onBalanceChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 2, - r'wallet': 2, - r'wallet=': 1, - r'transport': 2, - r'balance': 2, - r'balance=': 1, - r'rootTokenContract': 2, - r'tokenAddress': 2, - r'tokenAddress=': 1, - r'owner': 2, - r'owner=': 1, - r'symbol': 2, - r'symbol=': 1, - r'currency': 2, - r'currency=': 1, - r'version': 2, - r'version=': 1, - r'moneyBalance': 2, - r'isTransactionsPreloaded': 2, - r'contractState': 2, - r'fieldUpdatesStream': 2, - r'onBalanceChangedStream': 2, - r'onMoneyBalanceChangedStream': 2, - r'onTransactionsFoundStream': 2, - r'refreshDescription': 2, - r'subscribe': 11, - r'getTokenWalletDetails': 7, - r'getTokenRootDetailsFromTokenWallet': 7, - r'getTokenRootDetails': 15, - }, - ), - r.NonGenericClassMirrorImpl( - r'JettonWallet', - r'.JettonWallet', - 134217735, - 9, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix10.JettonWallet.subscribe, - r'getJettonWalletDetails': () => - prefix10.JettonWallet.getJettonWalletDetails, - r'getJettonRootDetailsFromJettonWallet': () => - prefix10.JettonWallet.getJettonRootDetailsFromJettonWallet, - r'getJettonRootDetails': () => - prefix10.JettonWallet.getJettonRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 2, - r'noSuchMethod': 1, - r'hashCode': 2, - r'runtimeType': 2, - r'init': 2, - r'dispose': 2, - r'instanceHash': 2, - r'avoidCall': 2, - r'getContractState': 2, - r'estimateMinAttachedAmount': 12, - r'prepareTransfer': 16, - r'refresh': 2, - r'preloadTransactions': 14, - r'handleBlock': 10, - r'onBalanceChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 2, - r'wallet': 2, - r'wallet=': 1, - r'transport': 2, - r'balance': 2, - r'balance=': 1, - r'rootTokenContract': 2, - r'tokenAddress': 2, - r'tokenAddress=': 1, - r'owner': 2, - r'owner=': 1, - r'isTransactionsPreloaded': 2, - r'contractState': 2, - r'fieldUpdatesStream': 2, - r'onBalanceChangedStream': 2, - r'onTransactionsFoundStream': 2, - r'refreshDescription': 2, - r'subscribe': 11, - r'getJettonWalletDetails': 7, - r'getJettonRootDetailsFromJettonWallet': 7, - r'getJettonRootDetails': 15, - }, - ), - r.NonGenericClassMirrorImpl( - r'TonWallet', - r'.TonWallet', - 134217735, - 10, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix11.TonWallet.subscribe, - r'subscribeByAddress': () => prefix11.TonWallet.subscribeByAddress, - r'subscribeByExistingWallet': () => - prefix11.TonWallet.subscribeByExistingWallet, - r'appendSignatureToWalletV5R1Payload': () => - prefix11.TonWallet.appendSignatureToWalletV5R1Payload, - r'findExistingWallets': () => prefix11.TonWallet.findExistingWallets, - r'getExistingWalletInfo': () => - prefix11.TonWallet.getExistingWalletInfo, - r'getWalletCustodians': () => prefix11.TonWallet.getWalletCustodians, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 2, - r'noSuchMethod': 1, - r'hashCode': 2, - r'runtimeType': 2, - r'init': 2, - r'dispose': 2, - r'instanceHash': 2, - r'avoidCall': 2, - r'getContractState': 2, - r'getPendingTransactions': 2, - r'getPollingMethod': 2, - r'getUnconfirmedTransactions': 2, - r'getCustodians': 2, - r'prepareDeploy': 20, - r'prepareDeployWithMultipleOwners': 21, - r'prepareTransfer': 22, - r'prepareWalletV5R1MessageBody': 23, - r'prepareNonexistWalletV5R1MessageBody': 23, - r'prepareConfirmTransaction': 24, - r'estimateFees': 25, - r'send': 8, - r'refresh': 2, - r'preloadTransactions': 9, - r'handleBlock': 10, - r'makeStateInit': 2, - r'getWalletV5R1Seqno': 22, - r'onMessageSent': 1, - r'onMessageExpired': 1, - r'onStateChanged': 1, - r'onTransactionsFound': 1, - r'onDetailsChanged': 1, - r'onCustodiansChanged': 1, - r'onUnconfirmedTransactionsChanged': 1, - r'initializeMirror': 2, - r'wallet': 2, - r'wallet=': 1, - r'transport': 2, - r'publicKey': 2, - r'publicKey=': 1, - r'address': 2, - r'address=': 1, - r'walletType': 2, - r'walletType=': 1, - r'workchain': 2, - r'workchain=': 1, - r'custodians': 2, - r'details': 2, - r'contractState': 2, - r'pendingTransactions': 2, - r'pollingMethod': 2, - r'unconfirmedTransactions': 2, - r'fieldUpdatesStream': 2, - r'onMessageSentStream': 2, - r'onMessageExpiredStream': 2, - r'onStateChangedStream': 2, - r'onTransactionsFoundStream': 2, - r'refreshDescription': 2, - r'subscribe': 17, - r'subscribeByAddress': 7, - r'subscribeByExistingWallet': 18, - r'appendSignatureToWalletV5R1Payload': 19, - r'findExistingWallets': 26, - r'getExistingWalletInfo': 7, - r'getWalletCustodians': 7, - }, - ), - ], - null, - null, - [ - prefix1.CallerWrapper, - prefix2.CallerTestClassWrapper, - prefix3.GqlConnection, - prefix4.ProtoConnection, - prefix5.JrpcConnection, - prefix6.LedgerConnection, - prefix7.Storage, - prefix8.GenericContract, - prefix9.TokenWallet, - prefix10.JettonWallet, - prefix11.TonWallet, - ], - 11, - { - r'==': (dynamic instance) => (x) => instance == x, - r'toString': (dynamic instance) => instance.toString, - r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, - r'hashCode': (dynamic instance) => instance.hashCode, - r'runtimeType': (dynamic instance) => instance.runtimeType, - r'init': (dynamic instance) => instance.init, - r'dispose': (dynamic instance) => instance.dispose, - r'instanceHash': (dynamic instance) => instance.instanceHash, - r'avoidCall': (dynamic instance) => instance.avoidCall, - r'func0': (dynamic instance) => instance.func0, - r'func1': (dynamic instance) => instance.func1, - r'func2': (dynamic instance) => instance.func2, - r'test0': (dynamic instance) => instance.test0, - r'test1': (dynamic instance) => instance.test1, - r'initializeMirror': (dynamic instance) => instance.initializeMirror, - r'caller': (dynamic instance) => instance.caller, - r'request': (dynamic instance) => instance.request, - r'post': (dynamic instance) => instance.post, - r'connection': (dynamic instance) => instance.connection, - r'settings': (dynamic instance) => instance.settings, - r'type': (dynamic instance) => instance.type, - r'name': (dynamic instance) => instance.name, - r'group': (dynamic instance) => instance.group, - r'getPublicKey': (dynamic instance) => instance.getPublicKey, - r'sign': (dynamic instance) => instance.sign, - r'signTransaction': (dynamic instance) => instance.signTransaction, - r'get': (dynamic instance) => instance.get, - r'set': (dynamic instance) => instance.set, - r'setUnchecked': (dynamic instance) => instance.setUnchecked, - r'remove': (dynamic instance) => instance.remove, - r'removeUnchecked': (dynamic instance) => instance.removeUnchecked, - r'storage': (dynamic instance) => instance.storage, - r'getContractState': (dynamic instance) => instance.getContractState, - r'getPendingTransactions': (dynamic instance) => - instance.getPendingTransactions, - r'getPollingMethod': (dynamic instance) => instance.getPollingMethod, - r'executeTransactionLocally': (dynamic instance) => - instance.executeTransactionLocally, - r'estimateFees': (dynamic instance) => instance.estimateFees, - r'send': (dynamic instance) => instance.send, - r'refresh': (dynamic instance) => instance.refresh, - r'preloadTransactions': (dynamic instance) => - instance.preloadTransactions, - r'handleBlock': (dynamic instance) => instance.handleBlock, - r'onMessageSent': (dynamic instance) => instance.onMessageSent, - r'onMessageExpired': (dynamic instance) => instance.onMessageExpired, - r'onStateChanged': (dynamic instance) => instance.onStateChanged, - r'onTransactionsFound': (dynamic instance) => - instance.onTransactionsFound, - r'contract': (dynamic instance) => instance.contract, - r'transport': (dynamic instance) => instance.transport, - r'address': (dynamic instance) => instance.address, - r'contractState': (dynamic instance) => instance.contractState, - r'pendingTransactions': (dynamic instance) => - instance.pendingTransactions, - r'pollingMethod': (dynamic instance) => instance.pollingMethod, - r'fieldUpdatesStream': (dynamic instance) => instance.fieldUpdatesStream, - r'onMessageSentStream': (dynamic instance) => - instance.onMessageSentStream, - r'onMessageExpiredStream': (dynamic instance) => - instance.onMessageExpiredStream, - r'onStateChangedStream': (dynamic instance) => - instance.onStateChangedStream, - r'onTransactionsFoundStream': (dynamic instance) => - instance.onTransactionsFoundStream, - r'refreshDescription': (dynamic instance) => instance.refreshDescription, - r'estimateMinAttachedAmount': (dynamic instance) => - instance.estimateMinAttachedAmount, - r'prepareTransfer': (dynamic instance) => instance.prepareTransfer, - r'onBalanceChanged': (dynamic instance) => instance.onBalanceChanged, - r'wallet': (dynamic instance) => instance.wallet, - r'balance': (dynamic instance) => instance.balance, - r'rootTokenContract': (dynamic instance) => instance.rootTokenContract, - r'tokenAddress': (dynamic instance) => instance.tokenAddress, - r'owner': (dynamic instance) => instance.owner, - r'symbol': (dynamic instance) => instance.symbol, - r'currency': (dynamic instance) => instance.currency, - r'version': (dynamic instance) => instance.version, - r'moneyBalance': (dynamic instance) => instance.moneyBalance, - r'isTransactionsPreloaded': (dynamic instance) => - instance.isTransactionsPreloaded, - r'onBalanceChangedStream': (dynamic instance) => - instance.onBalanceChangedStream, - r'onMoneyBalanceChangedStream': (dynamic instance) => - instance.onMoneyBalanceChangedStream, - r'getUnconfirmedTransactions': (dynamic instance) => - instance.getUnconfirmedTransactions, - r'getCustodians': (dynamic instance) => instance.getCustodians, - r'prepareDeploy': (dynamic instance) => instance.prepareDeploy, - r'prepareDeployWithMultipleOwners': (dynamic instance) => - instance.prepareDeployWithMultipleOwners, - r'prepareWalletV5R1MessageBody': (dynamic instance) => - instance.prepareWalletV5R1MessageBody, - r'prepareNonexistWalletV5R1MessageBody': (dynamic instance) => - instance.prepareNonexistWalletV5R1MessageBody, - r'prepareConfirmTransaction': (dynamic instance) => - instance.prepareConfirmTransaction, - r'makeStateInit': (dynamic instance) => instance.makeStateInit, - r'getWalletV5R1Seqno': (dynamic instance) => instance.getWalletV5R1Seqno, - r'onDetailsChanged': (dynamic instance) => instance.onDetailsChanged, - r'onCustodiansChanged': (dynamic instance) => - instance.onCustodiansChanged, - r'onUnconfirmedTransactionsChanged': (dynamic instance) => - instance.onUnconfirmedTransactionsChanged, - r'publicKey': (dynamic instance) => instance.publicKey, - r'walletType': (dynamic instance) => instance.walletType, - r'workchain': (dynamic instance) => instance.workchain, - r'custodians': (dynamic instance) => instance.custodians, - r'details': (dynamic instance) => instance.details, - r'unconfirmedTransactions': (dynamic instance) => - instance.unconfirmedTransactions, - }, - { - r'caller=': (dynamic instance, value) => instance.caller = value, - r'connection=': (dynamic instance, value) => instance.connection = value, - r'storage=': (dynamic instance, value) => instance.storage = value, - r'contract=': (dynamic instance, value) => instance.contract = value, - r'address=': (dynamic instance, value) => instance.address = value, - r'wallet=': (dynamic instance, value) => instance.wallet = value, - r'balance=': (dynamic instance, value) => instance.balance = value, - r'tokenAddress=': (dynamic instance, value) => - instance.tokenAddress = value, - r'owner=': (dynamic instance, value) => instance.owner = value, - r'symbol=': (dynamic instance, value) => instance.symbol = value, - r'currency=': (dynamic instance, value) => instance.currency = value, - r'version=': (dynamic instance, value) => instance.version = value, - r'publicKey=': (dynamic instance, value) => instance.publicKey = value, - r'walletType=': (dynamic instance, value) => instance.walletType = value, - r'workchain=': (dynamic instance, value) => instance.workchain = value, - }, - null, - [ - const [ - 3, - 0, - const [#arg0, #arg1], - ], - const [1, 0, null], - const [0, 0, null], - const [ - 0, - 0, - const [#client, #settings, #name, #group], - ], - const [5, 0, null], - const [ - 0, - 0, - const [#get, #set, #setUnchecked, #remove, #removeUnchecked], - ], - const [ - 0, - 0, - const [#key, #value], - ], - const [ - 0, - 0, - const [#transport, #address, #preloadTransactions], - ], - const [ - 0, - 0, - const [#signedMessage, #options], - ], - const [ - 0, - 0, - const [#fromLt], - ], - const [ - 0, - 0, - const [#block], - ], - const [ - 0, - 0, - const [#transport, #owner, #rootTokenContract, #preloadTransactions], - ], - const [ - 0, - 0, - const [#destination, #amount, #notifyReceiver, #payload], - ], - const [ - 0, - 0, - const [ - #destination, - #amount, - #notifyReceiver, - #attachedAmount, - #payload, - #remainingGasTo, - ], - ], - const [1, 1, null], - const [ - 0, - 0, - const [#transport, #tokenRoot], - ], - const [ - 0, - 0, - const [ - #amount, - #destination, - #remainingGasTo, - #callbackValue, - #customPayload, - #callbackPayload, - #attachedAmount, - ], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletType], - ], - const [ - 0, - 0, - const [#transport, #existingWallet], - ], - const [ - 0, - 0, - const [#payload, #base64Signature], - ], - const [ - 0, - 0, - const [#expiration], - ], - const [ - 0, - 0, - const [#expiration, #custodians, #reqConfirms, #expirationTime], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #expiration, #params], - ], - const [ - 0, - 0, - const [ - #contractState, - #publicKey, - #expiration, - #params, - #isInternalFlow, - ], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #transactionId, #expiration], - ], - const [ - 0, - 0, - const [#signedMessage, #executionOptions], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletTypes], - ], - ], - ), -}; - -final _memberSymbolMap = null; - -void initializeReflectable() { - r.data = _data; - r.memberSymbolMap = _memberSymbolMap; -} diff --git a/packages/flutter_nekoton_bridge/lib/example_related/example_related_lib.dart b/packages/flutter_nekoton_bridge/lib/example_related/example_related_lib.dart deleted file mode 100644 index b3eb9d99..00000000 --- a/packages/flutter_nekoton_bridge/lib/example_related/example_related_lib.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'dart:math'; - -import 'package:flutter_nekoton_bridge/example_related/abstract_caller.dart'; -import 'package:flutter_nekoton_bridge/example_related/caller_test_class_wrapper.dart'; -import 'package:flutter_nekoton_bridge/example_related/caller_wrapper.dart'; -import 'package:nekoton_bridge/nekoton_bridge.dart'; - -export 'abstract_caller.dart'; -export 'caller_test_class_wrapper.dart' hide main; -export 'caller_wrapper.dart' hide main; -export 'mega_struct.dart'; - -/// Create storage wrapper to see calls. -/// Must be called after [initRustToDartCaller] -CallerWrapper initCallerWrapper(AbstractCaller storage) { - return CallerWrapper(storage); -} - -/// Init test caller wrapper -/// Must be called after [initRustToDartCaller] -Future initCallerTestClassWrapper(int value) async { - return CallerTestClassWrapper.create(value); -} - -MyClass? _myClass; - -Future createMyClass() async { - _myClass ??= await MyClass.newInstance(a: Random().nextInt(1000)); - return _myClass!; -} - -Future queryMyClass() async { - final result = (await createMyClass()).myFormat(); - return result; -} diff --git a/packages/flutter_nekoton_bridge/lib/example_related/mega_struct.dart b/packages/flutter_nekoton_bridge/lib/example_related/mega_struct.dart deleted file mode 100644 index cb81d015..00000000 --- a/packages/flutter_nekoton_bridge/lib/example_related/mega_struct.dart +++ /dev/null @@ -1,31 +0,0 @@ -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:flutter/foundation.dart'; - -part 'mega_struct.freezed.dart'; - -part 'mega_struct.g.dart'; - -// TODO: remove this class as it is a non-integration test related thing - -@freezed -sealed class Coords with _$Coords { - const factory Coords({ - required double x, - required double y, - required double z, - }) = _Coords; - - factory Coords.fromJson(Map json) => _$CoordsFromJson(json); -} - -@freezed -sealed class MegaStruct with _$MegaStruct { - const factory MegaStruct({ - required String name, - required Coords coords, - required Map props, - }) = _MegaStruct; - - factory MegaStruct.fromJson(Map json) => - _$MegaStructFromJson(json); -} diff --git a/packages/flutter_nekoton_bridge/lib/example_related/mega_struct.freezed.dart b/packages/flutter_nekoton_bridge/lib/example_related/mega_struct.freezed.dart deleted file mode 100644 index 0fa71ad0..00000000 --- a/packages/flutter_nekoton_bridge/lib/example_related/mega_struct.freezed.dart +++ /dev/null @@ -1,426 +0,0 @@ -// dart format width=80 -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'mega_struct.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -// dart format off -T _$identity(T value) => value; - -/// @nodoc -mixin _$Coords implements DiagnosticableTreeMixin { - double get x; - double get y; - double get z; - - /// Create a copy of Coords - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $CoordsCopyWith get copyWith => - _$CoordsCopyWithImpl(this as Coords, _$identity); - - /// Serializes this Coords to a JSON map. - Map toJson(); - - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'Coords')) - ..add(DiagnosticsProperty('x', x)) - ..add(DiagnosticsProperty('y', y)) - ..add(DiagnosticsProperty('z', z)); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is Coords && - (identical(other.x, x) || other.x == x) && - (identical(other.y, y) || other.y == y) && - (identical(other.z, z) || other.z == z)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, x, y, z); - - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'Coords(x: $x, y: $y, z: $z)'; - } -} - -/// @nodoc -abstract mixin class $CoordsCopyWith<$Res> { - factory $CoordsCopyWith(Coords value, $Res Function(Coords) _then) = - _$CoordsCopyWithImpl; - @useResult - $Res call({double x, double y, double z}); -} - -/// @nodoc -class _$CoordsCopyWithImpl<$Res> implements $CoordsCopyWith<$Res> { - _$CoordsCopyWithImpl(this._self, this._then); - - final Coords _self; - final $Res Function(Coords) _then; - - /// Create a copy of Coords - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? x = null, - Object? y = null, - Object? z = null, - }) { - return _then(_self.copyWith( - x: null == x - ? _self.x - : x // ignore: cast_nullable_to_non_nullable - as double, - y: null == y - ? _self.y - : y // ignore: cast_nullable_to_non_nullable - as double, - z: null == z - ? _self.z - : z // ignore: cast_nullable_to_non_nullable - as double, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _Coords with DiagnosticableTreeMixin implements Coords { - const _Coords({required this.x, required this.y, required this.z}); - factory _Coords.fromJson(Map json) => _$CoordsFromJson(json); - - @override - final double x; - @override - final double y; - @override - final double z; - - /// Create a copy of Coords - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$CoordsCopyWith<_Coords> get copyWith => - __$CoordsCopyWithImpl<_Coords>(this, _$identity); - - @override - Map toJson() { - return _$CoordsToJson( - this, - ); - } - - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'Coords')) - ..add(DiagnosticsProperty('x', x)) - ..add(DiagnosticsProperty('y', y)) - ..add(DiagnosticsProperty('z', z)); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _Coords && - (identical(other.x, x) || other.x == x) && - (identical(other.y, y) || other.y == y) && - (identical(other.z, z) || other.z == z)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, x, y, z); - - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'Coords(x: $x, y: $y, z: $z)'; - } -} - -/// @nodoc -abstract mixin class _$CoordsCopyWith<$Res> implements $CoordsCopyWith<$Res> { - factory _$CoordsCopyWith(_Coords value, $Res Function(_Coords) _then) = - __$CoordsCopyWithImpl; - @override - @useResult - $Res call({double x, double y, double z}); -} - -/// @nodoc -class __$CoordsCopyWithImpl<$Res> implements _$CoordsCopyWith<$Res> { - __$CoordsCopyWithImpl(this._self, this._then); - - final _Coords _self; - final $Res Function(_Coords) _then; - - /// Create a copy of Coords - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? x = null, - Object? y = null, - Object? z = null, - }) { - return _then(_Coords( - x: null == x - ? _self.x - : x // ignore: cast_nullable_to_non_nullable - as double, - y: null == y - ? _self.y - : y // ignore: cast_nullable_to_non_nullable - as double, - z: null == z - ? _self.z - : z // ignore: cast_nullable_to_non_nullable - as double, - )); - } -} - -/// @nodoc -mixin _$MegaStruct implements DiagnosticableTreeMixin { - String get name; - Coords get coords; - Map get props; - - /// Create a copy of MegaStruct - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $MegaStructCopyWith get copyWith => - _$MegaStructCopyWithImpl(this as MegaStruct, _$identity); - - /// Serializes this MegaStruct to a JSON map. - Map toJson(); - - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'MegaStruct')) - ..add(DiagnosticsProperty('name', name)) - ..add(DiagnosticsProperty('coords', coords)) - ..add(DiagnosticsProperty('props', props)); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is MegaStruct && - (identical(other.name, name) || other.name == name) && - (identical(other.coords, coords) || other.coords == coords) && - const DeepCollectionEquality().equals(other.props, props)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, name, coords, const DeepCollectionEquality().hash(props)); - - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'MegaStruct(name: $name, coords: $coords, props: $props)'; - } -} - -/// @nodoc -abstract mixin class $MegaStructCopyWith<$Res> { - factory $MegaStructCopyWith( - MegaStruct value, $Res Function(MegaStruct) _then) = - _$MegaStructCopyWithImpl; - @useResult - $Res call({String name, Coords coords, Map props}); - - $CoordsCopyWith<$Res> get coords; -} - -/// @nodoc -class _$MegaStructCopyWithImpl<$Res> implements $MegaStructCopyWith<$Res> { - _$MegaStructCopyWithImpl(this._self, this._then); - - final MegaStruct _self; - final $Res Function(MegaStruct) _then; - - /// Create a copy of MegaStruct - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = null, - Object? coords = null, - Object? props = null, - }) { - return _then(_self.copyWith( - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - coords: null == coords - ? _self.coords - : coords // ignore: cast_nullable_to_non_nullable - as Coords, - props: null == props - ? _self.props - : props // ignore: cast_nullable_to_non_nullable - as Map, - )); - } - - /// Create a copy of MegaStruct - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $CoordsCopyWith<$Res> get coords { - return $CoordsCopyWith<$Res>(_self.coords, (value) { - return _then(_self.copyWith(coords: value)); - }); - } -} - -/// @nodoc -@JsonSerializable() -class _MegaStruct with DiagnosticableTreeMixin implements MegaStruct { - const _MegaStruct( - {required this.name, - required this.coords, - required final Map props}) - : _props = props; - factory _MegaStruct.fromJson(Map json) => - _$MegaStructFromJson(json); - - @override - final String name; - @override - final Coords coords; - final Map _props; - @override - Map get props { - if (_props is EqualUnmodifiableMapView) return _props; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_props); - } - - /// Create a copy of MegaStruct - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$MegaStructCopyWith<_MegaStruct> get copyWith => - __$MegaStructCopyWithImpl<_MegaStruct>(this, _$identity); - - @override - Map toJson() { - return _$MegaStructToJson( - this, - ); - } - - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'MegaStruct')) - ..add(DiagnosticsProperty('name', name)) - ..add(DiagnosticsProperty('coords', coords)) - ..add(DiagnosticsProperty('props', props)); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _MegaStruct && - (identical(other.name, name) || other.name == name) && - (identical(other.coords, coords) || other.coords == coords) && - const DeepCollectionEquality().equals(other._props, _props)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, name, coords, const DeepCollectionEquality().hash(_props)); - - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'MegaStruct(name: $name, coords: $coords, props: $props)'; - } -} - -/// @nodoc -abstract mixin class _$MegaStructCopyWith<$Res> - implements $MegaStructCopyWith<$Res> { - factory _$MegaStructCopyWith( - _MegaStruct value, $Res Function(_MegaStruct) _then) = - __$MegaStructCopyWithImpl; - @override - @useResult - $Res call({String name, Coords coords, Map props}); - - @override - $CoordsCopyWith<$Res> get coords; -} - -/// @nodoc -class __$MegaStructCopyWithImpl<$Res> implements _$MegaStructCopyWith<$Res> { - __$MegaStructCopyWithImpl(this._self, this._then); - - final _MegaStruct _self; - final $Res Function(_MegaStruct) _then; - - /// Create a copy of MegaStruct - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? name = null, - Object? coords = null, - Object? props = null, - }) { - return _then(_MegaStruct( - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - coords: null == coords - ? _self.coords - : coords // ignore: cast_nullable_to_non_nullable - as Coords, - props: null == props - ? _self._props - : props // ignore: cast_nullable_to_non_nullable - as Map, - )); - } - - /// Create a copy of MegaStruct - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $CoordsCopyWith<$Res> get coords { - return $CoordsCopyWith<$Res>(_self.coords, (value) { - return _then(_self.copyWith(coords: value)); - }); - } -} - -// dart format on diff --git a/packages/flutter_nekoton_bridge/lib/example_related/mega_struct.g.dart b/packages/flutter_nekoton_bridge/lib/example_related/mega_struct.g.dart deleted file mode 100644 index 04bcf329..00000000 --- a/packages/flutter_nekoton_bridge/lib/example_related/mega_struct.g.dart +++ /dev/null @@ -1,32 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'mega_struct.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_Coords _$CoordsFromJson(Map json) => _Coords( - x: (json['x'] as num).toDouble(), - y: (json['y'] as num).toDouble(), - z: (json['z'] as num).toDouble(), - ); - -Map _$CoordsToJson(_Coords instance) => { - 'x': instance.x, - 'y': instance.y, - 'z': instance.z, - }; - -_MegaStruct _$MegaStructFromJson(Map json) => _MegaStruct( - name: json['name'] as String, - coords: Coords.fromJson(json['coords'] as Map), - props: Map.from(json['props'] as Map), - ); - -Map _$MegaStructToJson(_MegaStruct instance) => - { - 'name': instance.name, - 'coords': instance.coords.toJson(), - 'props': instance.props, - }; diff --git a/packages/flutter_nekoton_bridge/lib/flutter_nekoton_bridge.dart b/packages/flutter_nekoton_bridge/lib/flutter_nekoton_bridge.dart index b589a870..ed34dc12 100644 --- a/packages/flutter_nekoton_bridge/lib/flutter_nekoton_bridge.dart +++ b/packages/flutter_nekoton_bridge/lib/flutter_nekoton_bridge.dart @@ -1,8 +1,4 @@ -export 'package:money2/money2.dart'; -export 'package:money2_fixer/money2_fixer.dart'; export 'package:nekoton_bridge/nekoton_bridge.dart'; -export 'dynamic_value.dart'; export 'misc.dart'; export 'nekoton/nekoton_lib.dart'; -export 'rust_to_dart/rust_to_dart_caller.dart'; diff --git a/packages/flutter_nekoton_bridge/lib/misc.dart b/packages/flutter_nekoton_bridge/lib/misc.dart index ea2f723e..b41b71e0 100644 --- a/packages/flutter_nekoton_bridge/lib/misc.dart +++ b/packages/flutter_nekoton_bridge/lib/misc.dart @@ -1,10 +1,7 @@ -import 'dart:typed_data'; - import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart' hide Symbol; -import 'package:flutter_nekoton_bridge/log_entry.dart'; +// ignore: unused_element void Function(LogEntry logEntry)? _logHandler; -const String _tag = 'flutter_nekoton_bridge'; /// Init logger Future setupLogger({ @@ -21,125 +18,3 @@ Future setupLogger({ Future updateClockOffset(Duration offset) { return setClockOffset(offsetMs: offset.inMilliseconds); } - -Stream? _caller; - -Future registerRustToDartCaller(RustToDartCaller rustToDartCaller) async { - if (_caller != null) return; - - _caller = initCaller() - ..listen((stubRegistred) async { - var id = stubRegistred.id; - var stub = stubRegistred.stub; - var objectHash = stub.instanceHash; - - final positionalArguments = stub.args.map((e) => e.toDynamic()).toList(); - final namedArguments = stub.namedArgs.fold( - {}, - (previousValue, element) => { - ...previousValue, - ...{ - Symbol(element.name): element.value?.toDynamic(), - } - }); - - try { - final result = rustToDartCaller.invoke( - objectHash, - stub.fnName, - positionalArguments, - namedArguments.isNotEmpty ? namedArguments : null, - ); - if (id == null) { - // Don't use return value - return; - } - if (result is String) { - callSendResult(id: id, value: DynamicValue.string(result)); - return; - } else if (result is Future) { - callSendResult(id: id, value: DynamicValue.string(await result)); - return; - } else if (result is Future) { - final r = await result; - if (r == null) { - callSendResult(id: id, value: const DynamicValue.none()); - } else { - callSendResult(id: id, value: DynamicValue.string(r)); - } - return; - } else if (result is int) { - callSendResult(id: id, value: DynamicValue.i64(result)); - return; - } else if (result is Future) { - callSendResult(id: id, value: DynamicValue.i64(await result)); - return; - } else if (result is double) { - callSendResult(id: id, value: DynamicValue.f64(result)); - return; - } else if (result is Future) { - callSendResult(id: id, value: DynamicValue.f64(await result)); - return; - } else if (result is DynamicValue) { - callSendResult(id: id, value: result); - return; - } else if (result is Future) { - callSendResult(id: id, value: await result); - return; - } else if (result is ErrorCode) { - callSendResult(id: id, value: DynamicValue.error(result)); - return; - } else if (result is Future) { - callSendResult(id: id, value: DynamicValue.error(await result)); - return; - } else if (result is Uint8List) { - callSendResult(id: id, value: DynamicValue.vecU8(result)); - return; - } else if (result is Future) { - callSendResult(id: id, value: DynamicValue.vecU8(await result)); - return; - } else if (result == null) { - callSendResult(id: id, value: const DynamicValue.none()); - } - // This option must be at last place because void can be determined - // as any type - else if (result is Future) { - await result; - callSendResult(id: id, value: const DynamicValue.none()); - return; - } - - final logEntry = LogEntryCreate.create( - level: LogLevel.error, - tag: _tag, - msg: 'Unsupported return type: ${result.runtimeType}', - ); - _logHandler?.call(logEntry); - } on Object catch (e, t) { - if (id != null) { - /// To get here, just `throw ErrorCode.Network` for example - if (e is ErrorCode) { - callSendResult(id: id, value: DynamicValue.error(e)); - } else { - callSendResult( - id: id, - value: const DynamicValue.error(ErrorCode.invokeException), - ); - } - } - final logEntry = LogEntryCreate.create( - level: LogLevel.error, - tag: _tag, - msg: e.toString(), - stack: t.toString(), - ); - _logHandler?.call(logEntry); - } - }); -} - -/// Init rust to dart caller that will call methods of registered instances. -/// For details, see [RustToDartCaller] -Future initRustToDartCaller() async { - await registerRustToDartCaller(RustToDartCaller.instance); -} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/accounts_storage.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/accounts_storage.dart index 9a3b993f..64b5e500 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/accounts_storage.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/accounts_storage.dart @@ -41,8 +41,9 @@ class AccountsStorage { /// Add new account to storage and return its address or throw error Future
addAccount(AccountToAdd account) async { - final encoded = - await accountsStorage.addAccount(account: jsonEncode(account)); + final encoded = await accountsStorage.addAccount( + account: jsonEncode(account), + ); final decoded = jsonDecode(encoded) as Map; await _updateData(); return AssetsList.fromJson(decoded).address; @@ -50,8 +51,9 @@ class AccountsStorage { /// Add list of new accounts to storage and return its addresses. Future> addAccounts(List account) async { - final encoded = - await accountsStorage.addAccounts(accounts: jsonEncode(account)); + final encoded = await accountsStorage.addAccounts( + accounts: jsonEncode(account), + ); final decoded = jsonDecode(encoded) as List; await _updateData(); return decoded @@ -165,7 +167,8 @@ class AccountsStorage { /// Return list of addresses that were removed or throw error. Future> removeAccounts(List
addresses) async { final encoded = await accountsStorage.removeAccounts( - accountAddresses: addresses.map((address) => address.address).toList()); + accountAddresses: addresses.map((address) => address.address).toList(), + ); final decoded = jsonDecode(encoded) as List; await _updateData(); return decoded diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/account_to_add.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/account_to_add.freezed.dart index 55003b99..4c64222c 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/account_to_add.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/account_to_add.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,233 +14,278 @@ T _$identity(T value) => value; /// @nodoc mixin _$AccountToAdd { - String get name; - PublicKey get publicKey; - WalletType get contract; - int get workchain; - Address? get explicitAddress; - - /// Create a copy of AccountToAdd - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $AccountToAddCopyWith get copyWith => - _$AccountToAddCopyWithImpl( - this as AccountToAdd, _$identity); + + String get name; PublicKey get publicKey; WalletType get contract; int get workchain; Address? get explicitAddress; +/// Create a copy of AccountToAdd +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$AccountToAddCopyWith get copyWith => _$AccountToAddCopyWithImpl(this as AccountToAdd, _$identity); /// Serializes this AccountToAdd to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is AccountToAdd && - (identical(other.name, name) || other.name == name) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.contract, contract) || - other.contract == contract) && - (identical(other.workchain, workchain) || - other.workchain == workchain) && - (identical(other.explicitAddress, explicitAddress) || - other.explicitAddress == explicitAddress)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, name, publicKey, contract, workchain, explicitAddress); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is AccountToAdd&&(identical(other.name, name) || other.name == name)&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.contract, contract) || other.contract == contract)&&(identical(other.workchain, workchain) || other.workchain == workchain)&&(identical(other.explicitAddress, explicitAddress) || other.explicitAddress == explicitAddress)); +} - @override - String toString() { - return 'AccountToAdd(name: $name, publicKey: $publicKey, contract: $contract, workchain: $workchain, explicitAddress: $explicitAddress)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,publicKey,contract,workchain,explicitAddress); + +@override +String toString() { + return 'AccountToAdd(name: $name, publicKey: $publicKey, contract: $contract, workchain: $workchain, explicitAddress: $explicitAddress)'; } -/// @nodoc -abstract mixin class $AccountToAddCopyWith<$Res> { - factory $AccountToAddCopyWith( - AccountToAdd value, $Res Function(AccountToAdd) _then) = - _$AccountToAddCopyWithImpl; - @useResult - $Res call( - {String name, - PublicKey publicKey, - WalletType contract, - int workchain, - Address? explicitAddress}); - - $PublicKeyCopyWith<$Res> get publicKey; - $WalletTypeCopyWith<$Res> get contract; - $AddressCopyWith<$Res>? get explicitAddress; + } /// @nodoc -class _$AccountToAddCopyWithImpl<$Res> implements $AccountToAddCopyWith<$Res> { +abstract mixin class $AccountToAddCopyWith<$Res> { + factory $AccountToAddCopyWith(AccountToAdd value, $Res Function(AccountToAdd) _then) = _$AccountToAddCopyWithImpl; +@useResult +$Res call({ + String name, PublicKey publicKey, WalletType contract, int workchain, Address? explicitAddress +}); + + +$PublicKeyCopyWith<$Res> get publicKey;$WalletTypeCopyWith<$Res> get contract;$AddressCopyWith<$Res>? get explicitAddress; + +} +/// @nodoc +class _$AccountToAddCopyWithImpl<$Res> + implements $AccountToAddCopyWith<$Res> { _$AccountToAddCopyWithImpl(this._self, this._then); final AccountToAdd _self; final $Res Function(AccountToAdd) _then; - /// Create a copy of AccountToAdd - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = null, - Object? publicKey = null, - Object? contract = null, - Object? workchain = null, - Object? explicitAddress = freezed, - }) { - return _then(_self.copyWith( - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - contract: null == contract - ? _self.contract - : contract // ignore: cast_nullable_to_non_nullable - as WalletType, - workchain: null == workchain - ? _self.workchain - : workchain // ignore: cast_nullable_to_non_nullable - as int, - explicitAddress: freezed == explicitAddress - ? _self.explicitAddress - : explicitAddress // ignore: cast_nullable_to_non_nullable - as Address?, - )); +/// Create a copy of AccountToAdd +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? publicKey = null,Object? contract = null,Object? workchain = null,Object? explicitAddress = freezed,}) { + return _then(_self.copyWith( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,contract: null == contract ? _self.contract : contract // ignore: cast_nullable_to_non_nullable +as WalletType,workchain: null == workchain ? _self.workchain : workchain // ignore: cast_nullable_to_non_nullable +as int,explicitAddress: freezed == explicitAddress ? _self.explicitAddress : explicitAddress // ignore: cast_nullable_to_non_nullable +as Address?, + )); +} +/// Create a copy of AccountToAdd +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of AccountToAdd +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$WalletTypeCopyWith<$Res> get contract { + + return $WalletTypeCopyWith<$Res>(_self.contract, (value) { + return _then(_self.copyWith(contract: value)); + }); +}/// Create a copy of AccountToAdd +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res>? get explicitAddress { + if (_self.explicitAddress == null) { + return null; } - /// Create a copy of AccountToAdd - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } + return $AddressCopyWith<$Res>(_self.explicitAddress!, (value) { + return _then(_self.copyWith(explicitAddress: value)); + }); +} +} - /// Create a copy of AccountToAdd - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $WalletTypeCopyWith<$Res> get contract { - return $WalletTypeCopyWith<$Res>(_self.contract, (value) { - return _then(_self.copyWith(contract: value)); - }); - } - /// Create a copy of AccountToAdd - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res>? get explicitAddress { - if (_self.explicitAddress == null) { - return null; - } +/// Adds pattern-matching-related methods to [AccountToAdd]. +extension AccountToAddPatterns on AccountToAdd { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _AccountToAdd value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _AccountToAdd() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _AccountToAdd value) $default,){ +final _that = this; +switch (_that) { +case _AccountToAdd(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _AccountToAdd value)? $default,){ +final _that = this; +switch (_that) { +case _AccountToAdd() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String name, PublicKey publicKey, WalletType contract, int workchain, Address? explicitAddress)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _AccountToAdd() when $default != null: +return $default(_that.name,_that.publicKey,_that.contract,_that.workchain,_that.explicitAddress);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String name, PublicKey publicKey, WalletType contract, int workchain, Address? explicitAddress) $default,) {final _that = this; +switch (_that) { +case _AccountToAdd(): +return $default(_that.name,_that.publicKey,_that.contract,_that.workchain,_that.explicitAddress);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String name, PublicKey publicKey, WalletType contract, int workchain, Address? explicitAddress)? $default,) {final _that = this; +switch (_that) { +case _AccountToAdd() when $default != null: +return $default(_that.name,_that.publicKey,_that.contract,_that.workchain,_that.explicitAddress);case _: + return null; + +} +} - return $AddressCopyWith<$Res>(_self.explicitAddress!, (value) { - return _then(_self.copyWith(explicitAddress: value)); - }); - } } /// @nodoc @JsonSerializable() + class _AccountToAdd implements AccountToAdd { - const _AccountToAdd( - {required this.name, - required this.publicKey, - required this.contract, - required this.workchain, - this.explicitAddress}); - factory _AccountToAdd.fromJson(Map json) => - _$AccountToAddFromJson(json); - - @override - final String name; - @override - final PublicKey publicKey; - @override - final WalletType contract; - @override - final int workchain; - @override - final Address? explicitAddress; - - /// Create a copy of AccountToAdd - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$AccountToAddCopyWith<_AccountToAdd> get copyWith => - __$AccountToAddCopyWithImpl<_AccountToAdd>(this, _$identity); - - @override - Map toJson() { - return _$AccountToAddToJson( - this, - ); - } + const _AccountToAdd({required this.name, required this.publicKey, required this.contract, required this.workchain, this.explicitAddress}); + factory _AccountToAdd.fromJson(Map json) => _$AccountToAddFromJson(json); + +@override final String name; +@override final PublicKey publicKey; +@override final WalletType contract; +@override final int workchain; +@override final Address? explicitAddress; + +/// Create a copy of AccountToAdd +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$AccountToAddCopyWith<_AccountToAdd> get copyWith => __$AccountToAddCopyWithImpl<_AccountToAdd>(this, _$identity); + +@override +Map toJson() { + return _$AccountToAddToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _AccountToAdd && - (identical(other.name, name) || other.name == name) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.contract, contract) || - other.contract == contract) && - (identical(other.workchain, workchain) || - other.workchain == workchain) && - (identical(other.explicitAddress, explicitAddress) || - other.explicitAddress == explicitAddress)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _AccountToAdd&&(identical(other.name, name) || other.name == name)&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.contract, contract) || other.contract == contract)&&(identical(other.workchain, workchain) || other.workchain == workchain)&&(identical(other.explicitAddress, explicitAddress) || other.explicitAddress == explicitAddress)); +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, name, publicKey, contract, workchain, explicitAddress); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,publicKey,contract,workchain,explicitAddress); - @override - String toString() { - return 'AccountToAdd(name: $name, publicKey: $publicKey, contract: $contract, workchain: $workchain, explicitAddress: $explicitAddress)'; - } +@override +String toString() { + return 'AccountToAdd(name: $name, publicKey: $publicKey, contract: $contract, workchain: $workchain, explicitAddress: $explicitAddress)'; } -/// @nodoc -abstract mixin class _$AccountToAddCopyWith<$Res> - implements $AccountToAddCopyWith<$Res> { - factory _$AccountToAddCopyWith( - _AccountToAdd value, $Res Function(_AccountToAdd) _then) = - __$AccountToAddCopyWithImpl; - @override - @useResult - $Res call( - {String name, - PublicKey publicKey, - WalletType contract, - int workchain, - Address? explicitAddress}); - - @override - $PublicKeyCopyWith<$Res> get publicKey; - @override - $WalletTypeCopyWith<$Res> get contract; - @override - $AddressCopyWith<$Res>? get explicitAddress; + } +/// @nodoc +abstract mixin class _$AccountToAddCopyWith<$Res> implements $AccountToAddCopyWith<$Res> { + factory _$AccountToAddCopyWith(_AccountToAdd value, $Res Function(_AccountToAdd) _then) = __$AccountToAddCopyWithImpl; +@override @useResult +$Res call({ + String name, PublicKey publicKey, WalletType contract, int workchain, Address? explicitAddress +}); + + +@override $PublicKeyCopyWith<$Res> get publicKey;@override $WalletTypeCopyWith<$Res> get contract;@override $AddressCopyWith<$Res>? get explicitAddress; + +} /// @nodoc class __$AccountToAddCopyWithImpl<$Res> implements _$AccountToAddCopyWith<$Res> { @@ -250,74 +294,50 @@ class __$AccountToAddCopyWithImpl<$Res> final _AccountToAdd _self; final $Res Function(_AccountToAdd) _then; - /// Create a copy of AccountToAdd - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? name = null, - Object? publicKey = null, - Object? contract = null, - Object? workchain = null, - Object? explicitAddress = freezed, - }) { - return _then(_AccountToAdd( - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - contract: null == contract - ? _self.contract - : contract // ignore: cast_nullable_to_non_nullable - as WalletType, - workchain: null == workchain - ? _self.workchain - : workchain // ignore: cast_nullable_to_non_nullable - as int, - explicitAddress: freezed == explicitAddress - ? _self.explicitAddress - : explicitAddress // ignore: cast_nullable_to_non_nullable - as Address?, - )); - } - - /// Create a copy of AccountToAdd - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } - - /// Create a copy of AccountToAdd - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $WalletTypeCopyWith<$Res> get contract { - return $WalletTypeCopyWith<$Res>(_self.contract, (value) { - return _then(_self.copyWith(contract: value)); - }); - } +/// Create a copy of AccountToAdd +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? publicKey = null,Object? contract = null,Object? workchain = null,Object? explicitAddress = freezed,}) { + return _then(_AccountToAdd( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,contract: null == contract ? _self.contract : contract // ignore: cast_nullable_to_non_nullable +as WalletType,workchain: null == workchain ? _self.workchain : workchain // ignore: cast_nullable_to_non_nullable +as int,explicitAddress: freezed == explicitAddress ? _self.explicitAddress : explicitAddress // ignore: cast_nullable_to_non_nullable +as Address?, + )); +} - /// Create a copy of AccountToAdd - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res>? get explicitAddress { +/// Create a copy of AccountToAdd +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of AccountToAdd +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$WalletTypeCopyWith<$Res> get contract { + + return $WalletTypeCopyWith<$Res>(_self.contract, (value) { + return _then(_self.copyWith(contract: value)); + }); +}/// Create a copy of AccountToAdd +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res>? get explicitAddress { if (_self.explicitAddress == null) { - return null; - } - - return $AddressCopyWith<$Res>(_self.explicitAddress!, (value) { - return _then(_self.copyWith(explicitAddress: value)); - }); + return null; } + + return $AddressCopyWith<$Res>(_self.explicitAddress!, (value) { + return _then(_self.copyWith(explicitAddress: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/additional_assets.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/additional_assets.freezed.dart index 7809edb3..4230d9ed 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/additional_assets.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/additional_assets.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,52 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$AdditionalAssets { - List get tokenWallets; - List get depools; - /// Create a copy of AdditionalAssets - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $AdditionalAssetsCopyWith get copyWith => - _$AdditionalAssetsCopyWithImpl( - this as AdditionalAssets, _$identity); + List get tokenWallets; List get depools; +/// Create a copy of AdditionalAssets +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$AdditionalAssetsCopyWith get copyWith => _$AdditionalAssetsCopyWithImpl(this as AdditionalAssets, _$identity); /// Serializes this AdditionalAssets to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is AdditionalAssets && - const DeepCollectionEquality() - .equals(other.tokenWallets, tokenWallets) && - const DeepCollectionEquality().equals(other.depools, depools)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(tokenWallets), - const DeepCollectionEquality().hash(depools)); - - @override - String toString() { - return 'AdditionalAssets(tokenWallets: $tokenWallets, depools: $depools)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is AdditionalAssets&&const DeepCollectionEquality().equals(other.tokenWallets, tokenWallets)&&const DeepCollectionEquality().equals(other.depools, depools)); } -/// @nodoc -abstract mixin class $AdditionalAssetsCopyWith<$Res> { - factory $AdditionalAssetsCopyWith( - AdditionalAssets value, $Res Function(AdditionalAssets) _then) = - _$AdditionalAssetsCopyWithImpl; - @useResult - $Res call({List tokenWallets, List depools}); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(tokenWallets),const DeepCollectionEquality().hash(depools)); + +@override +String toString() { + return 'AdditionalAssets(tokenWallets: $tokenWallets, depools: $depools)'; +} + + } +/// @nodoc +abstract mixin class $AdditionalAssetsCopyWith<$Res> { + factory $AdditionalAssetsCopyWith(AdditionalAssets value, $Res Function(AdditionalAssets) _then) = _$AdditionalAssetsCopyWithImpl; +@useResult +$Res call({ + List tokenWallets, List depools +}); + + + + +} /// @nodoc class _$AdditionalAssetsCopyWithImpl<$Res> implements $AdditionalAssetsCopyWith<$Res> { @@ -69,104 +63,205 @@ class _$AdditionalAssetsCopyWithImpl<$Res> final AdditionalAssets _self; final $Res Function(AdditionalAssets) _then; - /// Create a copy of AdditionalAssets - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? tokenWallets = null, - Object? depools = null, - }) { - return _then(_self.copyWith( - tokenWallets: null == tokenWallets - ? _self.tokenWallets - : tokenWallets // ignore: cast_nullable_to_non_nullable - as List, - depools: null == depools - ? _self.depools - : depools // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of AdditionalAssets +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? tokenWallets = null,Object? depools = null,}) { + return _then(_self.copyWith( +tokenWallets: null == tokenWallets ? _self.tokenWallets : tokenWallets // ignore: cast_nullable_to_non_nullable +as List,depools: null == depools ? _self.depools : depools // ignore: cast_nullable_to_non_nullable +as List, + )); +} + +} + + +/// Adds pattern-matching-related methods to [AdditionalAssets]. +extension AdditionalAssetsPatterns on AdditionalAssets { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _AdditionalAssets value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _AdditionalAssets() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _AdditionalAssets value) $default,){ +final _that = this; +switch (_that) { +case _AdditionalAssets(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _AdditionalAssets value)? $default,){ +final _that = this; +switch (_that) { +case _AdditionalAssets() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List tokenWallets, List depools)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _AdditionalAssets() when $default != null: +return $default(_that.tokenWallets,_that.depools);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List tokenWallets, List depools) $default,) {final _that = this; +switch (_that) { +case _AdditionalAssets(): +return $default(_that.tokenWallets,_that.depools);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List tokenWallets, List depools)? $default,) {final _that = this; +switch (_that) { +case _AdditionalAssets() when $default != null: +return $default(_that.tokenWallets,_that.depools);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _AdditionalAssets implements AdditionalAssets { - const _AdditionalAssets( - {required final List tokenWallets, - required final List depools}) - : _tokenWallets = tokenWallets, - _depools = depools; - factory _AdditionalAssets.fromJson(Map json) => - _$AdditionalAssetsFromJson(json); - - final List _tokenWallets; - @override - List get tokenWallets { - if (_tokenWallets is EqualUnmodifiableListView) return _tokenWallets; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_tokenWallets); - } - - final List _depools; - @override - List get depools { - if (_depools is EqualUnmodifiableListView) return _depools; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_depools); - } - - /// Create a copy of AdditionalAssets - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$AdditionalAssetsCopyWith<_AdditionalAssets> get copyWith => - __$AdditionalAssetsCopyWithImpl<_AdditionalAssets>(this, _$identity); - - @override - Map toJson() { - return _$AdditionalAssetsToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _AdditionalAssets && - const DeepCollectionEquality() - .equals(other._tokenWallets, _tokenWallets) && - const DeepCollectionEquality().equals(other._depools, _depools)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_tokenWallets), - const DeepCollectionEquality().hash(_depools)); - - @override - String toString() { - return 'AdditionalAssets(tokenWallets: $tokenWallets, depools: $depools)'; - } + const _AdditionalAssets({required final List tokenWallets, required final List depools}): _tokenWallets = tokenWallets,_depools = depools; + factory _AdditionalAssets.fromJson(Map json) => _$AdditionalAssetsFromJson(json); + + final List _tokenWallets; +@override List get tokenWallets { + if (_tokenWallets is EqualUnmodifiableListView) return _tokenWallets; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_tokenWallets); } -/// @nodoc -abstract mixin class _$AdditionalAssetsCopyWith<$Res> - implements $AdditionalAssetsCopyWith<$Res> { - factory _$AdditionalAssetsCopyWith( - _AdditionalAssets value, $Res Function(_AdditionalAssets) _then) = - __$AdditionalAssetsCopyWithImpl; - @override - @useResult - $Res call({List tokenWallets, List depools}); + final List _depools; +@override List get depools { + if (_depools is EqualUnmodifiableListView) return _depools; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_depools); +} + + +/// Create a copy of AdditionalAssets +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$AdditionalAssetsCopyWith<_AdditionalAssets> get copyWith => __$AdditionalAssetsCopyWithImpl<_AdditionalAssets>(this, _$identity); + +@override +Map toJson() { + return _$AdditionalAssetsToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _AdditionalAssets&&const DeepCollectionEquality().equals(other._tokenWallets, _tokenWallets)&&const DeepCollectionEquality().equals(other._depools, _depools)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_tokenWallets),const DeepCollectionEquality().hash(_depools)); + +@override +String toString() { + return 'AdditionalAssets(tokenWallets: $tokenWallets, depools: $depools)'; } + +} + +/// @nodoc +abstract mixin class _$AdditionalAssetsCopyWith<$Res> implements $AdditionalAssetsCopyWith<$Res> { + factory _$AdditionalAssetsCopyWith(_AdditionalAssets value, $Res Function(_AdditionalAssets) _then) = __$AdditionalAssetsCopyWithImpl; +@override @useResult +$Res call({ + List tokenWallets, List depools +}); + + + + +} /// @nodoc class __$AdditionalAssetsCopyWithImpl<$Res> implements _$AdditionalAssetsCopyWith<$Res> { @@ -175,25 +270,17 @@ class __$AdditionalAssetsCopyWithImpl<$Res> final _AdditionalAssets _self; final $Res Function(_AdditionalAssets) _then; - /// Create a copy of AdditionalAssets - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? tokenWallets = null, - Object? depools = null, - }) { - return _then(_AdditionalAssets( - tokenWallets: null == tokenWallets - ? _self._tokenWallets - : tokenWallets // ignore: cast_nullable_to_non_nullable - as List, - depools: null == depools - ? _self._depools - : depools // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of AdditionalAssets +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? tokenWallets = null,Object? depools = null,}) { + return _then(_AdditionalAssets( +tokenWallets: null == tokenWallets ? _self._tokenWallets : tokenWallets // ignore: cast_nullable_to_non_nullable +as List,depools: null == depools ? _self._depools : depools // ignore: cast_nullable_to_non_nullable +as List, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/assets_list.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/assets_list.freezed.dart index 97e978e3..5b50529c 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/assets_list.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/assets_list.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,229 +14,297 @@ T _$identity(T value) => value; /// @nodoc mixin _$AssetsList { - String get name; - TonWalletAsset - get tonWallet; // List of Token assets that are owned by this wallet. + + String get name; TonWalletAsset get tonWallet;// List of Token assets that are owned by this wallet. // key - should be , value - list of tokens. // key will be specified from method - Map get additionalAssets; - - /// Create a copy of AssetsList - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $AssetsListCopyWith get copyWith => - _$AssetsListCopyWithImpl(this as AssetsList, _$identity); + Map get additionalAssets; +/// Create a copy of AssetsList +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$AssetsListCopyWith get copyWith => _$AssetsListCopyWithImpl(this as AssetsList, _$identity); /// Serializes this AssetsList to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is AssetsList && - (identical(other.name, name) || other.name == name) && - (identical(other.tonWallet, tonWallet) || - other.tonWallet == tonWallet) && - const DeepCollectionEquality() - .equals(other.additionalAssets, additionalAssets)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, name, tonWallet, - const DeepCollectionEquality().hash(additionalAssets)); - - @override - String toString() { - return 'AssetsList(name: $name, tonWallet: $tonWallet, additionalAssets: $additionalAssets)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is AssetsList&&(identical(other.name, name) || other.name == name)&&(identical(other.tonWallet, tonWallet) || other.tonWallet == tonWallet)&&const DeepCollectionEquality().equals(other.additionalAssets, additionalAssets)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,tonWallet,const DeepCollectionEquality().hash(additionalAssets)); + +@override +String toString() { + return 'AssetsList(name: $name, tonWallet: $tonWallet, additionalAssets: $additionalAssets)'; } -/// @nodoc -abstract mixin class $AssetsListCopyWith<$Res> { - factory $AssetsListCopyWith( - AssetsList value, $Res Function(AssetsList) _then) = - _$AssetsListCopyWithImpl; - @useResult - $Res call( - {String name, - TonWalletAsset tonWallet, - Map additionalAssets}); - $TonWalletAssetCopyWith<$Res> get tonWallet; } /// @nodoc -class _$AssetsListCopyWithImpl<$Res> implements $AssetsListCopyWith<$Res> { +abstract mixin class $AssetsListCopyWith<$Res> { + factory $AssetsListCopyWith(AssetsList value, $Res Function(AssetsList) _then) = _$AssetsListCopyWithImpl; +@useResult +$Res call({ + String name, TonWalletAsset tonWallet, Map additionalAssets +}); + + +$TonWalletAssetCopyWith<$Res> get tonWallet; + +} +/// @nodoc +class _$AssetsListCopyWithImpl<$Res> + implements $AssetsListCopyWith<$Res> { _$AssetsListCopyWithImpl(this._self, this._then); final AssetsList _self; final $Res Function(AssetsList) _then; - /// Create a copy of AssetsList - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = null, - Object? tonWallet = null, - Object? additionalAssets = null, - }) { - return _then(_self.copyWith( - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - tonWallet: null == tonWallet - ? _self.tonWallet - : tonWallet // ignore: cast_nullable_to_non_nullable - as TonWalletAsset, - additionalAssets: null == additionalAssets - ? _self.additionalAssets - : additionalAssets // ignore: cast_nullable_to_non_nullable - as Map, - )); - } - - /// Create a copy of AssetsList - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TonWalletAssetCopyWith<$Res> get tonWallet { - return $TonWalletAssetCopyWith<$Res>(_self.tonWallet, (value) { - return _then(_self.copyWith(tonWallet: value)); - }); - } +/// Create a copy of AssetsList +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? tonWallet = null,Object? additionalAssets = null,}) { + return _then(_self.copyWith( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,tonWallet: null == tonWallet ? _self.tonWallet : tonWallet // ignore: cast_nullable_to_non_nullable +as TonWalletAsset,additionalAssets: null == additionalAssets ? _self.additionalAssets : additionalAssets // ignore: cast_nullable_to_non_nullable +as Map, + )); +} +/// Create a copy of AssetsList +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TonWalletAssetCopyWith<$Res> get tonWallet { + + return $TonWalletAssetCopyWith<$Res>(_self.tonWallet, (value) { + return _then(_self.copyWith(tonWallet: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [AssetsList]. +extension AssetsListPatterns on AssetsList { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _AssetsList value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _AssetsList() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _AssetsList value) $default,){ +final _that = this; +switch (_that) { +case _AssetsList(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _AssetsList value)? $default,){ +final _that = this; +switch (_that) { +case _AssetsList() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String name, TonWalletAsset tonWallet, Map additionalAssets)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _AssetsList() when $default != null: +return $default(_that.name,_that.tonWallet,_that.additionalAssets);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String name, TonWalletAsset tonWallet, Map additionalAssets) $default,) {final _that = this; +switch (_that) { +case _AssetsList(): +return $default(_that.name,_that.tonWallet,_that.additionalAssets);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String name, TonWalletAsset tonWallet, Map additionalAssets)? $default,) {final _that = this; +switch (_that) { +case _AssetsList() when $default != null: +return $default(_that.name,_that.tonWallet,_that.additionalAssets);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _AssetsList extends AssetsList { - const _AssetsList( - {required this.name, - required this.tonWallet, - required final Map additionalAssets}) - : _additionalAssets = additionalAssets, - super._(); - factory _AssetsList.fromJson(Map json) => - _$AssetsListFromJson(json); - - @override - final String name; - @override - final TonWalletAsset tonWallet; + const _AssetsList({required this.name, required this.tonWallet, required final Map additionalAssets}): _additionalAssets = additionalAssets,super._(); + factory _AssetsList.fromJson(Map json) => _$AssetsListFromJson(json); + +@override final String name; +@override final TonWalletAsset tonWallet; // List of Token assets that are owned by this wallet. // key - should be , value - list of tokens. // key will be specified from method - final Map _additionalAssets; + final Map _additionalAssets; // List of Token assets that are owned by this wallet. // key - should be , value - list of tokens. // key will be specified from method - @override - Map get additionalAssets { - if (_additionalAssets is EqualUnmodifiableMapView) return _additionalAssets; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_additionalAssets); - } - - /// Create a copy of AssetsList - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$AssetsListCopyWith<_AssetsList> get copyWith => - __$AssetsListCopyWithImpl<_AssetsList>(this, _$identity); - - @override - Map toJson() { - return _$AssetsListToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _AssetsList && - (identical(other.name, name) || other.name == name) && - (identical(other.tonWallet, tonWallet) || - other.tonWallet == tonWallet) && - const DeepCollectionEquality() - .equals(other._additionalAssets, _additionalAssets)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, name, tonWallet, - const DeepCollectionEquality().hash(_additionalAssets)); - - @override - String toString() { - return 'AssetsList(name: $name, tonWallet: $tonWallet, additionalAssets: $additionalAssets)'; - } +@override Map get additionalAssets { + if (_additionalAssets is EqualUnmodifiableMapView) return _additionalAssets; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_additionalAssets); +} + + +/// Create a copy of AssetsList +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$AssetsListCopyWith<_AssetsList> get copyWith => __$AssetsListCopyWithImpl<_AssetsList>(this, _$identity); + +@override +Map toJson() { + return _$AssetsListToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _AssetsList&&(identical(other.name, name) || other.name == name)&&(identical(other.tonWallet, tonWallet) || other.tonWallet == tonWallet)&&const DeepCollectionEquality().equals(other._additionalAssets, _additionalAssets)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,tonWallet,const DeepCollectionEquality().hash(_additionalAssets)); + +@override +String toString() { + return 'AssetsList(name: $name, tonWallet: $tonWallet, additionalAssets: $additionalAssets)'; } -/// @nodoc -abstract mixin class _$AssetsListCopyWith<$Res> - implements $AssetsListCopyWith<$Res> { - factory _$AssetsListCopyWith( - _AssetsList value, $Res Function(_AssetsList) _then) = - __$AssetsListCopyWithImpl; - @override - @useResult - $Res call( - {String name, - TonWalletAsset tonWallet, - Map additionalAssets}); - @override - $TonWalletAssetCopyWith<$Res> get tonWallet; } /// @nodoc -class __$AssetsListCopyWithImpl<$Res> implements _$AssetsListCopyWith<$Res> { +abstract mixin class _$AssetsListCopyWith<$Res> implements $AssetsListCopyWith<$Res> { + factory _$AssetsListCopyWith(_AssetsList value, $Res Function(_AssetsList) _then) = __$AssetsListCopyWithImpl; +@override @useResult +$Res call({ + String name, TonWalletAsset tonWallet, Map additionalAssets +}); + + +@override $TonWalletAssetCopyWith<$Res> get tonWallet; + +} +/// @nodoc +class __$AssetsListCopyWithImpl<$Res> + implements _$AssetsListCopyWith<$Res> { __$AssetsListCopyWithImpl(this._self, this._then); final _AssetsList _self; final $Res Function(_AssetsList) _then; - /// Create a copy of AssetsList - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? name = null, - Object? tonWallet = null, - Object? additionalAssets = null, - }) { - return _then(_AssetsList( - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - tonWallet: null == tonWallet - ? _self.tonWallet - : tonWallet // ignore: cast_nullable_to_non_nullable - as TonWalletAsset, - additionalAssets: null == additionalAssets - ? _self._additionalAssets - : additionalAssets // ignore: cast_nullable_to_non_nullable - as Map, - )); - } - - /// Create a copy of AssetsList - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TonWalletAssetCopyWith<$Res> get tonWallet { - return $TonWalletAssetCopyWith<$Res>(_self.tonWallet, (value) { - return _then(_self.copyWith(tonWallet: value)); - }); - } +/// Create a copy of AssetsList +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? tonWallet = null,Object? additionalAssets = null,}) { + return _then(_AssetsList( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,tonWallet: null == tonWallet ? _self.tonWallet : tonWallet // ignore: cast_nullable_to_non_nullable +as TonWalletAsset,additionalAssets: null == additionalAssets ? _self._additionalAssets : additionalAssets // ignore: cast_nullable_to_non_nullable +as Map, + )); +} + +/// Create a copy of AssetsList +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TonWalletAssetCopyWith<$Res> get tonWallet { + + return $TonWalletAssetCopyWith<$Res>(_self.tonWallet, (value) { + return _then(_self.copyWith(tonWallet: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/assets_list.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/assets_list.g.dart index 495458de..dc99aff4 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/assets_list.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/assets_list.g.dart @@ -7,19 +7,18 @@ part of 'assets_list.dart'; // ************************************************************************** _AssetsList _$AssetsListFromJson(Map json) => _AssetsList( - name: json['name'] as String, - tonWallet: - TonWalletAsset.fromJson(json['tonWallet'] as Map), - additionalAssets: (json['additionalAssets'] as Map).map( - (k, e) => - MapEntry(k, AdditionalAssets.fromJson(e as Map)), - ), - ); + name: json['name'] as String, + tonWallet: TonWalletAsset.fromJson(json['tonWallet'] as Map), + additionalAssets: (json['additionalAssets'] as Map).map( + (k, e) => MapEntry(k, AdditionalAssets.fromJson(e as Map)), + ), +); Map _$AssetsListToJson(_AssetsList instance) => { 'name': instance.name, 'tonWallet': instance.tonWallet.toJson(), - 'additionalAssets': - instance.additionalAssets.map((k, e) => MapEntry(k, e.toJson())), + 'additionalAssets': instance.additionalAssets.map( + (k, e) => MapEntry(k, e.toJson()), + ), }; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/depool_asset.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/depool_asset.dart index dcb1b427..578bb49a 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/depool_asset.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/depool_asset.dart @@ -6,9 +6,7 @@ part 'depool_asset.g.dart'; @freezed sealed class DePoolAsset with _$DePoolAsset { - const factory DePoolAsset({ - required final Address address, - }) = _DePoolAsset; + const factory DePoolAsset({required final Address address}) = _DePoolAsset; factory DePoolAsset.fromJson(Map json) => _$DePoolAssetFromJson(json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/depool_asset.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/depool_asset.freezed.dart index 127b964b..afa43384 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/depool_asset.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/depool_asset.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,168 +14,276 @@ T _$identity(T value) => value; /// @nodoc mixin _$DePoolAsset { - Address get address; - /// Create a copy of DePoolAsset - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DePoolAssetCopyWith get copyWith => - _$DePoolAssetCopyWithImpl(this as DePoolAsset, _$identity); + Address get address; +/// Create a copy of DePoolAsset +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DePoolAssetCopyWith get copyWith => _$DePoolAssetCopyWithImpl(this as DePoolAsset, _$identity); /// Serializes this DePoolAsset to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DePoolAsset && - (identical(other.address, address) || other.address == address)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, address); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DePoolAsset&&(identical(other.address, address) || other.address == address)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,address); - @override - String toString() { - return 'DePoolAsset(address: $address)'; - } +@override +String toString() { + return 'DePoolAsset(address: $address)'; } -/// @nodoc -abstract mixin class $DePoolAssetCopyWith<$Res> { - factory $DePoolAssetCopyWith( - DePoolAsset value, $Res Function(DePoolAsset) _then) = - _$DePoolAssetCopyWithImpl; - @useResult - $Res call({Address address}); - $AddressCopyWith<$Res> get address; } /// @nodoc -class _$DePoolAssetCopyWithImpl<$Res> implements $DePoolAssetCopyWith<$Res> { +abstract mixin class $DePoolAssetCopyWith<$Res> { + factory $DePoolAssetCopyWith(DePoolAsset value, $Res Function(DePoolAsset) _then) = _$DePoolAssetCopyWithImpl; +@useResult +$Res call({ + Address address +}); + + +$AddressCopyWith<$Res> get address; + +} +/// @nodoc +class _$DePoolAssetCopyWithImpl<$Res> + implements $DePoolAssetCopyWith<$Res> { _$DePoolAssetCopyWithImpl(this._self, this._then); final DePoolAsset _self; final $Res Function(DePoolAsset) _then; - /// Create a copy of DePoolAsset - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? address = null, - }) { - return _then(_self.copyWith( - address: null == address - ? _self.address - : address // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of DePoolAsset - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get address { - return $AddressCopyWith<$Res>(_self.address, (value) { - return _then(_self.copyWith(address: value)); - }); - } +/// Create a copy of DePoolAsset +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? address = null,}) { + return _then(_self.copyWith( +address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as Address, + )); +} +/// Create a copy of DePoolAsset +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get address { + + return $AddressCopyWith<$Res>(_self.address, (value) { + return _then(_self.copyWith(address: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [DePoolAsset]. +extension DePoolAssetPatterns on DePoolAsset { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DePoolAsset value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DePoolAsset() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DePoolAsset value) $default,){ +final _that = this; +switch (_that) { +case _DePoolAsset(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DePoolAsset value)? $default,){ +final _that = this; +switch (_that) { +case _DePoolAsset() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Address address)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DePoolAsset() when $default != null: +return $default(_that.address);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Address address) $default,) {final _that = this; +switch (_that) { +case _DePoolAsset(): +return $default(_that.address);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Address address)? $default,) {final _that = this; +switch (_that) { +case _DePoolAsset() when $default != null: +return $default(_that.address);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _DePoolAsset implements DePoolAsset { const _DePoolAsset({required this.address}); - factory _DePoolAsset.fromJson(Map json) => - _$DePoolAssetFromJson(json); - - @override - final Address address; - - /// Create a copy of DePoolAsset - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DePoolAssetCopyWith<_DePoolAsset> get copyWith => - __$DePoolAssetCopyWithImpl<_DePoolAsset>(this, _$identity); - - @override - Map toJson() { - return _$DePoolAssetToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DePoolAsset && - (identical(other.address, address) || other.address == address)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, address); - - @override - String toString() { - return 'DePoolAsset(address: $address)'; - } + factory _DePoolAsset.fromJson(Map json) => _$DePoolAssetFromJson(json); + +@override final Address address; + +/// Create a copy of DePoolAsset +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DePoolAssetCopyWith<_DePoolAsset> get copyWith => __$DePoolAssetCopyWithImpl<_DePoolAsset>(this, _$identity); + +@override +Map toJson() { + return _$DePoolAssetToJson(this, ); } -/// @nodoc -abstract mixin class _$DePoolAssetCopyWith<$Res> - implements $DePoolAssetCopyWith<$Res> { - factory _$DePoolAssetCopyWith( - _DePoolAsset value, $Res Function(_DePoolAsset) _then) = - __$DePoolAssetCopyWithImpl; - @override - @useResult - $Res call({Address address}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DePoolAsset&&(identical(other.address, address) || other.address == address)); +} - @override - $AddressCopyWith<$Res> get address; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,address); + +@override +String toString() { + return 'DePoolAsset(address: $address)'; } + +} + +/// @nodoc +abstract mixin class _$DePoolAssetCopyWith<$Res> implements $DePoolAssetCopyWith<$Res> { + factory _$DePoolAssetCopyWith(_DePoolAsset value, $Res Function(_DePoolAsset) _then) = __$DePoolAssetCopyWithImpl; +@override @useResult +$Res call({ + Address address +}); + + +@override $AddressCopyWith<$Res> get address; + +} /// @nodoc -class __$DePoolAssetCopyWithImpl<$Res> implements _$DePoolAssetCopyWith<$Res> { +class __$DePoolAssetCopyWithImpl<$Res> + implements _$DePoolAssetCopyWith<$Res> { __$DePoolAssetCopyWithImpl(this._self, this._then); final _DePoolAsset _self; final $Res Function(_DePoolAsset) _then; - /// Create a copy of DePoolAsset - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? address = null, - }) { - return _then(_DePoolAsset( - address: null == address - ? _self.address - : address // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of DePoolAsset - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get address { - return $AddressCopyWith<$Res>(_self.address, (value) { - return _then(_self.copyWith(address: value)); - }); - } +/// Create a copy of DePoolAsset +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? address = null,}) { + return _then(_DePoolAsset( +address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as Address, + )); +} + +/// Create a copy of DePoolAsset +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get address { + + return $AddressCopyWith<$Res>(_self.address, (value) { + return _then(_self.copyWith(address: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/depool_asset.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/depool_asset.g.dart index 91121885..e552de02 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/depool_asset.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/depool_asset.g.dart @@ -6,11 +6,8 @@ part of 'depool_asset.dart'; // JsonSerializableGenerator // ************************************************************************** -_DePoolAsset _$DePoolAssetFromJson(Map json) => _DePoolAsset( - address: Address.fromJson(json['address'] as String), - ); +_DePoolAsset _$DePoolAssetFromJson(Map json) => + _DePoolAsset(address: Address.fromJson(json['address'] as String)); Map _$DePoolAssetToJson(_DePoolAsset instance) => - { - 'address': instance.address.toJson(), - }; + {'address': instance.address.toJson()}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/token_wallet_asset.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/token_wallet_asset.dart index cacaa89b..7b9fee2d 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/token_wallet_asset.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/token_wallet_asset.dart @@ -7,9 +7,8 @@ part 'token_wallet_asset.g.dart'; @freezed sealed class TokenWalletAsset with _$TokenWalletAsset { @JsonSerializable(fieldRename: FieldRename.snake) - const factory TokenWalletAsset({ - required final Address rootTokenContract, - }) = _TokenWalletAsset; + const factory TokenWalletAsset({required final Address rootTokenContract}) = + _TokenWalletAsset; factory TokenWalletAsset.fromJson(Map json) => _$TokenWalletAssetFromJson(json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/token_wallet_asset.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/token_wallet_asset.freezed.dart index 00ce3cc7..c88f2e79 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/token_wallet_asset.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/token_wallet_asset.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,49 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TokenWalletAsset { - Address get rootTokenContract; - /// Create a copy of TokenWalletAsset - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TokenWalletAssetCopyWith get copyWith => - _$TokenWalletAssetCopyWithImpl( - this as TokenWalletAsset, _$identity); + Address get rootTokenContract; +/// Create a copy of TokenWalletAsset +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TokenWalletAssetCopyWith get copyWith => _$TokenWalletAssetCopyWithImpl(this as TokenWalletAsset, _$identity); /// Serializes this TokenWalletAsset to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenWalletAsset && - (identical(other.rootTokenContract, rootTokenContract) || - other.rootTokenContract == rootTokenContract)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, rootTokenContract); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenWalletAsset&&(identical(other.rootTokenContract, rootTokenContract) || other.rootTokenContract == rootTokenContract)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,rootTokenContract); - @override - String toString() { - return 'TokenWalletAsset(rootTokenContract: $rootTokenContract)'; - } +@override +String toString() { + return 'TokenWalletAsset(rootTokenContract: $rootTokenContract)'; } -/// @nodoc -abstract mixin class $TokenWalletAssetCopyWith<$Res> { - factory $TokenWalletAssetCopyWith( - TokenWalletAsset value, $Res Function(TokenWalletAsset) _then) = - _$TokenWalletAssetCopyWithImpl; - @useResult - $Res call({Address rootTokenContract}); - $AddressCopyWith<$Res> get rootTokenContract; } +/// @nodoc +abstract mixin class $TokenWalletAssetCopyWith<$Res> { + factory $TokenWalletAssetCopyWith(TokenWalletAsset value, $Res Function(TokenWalletAsset) _then) = _$TokenWalletAssetCopyWithImpl; +@useResult +$Res call({ + Address rootTokenContract +}); + + +$AddressCopyWith<$Res> get rootTokenContract; + +} /// @nodoc class _$TokenWalletAssetCopyWithImpl<$Res> implements $TokenWalletAssetCopyWith<$Res> { @@ -66,30 +63,149 @@ class _$TokenWalletAssetCopyWithImpl<$Res> final TokenWalletAsset _self; final $Res Function(TokenWalletAsset) _then; - /// Create a copy of TokenWalletAsset - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? rootTokenContract = null, - }) { - return _then(_self.copyWith( - rootTokenContract: null == rootTokenContract - ? _self.rootTokenContract - : rootTokenContract // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of TokenWalletAsset - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get rootTokenContract { - return $AddressCopyWith<$Res>(_self.rootTokenContract, (value) { - return _then(_self.copyWith(rootTokenContract: value)); - }); - } +/// Create a copy of TokenWalletAsset +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? rootTokenContract = null,}) { + return _then(_self.copyWith( +rootTokenContract: null == rootTokenContract ? _self.rootTokenContract : rootTokenContract // ignore: cast_nullable_to_non_nullable +as Address, + )); +} +/// Create a copy of TokenWalletAsset +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get rootTokenContract { + + return $AddressCopyWith<$Res>(_self.rootTokenContract, (value) { + return _then(_self.copyWith(rootTokenContract: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [TokenWalletAsset]. +extension TokenWalletAssetPatterns on TokenWalletAsset { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TokenWalletAsset value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TokenWalletAsset() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TokenWalletAsset value) $default,){ +final _that = this; +switch (_that) { +case _TokenWalletAsset(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TokenWalletAsset value)? $default,){ +final _that = this; +switch (_that) { +case _TokenWalletAsset() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Address rootTokenContract)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TokenWalletAsset() when $default != null: +return $default(_that.rootTokenContract);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Address rootTokenContract) $default,) {final _that = this; +switch (_that) { +case _TokenWalletAsset(): +return $default(_that.rootTokenContract);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Address rootTokenContract)? $default,) {final _that = this; +switch (_that) { +case _TokenWalletAsset() when $default != null: +return $default(_that.rootTokenContract);case _: + return null; + +} +} + } /// @nodoc @@ -97,60 +213,50 @@ class _$TokenWalletAssetCopyWithImpl<$Res> @JsonSerializable(fieldRename: FieldRename.snake) class _TokenWalletAsset implements TokenWalletAsset { const _TokenWalletAsset({required this.rootTokenContract}); - factory _TokenWalletAsset.fromJson(Map json) => - _$TokenWalletAssetFromJson(json); - - @override - final Address rootTokenContract; - - /// Create a copy of TokenWalletAsset - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TokenWalletAssetCopyWith<_TokenWalletAsset> get copyWith => - __$TokenWalletAssetCopyWithImpl<_TokenWalletAsset>(this, _$identity); - - @override - Map toJson() { - return _$TokenWalletAssetToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TokenWalletAsset && - (identical(other.rootTokenContract, rootTokenContract) || - other.rootTokenContract == rootTokenContract)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, rootTokenContract); - - @override - String toString() { - return 'TokenWalletAsset(rootTokenContract: $rootTokenContract)'; - } + factory _TokenWalletAsset.fromJson(Map json) => _$TokenWalletAssetFromJson(json); + +@override final Address rootTokenContract; + +/// Create a copy of TokenWalletAsset +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TokenWalletAssetCopyWith<_TokenWalletAsset> get copyWith => __$TokenWalletAssetCopyWithImpl<_TokenWalletAsset>(this, _$identity); + +@override +Map toJson() { + return _$TokenWalletAssetToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TokenWalletAsset&&(identical(other.rootTokenContract, rootTokenContract) || other.rootTokenContract == rootTokenContract)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,rootTokenContract); + +@override +String toString() { + return 'TokenWalletAsset(rootTokenContract: $rootTokenContract)'; } -/// @nodoc -abstract mixin class _$TokenWalletAssetCopyWith<$Res> - implements $TokenWalletAssetCopyWith<$Res> { - factory _$TokenWalletAssetCopyWith( - _TokenWalletAsset value, $Res Function(_TokenWalletAsset) _then) = - __$TokenWalletAssetCopyWithImpl; - @override - @useResult - $Res call({Address rootTokenContract}); - @override - $AddressCopyWith<$Res> get rootTokenContract; } +/// @nodoc +abstract mixin class _$TokenWalletAssetCopyWith<$Res> implements $TokenWalletAssetCopyWith<$Res> { + factory _$TokenWalletAssetCopyWith(_TokenWalletAsset value, $Res Function(_TokenWalletAsset) _then) = __$TokenWalletAssetCopyWithImpl; +@override @useResult +$Res call({ + Address rootTokenContract +}); + + +@override $AddressCopyWith<$Res> get rootTokenContract; + +} /// @nodoc class __$TokenWalletAssetCopyWithImpl<$Res> implements _$TokenWalletAssetCopyWith<$Res> { @@ -159,30 +265,25 @@ class __$TokenWalletAssetCopyWithImpl<$Res> final _TokenWalletAsset _self; final $Res Function(_TokenWalletAsset) _then; - /// Create a copy of TokenWalletAsset - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? rootTokenContract = null, - }) { - return _then(_TokenWalletAsset( - rootTokenContract: null == rootTokenContract - ? _self.rootTokenContract - : rootTokenContract // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of TokenWalletAsset - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get rootTokenContract { - return $AddressCopyWith<$Res>(_self.rootTokenContract, (value) { - return _then(_self.copyWith(rootTokenContract: value)); - }); - } +/// Create a copy of TokenWalletAsset +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? rootTokenContract = null,}) { + return _then(_TokenWalletAsset( +rootTokenContract: null == rootTokenContract ? _self.rootTokenContract : rootTokenContract // ignore: cast_nullable_to_non_nullable +as Address, + )); +} + +/// Create a copy of TokenWalletAsset +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get rootTokenContract { + + return $AddressCopyWith<$Res>(_self.rootTokenContract, (value) { + return _then(_self.copyWith(rootTokenContract: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/token_wallet_asset.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/token_wallet_asset.g.dart index 3b7be7dc..bf9400dd 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/token_wallet_asset.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/token_wallet_asset.g.dart @@ -8,8 +8,9 @@ part of 'token_wallet_asset.dart'; _TokenWalletAsset _$TokenWalletAssetFromJson(Map json) => _TokenWalletAsset( - rootTokenContract: - Address.fromJson(json['root_token_contract'] as String), + rootTokenContract: Address.fromJson( + json['root_token_contract'] as String, + ), ); Map _$TokenWalletAssetToJson(_TokenWalletAsset instance) => diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/ton_wallet_asset.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/ton_wallet_asset.freezed.dart index bb4c9f58..88058f52 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/ton_wallet_asset.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/ton_wallet_asset.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,56 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TonWalletAsset { - Address get address; - PublicKey get publicKey; - WalletType get contract; - - /// Create a copy of TonWalletAsset - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TonWalletAssetCopyWith get copyWith => - _$TonWalletAssetCopyWithImpl( - this as TonWalletAsset, _$identity); + + Address get address; PublicKey get publicKey; WalletType get contract; +/// Create a copy of TonWalletAsset +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TonWalletAssetCopyWith get copyWith => _$TonWalletAssetCopyWithImpl(this as TonWalletAsset, _$identity); /// Serializes this TonWalletAsset to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TonWalletAsset && - (identical(other.address, address) || other.address == address) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.contract, contract) || - other.contract == contract)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, address, publicKey, contract); - - @override - String toString() { - return 'TonWalletAsset(address: $address, publicKey: $publicKey, contract: $contract)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TonWalletAsset&&(identical(other.address, address) || other.address == address)&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.contract, contract) || other.contract == contract)); } -/// @nodoc -abstract mixin class $TonWalletAssetCopyWith<$Res> { - factory $TonWalletAssetCopyWith( - TonWalletAsset value, $Res Function(TonWalletAsset) _then) = - _$TonWalletAssetCopyWithImpl; - @useResult - $Res call({Address address, PublicKey publicKey, WalletType contract}); - - $AddressCopyWith<$Res> get address; - $PublicKeyCopyWith<$Res> get publicKey; - $WalletTypeCopyWith<$Res> get contract; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,address,publicKey,contract); + +@override +String toString() { + return 'TonWalletAsset(address: $address, publicKey: $publicKey, contract: $contract)'; } + +} + +/// @nodoc +abstract mixin class $TonWalletAssetCopyWith<$Res> { + factory $TonWalletAssetCopyWith(TonWalletAsset value, $Res Function(TonWalletAsset) _then) = _$TonWalletAssetCopyWithImpl; +@useResult +$Res call({ + Address address, PublicKey publicKey, WalletType contract +}); + + +$AddressCopyWith<$Res> get address;$PublicKeyCopyWith<$Res> get publicKey;$WalletTypeCopyWith<$Res> get contract; + +} /// @nodoc class _$TonWalletAssetCopyWithImpl<$Res> implements $TonWalletAssetCopyWith<$Res> { @@ -73,133 +63,222 @@ class _$TonWalletAssetCopyWithImpl<$Res> final TonWalletAsset _self; final $Res Function(TonWalletAsset) _then; - /// Create a copy of TonWalletAsset - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? address = null, - Object? publicKey = null, - Object? contract = null, - }) { - return _then(_self.copyWith( - address: null == address - ? _self.address - : address // ignore: cast_nullable_to_non_nullable - as Address, - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - contract: null == contract - ? _self.contract - : contract // ignore: cast_nullable_to_non_nullable - as WalletType, - )); - } - - /// Create a copy of TonWalletAsset - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get address { - return $AddressCopyWith<$Res>(_self.address, (value) { - return _then(_self.copyWith(address: value)); - }); - } - - /// Create a copy of TonWalletAsset - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } - - /// Create a copy of TonWalletAsset - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $WalletTypeCopyWith<$Res> get contract { - return $WalletTypeCopyWith<$Res>(_self.contract, (value) { - return _then(_self.copyWith(contract: value)); - }); - } +/// Create a copy of TonWalletAsset +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? address = null,Object? publicKey = null,Object? contract = null,}) { + return _then(_self.copyWith( +address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as Address,publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,contract: null == contract ? _self.contract : contract // ignore: cast_nullable_to_non_nullable +as WalletType, + )); +} +/// Create a copy of TonWalletAsset +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get address { + + return $AddressCopyWith<$Res>(_self.address, (value) { + return _then(_self.copyWith(address: value)); + }); +}/// Create a copy of TonWalletAsset +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of TonWalletAsset +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$WalletTypeCopyWith<$Res> get contract { + + return $WalletTypeCopyWith<$Res>(_self.contract, (value) { + return _then(_self.copyWith(contract: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [TonWalletAsset]. +extension TonWalletAssetPatterns on TonWalletAsset { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TonWalletAsset value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TonWalletAsset() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TonWalletAsset value) $default,){ +final _that = this; +switch (_that) { +case _TonWalletAsset(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TonWalletAsset value)? $default,){ +final _that = this; +switch (_that) { +case _TonWalletAsset() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Address address, PublicKey publicKey, WalletType contract)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TonWalletAsset() when $default != null: +return $default(_that.address,_that.publicKey,_that.contract);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Address address, PublicKey publicKey, WalletType contract) $default,) {final _that = this; +switch (_that) { +case _TonWalletAsset(): +return $default(_that.address,_that.publicKey,_that.contract);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Address address, PublicKey publicKey, WalletType contract)? $default,) {final _that = this; +switch (_that) { +case _TonWalletAsset() when $default != null: +return $default(_that.address,_that.publicKey,_that.contract);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _TonWalletAsset extends TonWalletAsset { - const _TonWalletAsset( - {required this.address, required this.publicKey, required this.contract}) - : super._(); - factory _TonWalletAsset.fromJson(Map json) => - _$TonWalletAssetFromJson(json); - - @override - final Address address; - @override - final PublicKey publicKey; - @override - final WalletType contract; - - /// Create a copy of TonWalletAsset - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TonWalletAssetCopyWith<_TonWalletAsset> get copyWith => - __$TonWalletAssetCopyWithImpl<_TonWalletAsset>(this, _$identity); - - @override - Map toJson() { - return _$TonWalletAssetToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TonWalletAsset && - (identical(other.address, address) || other.address == address) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.contract, contract) || - other.contract == contract)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, address, publicKey, contract); - - @override - String toString() { - return 'TonWalletAsset(address: $address, publicKey: $publicKey, contract: $contract)'; - } + const _TonWalletAsset({required this.address, required this.publicKey, required this.contract}): super._(); + factory _TonWalletAsset.fromJson(Map json) => _$TonWalletAssetFromJson(json); + +@override final Address address; +@override final PublicKey publicKey; +@override final WalletType contract; + +/// Create a copy of TonWalletAsset +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TonWalletAssetCopyWith<_TonWalletAsset> get copyWith => __$TonWalletAssetCopyWithImpl<_TonWalletAsset>(this, _$identity); + +@override +Map toJson() { + return _$TonWalletAssetToJson(this, ); } -/// @nodoc -abstract mixin class _$TonWalletAssetCopyWith<$Res> - implements $TonWalletAssetCopyWith<$Res> { - factory _$TonWalletAssetCopyWith( - _TonWalletAsset value, $Res Function(_TonWalletAsset) _then) = - __$TonWalletAssetCopyWithImpl; - @override - @useResult - $Res call({Address address, PublicKey publicKey, WalletType contract}); - - @override - $AddressCopyWith<$Res> get address; - @override - $PublicKeyCopyWith<$Res> get publicKey; - @override - $WalletTypeCopyWith<$Res> get contract; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TonWalletAsset&&(identical(other.address, address) || other.address == address)&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.contract, contract) || other.contract == contract)); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,address,publicKey,contract); + +@override +String toString() { + return 'TonWalletAsset(address: $address, publicKey: $publicKey, contract: $contract)'; +} + + +} + +/// @nodoc +abstract mixin class _$TonWalletAssetCopyWith<$Res> implements $TonWalletAssetCopyWith<$Res> { + factory _$TonWalletAssetCopyWith(_TonWalletAsset value, $Res Function(_TonWalletAsset) _then) = __$TonWalletAssetCopyWithImpl; +@override @useResult +$Res call({ + Address address, PublicKey publicKey, WalletType contract +}); + + +@override $AddressCopyWith<$Res> get address;@override $PublicKeyCopyWith<$Res> get publicKey;@override $WalletTypeCopyWith<$Res> get contract; + +} /// @nodoc class __$TonWalletAssetCopyWithImpl<$Res> implements _$TonWalletAssetCopyWith<$Res> { @@ -208,60 +287,45 @@ class __$TonWalletAssetCopyWithImpl<$Res> final _TonWalletAsset _self; final $Res Function(_TonWalletAsset) _then; - /// Create a copy of TonWalletAsset - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? address = null, - Object? publicKey = null, - Object? contract = null, - }) { - return _then(_TonWalletAsset( - address: null == address - ? _self.address - : address // ignore: cast_nullable_to_non_nullable - as Address, - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - contract: null == contract - ? _self.contract - : contract // ignore: cast_nullable_to_non_nullable - as WalletType, - )); - } - - /// Create a copy of TonWalletAsset - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get address { - return $AddressCopyWith<$Res>(_self.address, (value) { - return _then(_self.copyWith(address: value)); - }); - } - - /// Create a copy of TonWalletAsset - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } - - /// Create a copy of TonWalletAsset - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $WalletTypeCopyWith<$Res> get contract { - return $WalletTypeCopyWith<$Res>(_self.contract, (value) { - return _then(_self.copyWith(contract: value)); - }); - } +/// Create a copy of TonWalletAsset +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? address = null,Object? publicKey = null,Object? contract = null,}) { + return _then(_TonWalletAsset( +address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as Address,publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,contract: null == contract ? _self.contract : contract // ignore: cast_nullable_to_non_nullable +as WalletType, + )); +} + +/// Create a copy of TonWalletAsset +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get address { + + return $AddressCopyWith<$Res>(_self.address, (value) { + return _then(_self.copyWith(address: value)); + }); +}/// Create a copy of TonWalletAsset +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of TonWalletAsset +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$WalletTypeCopyWith<$Res> get contract { + + return $WalletTypeCopyWith<$Res>(_self.contract, (value) { + return _then(_self.copyWith(contract: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/wallet_type.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/wallet_type.freezed.dart index 325ff324..5a5b6695 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/wallet_type.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/wallet_type.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,114 +11,315 @@ part of 'wallet_type.dart'; // dart format off T _$identity(T value) => value; -WalletType _$WalletTypeFromJson(Map json) { - switch (json['type']) { - case 'multisig': - return WalletTypeMultisig.fromJson(json); - case 'walletV3': - return WalletTypeWalletV3.fromJson(json); - case 'highloadWalletV2': - return WalletTypeHighloadWalletV2.fromJson(json); - case 'everWallet': - return WalletTypeEverWallet.fromJson(json); - case 'walletV3R1': - return WalletTypeWalletV3R1.fromJson(json); - case 'walletV3R2': - return WalletTypeWalletV3R2.fromJson(json); - case 'walletV4R1': - return WalletTypeWalletV4R1.fromJson(json); - case 'walletV4R2': - return WalletTypeWalletV4R2.fromJson(json); - case 'walletV5R1': - return WalletTypeWalletV5R1.fromJson(json); - - default: - throw CheckedFromJsonException( - json, 'type', 'WalletType', 'Invalid union type "${json['type']}"!'); - } +WalletType _$WalletTypeFromJson( + Map json +) { + switch (json['type']) { + case 'multisig': + return WalletTypeMultisig.fromJson( + json + ); + case 'walletV3': + return WalletTypeWalletV3.fromJson( + json + ); + case 'highloadWalletV2': + return WalletTypeHighloadWalletV2.fromJson( + json + ); + case 'everWallet': + return WalletTypeEverWallet.fromJson( + json + ); + case 'walletV3R1': + return WalletTypeWalletV3R1.fromJson( + json + ); + case 'walletV3R2': + return WalletTypeWalletV3R2.fromJson( + json + ); + case 'walletV4R1': + return WalletTypeWalletV4R1.fromJson( + json + ); + case 'walletV4R2': + return WalletTypeWalletV4R2.fromJson( + json + ); + case 'walletV5R1': + return WalletTypeWalletV5R1.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'WalletType', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$WalletType { + + + /// Serializes this WalletType to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is WalletType); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletType); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'WalletType()'; +} + - @override - String toString() { - return 'WalletType()'; - } } /// @nodoc -class $WalletTypeCopyWith<$Res> { - $WalletTypeCopyWith(WalletType _, $Res Function(WalletType) __); +class $WalletTypeCopyWith<$Res> { +$WalletTypeCopyWith(WalletType _, $Res Function(WalletType) __); +} + + +/// Adds pattern-matching-related methods to [WalletType]. +extension WalletTypePatterns on WalletType { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( WalletTypeMultisig value)? multisig,TResult Function( WalletTypeWalletV3 value)? walletV3,TResult Function( WalletTypeHighloadWalletV2 value)? highloadWalletV2,TResult Function( WalletTypeEverWallet value)? everWallet,TResult Function( WalletTypeWalletV3R1 value)? walletV3R1,TResult Function( WalletTypeWalletV3R2 value)? walletV3R2,TResult Function( WalletTypeWalletV4R1 value)? walletV4R1,TResult Function( WalletTypeWalletV4R2 value)? walletV4R2,TResult Function( WalletTypeWalletV5R1 value)? walletV5R1,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case WalletTypeMultisig() when multisig != null: +return multisig(_that);case WalletTypeWalletV3() when walletV3 != null: +return walletV3(_that);case WalletTypeHighloadWalletV2() when highloadWalletV2 != null: +return highloadWalletV2(_that);case WalletTypeEverWallet() when everWallet != null: +return everWallet(_that);case WalletTypeWalletV3R1() when walletV3R1 != null: +return walletV3R1(_that);case WalletTypeWalletV3R2() when walletV3R2 != null: +return walletV3R2(_that);case WalletTypeWalletV4R1() when walletV4R1 != null: +return walletV4R1(_that);case WalletTypeWalletV4R2() when walletV4R2 != null: +return walletV4R2(_that);case WalletTypeWalletV5R1() when walletV5R1 != null: +return walletV5R1(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( WalletTypeMultisig value) multisig,required TResult Function( WalletTypeWalletV3 value) walletV3,required TResult Function( WalletTypeHighloadWalletV2 value) highloadWalletV2,required TResult Function( WalletTypeEverWallet value) everWallet,required TResult Function( WalletTypeWalletV3R1 value) walletV3R1,required TResult Function( WalletTypeWalletV3R2 value) walletV3R2,required TResult Function( WalletTypeWalletV4R1 value) walletV4R1,required TResult Function( WalletTypeWalletV4R2 value) walletV4R2,required TResult Function( WalletTypeWalletV5R1 value) walletV5R1,}){ +final _that = this; +switch (_that) { +case WalletTypeMultisig(): +return multisig(_that);case WalletTypeWalletV3(): +return walletV3(_that);case WalletTypeHighloadWalletV2(): +return highloadWalletV2(_that);case WalletTypeEverWallet(): +return everWallet(_that);case WalletTypeWalletV3R1(): +return walletV3R1(_that);case WalletTypeWalletV3R2(): +return walletV3R2(_that);case WalletTypeWalletV4R1(): +return walletV4R1(_that);case WalletTypeWalletV4R2(): +return walletV4R2(_that);case WalletTypeWalletV5R1(): +return walletV5R1(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( WalletTypeMultisig value)? multisig,TResult? Function( WalletTypeWalletV3 value)? walletV3,TResult? Function( WalletTypeHighloadWalletV2 value)? highloadWalletV2,TResult? Function( WalletTypeEverWallet value)? everWallet,TResult? Function( WalletTypeWalletV3R1 value)? walletV3R1,TResult? Function( WalletTypeWalletV3R2 value)? walletV3R2,TResult? Function( WalletTypeWalletV4R1 value)? walletV4R1,TResult? Function( WalletTypeWalletV4R2 value)? walletV4R2,TResult? Function( WalletTypeWalletV5R1 value)? walletV5R1,}){ +final _that = this; +switch (_that) { +case WalletTypeMultisig() when multisig != null: +return multisig(_that);case WalletTypeWalletV3() when walletV3 != null: +return walletV3(_that);case WalletTypeHighloadWalletV2() when highloadWalletV2 != null: +return highloadWalletV2(_that);case WalletTypeEverWallet() when everWallet != null: +return everWallet(_that);case WalletTypeWalletV3R1() when walletV3R1 != null: +return walletV3R1(_that);case WalletTypeWalletV3R2() when walletV3R2 != null: +return walletV3R2(_that);case WalletTypeWalletV4R1() when walletV4R1 != null: +return walletV4R1(_that);case WalletTypeWalletV4R2() when walletV4R2 != null: +return walletV4R2(_that);case WalletTypeWalletV5R1() when walletV5R1 != null: +return walletV5R1(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( MultisigType data)? multisig,TResult Function()? walletV3,TResult Function()? highloadWalletV2,TResult Function()? everWallet,TResult Function()? walletV3R1,TResult Function()? walletV3R2,TResult Function()? walletV4R1,TResult Function()? walletV4R2,TResult Function()? walletV5R1,required TResult orElse(),}) {final _that = this; +switch (_that) { +case WalletTypeMultisig() when multisig != null: +return multisig(_that.data);case WalletTypeWalletV3() when walletV3 != null: +return walletV3();case WalletTypeHighloadWalletV2() when highloadWalletV2 != null: +return highloadWalletV2();case WalletTypeEverWallet() when everWallet != null: +return everWallet();case WalletTypeWalletV3R1() when walletV3R1 != null: +return walletV3R1();case WalletTypeWalletV3R2() when walletV3R2 != null: +return walletV3R2();case WalletTypeWalletV4R1() when walletV4R1 != null: +return walletV4R1();case WalletTypeWalletV4R2() when walletV4R2 != null: +return walletV4R2();case WalletTypeWalletV5R1() when walletV5R1 != null: +return walletV5R1();case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( MultisigType data) multisig,required TResult Function() walletV3,required TResult Function() highloadWalletV2,required TResult Function() everWallet,required TResult Function() walletV3R1,required TResult Function() walletV3R2,required TResult Function() walletV4R1,required TResult Function() walletV4R2,required TResult Function() walletV5R1,}) {final _that = this; +switch (_that) { +case WalletTypeMultisig(): +return multisig(_that.data);case WalletTypeWalletV3(): +return walletV3();case WalletTypeHighloadWalletV2(): +return highloadWalletV2();case WalletTypeEverWallet(): +return everWallet();case WalletTypeWalletV3R1(): +return walletV3R1();case WalletTypeWalletV3R2(): +return walletV3R2();case WalletTypeWalletV4R1(): +return walletV4R1();case WalletTypeWalletV4R2(): +return walletV4R2();case WalletTypeWalletV5R1(): +return walletV5R1();} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( MultisigType data)? multisig,TResult? Function()? walletV3,TResult? Function()? highloadWalletV2,TResult? Function()? everWallet,TResult? Function()? walletV3R1,TResult? Function()? walletV3R2,TResult? Function()? walletV4R1,TResult? Function()? walletV4R2,TResult? Function()? walletV5R1,}) {final _that = this; +switch (_that) { +case WalletTypeMultisig() when multisig != null: +return multisig(_that.data);case WalletTypeWalletV3() when walletV3 != null: +return walletV3();case WalletTypeHighloadWalletV2() when highloadWalletV2 != null: +return highloadWalletV2();case WalletTypeEverWallet() when everWallet != null: +return everWallet();case WalletTypeWalletV3R1() when walletV3R1 != null: +return walletV3R1();case WalletTypeWalletV3R2() when walletV3R2 != null: +return walletV3R2();case WalletTypeWalletV4R1() when walletV4R1 != null: +return walletV4R1();case WalletTypeWalletV4R2() when walletV4R2 != null: +return walletV4R2();case WalletTypeWalletV5R1() when walletV5R1 != null: +return walletV5R1();case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class WalletTypeMultisig implements WalletType { - const WalletTypeMultisig(this.data, {final String? $type}) - : $type = $type ?? 'multisig'; - factory WalletTypeMultisig.fromJson(Map json) => - _$WalletTypeMultisigFromJson(json); - - final MultisigType data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of WalletType - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $WalletTypeMultisigCopyWith get copyWith => - _$WalletTypeMultisigCopyWithImpl(this, _$identity); - - @override - Map toJson() { - return _$WalletTypeMultisigToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is WalletTypeMultisig && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'WalletType.multisig(data: $data)'; - } + const WalletTypeMultisig(this.data, {final String? $type}): $type = $type ?? 'multisig'; + factory WalletTypeMultisig.fromJson(Map json) => _$WalletTypeMultisigFromJson(json); + + final MultisigType data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of WalletType +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$WalletTypeMultisigCopyWith get copyWith => _$WalletTypeMultisigCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$WalletTypeMultisigToJson(this, ); } -/// @nodoc -abstract mixin class $WalletTypeMultisigCopyWith<$Res> - implements $WalletTypeCopyWith<$Res> { - factory $WalletTypeMultisigCopyWith( - WalletTypeMultisig value, $Res Function(WalletTypeMultisig) _then) = - _$WalletTypeMultisigCopyWithImpl; - @useResult - $Res call({MultisigType data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTypeMultisig&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'WalletType.multisig(data: $data)'; +} + + } +/// @nodoc +abstract mixin class $WalletTypeMultisigCopyWith<$Res> implements $WalletTypeCopyWith<$Res> { + factory $WalletTypeMultisigCopyWith(WalletTypeMultisig value, $Res Function(WalletTypeMultisig) _then) = _$WalletTypeMultisigCopyWithImpl; +@useResult +$Res call({ + MultisigType data +}); + + + + +} /// @nodoc class _$WalletTypeMultisigCopyWithImpl<$Res> implements $WalletTypeMultisigCopyWith<$Res> { @@ -128,291 +328,328 @@ class _$WalletTypeMultisigCopyWithImpl<$Res> final WalletTypeMultisig _self; final $Res Function(WalletTypeMultisig) _then; - /// Create a copy of WalletType - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(WalletTypeMultisig( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as MultisigType, - )); - } +/// Create a copy of WalletType +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(WalletTypeMultisig( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as MultisigType, + )); +} + + } /// @nodoc @JsonSerializable() + class WalletTypeWalletV3 implements WalletType { - const WalletTypeWalletV3({final String? $type}) : $type = $type ?? 'walletV3'; - factory WalletTypeWalletV3.fromJson(Map json) => - _$WalletTypeWalletV3FromJson(json); + const WalletTypeWalletV3({final String? $type}): $type = $type ?? 'walletV3'; + factory WalletTypeWalletV3.fromJson(Map json) => _$WalletTypeWalletV3FromJson(json); + - @JsonKey(name: 'type') - final String $type; - @override - Map toJson() { - return _$WalletTypeWalletV3ToJson( - this, - ); - } +@JsonKey(name: 'type') +final String $type; - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is WalletTypeWalletV3); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'WalletType.walletV3()'; - } +@override +Map toJson() { + return _$WalletTypeWalletV3ToJson(this, ); } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTypeWalletV3); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'WalletType.walletV3()'; +} + + +} + + + + /// @nodoc @JsonSerializable() + class WalletTypeHighloadWalletV2 implements WalletType { - const WalletTypeHighloadWalletV2({final String? $type}) - : $type = $type ?? 'highloadWalletV2'; - factory WalletTypeHighloadWalletV2.fromJson(Map json) => - _$WalletTypeHighloadWalletV2FromJson(json); - - @JsonKey(name: 'type') - final String $type; - - @override - Map toJson() { - return _$WalletTypeHighloadWalletV2ToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is WalletTypeHighloadWalletV2); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; - - @override - String toString() { - return 'WalletType.highloadWalletV2()'; - } + const WalletTypeHighloadWalletV2({final String? $type}): $type = $type ?? 'highloadWalletV2'; + factory WalletTypeHighloadWalletV2.fromJson(Map json) => _$WalletTypeHighloadWalletV2FromJson(json); + + + +@JsonKey(name: 'type') +final String $type; + + + +@override +Map toJson() { + return _$WalletTypeHighloadWalletV2ToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTypeHighloadWalletV2); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'WalletType.highloadWalletV2()'; +} + + +} + + + + /// @nodoc @JsonSerializable() + class WalletTypeEverWallet implements WalletType { - const WalletTypeEverWallet({final String? $type}) - : $type = $type ?? 'everWallet'; - factory WalletTypeEverWallet.fromJson(Map json) => - _$WalletTypeEverWalletFromJson(json); + const WalletTypeEverWallet({final String? $type}): $type = $type ?? 'everWallet'; + factory WalletTypeEverWallet.fromJson(Map json) => _$WalletTypeEverWalletFromJson(json); - @JsonKey(name: 'type') - final String $type; - @override - Map toJson() { - return _$WalletTypeEverWalletToJson( - this, - ); - } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is WalletTypeEverWallet); - } +@JsonKey(name: 'type') +final String $type; - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'WalletType.everWallet()'; - } + +@override +Map toJson() { + return _$WalletTypeEverWalletToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTypeEverWallet); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'WalletType.everWallet()'; } + +} + + + + /// @nodoc @JsonSerializable() + class WalletTypeWalletV3R1 implements WalletType { - const WalletTypeWalletV3R1({final String? $type}) - : $type = $type ?? 'walletV3R1'; - factory WalletTypeWalletV3R1.fromJson(Map json) => - _$WalletTypeWalletV3R1FromJson(json); + const WalletTypeWalletV3R1({final String? $type}): $type = $type ?? 'walletV3R1'; + factory WalletTypeWalletV3R1.fromJson(Map json) => _$WalletTypeWalletV3R1FromJson(json); + + + +@JsonKey(name: 'type') +final String $type; - @JsonKey(name: 'type') - final String $type; - @override - Map toJson() { - return _$WalletTypeWalletV3R1ToJson( - this, - ); - } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is WalletTypeWalletV3R1); - } +@override +Map toJson() { + return _$WalletTypeWalletV3R1ToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTypeWalletV3R1); +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'WalletType.walletV3R1()'; - } +@override +String toString() { + return 'WalletType.walletV3R1()'; } + +} + + + + /// @nodoc @JsonSerializable() + class WalletTypeWalletV3R2 implements WalletType { - const WalletTypeWalletV3R2({final String? $type}) - : $type = $type ?? 'walletV3R2'; - factory WalletTypeWalletV3R2.fromJson(Map json) => - _$WalletTypeWalletV3R2FromJson(json); + const WalletTypeWalletV3R2({final String? $type}): $type = $type ?? 'walletV3R2'; + factory WalletTypeWalletV3R2.fromJson(Map json) => _$WalletTypeWalletV3R2FromJson(json); + + + +@JsonKey(name: 'type') +final String $type; + + - @JsonKey(name: 'type') - final String $type; +@override +Map toJson() { + return _$WalletTypeWalletV3R2ToJson(this, ); +} - @override - Map toJson() { - return _$WalletTypeWalletV3R2ToJson( - this, - ); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTypeWalletV3R2); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is WalletTypeWalletV3R2); - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'WalletType.walletV3R2()'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'WalletType.walletV3R2()'; - } } + + + /// @nodoc @JsonSerializable() + class WalletTypeWalletV4R1 implements WalletType { - const WalletTypeWalletV4R1({final String? $type}) - : $type = $type ?? 'walletV4R1'; - factory WalletTypeWalletV4R1.fromJson(Map json) => - _$WalletTypeWalletV4R1FromJson(json); + const WalletTypeWalletV4R1({final String? $type}): $type = $type ?? 'walletV4R1'; + factory WalletTypeWalletV4R1.fromJson(Map json) => _$WalletTypeWalletV4R1FromJson(json); + + - @JsonKey(name: 'type') - final String $type; +@JsonKey(name: 'type') +final String $type; - @override - Map toJson() { - return _$WalletTypeWalletV4R1ToJson( - this, - ); - } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is WalletTypeWalletV4R1); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; +@override +Map toJson() { + return _$WalletTypeWalletV4R1ToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTypeWalletV4R1); +} - @override - String toString() { - return 'WalletType.walletV4R1()'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'WalletType.walletV4R1()'; } + +} + + + + /// @nodoc @JsonSerializable() + class WalletTypeWalletV4R2 implements WalletType { - const WalletTypeWalletV4R2({final String? $type}) - : $type = $type ?? 'walletV4R2'; - factory WalletTypeWalletV4R2.fromJson(Map json) => - _$WalletTypeWalletV4R2FromJson(json); + const WalletTypeWalletV4R2({final String? $type}): $type = $type ?? 'walletV4R2'; + factory WalletTypeWalletV4R2.fromJson(Map json) => _$WalletTypeWalletV4R2FromJson(json); - @JsonKey(name: 'type') - final String $type; - @override - Map toJson() { - return _$WalletTypeWalletV4R2ToJson( - this, - ); - } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is WalletTypeWalletV4R2); - } +@JsonKey(name: 'type') +final String $type; - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'WalletType.walletV4R2()'; - } + +@override +Map toJson() { + return _$WalletTypeWalletV4R2ToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTypeWalletV4R2); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'WalletType.walletV4R2()'; } + +} + + + + /// @nodoc @JsonSerializable() + class WalletTypeWalletV5R1 implements WalletType { - const WalletTypeWalletV5R1({final String? $type}) - : $type = $type ?? 'walletV5R1'; - factory WalletTypeWalletV5R1.fromJson(Map json) => - _$WalletTypeWalletV5R1FromJson(json); - - @JsonKey(name: 'type') - final String $type; - - @override - Map toJson() { - return _$WalletTypeWalletV5R1ToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is WalletTypeWalletV5R1); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; - - @override - String toString() { - return 'WalletType.walletV5R1()'; - } + const WalletTypeWalletV5R1({final String? $type}): $type = $type ?? 'walletV5R1'; + factory WalletTypeWalletV5R1.fromJson(Map json) => _$WalletTypeWalletV5R1FromJson(json); + + + +@JsonKey(name: 'type') +final String $type; + + + +@override +Map toJson() { + return _$WalletTypeWalletV5R1ToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTypeWalletV5R1); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'WalletType.walletV5R1()'; +} + + } + + + // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/wallet_type.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/wallet_type.g.dart index 817a4c5a..87b266fc 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/wallet_type.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/accounts_storage/models/wallet_type.g.dart @@ -30,95 +30,63 @@ const _$MultisigTypeEnumMap = { }; WalletTypeWalletV3 _$WalletTypeWalletV3FromJson(Map json) => - WalletTypeWalletV3( - $type: json['type'] as String?, - ); + WalletTypeWalletV3($type: json['type'] as String?); Map _$WalletTypeWalletV3ToJson(WalletTypeWalletV3 instance) => - { - 'type': instance.$type, - }; + {'type': instance.$type}; WalletTypeHighloadWalletV2 _$WalletTypeHighloadWalletV2FromJson( - Map json) => - WalletTypeHighloadWalletV2( - $type: json['type'] as String?, - ); + Map json, +) => WalletTypeHighloadWalletV2($type: json['type'] as String?); Map _$WalletTypeHighloadWalletV2ToJson( - WalletTypeHighloadWalletV2 instance) => - { - 'type': instance.$type, - }; + WalletTypeHighloadWalletV2 instance, +) => {'type': instance.$type}; WalletTypeEverWallet _$WalletTypeEverWalletFromJson( - Map json) => - WalletTypeEverWallet( - $type: json['type'] as String?, - ); + Map json, +) => WalletTypeEverWallet($type: json['type'] as String?); Map _$WalletTypeEverWalletToJson( - WalletTypeEverWallet instance) => - { - 'type': instance.$type, - }; + WalletTypeEverWallet instance, +) => {'type': instance.$type}; WalletTypeWalletV3R1 _$WalletTypeWalletV3R1FromJson( - Map json) => - WalletTypeWalletV3R1( - $type: json['type'] as String?, - ); + Map json, +) => WalletTypeWalletV3R1($type: json['type'] as String?); Map _$WalletTypeWalletV3R1ToJson( - WalletTypeWalletV3R1 instance) => - { - 'type': instance.$type, - }; + WalletTypeWalletV3R1 instance, +) => {'type': instance.$type}; WalletTypeWalletV3R2 _$WalletTypeWalletV3R2FromJson( - Map json) => - WalletTypeWalletV3R2( - $type: json['type'] as String?, - ); + Map json, +) => WalletTypeWalletV3R2($type: json['type'] as String?); Map _$WalletTypeWalletV3R2ToJson( - WalletTypeWalletV3R2 instance) => - { - 'type': instance.$type, - }; + WalletTypeWalletV3R2 instance, +) => {'type': instance.$type}; WalletTypeWalletV4R1 _$WalletTypeWalletV4R1FromJson( - Map json) => - WalletTypeWalletV4R1( - $type: json['type'] as String?, - ); + Map json, +) => WalletTypeWalletV4R1($type: json['type'] as String?); Map _$WalletTypeWalletV4R1ToJson( - WalletTypeWalletV4R1 instance) => - { - 'type': instance.$type, - }; + WalletTypeWalletV4R1 instance, +) => {'type': instance.$type}; WalletTypeWalletV4R2 _$WalletTypeWalletV4R2FromJson( - Map json) => - WalletTypeWalletV4R2( - $type: json['type'] as String?, - ); + Map json, +) => WalletTypeWalletV4R2($type: json['type'] as String?); Map _$WalletTypeWalletV4R2ToJson( - WalletTypeWalletV4R2 instance) => - { - 'type': instance.$type, - }; + WalletTypeWalletV4R2 instance, +) => {'type': instance.$type}; WalletTypeWalletV5R1 _$WalletTypeWalletV5R1FromJson( - Map json) => - WalletTypeWalletV5R1( - $type: json['type'] as String?, - ); + Map json, +) => WalletTypeWalletV5R1($type: json['type'] as String?); Map _$WalletTypeWalletV5R1ToJson( - WalletTypeWalletV5R1 instance) => - { - 'type': instance.$type, - }; + WalletTypeWalletV5R1 instance, +) => {'type': instance.$type}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/generic_contract/generic_contract.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/generic_contract/generic_contract.dart index 128827ae..17e4d739 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/generic_contract/generic_contract.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/generic_contract/generic_contract.dart @@ -2,12 +2,8 @@ import 'dart:async'; import 'dart:convert'; import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart'; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart'; -import 'package:reflectable/mirrors.dart'; import 'package:rxdart/rxdart.dart'; -import 'generic_contract.reflectable.dart'; - /// Implementation of nekoton's GenericContract. /// /// If you need watch contract changes, you can subscribe to [fieldUpdatesStream] @@ -15,14 +11,13 @@ import 'generic_contract.reflectable.dart'; /// events emitted through [onMessageSentStream], [onMessageExpiredStream], /// or [onTransactionsFoundStream]. /// [onStateChangedStream] changes internal state, so it will lead updating data. -@reflector -class GenericContract extends RustToDartMirrorInterface - implements RefreshingInterface { +class GenericContract implements RefreshingInterface { late GenericContractDartWrapper contract; final Transport transport; /// Flag that display [onStateChanged] that [contract] was initialized. bool _isInitialized = false; + bool _isDisposed = false; /// Controllers that contains data that emits from rust. final _onMessageSentController = @@ -47,6 +42,8 @@ class GenericContract extends RustToDartMirrorInterface GenericContract._(this.transport); + bool get isDisposed => _isDisposed; + /// Create GenericContract by subscribing to its instance. /// [address] - address of contract /// [preloadTransactions] - if transactions must be loaded during creation @@ -58,10 +55,13 @@ class GenericContract extends RustToDartMirrorInterface final instance = GenericContract._(transport); instance.contract = await GenericContractDartWrapper.subscribe( - instanceHash: instance.instanceHash, transport: transport.transportBox, address: address.address, preloadTransactions: preloadTransactions, + onMessageExpired: instance.onMessageExpired, + onTransactionsFound: instance.onTransactionsFound, + onMessageSent: instance.onMessageSent, + onStateChanged: instance.onStateChanged, ); await instance._initInstance(); @@ -114,7 +114,7 @@ class GenericContract extends RustToDartMirrorInterface /// /// To update data of this stream, contract must be refreshed via [refresh]. Stream<(List, TransactionsBatchInfo)> - get onTransactionsFoundStream => _onTransactionsFoundController.stream; + get onTransactionsFoundStream => _onTransactionsFoundController.stream; /// Get address of contract. Future
_getAddress() async => @@ -156,9 +156,7 @@ class GenericContract extends RustToDartMirrorInterface /// Calculate fees for transaction. /// Returns fees as string representation of u128 or throw error. - Future estimateFees({ - required SignedMessage signedMessage, - }) => + Future estimateFees({required SignedMessage signedMessage}) => contract.estimateFees(signedMessage: jsonEncode(signedMessage)); /// Send message to blockchain and receive transaction of send. @@ -166,8 +164,9 @@ class GenericContract extends RustToDartMirrorInterface Future send({ required SignedMessage signedMessage, }) async { - final encoded = - await contract.send(signedMessage: jsonEncode(signedMessage)); + final encoded = await contract.send( + signedMessage: jsonEncode(signedMessage), + ); final decoded = jsonDecode(encoded) as Map; await _updateData(); return PendingTransaction.fromJson(decoded); @@ -185,7 +184,7 @@ class GenericContract extends RustToDartMirrorInterface /// May throw error. @override Future refresh() async { - if (_isRefreshing || transport.disposed || avoidCall) return; + if (_isRefreshing || transport.disposed || isDisposed) return; try { _isRefreshing = true; @@ -205,7 +204,7 @@ class GenericContract extends RustToDartMirrorInterface /// [fromLt] - offset for loading data, string representation of u64 /// May throw error. Future preloadTransactions({required String fromLt}) async { - if (avoidCall) return; + if (isDisposed) return; await contract.preloadTransactions(fromLt: fromLt); await _updateData(); @@ -215,7 +214,7 @@ class GenericContract extends RustToDartMirrorInterface /// [block] - base64-encoded Block that could be got from [GqlTransport.getBlock] /// May throw error. Future handleBlock({required String block}) async { - if (avoidCall) return; + if (isDisposed) return; await contract.handleBlock(block: block); await _updateData(); @@ -226,11 +225,13 @@ class GenericContract extends RustToDartMirrorInterface final json = jsonDecode(payload) as List; final pendingTransactionJson = json.first as Map; - final pendingTransaction = - PendingTransaction.fromJson(pendingTransactionJson); + final pendingTransaction = PendingTransaction.fromJson( + pendingTransactionJson, + ); final transactionJson = json.last as Map?; - final transaction = - transactionJson != null ? Transaction.fromJson(transactionJson) : null; + final transaction = transactionJson != null + ? Transaction.fromJson(transactionJson) + : null; _onMessageSentController.add((pendingTransaction, transaction)); } @@ -276,31 +277,22 @@ class GenericContract extends RustToDartMirrorInterface Future _updateData() async { if (transport.disposed) return; - if (avoidCall) return; + if (isDisposed) return; _contractState = await getContractState(); - if (avoidCall) return; + if (isDisposed) return; _pendingTransactions = await getPendingTransactions(); - if (avoidCall) return; + if (isDisposed) return; _pollingMethod = await getPollingMethod(); _fieldsUpdateController.add(null); } - @override void dispose() { + _isDisposed = true; contract.innerContract.dispose(); _onTransactionsFoundController.close(); _onStateChangedController.close(); _onMessageSentController.close(); _onMessageExpiredController.close(); - super.dispose(); - } - - @override - InstanceMirror initializeMirror() { - initializeReflectable(); // auto-generated reflectable file - return reflector.reflect(this); } } - -void main() {} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/generic_contract/generic_contract.reflectable.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/generic_contract/generic_contract.reflectable.dart deleted file mode 100644 index ffe26b54..00000000 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/generic_contract/generic_contract.reflectable.dart +++ /dev/null @@ -1,803 +0,0 @@ -// This file has been generated by the reflectable package. -// https://github.com/dart-lang/reflectable. -import 'dart:core'; -import 'generic_contract.dart' as prefix1; -import 'package:flutter_nekoton_bridge/nekoton/core/jetton_wallet/jetton_wallet.dart' - as prefix8; -import 'package:flutter_nekoton_bridge/nekoton/core/token_wallet/token_wallet.dart' - as prefix7; -import 'package:flutter_nekoton_bridge/nekoton/core/ton_wallet/ton_wallet.dart' - as prefix9; -import 'package:flutter_nekoton_bridge/nekoton/external/gql_connection.dart' - as prefix2; -import 'package:flutter_nekoton_bridge/nekoton/external/jrpc_connection.dart' - as prefix4; -import 'package:flutter_nekoton_bridge/nekoton/external/ledger_connection.dart' - as prefix5; -import 'package:flutter_nekoton_bridge/nekoton/external/proto_connection.dart' - as prefix3; -import 'package:flutter_nekoton_bridge/nekoton/external/storage.dart' - as prefix6; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart' as prefix0; - -// ignore_for_file: camel_case_types -// ignore_for_file: implementation_imports -// ignore_for_file: prefer_adjacent_string_concatenation -// ignore_for_file: prefer_collection_literals -// ignore_for_file: unnecessary_const -// ignore_for_file: unused_import -// ignore_for_file: sdk_version_since - -import 'package:reflectable/mirrors.dart' as m; -import 'package:reflectable/src/reflectable_builder_based.dart' as r; -import 'package:reflectable/reflectable.dart' as r show Reflectable; - -final _data = { - const prefix0.Reflector(): r.ReflectorData( - [ - r.NonGenericClassMirrorImpl( - r'GenericContract', - r'.GenericContract', - 134217735, - 0, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'subscribe': () => prefix1.GenericContract.subscribe}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 4, - r'toString': 0, - r'noSuchMethod': 4, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'executeTransactionLocally': 1, - r'estimateFees': 1, - r'send': 1, - r'refresh': 0, - r'preloadTransactions': 2, - r'handleBlock': 3, - r'onMessageSent': 4, - r'onMessageExpired': 4, - r'onStateChanged': 4, - r'onTransactionsFound': 4, - r'initializeMirror': 0, - r'contract': 0, - r'contract=': 4, - r'transport': 0, - r'address': 0, - r'address=': 4, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 0, - }, - ), - r.NonGenericClassMirrorImpl( - r'GqlConnection', - r'.GqlConnection', - 134217735, - 1, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix2.GqlConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 4, - r'toString': 0, - r'noSuchMethod': 4, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 4, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 4, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 5, - }, - ), - r.NonGenericClassMirrorImpl( - r'ProtoConnection', - r'.ProtoConnection', - 134217735, - 2, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix3.ProtoConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 4, - r'toString': 0, - r'noSuchMethod': 4, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 4, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 4, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 5, - }, - ), - r.NonGenericClassMirrorImpl( - r'JrpcConnection', - r'.JrpcConnection', - 134217735, - 3, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix4.JrpcConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 4, - r'toString': 0, - r'noSuchMethod': 4, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 4, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 4, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 5, - }, - ), - r.NonGenericClassMirrorImpl( - r'LedgerConnection', - r'.LedgerConnection', - 134217735, - 4, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix5.LedgerConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 4, - r'toString': 0, - r'noSuchMethod': 4, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getPublicKey': 4, - r'sign': 6, - r'signTransaction': 7, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 4, - r'create': 4, - }, - ), - r.NonGenericClassMirrorImpl( - r'Storage', - r'.Storage', - 134217735, - 5, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix6.Storage.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 4, - r'toString': 0, - r'noSuchMethod': 4, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'get': 4, - r'set': 9, - r'setUnchecked': 9, - r'remove': 9, - r'removeUnchecked': 9, - r'initializeMirror': 0, - r'storage': 0, - r'storage=': 4, - r'create': 8, - }, - ), - r.NonGenericClassMirrorImpl( - r'TokenWallet', - r'.TokenWallet', - 134217735, - 6, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix7.TokenWallet.subscribe, - r'getTokenWalletDetails': () => - prefix7.TokenWallet.getTokenWalletDetails, - r'getTokenRootDetailsFromTokenWallet': () => - prefix7.TokenWallet.getTokenRootDetailsFromTokenWallet, - r'getTokenRootDetails': () => prefix7.TokenWallet.getTokenRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 4, - r'toString': 0, - r'noSuchMethod': 4, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 11, - r'prepareTransfer': 12, - r'refresh': 0, - r'preloadTransactions': 13, - r'handleBlock': 3, - r'onBalanceChanged': 4, - r'onTransactionsFound': 4, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 4, - r'transport': 0, - r'balance': 0, - r'balance=': 4, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 4, - r'owner': 0, - r'owner=': 4, - r'symbol': 0, - r'symbol=': 4, - r'currency': 0, - r'currency=': 4, - r'version': 0, - r'version=': 4, - r'moneyBalance': 0, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onMoneyBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 10, - r'getTokenWalletDetails': 0, - r'getTokenRootDetailsFromTokenWallet': 0, - r'getTokenRootDetails': 14, - }, - ), - r.NonGenericClassMirrorImpl( - r'JettonWallet', - r'.JettonWallet', - 134217735, - 7, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix8.JettonWallet.subscribe, - r'getJettonWalletDetails': () => - prefix8.JettonWallet.getJettonWalletDetails, - r'getJettonRootDetailsFromJettonWallet': () => - prefix8.JettonWallet.getJettonRootDetailsFromJettonWallet, - r'getJettonRootDetails': () => - prefix8.JettonWallet.getJettonRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 4, - r'toString': 0, - r'noSuchMethod': 4, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 11, - r'prepareTransfer': 15, - r'refresh': 0, - r'preloadTransactions': 13, - r'handleBlock': 3, - r'onBalanceChanged': 4, - r'onTransactionsFound': 4, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 4, - r'transport': 0, - r'balance': 0, - r'balance=': 4, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 4, - r'owner': 0, - r'owner=': 4, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 10, - r'getJettonWalletDetails': 0, - r'getJettonRootDetailsFromJettonWallet': 0, - r'getJettonRootDetails': 14, - }, - ), - r.NonGenericClassMirrorImpl( - r'TonWallet', - r'.TonWallet', - 134217735, - 8, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix9.TonWallet.subscribe, - r'subscribeByAddress': () => prefix9.TonWallet.subscribeByAddress, - r'subscribeByExistingWallet': () => - prefix9.TonWallet.subscribeByExistingWallet, - r'appendSignatureToWalletV5R1Payload': () => - prefix9.TonWallet.appendSignatureToWalletV5R1Payload, - r'findExistingWallets': () => prefix9.TonWallet.findExistingWallets, - r'getExistingWalletInfo': () => - prefix9.TonWallet.getExistingWalletInfo, - r'getWalletCustodians': () => prefix9.TonWallet.getWalletCustodians, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 4, - r'toString': 0, - r'noSuchMethod': 4, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'getUnconfirmedTransactions': 0, - r'getCustodians': 0, - r'prepareDeploy': 19, - r'prepareDeployWithMultipleOwners': 20, - r'prepareTransfer': 21, - r'prepareWalletV5R1MessageBody': 22, - r'prepareNonexistWalletV5R1MessageBody': 22, - r'prepareConfirmTransaction': 23, - r'estimateFees': 24, - r'send': 1, - r'refresh': 0, - r'preloadTransactions': 2, - r'handleBlock': 3, - r'makeStateInit': 0, - r'getWalletV5R1Seqno': 21, - r'onMessageSent': 4, - r'onMessageExpired': 4, - r'onStateChanged': 4, - r'onTransactionsFound': 4, - r'onDetailsChanged': 4, - r'onCustodiansChanged': 4, - r'onUnconfirmedTransactionsChanged': 4, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 4, - r'transport': 0, - r'publicKey': 0, - r'publicKey=': 4, - r'address': 0, - r'address=': 4, - r'walletType': 0, - r'walletType=': 4, - r'workchain': 0, - r'workchain=': 4, - r'custodians': 0, - r'details': 0, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'unconfirmedTransactions': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 16, - r'subscribeByAddress': 0, - r'subscribeByExistingWallet': 17, - r'appendSignatureToWalletV5R1Payload': 18, - r'findExistingWallets': 25, - r'getExistingWalletInfo': 0, - r'getWalletCustodians': 0, - }, - ), - ], - null, - null, - [ - prefix1.GenericContract, - prefix2.GqlConnection, - prefix3.ProtoConnection, - prefix4.JrpcConnection, - prefix5.LedgerConnection, - prefix6.Storage, - prefix7.TokenWallet, - prefix8.JettonWallet, - prefix9.TonWallet, - ], - 9, - { - r'==': (dynamic instance) => (x) => instance == x, - r'toString': (dynamic instance) => instance.toString, - r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, - r'hashCode': (dynamic instance) => instance.hashCode, - r'runtimeType': (dynamic instance) => instance.runtimeType, - r'init': (dynamic instance) => instance.init, - r'dispose': (dynamic instance) => instance.dispose, - r'instanceHash': (dynamic instance) => instance.instanceHash, - r'avoidCall': (dynamic instance) => instance.avoidCall, - r'getContractState': (dynamic instance) => instance.getContractState, - r'getPendingTransactions': (dynamic instance) => - instance.getPendingTransactions, - r'getPollingMethod': (dynamic instance) => instance.getPollingMethod, - r'executeTransactionLocally': (dynamic instance) => - instance.executeTransactionLocally, - r'estimateFees': (dynamic instance) => instance.estimateFees, - r'send': (dynamic instance) => instance.send, - r'refresh': (dynamic instance) => instance.refresh, - r'preloadTransactions': (dynamic instance) => - instance.preloadTransactions, - r'handleBlock': (dynamic instance) => instance.handleBlock, - r'onMessageSent': (dynamic instance) => instance.onMessageSent, - r'onMessageExpired': (dynamic instance) => instance.onMessageExpired, - r'onStateChanged': (dynamic instance) => instance.onStateChanged, - r'onTransactionsFound': (dynamic instance) => - instance.onTransactionsFound, - r'initializeMirror': (dynamic instance) => instance.initializeMirror, - r'contract': (dynamic instance) => instance.contract, - r'transport': (dynamic instance) => instance.transport, - r'address': (dynamic instance) => instance.address, - r'contractState': (dynamic instance) => instance.contractState, - r'pendingTransactions': (dynamic instance) => - instance.pendingTransactions, - r'pollingMethod': (dynamic instance) => instance.pollingMethod, - r'fieldUpdatesStream': (dynamic instance) => instance.fieldUpdatesStream, - r'onMessageSentStream': (dynamic instance) => - instance.onMessageSentStream, - r'onMessageExpiredStream': (dynamic instance) => - instance.onMessageExpiredStream, - r'onStateChangedStream': (dynamic instance) => - instance.onStateChangedStream, - r'onTransactionsFoundStream': (dynamic instance) => - instance.onTransactionsFoundStream, - r'refreshDescription': (dynamic instance) => instance.refreshDescription, - r'post': (dynamic instance) => instance.post, - r'connection': (dynamic instance) => instance.connection, - r'settings': (dynamic instance) => instance.settings, - r'type': (dynamic instance) => instance.type, - r'name': (dynamic instance) => instance.name, - r'group': (dynamic instance) => instance.group, - r'getPublicKey': (dynamic instance) => instance.getPublicKey, - r'sign': (dynamic instance) => instance.sign, - r'signTransaction': (dynamic instance) => instance.signTransaction, - r'get': (dynamic instance) => instance.get, - r'set': (dynamic instance) => instance.set, - r'setUnchecked': (dynamic instance) => instance.setUnchecked, - r'remove': (dynamic instance) => instance.remove, - r'removeUnchecked': (dynamic instance) => instance.removeUnchecked, - r'storage': (dynamic instance) => instance.storage, - r'estimateMinAttachedAmount': (dynamic instance) => - instance.estimateMinAttachedAmount, - r'prepareTransfer': (dynamic instance) => instance.prepareTransfer, - r'onBalanceChanged': (dynamic instance) => instance.onBalanceChanged, - r'wallet': (dynamic instance) => instance.wallet, - r'balance': (dynamic instance) => instance.balance, - r'rootTokenContract': (dynamic instance) => instance.rootTokenContract, - r'tokenAddress': (dynamic instance) => instance.tokenAddress, - r'owner': (dynamic instance) => instance.owner, - r'symbol': (dynamic instance) => instance.symbol, - r'currency': (dynamic instance) => instance.currency, - r'version': (dynamic instance) => instance.version, - r'moneyBalance': (dynamic instance) => instance.moneyBalance, - r'isTransactionsPreloaded': (dynamic instance) => - instance.isTransactionsPreloaded, - r'onBalanceChangedStream': (dynamic instance) => - instance.onBalanceChangedStream, - r'onMoneyBalanceChangedStream': (dynamic instance) => - instance.onMoneyBalanceChangedStream, - r'getUnconfirmedTransactions': (dynamic instance) => - instance.getUnconfirmedTransactions, - r'getCustodians': (dynamic instance) => instance.getCustodians, - r'prepareDeploy': (dynamic instance) => instance.prepareDeploy, - r'prepareDeployWithMultipleOwners': (dynamic instance) => - instance.prepareDeployWithMultipleOwners, - r'prepareWalletV5R1MessageBody': (dynamic instance) => - instance.prepareWalletV5R1MessageBody, - r'prepareNonexistWalletV5R1MessageBody': (dynamic instance) => - instance.prepareNonexistWalletV5R1MessageBody, - r'prepareConfirmTransaction': (dynamic instance) => - instance.prepareConfirmTransaction, - r'makeStateInit': (dynamic instance) => instance.makeStateInit, - r'getWalletV5R1Seqno': (dynamic instance) => instance.getWalletV5R1Seqno, - r'onDetailsChanged': (dynamic instance) => instance.onDetailsChanged, - r'onCustodiansChanged': (dynamic instance) => - instance.onCustodiansChanged, - r'onUnconfirmedTransactionsChanged': (dynamic instance) => - instance.onUnconfirmedTransactionsChanged, - r'publicKey': (dynamic instance) => instance.publicKey, - r'walletType': (dynamic instance) => instance.walletType, - r'workchain': (dynamic instance) => instance.workchain, - r'custodians': (dynamic instance) => instance.custodians, - r'details': (dynamic instance) => instance.details, - r'unconfirmedTransactions': (dynamic instance) => - instance.unconfirmedTransactions, - }, - { - r'contract=': (dynamic instance, value) => instance.contract = value, - r'address=': (dynamic instance, value) => instance.address = value, - r'connection=': (dynamic instance, value) => instance.connection = value, - r'storage=': (dynamic instance, value) => instance.storage = value, - r'wallet=': (dynamic instance, value) => instance.wallet = value, - r'balance=': (dynamic instance, value) => instance.balance = value, - r'tokenAddress=': (dynamic instance, value) => - instance.tokenAddress = value, - r'owner=': (dynamic instance, value) => instance.owner = value, - r'symbol=': (dynamic instance, value) => instance.symbol = value, - r'currency=': (dynamic instance, value) => instance.currency = value, - r'version=': (dynamic instance, value) => instance.version = value, - r'publicKey=': (dynamic instance, value) => instance.publicKey = value, - r'walletType=': (dynamic instance, value) => instance.walletType = value, - r'workchain=': (dynamic instance, value) => instance.workchain = value, - }, - null, - [ - const [ - 0, - 0, - const [#transport, #address, #preloadTransactions], - ], - const [ - 0, - 0, - const [#signedMessage, #options], - ], - const [ - 0, - 0, - const [#fromLt], - ], - const [ - 0, - 0, - const [#block], - ], - const [1, 0, null], - const [ - 0, - 0, - const [#client, #settings, #name, #group], - ], - const [3, 0, null], - const [5, 0, null], - const [ - 0, - 0, - const [#get, #set, #setUnchecked, #remove, #removeUnchecked], - ], - const [ - 0, - 0, - const [#key, #value], - ], - const [ - 0, - 0, - const [#transport, #owner, #rootTokenContract, #preloadTransactions], - ], - const [ - 0, - 0, - const [#destination, #amount, #notifyReceiver, #payload], - ], - const [ - 0, - 0, - const [ - #destination, - #amount, - #notifyReceiver, - #attachedAmount, - #payload, - #remainingGasTo, - ], - ], - const [1, 1, null], - const [ - 0, - 0, - const [#transport, #tokenRoot], - ], - const [ - 0, - 0, - const [ - #amount, - #destination, - #remainingGasTo, - #callbackValue, - #customPayload, - #callbackPayload, - #attachedAmount, - ], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletType], - ], - const [ - 0, - 0, - const [#transport, #existingWallet], - ], - const [ - 0, - 0, - const [#payload, #base64Signature], - ], - const [ - 0, - 0, - const [#expiration], - ], - const [ - 0, - 0, - const [#expiration, #custodians, #reqConfirms, #expirationTime], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #expiration, #params], - ], - const [ - 0, - 0, - const [ - #contractState, - #publicKey, - #expiration, - #params, - #isInternalFlow, - ], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #transactionId, #expiration], - ], - const [ - 0, - 0, - const [#signedMessage, #executionOptions], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletTypes], - ], - ], - ), -}; - -final _memberSymbolMap = null; - -void initializeReflectable() { - r.data = _data; - r.memberSymbolMap = _memberSymbolMap; -} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/generic_contract/generic_contract_lib.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/generic_contract/generic_contract_lib.dart index e579ec3b..396c5a21 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/generic_contract/generic_contract_lib.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/generic_contract/generic_contract_lib.dart @@ -1 +1 @@ -export 'generic_contract.dart' hide main; +export 'generic_contract.dart'; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/jetton_wallet.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/jetton_wallet.dart index 1035823f..b2c4fbbe 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/jetton_wallet.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/jetton_wallet.dart @@ -2,36 +2,33 @@ import 'dart:async'; import 'dart:convert'; import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart'; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart'; -import 'package:reflectable/mirrors.dart'; import 'package:rxdart/rxdart.dart'; -import 'jetton_wallet.reflectable.dart'; - /// Implementation of nekoton's JettonWallet. /// /// If you need watch wallet changes, you can subscribe to [fieldUpdatesStream] /// and be ready if any suitable data changes, but this won't notify about external -/// events emitted through [onMessageSentStream], [onMessageExpiredStream], -/// or [onTransactionsFoundStream]. -/// [onStateChangedStream] changes internal state, so it will lead updating data. -@reflector -class JettonWallet extends RustToDartMirrorInterface - implements RefreshingInterface { +/// events emitted through [onTransactionsFoundStream]. +class JettonWallet implements RefreshingInterface { + JettonWallet._(this.transport, this.rootTokenContract); + late JettonWalletDartWrapper wallet; final Transport transport; /// Flag that display [onStateChanged] that [wallet] was initialized. bool _isInitialized = false; bool _isTransactionsPreloaded = false; + bool _isDisposed = false; /// Controllers that contains data that emits from rust. final _onBalanceChangedController = BehaviorSubject(); - final _onTransactionsFoundController = BehaviorSubject< - ( - List>, - TransactionsBatchInfo - )>(); + final _onTransactionsFoundController = + BehaviorSubject< + ( + List>, + TransactionsBatchInfo, + ) + >(); /// Description information about wallet that could be changed and updated /// during [_updateData]. It means, that fields could be changed after any @@ -57,7 +54,7 @@ class JettonWallet extends RustToDartMirrorInterface bool get isTransactionsPreloaded => _isTransactionsPreloaded; - JettonWallet._(this.transport, this.rootTokenContract); + bool get isDisposed => _isDisposed; /// Create JettonWallet by subscribing to its instance. /// [owner] - address of account that is owner of wallet @@ -67,23 +64,23 @@ class JettonWallet extends RustToDartMirrorInterface required Address owner, required Address rootTokenContract, bool preloadTransactions = false, - }) => - transport.use(() async { - final instance = JettonWallet._(transport, rootTokenContract); - - instance.wallet = await JettonWalletDartWrapper.subscribe( - instanceHash: instance.instanceHash, - transport: transport.transportBox, - rootTokenContract: rootTokenContract.address, - owner: owner.address, - preloadTransactions: preloadTransactions, - ); - - await instance._initInstance(); - instance._isTransactionsPreloaded = preloadTransactions; - - return instance; - }); + }) => transport.use(() async { + final instance = JettonWallet._(transport, rootTokenContract); + + instance.wallet = await JettonWalletDartWrapper.subscribe( + transport: transport.transportBox, + rootTokenContract: rootTokenContract.address, + owner: owner.address, + preloadTransactions: preloadTransactions, + onBalanceChanged: instance.onBalanceChanged, + onTransactionsFound: instance.onTransactionsFound, + ); + + await instance._initInstance(); + instance._isTransactionsPreloaded = preloadTransactions; + + return instance; + }); /// If any error occurs during first initialization of wallet, it will dispose /// wallet and rethrow error; @@ -115,10 +112,9 @@ class JettonWallet extends RustToDartMirrorInterface /// /// To update data of this stream, wallet must be refreshed via [refresh]. Stream< - ( - List>, - TransactionsBatchInfo - )> get onTransactionsFoundStream => _onTransactionsFoundController.stream; + (List>, TransactionsBatchInfo) + > + get onTransactionsFoundStream => _onTransactionsFoundController.stream; /// Get address of owner of wallet. Future
_getOwner() async => Address(address: await wallet.owner()); @@ -213,7 +209,7 @@ class JettonWallet extends RustToDartMirrorInterface /// May throw error. @override Future refresh() async { - if (_isRefreshing || transport.disposed || avoidCall) return; + if (_isRefreshing || transport.disposed || isDisposed) return; try { _isRefreshing = true; @@ -234,7 +230,7 @@ class JettonWallet extends RustToDartMirrorInterface /// [fromLt] - offset for loading data, string representation of u64 /// May throw error. Future preloadTransactions([String? fromLt]) async { - if (avoidCall) return; + if (isDisposed) return; _isTransactionsPreloaded = true; await wallet.preloadTransactions( @@ -247,7 +243,7 @@ class JettonWallet extends RustToDartMirrorInterface /// [block] - base64-encoded Block that could be got from [GqlTransport.getBlock] /// May throw error. Future handleBlock({required String block}) async { - if (avoidCall) return; + if (isDisposed) return; await wallet.handleBlock(block: block); await _updateData(); @@ -280,7 +276,7 @@ class JettonWallet extends RustToDartMirrorInterface /// 1: JettonRootData of root contract /// or throw error. static Future<(Address, JettonRootData)> - getJettonRootDetailsFromJettonWallet({ + getJettonRootDetailsFromJettonWallet({ required Transport transport, required Address address, }) async { @@ -316,7 +312,7 @@ class JettonWallet extends RustToDartMirrorInterface /// Calls from rust side when balance of wallet has been changed void onBalanceChanged(String balance) { - if (avoidCall) return; + if (isDisposed) return; _onBalanceChangedController.add(BigInt.parse(balance)); @@ -328,7 +324,7 @@ class JettonWallet extends RustToDartMirrorInterface /// Calls from rust side when transactions of wallet has been found void onTransactionsFound(String payload) { - if (avoidCall) return; + if (isDisposed) return; final json = jsonDecode(payload) as List; @@ -359,28 +355,19 @@ class JettonWallet extends RustToDartMirrorInterface Future _updateData() async { if (transport.disposed) return; - if (avoidCall) return; + if (isDisposed) return; _contractState = await getContractState(); - if (avoidCall) return; + if (isDisposed) return; balance = BigInt.parse(await _getBalance()); - if (avoidCall) return; + if (isDisposed) return; _fieldsUpdateController.add(null); } - @override void dispose() { + _isDisposed = true; wallet.innerWallet.dispose(); _onBalanceChangedController.close(); _onTransactionsFoundController.close(); _fieldsUpdateController.close(); - super.dispose(); - } - - @override - InstanceMirror initializeMirror() { - initializeReflectable(); // auto-generated reflectable file - return reflector.reflect(this); } } - -void main() {} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/jetton_wallet.reflectable.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/jetton_wallet.reflectable.dart deleted file mode 100644 index b83da4ac..00000000 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/jetton_wallet.reflectable.dart +++ /dev/null @@ -1,813 +0,0 @@ -// This file has been generated by the reflectable package. -// https://github.com/dart-lang/reflectable. -import 'dart:core'; -import 'jetton_wallet.dart' as prefix1; -import 'package:flutter_nekoton_bridge/nekoton/core/generic_contract/generic_contract.dart' - as prefix7; -import 'package:flutter_nekoton_bridge/nekoton/core/token_wallet/token_wallet.dart' - as prefix8; -import 'package:flutter_nekoton_bridge/nekoton/core/ton_wallet/ton_wallet.dart' - as prefix9; -import 'package:flutter_nekoton_bridge/nekoton/external/gql_connection.dart' - as prefix2; -import 'package:flutter_nekoton_bridge/nekoton/external/jrpc_connection.dart' - as prefix4; -import 'package:flutter_nekoton_bridge/nekoton/external/ledger_connection.dart' - as prefix5; -import 'package:flutter_nekoton_bridge/nekoton/external/proto_connection.dart' - as prefix3; -import 'package:flutter_nekoton_bridge/nekoton/external/storage.dart' - as prefix6; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart' as prefix0; - -// ignore_for_file: camel_case_types -// ignore_for_file: implementation_imports -// ignore_for_file: prefer_adjacent_string_concatenation -// ignore_for_file: prefer_collection_literals -// ignore_for_file: unnecessary_const -// ignore_for_file: unused_import -// ignore_for_file: sdk_version_since - -import 'package:reflectable/mirrors.dart' as m; -import 'package:reflectable/src/reflectable_builder_based.dart' as r; -import 'package:reflectable/reflectable.dart' as r show Reflectable; - -final _data = { - const prefix0.Reflector(): r.ReflectorData( - [ - r.NonGenericClassMirrorImpl( - r'JettonWallet', - r'.JettonWallet', - 134217735, - 0, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix1.JettonWallet.subscribe, - r'getJettonWalletDetails': () => - prefix1.JettonWallet.getJettonWalletDetails, - r'getJettonRootDetailsFromJettonWallet': () => - prefix1.JettonWallet.getJettonRootDetailsFromJettonWallet, - r'getJettonRootDetails': () => - prefix1.JettonWallet.getJettonRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 1, - r'prepareTransfer': 2, - r'refresh': 0, - r'preloadTransactions': 3, - r'handleBlock': 4, - r'onBalanceChanged': 7, - r'onTransactionsFound': 7, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 7, - r'transport': 0, - r'balance': 0, - r'balance=': 7, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 7, - r'owner': 0, - r'owner=': 7, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 0, - r'getJettonWalletDetails': 5, - r'getJettonRootDetailsFromJettonWallet': 5, - r'getJettonRootDetails': 6, - }, - ), - r.NonGenericClassMirrorImpl( - r'GqlConnection', - r'.GqlConnection', - 134217735, - 1, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix2.GqlConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 7, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 7, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 8, - }, - ), - r.NonGenericClassMirrorImpl( - r'ProtoConnection', - r'.ProtoConnection', - 134217735, - 2, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix3.ProtoConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 7, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 7, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 8, - }, - ), - r.NonGenericClassMirrorImpl( - r'JrpcConnection', - r'.JrpcConnection', - 134217735, - 3, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix4.JrpcConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 7, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 7, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 8, - }, - ), - r.NonGenericClassMirrorImpl( - r'LedgerConnection', - r'.LedgerConnection', - 134217735, - 4, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix5.LedgerConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getPublicKey': 7, - r'sign': 9, - r'signTransaction': 10, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 7, - r'create': 7, - }, - ), - r.NonGenericClassMirrorImpl( - r'Storage', - r'.Storage', - 134217735, - 5, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix6.Storage.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'get': 7, - r'set': 12, - r'setUnchecked': 12, - r'remove': 12, - r'removeUnchecked': 12, - r'initializeMirror': 0, - r'storage': 0, - r'storage=': 7, - r'create': 11, - }, - ), - r.NonGenericClassMirrorImpl( - r'GenericContract', - r'.GenericContract', - 134217735, - 6, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'subscribe': () => prefix7.GenericContract.subscribe}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'executeTransactionLocally': 14, - r'estimateFees': 14, - r'send': 14, - r'refresh': 0, - r'preloadTransactions': 15, - r'handleBlock': 4, - r'onMessageSent': 7, - r'onMessageExpired': 7, - r'onStateChanged': 7, - r'onTransactionsFound': 7, - r'initializeMirror': 0, - r'contract': 0, - r'contract=': 7, - r'transport': 0, - r'address': 0, - r'address=': 7, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 13, - }, - ), - r.NonGenericClassMirrorImpl( - r'TokenWallet', - r'.TokenWallet', - 134217735, - 7, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix8.TokenWallet.subscribe, - r'getTokenWalletDetails': () => - prefix8.TokenWallet.getTokenWalletDetails, - r'getTokenRootDetailsFromTokenWallet': () => - prefix8.TokenWallet.getTokenRootDetailsFromTokenWallet, - r'getTokenRootDetails': () => prefix8.TokenWallet.getTokenRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 16, - r'prepareTransfer': 17, - r'refresh': 0, - r'preloadTransactions': 3, - r'handleBlock': 4, - r'onBalanceChanged': 7, - r'onTransactionsFound': 7, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 7, - r'transport': 0, - r'balance': 0, - r'balance=': 7, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 7, - r'owner': 0, - r'owner=': 7, - r'symbol': 0, - r'symbol=': 7, - r'currency': 0, - r'currency=': 7, - r'version': 0, - r'version=': 7, - r'moneyBalance': 0, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onMoneyBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 0, - r'getTokenWalletDetails': 5, - r'getTokenRootDetailsFromTokenWallet': 5, - r'getTokenRootDetails': 6, - }, - ), - r.NonGenericClassMirrorImpl( - r'TonWallet', - r'.TonWallet', - 134217735, - 8, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix9.TonWallet.subscribe, - r'subscribeByAddress': () => prefix9.TonWallet.subscribeByAddress, - r'subscribeByExistingWallet': () => - prefix9.TonWallet.subscribeByExistingWallet, - r'appendSignatureToWalletV5R1Payload': () => - prefix9.TonWallet.appendSignatureToWalletV5R1Payload, - r'findExistingWallets': () => prefix9.TonWallet.findExistingWallets, - r'getExistingWalletInfo': () => - prefix9.TonWallet.getExistingWalletInfo, - r'getWalletCustodians': () => prefix9.TonWallet.getWalletCustodians, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'getUnconfirmedTransactions': 0, - r'getCustodians': 0, - r'prepareDeploy': 21, - r'prepareDeployWithMultipleOwners': 22, - r'prepareTransfer': 23, - r'prepareWalletV5R1MessageBody': 24, - r'prepareNonexistWalletV5R1MessageBody': 24, - r'prepareConfirmTransaction': 25, - r'estimateFees': 26, - r'send': 14, - r'refresh': 0, - r'preloadTransactions': 15, - r'handleBlock': 4, - r'makeStateInit': 0, - r'getWalletV5R1Seqno': 23, - r'onMessageSent': 7, - r'onMessageExpired': 7, - r'onStateChanged': 7, - r'onTransactionsFound': 7, - r'onDetailsChanged': 7, - r'onCustodiansChanged': 7, - r'onUnconfirmedTransactionsChanged': 7, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 7, - r'transport': 0, - r'publicKey': 0, - r'publicKey=': 7, - r'address': 0, - r'address=': 7, - r'walletType': 0, - r'walletType=': 7, - r'workchain': 0, - r'workchain=': 7, - r'custodians': 0, - r'details': 0, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'unconfirmedTransactions': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 18, - r'subscribeByAddress': 5, - r'subscribeByExistingWallet': 19, - r'appendSignatureToWalletV5R1Payload': 20, - r'findExistingWallets': 27, - r'getExistingWalletInfo': 5, - r'getWalletCustodians': 5, - }, - ), - ], - null, - null, - [ - prefix1.JettonWallet, - prefix2.GqlConnection, - prefix3.ProtoConnection, - prefix4.JrpcConnection, - prefix5.LedgerConnection, - prefix6.Storage, - prefix7.GenericContract, - prefix8.TokenWallet, - prefix9.TonWallet, - ], - 9, - { - r'==': (dynamic instance) => (x) => instance == x, - r'toString': (dynamic instance) => instance.toString, - r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, - r'hashCode': (dynamic instance) => instance.hashCode, - r'runtimeType': (dynamic instance) => instance.runtimeType, - r'init': (dynamic instance) => instance.init, - r'dispose': (dynamic instance) => instance.dispose, - r'instanceHash': (dynamic instance) => instance.instanceHash, - r'avoidCall': (dynamic instance) => instance.avoidCall, - r'getContractState': (dynamic instance) => instance.getContractState, - r'estimateMinAttachedAmount': (dynamic instance) => - instance.estimateMinAttachedAmount, - r'prepareTransfer': (dynamic instance) => instance.prepareTransfer, - r'refresh': (dynamic instance) => instance.refresh, - r'preloadTransactions': (dynamic instance) => - instance.preloadTransactions, - r'handleBlock': (dynamic instance) => instance.handleBlock, - r'onBalanceChanged': (dynamic instance) => instance.onBalanceChanged, - r'onTransactionsFound': (dynamic instance) => - instance.onTransactionsFound, - r'initializeMirror': (dynamic instance) => instance.initializeMirror, - r'wallet': (dynamic instance) => instance.wallet, - r'transport': (dynamic instance) => instance.transport, - r'balance': (dynamic instance) => instance.balance, - r'rootTokenContract': (dynamic instance) => instance.rootTokenContract, - r'tokenAddress': (dynamic instance) => instance.tokenAddress, - r'owner': (dynamic instance) => instance.owner, - r'isTransactionsPreloaded': (dynamic instance) => - instance.isTransactionsPreloaded, - r'contractState': (dynamic instance) => instance.contractState, - r'fieldUpdatesStream': (dynamic instance) => instance.fieldUpdatesStream, - r'onBalanceChangedStream': (dynamic instance) => - instance.onBalanceChangedStream, - r'onTransactionsFoundStream': (dynamic instance) => - instance.onTransactionsFoundStream, - r'refreshDescription': (dynamic instance) => instance.refreshDescription, - r'post': (dynamic instance) => instance.post, - r'connection': (dynamic instance) => instance.connection, - r'settings': (dynamic instance) => instance.settings, - r'type': (dynamic instance) => instance.type, - r'name': (dynamic instance) => instance.name, - r'group': (dynamic instance) => instance.group, - r'getPublicKey': (dynamic instance) => instance.getPublicKey, - r'sign': (dynamic instance) => instance.sign, - r'signTransaction': (dynamic instance) => instance.signTransaction, - r'get': (dynamic instance) => instance.get, - r'set': (dynamic instance) => instance.set, - r'setUnchecked': (dynamic instance) => instance.setUnchecked, - r'remove': (dynamic instance) => instance.remove, - r'removeUnchecked': (dynamic instance) => instance.removeUnchecked, - r'storage': (dynamic instance) => instance.storage, - r'getPendingTransactions': (dynamic instance) => - instance.getPendingTransactions, - r'getPollingMethod': (dynamic instance) => instance.getPollingMethod, - r'executeTransactionLocally': (dynamic instance) => - instance.executeTransactionLocally, - r'estimateFees': (dynamic instance) => instance.estimateFees, - r'send': (dynamic instance) => instance.send, - r'onMessageSent': (dynamic instance) => instance.onMessageSent, - r'onMessageExpired': (dynamic instance) => instance.onMessageExpired, - r'onStateChanged': (dynamic instance) => instance.onStateChanged, - r'contract': (dynamic instance) => instance.contract, - r'address': (dynamic instance) => instance.address, - r'pendingTransactions': (dynamic instance) => - instance.pendingTransactions, - r'pollingMethod': (dynamic instance) => instance.pollingMethod, - r'onMessageSentStream': (dynamic instance) => - instance.onMessageSentStream, - r'onMessageExpiredStream': (dynamic instance) => - instance.onMessageExpiredStream, - r'onStateChangedStream': (dynamic instance) => - instance.onStateChangedStream, - r'symbol': (dynamic instance) => instance.symbol, - r'currency': (dynamic instance) => instance.currency, - r'version': (dynamic instance) => instance.version, - r'moneyBalance': (dynamic instance) => instance.moneyBalance, - r'onMoneyBalanceChangedStream': (dynamic instance) => - instance.onMoneyBalanceChangedStream, - r'getUnconfirmedTransactions': (dynamic instance) => - instance.getUnconfirmedTransactions, - r'getCustodians': (dynamic instance) => instance.getCustodians, - r'prepareDeploy': (dynamic instance) => instance.prepareDeploy, - r'prepareDeployWithMultipleOwners': (dynamic instance) => - instance.prepareDeployWithMultipleOwners, - r'prepareWalletV5R1MessageBody': (dynamic instance) => - instance.prepareWalletV5R1MessageBody, - r'prepareNonexistWalletV5R1MessageBody': (dynamic instance) => - instance.prepareNonexistWalletV5R1MessageBody, - r'prepareConfirmTransaction': (dynamic instance) => - instance.prepareConfirmTransaction, - r'makeStateInit': (dynamic instance) => instance.makeStateInit, - r'getWalletV5R1Seqno': (dynamic instance) => instance.getWalletV5R1Seqno, - r'onDetailsChanged': (dynamic instance) => instance.onDetailsChanged, - r'onCustodiansChanged': (dynamic instance) => - instance.onCustodiansChanged, - r'onUnconfirmedTransactionsChanged': (dynamic instance) => - instance.onUnconfirmedTransactionsChanged, - r'publicKey': (dynamic instance) => instance.publicKey, - r'walletType': (dynamic instance) => instance.walletType, - r'workchain': (dynamic instance) => instance.workchain, - r'custodians': (dynamic instance) => instance.custodians, - r'details': (dynamic instance) => instance.details, - r'unconfirmedTransactions': (dynamic instance) => - instance.unconfirmedTransactions, - }, - { - r'wallet=': (dynamic instance, value) => instance.wallet = value, - r'balance=': (dynamic instance, value) => instance.balance = value, - r'tokenAddress=': (dynamic instance, value) => - instance.tokenAddress = value, - r'owner=': (dynamic instance, value) => instance.owner = value, - r'connection=': (dynamic instance, value) => instance.connection = value, - r'storage=': (dynamic instance, value) => instance.storage = value, - r'contract=': (dynamic instance, value) => instance.contract = value, - r'address=': (dynamic instance, value) => instance.address = value, - r'symbol=': (dynamic instance, value) => instance.symbol = value, - r'currency=': (dynamic instance, value) => instance.currency = value, - r'version=': (dynamic instance, value) => instance.version = value, - r'publicKey=': (dynamic instance, value) => instance.publicKey = value, - r'walletType=': (dynamic instance, value) => instance.walletType = value, - r'workchain=': (dynamic instance, value) => instance.workchain = value, - }, - null, - [ - const [ - 0, - 0, - const [#transport, #owner, #rootTokenContract, #preloadTransactions], - ], - const [ - 0, - 0, - const [#destination], - ], - const [ - 0, - 0, - const [ - #amount, - #destination, - #remainingGasTo, - #callbackValue, - #customPayload, - #callbackPayload, - #attachedAmount, - ], - ], - const [1, 1, null], - const [ - 0, - 0, - const [#block], - ], - const [ - 0, - 0, - const [#transport, #address], - ], - const [ - 0, - 0, - const [#transport, #tokenRoot], - ], - const [1, 0, null], - const [ - 0, - 0, - const [#client, #settings, #name, #group], - ], - const [3, 0, null], - const [5, 0, null], - const [ - 0, - 0, - const [#get, #set, #setUnchecked, #remove, #removeUnchecked], - ], - const [ - 0, - 0, - const [#key, #value], - ], - const [ - 0, - 0, - const [#transport, #address, #preloadTransactions], - ], - const [ - 0, - 0, - const [#signedMessage, #options], - ], - const [ - 0, - 0, - const [#fromLt], - ], - const [ - 0, - 0, - const [#destination, #amount, #notifyReceiver, #payload], - ], - const [ - 0, - 0, - const [ - #destination, - #amount, - #notifyReceiver, - #attachedAmount, - #payload, - #remainingGasTo, - ], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletType], - ], - const [ - 0, - 0, - const [#transport, #existingWallet], - ], - const [ - 0, - 0, - const [#payload, #base64Signature], - ], - const [ - 0, - 0, - const [#expiration], - ], - const [ - 0, - 0, - const [#expiration, #custodians, #reqConfirms, #expirationTime], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #expiration, #params], - ], - const [ - 0, - 0, - const [ - #contractState, - #publicKey, - #expiration, - #params, - #isInternalFlow, - ], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #transactionId, #expiration], - ], - const [ - 0, - 0, - const [#signedMessage, #executionOptions], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletTypes], - ], - ], - ), -}; - -final _memberSymbolMap = null; - -void initializeReflectable() { - r.data = _data; - r.memberSymbolMap = _memberSymbolMap; -} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/jetton_wallet_lib.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/jetton_wallet_lib.dart index d1be63db..50b8ec15 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/jetton_wallet_lib.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/jetton_wallet_lib.dart @@ -1,4 +1,4 @@ -export 'jetton_wallet.dart' hide main; +export 'jetton_wallet.dart'; export 'models/jetton_incoming_transfer.dart'; export 'models/jetton_meta_data.dart'; export 'models/jetton_outgoing_transfer.dart'; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_incoming_transfer.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_incoming_transfer.freezed.dart index 46eb2fd0..bcf093d9 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_incoming_transfer.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_incoming_transfer.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,50 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$JettonIncomingTransfer { - BigInt get tokens; - Address get from; - /// Create a copy of JettonIncomingTransfer - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $JettonIncomingTransferCopyWith get copyWith => - _$JettonIncomingTransferCopyWithImpl( - this as JettonIncomingTransfer, _$identity); + BigInt get tokens; Address get from; +/// Create a copy of JettonIncomingTransfer +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$JettonIncomingTransferCopyWith get copyWith => _$JettonIncomingTransferCopyWithImpl(this as JettonIncomingTransfer, _$identity); /// Serializes this JettonIncomingTransfer to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is JettonIncomingTransfer && - (identical(other.tokens, tokens) || other.tokens == tokens) && - (identical(other.from, from) || other.from == from)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, tokens, from); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is JettonIncomingTransfer&&(identical(other.tokens, tokens) || other.tokens == tokens)&&(identical(other.from, from) || other.from == from)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,tokens,from); - @override - String toString() { - return 'JettonIncomingTransfer(tokens: $tokens, from: $from)'; - } +@override +String toString() { + return 'JettonIncomingTransfer(tokens: $tokens, from: $from)'; } -/// @nodoc -abstract mixin class $JettonIncomingTransferCopyWith<$Res> { - factory $JettonIncomingTransferCopyWith(JettonIncomingTransfer value, - $Res Function(JettonIncomingTransfer) _then) = - _$JettonIncomingTransferCopyWithImpl; - @useResult - $Res call({BigInt tokens, Address from}); - $AddressCopyWith<$Res> get from; } +/// @nodoc +abstract mixin class $JettonIncomingTransferCopyWith<$Res> { + factory $JettonIncomingTransferCopyWith(JettonIncomingTransfer value, $Res Function(JettonIncomingTransfer) _then) = _$JettonIncomingTransferCopyWithImpl; +@useResult +$Res call({ + BigInt tokens, Address from +}); + + +$AddressCopyWith<$Res> get from; + +} /// @nodoc class _$JettonIncomingTransferCopyWithImpl<$Res> implements $JettonIncomingTransferCopyWith<$Res> { @@ -67,98 +63,202 @@ class _$JettonIncomingTransferCopyWithImpl<$Res> final JettonIncomingTransfer _self; final $Res Function(JettonIncomingTransfer) _then; - /// Create a copy of JettonIncomingTransfer - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? tokens = null, - Object? from = null, - }) { - return _then(_self.copyWith( - tokens: null == tokens - ? _self.tokens - : tokens // ignore: cast_nullable_to_non_nullable - as BigInt, - from: null == from - ? _self.from - : from // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of JettonIncomingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get from { - return $AddressCopyWith<$Res>(_self.from, (value) { - return _then(_self.copyWith(from: value)); - }); - } +/// Create a copy of JettonIncomingTransfer +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? tokens = null,Object? from = null,}) { + return _then(_self.copyWith( +tokens: null == tokens ? _self.tokens : tokens // ignore: cast_nullable_to_non_nullable +as BigInt,from: null == from ? _self.from : from // ignore: cast_nullable_to_non_nullable +as Address, + )); +} +/// Create a copy of JettonIncomingTransfer +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get from { + + return $AddressCopyWith<$Res>(_self.from, (value) { + return _then(_self.copyWith(from: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [JettonIncomingTransfer]. +extension JettonIncomingTransferPatterns on JettonIncomingTransfer { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _JettonIncomingTransfer value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _JettonIncomingTransfer() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _JettonIncomingTransfer value) $default,){ +final _that = this; +switch (_that) { +case _JettonIncomingTransfer(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _JettonIncomingTransfer value)? $default,){ +final _that = this; +switch (_that) { +case _JettonIncomingTransfer() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( BigInt tokens, Address from)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _JettonIncomingTransfer() when $default != null: +return $default(_that.tokens,_that.from);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( BigInt tokens, Address from) $default,) {final _that = this; +switch (_that) { +case _JettonIncomingTransfer(): +return $default(_that.tokens,_that.from);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( BigInt tokens, Address from)? $default,) {final _that = this; +switch (_that) { +case _JettonIncomingTransfer() when $default != null: +return $default(_that.tokens,_that.from);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _JettonIncomingTransfer implements JettonIncomingTransfer { const _JettonIncomingTransfer({required this.tokens, required this.from}); - factory _JettonIncomingTransfer.fromJson(Map json) => - _$JettonIncomingTransferFromJson(json); - - @override - final BigInt tokens; - @override - final Address from; - - /// Create a copy of JettonIncomingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$JettonIncomingTransferCopyWith<_JettonIncomingTransfer> get copyWith => - __$JettonIncomingTransferCopyWithImpl<_JettonIncomingTransfer>( - this, _$identity); - - @override - Map toJson() { - return _$JettonIncomingTransferToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _JettonIncomingTransfer && - (identical(other.tokens, tokens) || other.tokens == tokens) && - (identical(other.from, from) || other.from == from)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, tokens, from); - - @override - String toString() { - return 'JettonIncomingTransfer(tokens: $tokens, from: $from)'; - } + factory _JettonIncomingTransfer.fromJson(Map json) => _$JettonIncomingTransferFromJson(json); + +@override final BigInt tokens; +@override final Address from; + +/// Create a copy of JettonIncomingTransfer +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$JettonIncomingTransferCopyWith<_JettonIncomingTransfer> get copyWith => __$JettonIncomingTransferCopyWithImpl<_JettonIncomingTransfer>(this, _$identity); + +@override +Map toJson() { + return _$JettonIncomingTransferToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _JettonIncomingTransfer&&(identical(other.tokens, tokens) || other.tokens == tokens)&&(identical(other.from, from) || other.from == from)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,tokens,from); + +@override +String toString() { + return 'JettonIncomingTransfer(tokens: $tokens, from: $from)'; } -/// @nodoc -abstract mixin class _$JettonIncomingTransferCopyWith<$Res> - implements $JettonIncomingTransferCopyWith<$Res> { - factory _$JettonIncomingTransferCopyWith(_JettonIncomingTransfer value, - $Res Function(_JettonIncomingTransfer) _then) = - __$JettonIncomingTransferCopyWithImpl; - @override - @useResult - $Res call({BigInt tokens, Address from}); - @override - $AddressCopyWith<$Res> get from; } +/// @nodoc +abstract mixin class _$JettonIncomingTransferCopyWith<$Res> implements $JettonIncomingTransferCopyWith<$Res> { + factory _$JettonIncomingTransferCopyWith(_JettonIncomingTransfer value, $Res Function(_JettonIncomingTransfer) _then) = __$JettonIncomingTransferCopyWithImpl; +@override @useResult +$Res call({ + BigInt tokens, Address from +}); + + +@override $AddressCopyWith<$Res> get from; + +} /// @nodoc class __$JettonIncomingTransferCopyWithImpl<$Res> implements _$JettonIncomingTransferCopyWith<$Res> { @@ -167,35 +267,26 @@ class __$JettonIncomingTransferCopyWithImpl<$Res> final _JettonIncomingTransfer _self; final $Res Function(_JettonIncomingTransfer) _then; - /// Create a copy of JettonIncomingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? tokens = null, - Object? from = null, - }) { - return _then(_JettonIncomingTransfer( - tokens: null == tokens - ? _self.tokens - : tokens // ignore: cast_nullable_to_non_nullable - as BigInt, - from: null == from - ? _self.from - : from // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of JettonIncomingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get from { - return $AddressCopyWith<$Res>(_self.from, (value) { - return _then(_self.copyWith(from: value)); - }); - } +/// Create a copy of JettonIncomingTransfer +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? tokens = null,Object? from = null,}) { + return _then(_JettonIncomingTransfer( +tokens: null == tokens ? _self.tokens : tokens // ignore: cast_nullable_to_non_nullable +as BigInt,from: null == from ? _self.from : from // ignore: cast_nullable_to_non_nullable +as Address, + )); +} + +/// Create a copy of JettonIncomingTransfer +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get from { + + return $AddressCopyWith<$Res>(_self.from, (value) { + return _then(_self.copyWith(from: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_incoming_transfer.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_incoming_transfer.g.dart index 945495e5..c10562e9 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_incoming_transfer.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_incoming_transfer.g.dart @@ -7,15 +7,15 @@ part of 'jetton_incoming_transfer.dart'; // ************************************************************************** _JettonIncomingTransfer _$JettonIncomingTransferFromJson( - Map json) => - _JettonIncomingTransfer( - tokens: BigInt.parse(json['tokens'] as String), - from: Address.fromJson(json['from'] as String), - ); + Map json, +) => _JettonIncomingTransfer( + tokens: BigInt.parse(json['tokens'] as String), + from: Address.fromJson(json['from'] as String), +); Map _$JettonIncomingTransferToJson( - _JettonIncomingTransfer instance) => - { - 'tokens': instance.tokens.toString(), - 'from': instance.from.toJson(), - }; + _JettonIncomingTransfer instance, +) => { + 'tokens': instance.tokens.toString(), + 'from': instance.from.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_meta_data.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_meta_data.freezed.dart index 524b5188..d6f43fb9 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_meta_data.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_meta_data.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,65 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$JettonMetaData { - String? get name; - String? get uri; - String? get symbol; - String? get description; - String? get image; - int? get decimals; - - /// Create a copy of JettonMetaData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $JettonMetaDataCopyWith get copyWith => - _$JettonMetaDataCopyWithImpl( - this as JettonMetaData, _$identity); + + String? get name; String? get uri; String? get symbol; String? get description; String? get image; int? get decimals; +/// Create a copy of JettonMetaData +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$JettonMetaDataCopyWith get copyWith => _$JettonMetaDataCopyWithImpl(this as JettonMetaData, _$identity); /// Serializes this JettonMetaData to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is JettonMetaData && - (identical(other.name, name) || other.name == name) && - (identical(other.uri, uri) || other.uri == uri) && - (identical(other.symbol, symbol) || other.symbol == symbol) && - (identical(other.description, description) || - other.description == description) && - (identical(other.image, image) || other.image == image) && - (identical(other.decimals, decimals) || - other.decimals == decimals)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, name, uri, symbol, description, image, decimals); - - @override - String toString() { - return 'JettonMetaData(name: $name, uri: $uri, symbol: $symbol, description: $description, image: $image, decimals: $decimals)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is JettonMetaData&&(identical(other.name, name) || other.name == name)&&(identical(other.uri, uri) || other.uri == uri)&&(identical(other.symbol, symbol) || other.symbol == symbol)&&(identical(other.description, description) || other.description == description)&&(identical(other.image, image) || other.image == image)&&(identical(other.decimals, decimals) || other.decimals == decimals)); } -/// @nodoc -abstract mixin class $JettonMetaDataCopyWith<$Res> { - factory $JettonMetaDataCopyWith( - JettonMetaData value, $Res Function(JettonMetaData) _then) = - _$JettonMetaDataCopyWithImpl; - @useResult - $Res call( - {String? name, - String? uri, - String? symbol, - String? description, - String? image, - int? decimals}); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,uri,symbol,description,image,decimals); + +@override +String toString() { + return 'JettonMetaData(name: $name, uri: $uri, symbol: $symbol, description: $description, image: $image, decimals: $decimals)'; +} + + } +/// @nodoc +abstract mixin class $JettonMetaDataCopyWith<$Res> { + factory $JettonMetaDataCopyWith(JettonMetaData value, $Res Function(JettonMetaData) _then) = _$JettonMetaDataCopyWithImpl; +@useResult +$Res call({ + String? name, String? uri, String? symbol, String? description, String? image, int? decimals +}); + + + + +} /// @nodoc class _$JettonMetaDataCopyWithImpl<$Res> implements $JettonMetaDataCopyWith<$Res> { @@ -82,131 +63,201 @@ class _$JettonMetaDataCopyWithImpl<$Res> final JettonMetaData _self; final $Res Function(JettonMetaData) _then; - /// Create a copy of JettonMetaData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = freezed, - Object? uri = freezed, - Object? symbol = freezed, - Object? description = freezed, - Object? image = freezed, - Object? decimals = freezed, - }) { - return _then(_self.copyWith( - name: freezed == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - uri: freezed == uri - ? _self.uri - : uri // ignore: cast_nullable_to_non_nullable - as String?, - symbol: freezed == symbol - ? _self.symbol - : symbol // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _self.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - image: freezed == image - ? _self.image - : image // ignore: cast_nullable_to_non_nullable - as String?, - decimals: freezed == decimals - ? _self.decimals - : decimals // ignore: cast_nullable_to_non_nullable - as int?, - )); - } +/// Create a copy of JettonMetaData +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? name = freezed,Object? uri = freezed,Object? symbol = freezed,Object? description = freezed,Object? image = freezed,Object? decimals = freezed,}) { + return _then(_self.copyWith( +name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?,uri: freezed == uri ? _self.uri : uri // ignore: cast_nullable_to_non_nullable +as String?,symbol: freezed == symbol ? _self.symbol : symbol // ignore: cast_nullable_to_non_nullable +as String?,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable +as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable +as String?,decimals: freezed == decimals ? _self.decimals : decimals // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [JettonMetaData]. +extension JettonMetaDataPatterns on JettonMetaData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _JettonMetaData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _JettonMetaData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _JettonMetaData value) $default,){ +final _that = this; +switch (_that) { +case _JettonMetaData(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _JettonMetaData value)? $default,){ +final _that = this; +switch (_that) { +case _JettonMetaData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String? name, String? uri, String? symbol, String? description, String? image, int? decimals)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _JettonMetaData() when $default != null: +return $default(_that.name,_that.uri,_that.symbol,_that.description,_that.image,_that.decimals);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String? name, String? uri, String? symbol, String? description, String? image, int? decimals) $default,) {final _that = this; +switch (_that) { +case _JettonMetaData(): +return $default(_that.name,_that.uri,_that.symbol,_that.description,_that.image,_that.decimals);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? name, String? uri, String? symbol, String? description, String? image, int? decimals)? $default,) {final _that = this; +switch (_that) { +case _JettonMetaData() when $default != null: +return $default(_that.name,_that.uri,_that.symbol,_that.description,_that.image,_that.decimals);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _JettonMetaData implements JettonMetaData { - const _JettonMetaData( - {this.name, - this.uri, - this.symbol, - this.description, - this.image, - this.decimals}); - factory _JettonMetaData.fromJson(Map json) => - _$JettonMetaDataFromJson(json); - - @override - final String? name; - @override - final String? uri; - @override - final String? symbol; - @override - final String? description; - @override - final String? image; - @override - final int? decimals; - - /// Create a copy of JettonMetaData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$JettonMetaDataCopyWith<_JettonMetaData> get copyWith => - __$JettonMetaDataCopyWithImpl<_JettonMetaData>(this, _$identity); - - @override - Map toJson() { - return _$JettonMetaDataToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _JettonMetaData && - (identical(other.name, name) || other.name == name) && - (identical(other.uri, uri) || other.uri == uri) && - (identical(other.symbol, symbol) || other.symbol == symbol) && - (identical(other.description, description) || - other.description == description) && - (identical(other.image, image) || other.image == image) && - (identical(other.decimals, decimals) || - other.decimals == decimals)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, name, uri, symbol, description, image, decimals); - - @override - String toString() { - return 'JettonMetaData(name: $name, uri: $uri, symbol: $symbol, description: $description, image: $image, decimals: $decimals)'; - } + const _JettonMetaData({this.name, this.uri, this.symbol, this.description, this.image, this.decimals}); + factory _JettonMetaData.fromJson(Map json) => _$JettonMetaDataFromJson(json); + +@override final String? name; +@override final String? uri; +@override final String? symbol; +@override final String? description; +@override final String? image; +@override final int? decimals; + +/// Create a copy of JettonMetaData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$JettonMetaDataCopyWith<_JettonMetaData> get copyWith => __$JettonMetaDataCopyWithImpl<_JettonMetaData>(this, _$identity); + +@override +Map toJson() { + return _$JettonMetaDataToJson(this, ); } -/// @nodoc -abstract mixin class _$JettonMetaDataCopyWith<$Res> - implements $JettonMetaDataCopyWith<$Res> { - factory _$JettonMetaDataCopyWith( - _JettonMetaData value, $Res Function(_JettonMetaData) _then) = - __$JettonMetaDataCopyWithImpl; - @override - @useResult - $Res call( - {String? name, - String? uri, - String? symbol, - String? description, - String? image, - int? decimals}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _JettonMetaData&&(identical(other.name, name) || other.name == name)&&(identical(other.uri, uri) || other.uri == uri)&&(identical(other.symbol, symbol) || other.symbol == symbol)&&(identical(other.description, description) || other.description == description)&&(identical(other.image, image) || other.image == image)&&(identical(other.decimals, decimals) || other.decimals == decimals)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,uri,symbol,description,image,decimals); + +@override +String toString() { + return 'JettonMetaData(name: $name, uri: $uri, symbol: $symbol, description: $description, image: $image, decimals: $decimals)'; +} + + } +/// @nodoc +abstract mixin class _$JettonMetaDataCopyWith<$Res> implements $JettonMetaDataCopyWith<$Res> { + factory _$JettonMetaDataCopyWith(_JettonMetaData value, $Res Function(_JettonMetaData) _then) = __$JettonMetaDataCopyWithImpl; +@override @useResult +$Res call({ + String? name, String? uri, String? symbol, String? description, String? image, int? decimals +}); + + + + +} /// @nodoc class __$JettonMetaDataCopyWithImpl<$Res> implements _$JettonMetaDataCopyWith<$Res> { @@ -215,45 +266,21 @@ class __$JettonMetaDataCopyWithImpl<$Res> final _JettonMetaData _self; final $Res Function(_JettonMetaData) _then; - /// Create a copy of JettonMetaData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? name = freezed, - Object? uri = freezed, - Object? symbol = freezed, - Object? description = freezed, - Object? image = freezed, - Object? decimals = freezed, - }) { - return _then(_JettonMetaData( - name: freezed == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - uri: freezed == uri - ? _self.uri - : uri // ignore: cast_nullable_to_non_nullable - as String?, - symbol: freezed == symbol - ? _self.symbol - : symbol // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _self.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - image: freezed == image - ? _self.image - : image // ignore: cast_nullable_to_non_nullable - as String?, - decimals: freezed == decimals - ? _self.decimals - : decimals // ignore: cast_nullable_to_non_nullable - as int?, - )); - } +/// Create a copy of JettonMetaData +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? name = freezed,Object? uri = freezed,Object? symbol = freezed,Object? description = freezed,Object? image = freezed,Object? decimals = freezed,}) { + return _then(_JettonMetaData( +name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?,uri: freezed == uri ? _self.uri : uri // ignore: cast_nullable_to_non_nullable +as String?,symbol: freezed == symbol ? _self.symbol : symbol // ignore: cast_nullable_to_non_nullable +as String?,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable +as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable +as String?,decimals: freezed == decimals ? _self.decimals : decimals // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_outgoing_transfer.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_outgoing_transfer.freezed.dart index c36623b5..fb0da7a1 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_outgoing_transfer.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_outgoing_transfer.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,50 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$JettonOutgoingTransfer { - BigInt get tokens; - Address get to; - /// Create a copy of JettonOutgoingTransfer - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $JettonOutgoingTransferCopyWith get copyWith => - _$JettonOutgoingTransferCopyWithImpl( - this as JettonOutgoingTransfer, _$identity); + BigInt get tokens; Address get to; +/// Create a copy of JettonOutgoingTransfer +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$JettonOutgoingTransferCopyWith get copyWith => _$JettonOutgoingTransferCopyWithImpl(this as JettonOutgoingTransfer, _$identity); /// Serializes this JettonOutgoingTransfer to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is JettonOutgoingTransfer && - (identical(other.tokens, tokens) || other.tokens == tokens) && - (identical(other.to, to) || other.to == to)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, tokens, to); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is JettonOutgoingTransfer&&(identical(other.tokens, tokens) || other.tokens == tokens)&&(identical(other.to, to) || other.to == to)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,tokens,to); - @override - String toString() { - return 'JettonOutgoingTransfer(tokens: $tokens, to: $to)'; - } +@override +String toString() { + return 'JettonOutgoingTransfer(tokens: $tokens, to: $to)'; } -/// @nodoc -abstract mixin class $JettonOutgoingTransferCopyWith<$Res> { - factory $JettonOutgoingTransferCopyWith(JettonOutgoingTransfer value, - $Res Function(JettonOutgoingTransfer) _then) = - _$JettonOutgoingTransferCopyWithImpl; - @useResult - $Res call({BigInt tokens, Address to}); - $AddressCopyWith<$Res> get to; } +/// @nodoc +abstract mixin class $JettonOutgoingTransferCopyWith<$Res> { + factory $JettonOutgoingTransferCopyWith(JettonOutgoingTransfer value, $Res Function(JettonOutgoingTransfer) _then) = _$JettonOutgoingTransferCopyWithImpl; +@useResult +$Res call({ + BigInt tokens, Address to +}); + + +$AddressCopyWith<$Res> get to; + +} /// @nodoc class _$JettonOutgoingTransferCopyWithImpl<$Res> implements $JettonOutgoingTransferCopyWith<$Res> { @@ -67,98 +63,202 @@ class _$JettonOutgoingTransferCopyWithImpl<$Res> final JettonOutgoingTransfer _self; final $Res Function(JettonOutgoingTransfer) _then; - /// Create a copy of JettonOutgoingTransfer - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? tokens = null, - Object? to = null, - }) { - return _then(_self.copyWith( - tokens: null == tokens - ? _self.tokens - : tokens // ignore: cast_nullable_to_non_nullable - as BigInt, - to: null == to - ? _self.to - : to // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of JettonOutgoingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get to { - return $AddressCopyWith<$Res>(_self.to, (value) { - return _then(_self.copyWith(to: value)); - }); - } +/// Create a copy of JettonOutgoingTransfer +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? tokens = null,Object? to = null,}) { + return _then(_self.copyWith( +tokens: null == tokens ? _self.tokens : tokens // ignore: cast_nullable_to_non_nullable +as BigInt,to: null == to ? _self.to : to // ignore: cast_nullable_to_non_nullable +as Address, + )); +} +/// Create a copy of JettonOutgoingTransfer +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get to { + + return $AddressCopyWith<$Res>(_self.to, (value) { + return _then(_self.copyWith(to: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [JettonOutgoingTransfer]. +extension JettonOutgoingTransferPatterns on JettonOutgoingTransfer { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _JettonOutgoingTransfer value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _JettonOutgoingTransfer() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _JettonOutgoingTransfer value) $default,){ +final _that = this; +switch (_that) { +case _JettonOutgoingTransfer(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _JettonOutgoingTransfer value)? $default,){ +final _that = this; +switch (_that) { +case _JettonOutgoingTransfer() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( BigInt tokens, Address to)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _JettonOutgoingTransfer() when $default != null: +return $default(_that.tokens,_that.to);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( BigInt tokens, Address to) $default,) {final _that = this; +switch (_that) { +case _JettonOutgoingTransfer(): +return $default(_that.tokens,_that.to);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( BigInt tokens, Address to)? $default,) {final _that = this; +switch (_that) { +case _JettonOutgoingTransfer() when $default != null: +return $default(_that.tokens,_that.to);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _JettonOutgoingTransfer implements JettonOutgoingTransfer { const _JettonOutgoingTransfer({required this.tokens, required this.to}); - factory _JettonOutgoingTransfer.fromJson(Map json) => - _$JettonOutgoingTransferFromJson(json); - - @override - final BigInt tokens; - @override - final Address to; - - /// Create a copy of JettonOutgoingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$JettonOutgoingTransferCopyWith<_JettonOutgoingTransfer> get copyWith => - __$JettonOutgoingTransferCopyWithImpl<_JettonOutgoingTransfer>( - this, _$identity); - - @override - Map toJson() { - return _$JettonOutgoingTransferToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _JettonOutgoingTransfer && - (identical(other.tokens, tokens) || other.tokens == tokens) && - (identical(other.to, to) || other.to == to)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, tokens, to); - - @override - String toString() { - return 'JettonOutgoingTransfer(tokens: $tokens, to: $to)'; - } + factory _JettonOutgoingTransfer.fromJson(Map json) => _$JettonOutgoingTransferFromJson(json); + +@override final BigInt tokens; +@override final Address to; + +/// Create a copy of JettonOutgoingTransfer +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$JettonOutgoingTransferCopyWith<_JettonOutgoingTransfer> get copyWith => __$JettonOutgoingTransferCopyWithImpl<_JettonOutgoingTransfer>(this, _$identity); + +@override +Map toJson() { + return _$JettonOutgoingTransferToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _JettonOutgoingTransfer&&(identical(other.tokens, tokens) || other.tokens == tokens)&&(identical(other.to, to) || other.to == to)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,tokens,to); + +@override +String toString() { + return 'JettonOutgoingTransfer(tokens: $tokens, to: $to)'; } -/// @nodoc -abstract mixin class _$JettonOutgoingTransferCopyWith<$Res> - implements $JettonOutgoingTransferCopyWith<$Res> { - factory _$JettonOutgoingTransferCopyWith(_JettonOutgoingTransfer value, - $Res Function(_JettonOutgoingTransfer) _then) = - __$JettonOutgoingTransferCopyWithImpl; - @override - @useResult - $Res call({BigInt tokens, Address to}); - @override - $AddressCopyWith<$Res> get to; } +/// @nodoc +abstract mixin class _$JettonOutgoingTransferCopyWith<$Res> implements $JettonOutgoingTransferCopyWith<$Res> { + factory _$JettonOutgoingTransferCopyWith(_JettonOutgoingTransfer value, $Res Function(_JettonOutgoingTransfer) _then) = __$JettonOutgoingTransferCopyWithImpl; +@override @useResult +$Res call({ + BigInt tokens, Address to +}); + + +@override $AddressCopyWith<$Res> get to; + +} /// @nodoc class __$JettonOutgoingTransferCopyWithImpl<$Res> implements _$JettonOutgoingTransferCopyWith<$Res> { @@ -167,35 +267,26 @@ class __$JettonOutgoingTransferCopyWithImpl<$Res> final _JettonOutgoingTransfer _self; final $Res Function(_JettonOutgoingTransfer) _then; - /// Create a copy of JettonOutgoingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? tokens = null, - Object? to = null, - }) { - return _then(_JettonOutgoingTransfer( - tokens: null == tokens - ? _self.tokens - : tokens // ignore: cast_nullable_to_non_nullable - as BigInt, - to: null == to - ? _self.to - : to // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of JettonOutgoingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get to { - return $AddressCopyWith<$Res>(_self.to, (value) { - return _then(_self.copyWith(to: value)); - }); - } +/// Create a copy of JettonOutgoingTransfer +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? tokens = null,Object? to = null,}) { + return _then(_JettonOutgoingTransfer( +tokens: null == tokens ? _self.tokens : tokens // ignore: cast_nullable_to_non_nullable +as BigInt,to: null == to ? _self.to : to // ignore: cast_nullable_to_non_nullable +as Address, + )); +} + +/// Create a copy of JettonOutgoingTransfer +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get to { + + return $AddressCopyWith<$Res>(_self.to, (value) { + return _then(_self.copyWith(to: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_outgoing_transfer.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_outgoing_transfer.g.dart index a56edaa1..fca7b374 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_outgoing_transfer.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_outgoing_transfer.g.dart @@ -7,15 +7,15 @@ part of 'jetton_outgoing_transfer.dart'; // ************************************************************************** _JettonOutgoingTransfer _$JettonOutgoingTransferFromJson( - Map json) => - _JettonOutgoingTransfer( - tokens: BigInt.parse(json['tokens'] as String), - to: Address.fromJson(json['to'] as String), - ); + Map json, +) => _JettonOutgoingTransfer( + tokens: BigInt.parse(json['tokens'] as String), + to: Address.fromJson(json['to'] as String), +); Map _$JettonOutgoingTransferToJson( - _JettonOutgoingTransfer instance) => - { - 'tokens': instance.tokens.toString(), - 'to': instance.to.toJson(), - }; + _JettonOutgoingTransfer instance, +) => { + 'tokens': instance.tokens.toString(), + 'to': instance.to.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_root_data.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_root_data.freezed.dart index 6541295f..182b5ef7 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_root_data.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_root_data.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,55 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$JettonRootData { - bool get mintable; - Address get adminAddress; - JettonMetaData get content; - - /// Create a copy of JettonRootData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $JettonRootDataCopyWith get copyWith => - _$JettonRootDataCopyWithImpl( - this as JettonRootData, _$identity); + + bool get mintable; Address get adminAddress; JettonMetaData get content; +/// Create a copy of JettonRootData +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$JettonRootDataCopyWith get copyWith => _$JettonRootDataCopyWithImpl(this as JettonRootData, _$identity); /// Serializes this JettonRootData to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is JettonRootData && - (identical(other.mintable, mintable) || - other.mintable == mintable) && - (identical(other.adminAddress, adminAddress) || - other.adminAddress == adminAddress) && - (identical(other.content, content) || other.content == content)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, mintable, adminAddress, content); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is JettonRootData&&(identical(other.mintable, mintable) || other.mintable == mintable)&&(identical(other.adminAddress, adminAddress) || other.adminAddress == adminAddress)&&(identical(other.content, content) || other.content == content)); +} - @override - String toString() { - return 'JettonRootData(mintable: $mintable, adminAddress: $adminAddress, content: $content)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,mintable,adminAddress,content); + +@override +String toString() { + return 'JettonRootData(mintable: $mintable, adminAddress: $adminAddress, content: $content)'; } -/// @nodoc -abstract mixin class $JettonRootDataCopyWith<$Res> { - factory $JettonRootDataCopyWith( - JettonRootData value, $Res Function(JettonRootData) _then) = - _$JettonRootDataCopyWithImpl; - @useResult - $Res call({bool mintable, Address adminAddress, JettonMetaData content}); - $AddressCopyWith<$Res> get adminAddress; - $JettonMetaDataCopyWith<$Res> get content; } +/// @nodoc +abstract mixin class $JettonRootDataCopyWith<$Res> { + factory $JettonRootDataCopyWith(JettonRootData value, $Res Function(JettonRootData) _then) = _$JettonRootDataCopyWithImpl; +@useResult +$Res call({ + bool mintable, Address adminAddress, JettonMetaData content +}); + + +$AddressCopyWith<$Res> get adminAddress;$JettonMetaDataCopyWith<$Res> get content; + +} /// @nodoc class _$JettonRootDataCopyWithImpl<$Res> implements $JettonRootDataCopyWith<$Res> { @@ -72,122 +63,213 @@ class _$JettonRootDataCopyWithImpl<$Res> final JettonRootData _self; final $Res Function(JettonRootData) _then; - /// Create a copy of JettonRootData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? mintable = null, - Object? adminAddress = null, - Object? content = null, - }) { - return _then(_self.copyWith( - mintable: null == mintable - ? _self.mintable - : mintable // ignore: cast_nullable_to_non_nullable - as bool, - adminAddress: null == adminAddress - ? _self.adminAddress - : adminAddress // ignore: cast_nullable_to_non_nullable - as Address, - content: null == content - ? _self.content - : content // ignore: cast_nullable_to_non_nullable - as JettonMetaData, - )); - } - - /// Create a copy of JettonRootData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get adminAddress { - return $AddressCopyWith<$Res>(_self.adminAddress, (value) { - return _then(_self.copyWith(adminAddress: value)); - }); - } - - /// Create a copy of JettonRootData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $JettonMetaDataCopyWith<$Res> get content { - return $JettonMetaDataCopyWith<$Res>(_self.content, (value) { - return _then(_self.copyWith(content: value)); - }); - } +/// Create a copy of JettonRootData +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? mintable = null,Object? adminAddress = null,Object? content = null,}) { + return _then(_self.copyWith( +mintable: null == mintable ? _self.mintable : mintable // ignore: cast_nullable_to_non_nullable +as bool,adminAddress: null == adminAddress ? _self.adminAddress : adminAddress // ignore: cast_nullable_to_non_nullable +as Address,content: null == content ? _self.content : content // ignore: cast_nullable_to_non_nullable +as JettonMetaData, + )); +} +/// Create a copy of JettonRootData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get adminAddress { + + return $AddressCopyWith<$Res>(_self.adminAddress, (value) { + return _then(_self.copyWith(adminAddress: value)); + }); +}/// Create a copy of JettonRootData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$JettonMetaDataCopyWith<$Res> get content { + + return $JettonMetaDataCopyWith<$Res>(_self.content, (value) { + return _then(_self.copyWith(content: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [JettonRootData]. +extension JettonRootDataPatterns on JettonRootData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _JettonRootData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _JettonRootData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _JettonRootData value) $default,){ +final _that = this; +switch (_that) { +case _JettonRootData(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _JettonRootData value)? $default,){ +final _that = this; +switch (_that) { +case _JettonRootData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool mintable, Address adminAddress, JettonMetaData content)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _JettonRootData() when $default != null: +return $default(_that.mintable,_that.adminAddress,_that.content);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool mintable, Address adminAddress, JettonMetaData content) $default,) {final _that = this; +switch (_that) { +case _JettonRootData(): +return $default(_that.mintable,_that.adminAddress,_that.content);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool mintable, Address adminAddress, JettonMetaData content)? $default,) {final _that = this; +switch (_that) { +case _JettonRootData() when $default != null: +return $default(_that.mintable,_that.adminAddress,_that.content);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _JettonRootData implements JettonRootData { - const _JettonRootData( - {required this.mintable, - required this.adminAddress, - required this.content}); - factory _JettonRootData.fromJson(Map json) => - _$JettonRootDataFromJson(json); - - @override - final bool mintable; - @override - final Address adminAddress; - @override - final JettonMetaData content; - - /// Create a copy of JettonRootData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$JettonRootDataCopyWith<_JettonRootData> get copyWith => - __$JettonRootDataCopyWithImpl<_JettonRootData>(this, _$identity); - - @override - Map toJson() { - return _$JettonRootDataToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _JettonRootData && - (identical(other.mintable, mintable) || - other.mintable == mintable) && - (identical(other.adminAddress, adminAddress) || - other.adminAddress == adminAddress) && - (identical(other.content, content) || other.content == content)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, mintable, adminAddress, content); - - @override - String toString() { - return 'JettonRootData(mintable: $mintable, adminAddress: $adminAddress, content: $content)'; - } + const _JettonRootData({required this.mintable, required this.adminAddress, required this.content}); + factory _JettonRootData.fromJson(Map json) => _$JettonRootDataFromJson(json); + +@override final bool mintable; +@override final Address adminAddress; +@override final JettonMetaData content; + +/// Create a copy of JettonRootData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$JettonRootDataCopyWith<_JettonRootData> get copyWith => __$JettonRootDataCopyWithImpl<_JettonRootData>(this, _$identity); + +@override +Map toJson() { + return _$JettonRootDataToJson(this, ); } -/// @nodoc -abstract mixin class _$JettonRootDataCopyWith<$Res> - implements $JettonRootDataCopyWith<$Res> { - factory _$JettonRootDataCopyWith( - _JettonRootData value, $Res Function(_JettonRootData) _then) = - __$JettonRootDataCopyWithImpl; - @override - @useResult - $Res call({bool mintable, Address adminAddress, JettonMetaData content}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _JettonRootData&&(identical(other.mintable, mintable) || other.mintable == mintable)&&(identical(other.adminAddress, adminAddress) || other.adminAddress == adminAddress)&&(identical(other.content, content) || other.content == content)); +} - @override - $AddressCopyWith<$Res> get adminAddress; - @override - $JettonMetaDataCopyWith<$Res> get content; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,mintable,adminAddress,content); + +@override +String toString() { + return 'JettonRootData(mintable: $mintable, adminAddress: $adminAddress, content: $content)'; } + +} + +/// @nodoc +abstract mixin class _$JettonRootDataCopyWith<$Res> implements $JettonRootDataCopyWith<$Res> { + factory _$JettonRootDataCopyWith(_JettonRootData value, $Res Function(_JettonRootData) _then) = __$JettonRootDataCopyWithImpl; +@override @useResult +$Res call({ + bool mintable, Address adminAddress, JettonMetaData content +}); + + +@override $AddressCopyWith<$Res> get adminAddress;@override $JettonMetaDataCopyWith<$Res> get content; + +} /// @nodoc class __$JettonRootDataCopyWithImpl<$Res> implements _$JettonRootDataCopyWith<$Res> { @@ -196,50 +278,36 @@ class __$JettonRootDataCopyWithImpl<$Res> final _JettonRootData _self; final $Res Function(_JettonRootData) _then; - /// Create a copy of JettonRootData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? mintable = null, - Object? adminAddress = null, - Object? content = null, - }) { - return _then(_JettonRootData( - mintable: null == mintable - ? _self.mintable - : mintable // ignore: cast_nullable_to_non_nullable - as bool, - adminAddress: null == adminAddress - ? _self.adminAddress - : adminAddress // ignore: cast_nullable_to_non_nullable - as Address, - content: null == content - ? _self.content - : content // ignore: cast_nullable_to_non_nullable - as JettonMetaData, - )); - } - - /// Create a copy of JettonRootData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get adminAddress { - return $AddressCopyWith<$Res>(_self.adminAddress, (value) { - return _then(_self.copyWith(adminAddress: value)); - }); - } - - /// Create a copy of JettonRootData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $JettonMetaDataCopyWith<$Res> get content { - return $JettonMetaDataCopyWith<$Res>(_self.content, (value) { - return _then(_self.copyWith(content: value)); - }); - } +/// Create a copy of JettonRootData +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? mintable = null,Object? adminAddress = null,Object? content = null,}) { + return _then(_JettonRootData( +mintable: null == mintable ? _self.mintable : mintable // ignore: cast_nullable_to_non_nullable +as bool,adminAddress: null == adminAddress ? _self.adminAddress : adminAddress // ignore: cast_nullable_to_non_nullable +as Address,content: null == content ? _self.content : content // ignore: cast_nullable_to_non_nullable +as JettonMetaData, + )); +} + +/// Create a copy of JettonRootData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get adminAddress { + + return $AddressCopyWith<$Res>(_self.adminAddress, (value) { + return _then(_self.copyWith(adminAddress: value)); + }); +}/// Create a copy of JettonRootData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$JettonMetaDataCopyWith<$Res> get content { + + return $JettonMetaDataCopyWith<$Res>(_self.content, (value) { + return _then(_self.copyWith(content: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_wallet_data.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_wallet_data.freezed.dart index 65133cd1..099f63ec 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_wallet_data.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/jetton_wallet/models/jetton_wallet_data.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,56 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$JettonWalletData { - Address get rootAddress; - Address get ownerAddress; - BigInt get balance; - - /// Create a copy of JettonWalletData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $JettonWalletDataCopyWith get copyWith => - _$JettonWalletDataCopyWithImpl( - this as JettonWalletData, _$identity); + + Address get rootAddress; Address get ownerAddress; BigInt get balance; +/// Create a copy of JettonWalletData +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$JettonWalletDataCopyWith get copyWith => _$JettonWalletDataCopyWithImpl(this as JettonWalletData, _$identity); /// Serializes this JettonWalletData to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is JettonWalletData && - (identical(other.rootAddress, rootAddress) || - other.rootAddress == rootAddress) && - (identical(other.ownerAddress, ownerAddress) || - other.ownerAddress == ownerAddress) && - (identical(other.balance, balance) || other.balance == balance)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, rootAddress, ownerAddress, balance); - - @override - String toString() { - return 'JettonWalletData(rootAddress: $rootAddress, ownerAddress: $ownerAddress, balance: $balance)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is JettonWalletData&&(identical(other.rootAddress, rootAddress) || other.rootAddress == rootAddress)&&(identical(other.ownerAddress, ownerAddress) || other.ownerAddress == ownerAddress)&&(identical(other.balance, balance) || other.balance == balance)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,rootAddress,ownerAddress,balance); + +@override +String toString() { + return 'JettonWalletData(rootAddress: $rootAddress, ownerAddress: $ownerAddress, balance: $balance)'; } -/// @nodoc -abstract mixin class $JettonWalletDataCopyWith<$Res> { - factory $JettonWalletDataCopyWith( - JettonWalletData value, $Res Function(JettonWalletData) _then) = - _$JettonWalletDataCopyWithImpl; - @useResult - $Res call({Address rootAddress, Address ownerAddress, BigInt balance}); - $AddressCopyWith<$Res> get rootAddress; - $AddressCopyWith<$Res> get ownerAddress; } +/// @nodoc +abstract mixin class $JettonWalletDataCopyWith<$Res> { + factory $JettonWalletDataCopyWith(JettonWalletData value, $Res Function(JettonWalletData) _then) = _$JettonWalletDataCopyWithImpl; +@useResult +$Res call({ + Address rootAddress, Address ownerAddress, BigInt balance +}); + + +$AddressCopyWith<$Res> get rootAddress;$AddressCopyWith<$Res> get ownerAddress; + +} /// @nodoc class _$JettonWalletDataCopyWithImpl<$Res> implements $JettonWalletDataCopyWith<$Res> { @@ -73,123 +63,213 @@ class _$JettonWalletDataCopyWithImpl<$Res> final JettonWalletData _self; final $Res Function(JettonWalletData) _then; - /// Create a copy of JettonWalletData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? rootAddress = null, - Object? ownerAddress = null, - Object? balance = null, - }) { - return _then(_self.copyWith( - rootAddress: null == rootAddress - ? _self.rootAddress - : rootAddress // ignore: cast_nullable_to_non_nullable - as Address, - ownerAddress: null == ownerAddress - ? _self.ownerAddress - : ownerAddress // ignore: cast_nullable_to_non_nullable - as Address, - balance: null == balance - ? _self.balance - : balance // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } - - /// Create a copy of JettonWalletData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get rootAddress { - return $AddressCopyWith<$Res>(_self.rootAddress, (value) { - return _then(_self.copyWith(rootAddress: value)); - }); - } - - /// Create a copy of JettonWalletData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get ownerAddress { - return $AddressCopyWith<$Res>(_self.ownerAddress, (value) { - return _then(_self.copyWith(ownerAddress: value)); - }); - } +/// Create a copy of JettonWalletData +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? rootAddress = null,Object? ownerAddress = null,Object? balance = null,}) { + return _then(_self.copyWith( +rootAddress: null == rootAddress ? _self.rootAddress : rootAddress // ignore: cast_nullable_to_non_nullable +as Address,ownerAddress: null == ownerAddress ? _self.ownerAddress : ownerAddress // ignore: cast_nullable_to_non_nullable +as Address,balance: null == balance ? _self.balance : balance // ignore: cast_nullable_to_non_nullable +as BigInt, + )); +} +/// Create a copy of JettonWalletData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get rootAddress { + + return $AddressCopyWith<$Res>(_self.rootAddress, (value) { + return _then(_self.copyWith(rootAddress: value)); + }); +}/// Create a copy of JettonWalletData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get ownerAddress { + + return $AddressCopyWith<$Res>(_self.ownerAddress, (value) { + return _then(_self.copyWith(ownerAddress: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [JettonWalletData]. +extension JettonWalletDataPatterns on JettonWalletData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _JettonWalletData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _JettonWalletData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _JettonWalletData value) $default,){ +final _that = this; +switch (_that) { +case _JettonWalletData(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _JettonWalletData value)? $default,){ +final _that = this; +switch (_that) { +case _JettonWalletData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Address rootAddress, Address ownerAddress, BigInt balance)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _JettonWalletData() when $default != null: +return $default(_that.rootAddress,_that.ownerAddress,_that.balance);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Address rootAddress, Address ownerAddress, BigInt balance) $default,) {final _that = this; +switch (_that) { +case _JettonWalletData(): +return $default(_that.rootAddress,_that.ownerAddress,_that.balance);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Address rootAddress, Address ownerAddress, BigInt balance)? $default,) {final _that = this; +switch (_that) { +case _JettonWalletData() when $default != null: +return $default(_that.rootAddress,_that.ownerAddress,_that.balance);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _JettonWalletData implements JettonWalletData { - const _JettonWalletData( - {required this.rootAddress, - required this.ownerAddress, - required this.balance}); - factory _JettonWalletData.fromJson(Map json) => - _$JettonWalletDataFromJson(json); - - @override - final Address rootAddress; - @override - final Address ownerAddress; - @override - final BigInt balance; - - /// Create a copy of JettonWalletData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$JettonWalletDataCopyWith<_JettonWalletData> get copyWith => - __$JettonWalletDataCopyWithImpl<_JettonWalletData>(this, _$identity); - - @override - Map toJson() { - return _$JettonWalletDataToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _JettonWalletData && - (identical(other.rootAddress, rootAddress) || - other.rootAddress == rootAddress) && - (identical(other.ownerAddress, ownerAddress) || - other.ownerAddress == ownerAddress) && - (identical(other.balance, balance) || other.balance == balance)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, rootAddress, ownerAddress, balance); - - @override - String toString() { - return 'JettonWalletData(rootAddress: $rootAddress, ownerAddress: $ownerAddress, balance: $balance)'; - } + const _JettonWalletData({required this.rootAddress, required this.ownerAddress, required this.balance}); + factory _JettonWalletData.fromJson(Map json) => _$JettonWalletDataFromJson(json); + +@override final Address rootAddress; +@override final Address ownerAddress; +@override final BigInt balance; + +/// Create a copy of JettonWalletData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$JettonWalletDataCopyWith<_JettonWalletData> get copyWith => __$JettonWalletDataCopyWithImpl<_JettonWalletData>(this, _$identity); + +@override +Map toJson() { + return _$JettonWalletDataToJson(this, ); } -/// @nodoc -abstract mixin class _$JettonWalletDataCopyWith<$Res> - implements $JettonWalletDataCopyWith<$Res> { - factory _$JettonWalletDataCopyWith( - _JettonWalletData value, $Res Function(_JettonWalletData) _then) = - __$JettonWalletDataCopyWithImpl; - @override - @useResult - $Res call({Address rootAddress, Address ownerAddress, BigInt balance}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _JettonWalletData&&(identical(other.rootAddress, rootAddress) || other.rootAddress == rootAddress)&&(identical(other.ownerAddress, ownerAddress) || other.ownerAddress == ownerAddress)&&(identical(other.balance, balance) || other.balance == balance)); +} - @override - $AddressCopyWith<$Res> get rootAddress; - @override - $AddressCopyWith<$Res> get ownerAddress; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,rootAddress,ownerAddress,balance); + +@override +String toString() { + return 'JettonWalletData(rootAddress: $rootAddress, ownerAddress: $ownerAddress, balance: $balance)'; } + +} + +/// @nodoc +abstract mixin class _$JettonWalletDataCopyWith<$Res> implements $JettonWalletDataCopyWith<$Res> { + factory _$JettonWalletDataCopyWith(_JettonWalletData value, $Res Function(_JettonWalletData) _then) = __$JettonWalletDataCopyWithImpl; +@override @useResult +$Res call({ + Address rootAddress, Address ownerAddress, BigInt balance +}); + + +@override $AddressCopyWith<$Res> get rootAddress;@override $AddressCopyWith<$Res> get ownerAddress; + +} /// @nodoc class __$JettonWalletDataCopyWithImpl<$Res> implements _$JettonWalletDataCopyWith<$Res> { @@ -198,50 +278,36 @@ class __$JettonWalletDataCopyWithImpl<$Res> final _JettonWalletData _self; final $Res Function(_JettonWalletData) _then; - /// Create a copy of JettonWalletData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? rootAddress = null, - Object? ownerAddress = null, - Object? balance = null, - }) { - return _then(_JettonWalletData( - rootAddress: null == rootAddress - ? _self.rootAddress - : rootAddress // ignore: cast_nullable_to_non_nullable - as Address, - ownerAddress: null == ownerAddress - ? _self.ownerAddress - : ownerAddress // ignore: cast_nullable_to_non_nullable - as Address, - balance: null == balance - ? _self.balance - : balance // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } - - /// Create a copy of JettonWalletData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get rootAddress { - return $AddressCopyWith<$Res>(_self.rootAddress, (value) { - return _then(_self.copyWith(rootAddress: value)); - }); - } - - /// Create a copy of JettonWalletData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get ownerAddress { - return $AddressCopyWith<$Res>(_self.ownerAddress, (value) { - return _then(_self.copyWith(ownerAddress: value)); - }); - } +/// Create a copy of JettonWalletData +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? rootAddress = null,Object? ownerAddress = null,Object? balance = null,}) { + return _then(_JettonWalletData( +rootAddress: null == rootAddress ? _self.rootAddress : rootAddress // ignore: cast_nullable_to_non_nullable +as Address,ownerAddress: null == ownerAddress ? _self.ownerAddress : ownerAddress // ignore: cast_nullable_to_non_nullable +as Address,balance: null == balance ? _self.balance : balance // ignore: cast_nullable_to_non_nullable +as BigInt, + )); +} + +/// Create a copy of JettonWalletData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get rootAddress { + + return $AddressCopyWith<$Res>(_self.rootAddress, (value) { + return _then(_self.copyWith(rootAddress: value)); + }); +}/// Create a copy of JettonWalletData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get ownerAddress { + + return $AddressCopyWith<$Res>(_self.ownerAddress, (value) { + return _then(_self.copyWith(ownerAddress: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/keystore/models/key_signer_type.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/keystore/models/key_signer_type.dart index 38fbd57f..7752ad7a 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/keystore/models/key_signer_type.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/keystore/models/key_signer_type.dart @@ -1,6 +1,2 @@ /// KeySigner generated class workaround. -enum KeySignerType { - encrypted, - derived, - ledger, -} +enum KeySignerType { encrypted, derived, ledger } diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/keystore/models/key_store_entry.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/keystore/models/key_store_entry.dart index e8f2ef5e..5a58a493 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/keystore/models/key_store_entry.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/keystore/models/key_store_entry.dart @@ -31,13 +31,13 @@ sealed class KeyStoreEntry bool get isMaster => publicKey == masterKey; KeySignerType get signerType => switch (signerName) { - 'EncryptedKeySigner' => KeySignerType.encrypted, - 'DerivedKeySigner' => KeySignerType.derived, - 'LedgerKeySigner' => KeySignerType.ledger, - _ => throw StateError( - 'Invalid KeySigner. "KeySigner.stub" should not be used', - ), - }; + 'EncryptedKeySigner' => KeySignerType.encrypted, + 'DerivedKeySigner' => KeySignerType.derived, + 'LedgerKeySigner' => KeySignerType.ledger, + _ => throw StateError( + 'Invalid KeySigner. "KeySigner.stub" should not be used', + ), + }; @override int compareTo(KeyStoreEntry other) => publicKey.compareTo(other.publicKey); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/keystore/models/key_store_entry.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/keystore/models/key_store_entry.freezed.dart index 756279ae..7d669ea4 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/keystore/models/key_store_entry.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/keystore/models/key_store_entry.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,67 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$KeyStoreEntry { - String get signerName; - String get name; - PublicKey get publicKey; - PublicKey get masterKey; - int get accountId; - - /// Create a copy of KeyStoreEntry - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $KeyStoreEntryCopyWith get copyWith => - _$KeyStoreEntryCopyWithImpl( - this as KeyStoreEntry, _$identity); + + String get signerName; String get name; PublicKey get publicKey; PublicKey get masterKey; int get accountId; +/// Create a copy of KeyStoreEntry +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$KeyStoreEntryCopyWith get copyWith => _$KeyStoreEntryCopyWithImpl(this as KeyStoreEntry, _$identity); /// Serializes this KeyStoreEntry to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is KeyStoreEntry && - (identical(other.signerName, signerName) || - other.signerName == signerName) && - (identical(other.name, name) || other.name == name) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.accountId, accountId) || - other.accountId == accountId)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, signerName, name, publicKey, masterKey, accountId); - - @override - String toString() { - return 'KeyStoreEntry(signerName: $signerName, name: $name, publicKey: $publicKey, masterKey: $masterKey, accountId: $accountId)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is KeyStoreEntry&&(identical(other.signerName, signerName) || other.signerName == signerName)&&(identical(other.name, name) || other.name == name)&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.accountId, accountId) || other.accountId == accountId)); } -/// @nodoc -abstract mixin class $KeyStoreEntryCopyWith<$Res> { - factory $KeyStoreEntryCopyWith( - KeyStoreEntry value, $Res Function(KeyStoreEntry) _then) = - _$KeyStoreEntryCopyWithImpl; - @useResult - $Res call( - {String signerName, - String name, - PublicKey publicKey, - PublicKey masterKey, - int accountId}); - - $PublicKeyCopyWith<$Res> get publicKey; - $PublicKeyCopyWith<$Res> get masterKey; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,signerName,name,publicKey,masterKey,accountId); + +@override +String toString() { + return 'KeyStoreEntry(signerName: $signerName, name: $name, publicKey: $publicKey, masterKey: $masterKey, accountId: $accountId)'; +} + + } +/// @nodoc +abstract mixin class $KeyStoreEntryCopyWith<$Res> { + factory $KeyStoreEntryCopyWith(KeyStoreEntry value, $Res Function(KeyStoreEntry) _then) = _$KeyStoreEntryCopyWithImpl; +@useResult +$Res call({ + String signerName, String name, PublicKey publicKey, PublicKey masterKey, int accountId +}); + + +$PublicKeyCopyWith<$Res> get publicKey;$PublicKeyCopyWith<$Res> get masterKey; + +} /// @nodoc class _$KeyStoreEntryCopyWithImpl<$Res> implements $KeyStoreEntryCopyWith<$Res> { @@ -84,150 +63,217 @@ class _$KeyStoreEntryCopyWithImpl<$Res> final KeyStoreEntry _self; final $Res Function(KeyStoreEntry) _then; - /// Create a copy of KeyStoreEntry - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? signerName = null, - Object? name = null, - Object? publicKey = null, - Object? masterKey = null, - Object? accountId = null, - }) { - return _then(_self.copyWith( - signerName: null == signerName - ? _self.signerName - : signerName // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - accountId: null == accountId - ? _self.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - )); - } - - /// Create a copy of KeyStoreEntry - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } - - /// Create a copy of KeyStoreEntry - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } +/// Create a copy of KeyStoreEntry +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? signerName = null,Object? name = null,Object? publicKey = null,Object? masterKey = null,Object? accountId = null,}) { + return _then(_self.copyWith( +signerName: null == signerName ? _self.signerName : signerName // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable +as int, + )); +} +/// Create a copy of KeyStoreEntry +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of KeyStoreEntry +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [KeyStoreEntry]. +extension KeyStoreEntryPatterns on KeyStoreEntry { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _KeyStoreEntry value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _KeyStoreEntry() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _KeyStoreEntry value) $default,){ +final _that = this; +switch (_that) { +case _KeyStoreEntry(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _KeyStoreEntry value)? $default,){ +final _that = this; +switch (_that) { +case _KeyStoreEntry() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String signerName, String name, PublicKey publicKey, PublicKey masterKey, int accountId)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _KeyStoreEntry() when $default != null: +return $default(_that.signerName,_that.name,_that.publicKey,_that.masterKey,_that.accountId);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String signerName, String name, PublicKey publicKey, PublicKey masterKey, int accountId) $default,) {final _that = this; +switch (_that) { +case _KeyStoreEntry(): +return $default(_that.signerName,_that.name,_that.publicKey,_that.masterKey,_that.accountId);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String signerName, String name, PublicKey publicKey, PublicKey masterKey, int accountId)? $default,) {final _that = this; +switch (_that) { +case _KeyStoreEntry() when $default != null: +return $default(_that.signerName,_that.name,_that.publicKey,_that.masterKey,_that.accountId);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _KeyStoreEntry extends KeyStoreEntry { - const _KeyStoreEntry( - {required this.signerName, - required this.name, - required this.publicKey, - required this.masterKey, - required this.accountId}) - : super._(); - factory _KeyStoreEntry.fromJson(Map json) => - _$KeyStoreEntryFromJson(json); - - @override - final String signerName; - @override - final String name; - @override - final PublicKey publicKey; - @override - final PublicKey masterKey; - @override - final int accountId; - - /// Create a copy of KeyStoreEntry - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$KeyStoreEntryCopyWith<_KeyStoreEntry> get copyWith => - __$KeyStoreEntryCopyWithImpl<_KeyStoreEntry>(this, _$identity); - - @override - Map toJson() { - return _$KeyStoreEntryToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _KeyStoreEntry && - (identical(other.signerName, signerName) || - other.signerName == signerName) && - (identical(other.name, name) || other.name == name) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.accountId, accountId) || - other.accountId == accountId)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, signerName, name, publicKey, masterKey, accountId); - - @override - String toString() { - return 'KeyStoreEntry(signerName: $signerName, name: $name, publicKey: $publicKey, masterKey: $masterKey, accountId: $accountId)'; - } + const _KeyStoreEntry({required this.signerName, required this.name, required this.publicKey, required this.masterKey, required this.accountId}): super._(); + factory _KeyStoreEntry.fromJson(Map json) => _$KeyStoreEntryFromJson(json); + +@override final String signerName; +@override final String name; +@override final PublicKey publicKey; +@override final PublicKey masterKey; +@override final int accountId; + +/// Create a copy of KeyStoreEntry +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$KeyStoreEntryCopyWith<_KeyStoreEntry> get copyWith => __$KeyStoreEntryCopyWithImpl<_KeyStoreEntry>(this, _$identity); + +@override +Map toJson() { + return _$KeyStoreEntryToJson(this, ); } -/// @nodoc -abstract mixin class _$KeyStoreEntryCopyWith<$Res> - implements $KeyStoreEntryCopyWith<$Res> { - factory _$KeyStoreEntryCopyWith( - _KeyStoreEntry value, $Res Function(_KeyStoreEntry) _then) = - __$KeyStoreEntryCopyWithImpl; - @override - @useResult - $Res call( - {String signerName, - String name, - PublicKey publicKey, - PublicKey masterKey, - int accountId}); - - @override - $PublicKeyCopyWith<$Res> get publicKey; - @override - $PublicKeyCopyWith<$Res> get masterKey; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _KeyStoreEntry&&(identical(other.signerName, signerName) || other.signerName == signerName)&&(identical(other.name, name) || other.name == name)&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.accountId, accountId) || other.accountId == accountId)); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,signerName,name,publicKey,masterKey,accountId); + +@override +String toString() { + return 'KeyStoreEntry(signerName: $signerName, name: $name, publicKey: $publicKey, masterKey: $masterKey, accountId: $accountId)'; +} + + +} + +/// @nodoc +abstract mixin class _$KeyStoreEntryCopyWith<$Res> implements $KeyStoreEntryCopyWith<$Res> { + factory _$KeyStoreEntryCopyWith(_KeyStoreEntry value, $Res Function(_KeyStoreEntry) _then) = __$KeyStoreEntryCopyWithImpl; +@override @useResult +$Res call({ + String signerName, String name, PublicKey publicKey, PublicKey masterKey, int accountId +}); + + +@override $PublicKeyCopyWith<$Res> get publicKey;@override $PublicKeyCopyWith<$Res> get masterKey; + +} /// @nodoc class __$KeyStoreEntryCopyWithImpl<$Res> implements _$KeyStoreEntryCopyWith<$Res> { @@ -236,60 +282,38 @@ class __$KeyStoreEntryCopyWithImpl<$Res> final _KeyStoreEntry _self; final $Res Function(_KeyStoreEntry) _then; - /// Create a copy of KeyStoreEntry - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? signerName = null, - Object? name = null, - Object? publicKey = null, - Object? masterKey = null, - Object? accountId = null, - }) { - return _then(_KeyStoreEntry( - signerName: null == signerName - ? _self.signerName - : signerName // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - accountId: null == accountId - ? _self.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - )); - } - - /// Create a copy of KeyStoreEntry - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } - - /// Create a copy of KeyStoreEntry - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } +/// Create a copy of KeyStoreEntry +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? signerName = null,Object? name = null,Object? publicKey = null,Object? masterKey = null,Object? accountId = null,}) { + return _then(_KeyStoreEntry( +signerName: null == signerName ? _self.signerName : signerName // ignore: cast_nullable_to_non_nullable +as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +/// Create a copy of KeyStoreEntry +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of KeyStoreEntry +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/account_status.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/account_status.dart index 633f6e5d..f6db37e5 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/account_status.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/account_status.dart @@ -1,9 +1,4 @@ import 'package:json_annotation/json_annotation.dart'; @JsonEnum() -enum AccountStatus { - uninit, - frozen, - active, - nonexist, -} +enum AccountStatus { uninit, frozen, active, nonexist } diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/accounts_list.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/accounts_list.freezed.dart index 27348ec8..794f3f34 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/accounts_list.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/accounts_list.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,152 +14,248 @@ T _$identity(T value) => value; /// @nodoc mixin _$AccountsList { - List get accounts; - @JsonKey(includeIfNull: false) - String? get continuation; - - /// Create a copy of AccountsList - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $AccountsListCopyWith get copyWith => - _$AccountsListCopyWithImpl( - this as AccountsList, _$identity); + + List get accounts;@JsonKey(includeIfNull: false) String? get continuation; +/// Create a copy of AccountsList +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$AccountsListCopyWith get copyWith => _$AccountsListCopyWithImpl(this as AccountsList, _$identity); /// Serializes this AccountsList to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is AccountsList && - const DeepCollectionEquality().equals(other.accounts, accounts) && - (identical(other.continuation, continuation) || - other.continuation == continuation)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(accounts), continuation); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is AccountsList&&const DeepCollectionEquality().equals(other.accounts, accounts)&&(identical(other.continuation, continuation) || other.continuation == continuation)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(accounts),continuation); - @override - String toString() { - return 'AccountsList(accounts: $accounts, continuation: $continuation)'; - } +@override +String toString() { + return 'AccountsList(accounts: $accounts, continuation: $continuation)'; } -/// @nodoc -abstract mixin class $AccountsListCopyWith<$Res> { - factory $AccountsListCopyWith( - AccountsList value, $Res Function(AccountsList) _then) = - _$AccountsListCopyWithImpl; - @useResult - $Res call( - {List accounts, - @JsonKey(includeIfNull: false) String? continuation}); + } /// @nodoc -class _$AccountsListCopyWithImpl<$Res> implements $AccountsListCopyWith<$Res> { +abstract mixin class $AccountsListCopyWith<$Res> { + factory $AccountsListCopyWith(AccountsList value, $Res Function(AccountsList) _then) = _$AccountsListCopyWithImpl; +@useResult +$Res call({ + List accounts,@JsonKey(includeIfNull: false) String? continuation +}); + + + + +} +/// @nodoc +class _$AccountsListCopyWithImpl<$Res> + implements $AccountsListCopyWith<$Res> { _$AccountsListCopyWithImpl(this._self, this._then); final AccountsList _self; final $Res Function(AccountsList) _then; - /// Create a copy of AccountsList - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? accounts = null, - Object? continuation = freezed, - }) { - return _then(_self.copyWith( - accounts: null == accounts - ? _self.accounts - : accounts // ignore: cast_nullable_to_non_nullable - as List, - continuation: freezed == continuation - ? _self.continuation - : continuation // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of AccountsList +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? accounts = null,Object? continuation = freezed,}) { + return _then(_self.copyWith( +accounts: null == accounts ? _self.accounts : accounts // ignore: cast_nullable_to_non_nullable +as List,continuation: freezed == continuation ? _self.continuation : continuation // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [AccountsList]. +extension AccountsListPatterns on AccountsList { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _AccountsList value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _AccountsList() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _AccountsList value) $default,){ +final _that = this; +switch (_that) { +case _AccountsList(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _AccountsList value)? $default,){ +final _that = this; +switch (_that) { +case _AccountsList() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List accounts, @JsonKey(includeIfNull: false) String? continuation)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _AccountsList() when $default != null: +return $default(_that.accounts,_that.continuation);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List accounts, @JsonKey(includeIfNull: false) String? continuation) $default,) {final _that = this; +switch (_that) { +case _AccountsList(): +return $default(_that.accounts,_that.continuation);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List accounts, @JsonKey(includeIfNull: false) String? continuation)? $default,) {final _that = this; +switch (_that) { +case _AccountsList() when $default != null: +return $default(_that.accounts,_that.continuation);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _AccountsList implements AccountsList { - const _AccountsList( - {required final List accounts, - @JsonKey(includeIfNull: false) this.continuation}) - : _accounts = accounts; - factory _AccountsList.fromJson(Map json) => - _$AccountsListFromJson(json); - - final List _accounts; - @override - List get accounts { - if (_accounts is EqualUnmodifiableListView) return _accounts; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_accounts); - } - - @override - @JsonKey(includeIfNull: false) - final String? continuation; - - /// Create a copy of AccountsList - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$AccountsListCopyWith<_AccountsList> get copyWith => - __$AccountsListCopyWithImpl<_AccountsList>(this, _$identity); - - @override - Map toJson() { - return _$AccountsListToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _AccountsList && - const DeepCollectionEquality().equals(other._accounts, _accounts) && - (identical(other.continuation, continuation) || - other.continuation == continuation)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(_accounts), continuation); - - @override - String toString() { - return 'AccountsList(accounts: $accounts, continuation: $continuation)'; - } + const _AccountsList({required final List accounts, @JsonKey(includeIfNull: false) this.continuation}): _accounts = accounts; + factory _AccountsList.fromJson(Map json) => _$AccountsListFromJson(json); + + final List _accounts; +@override List get accounts { + if (_accounts is EqualUnmodifiableListView) return _accounts; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_accounts); } -/// @nodoc -abstract mixin class _$AccountsListCopyWith<$Res> - implements $AccountsListCopyWith<$Res> { - factory _$AccountsListCopyWith( - _AccountsList value, $Res Function(_AccountsList) _then) = - __$AccountsListCopyWithImpl; - @override - @useResult - $Res call( - {List accounts, - @JsonKey(includeIfNull: false) String? continuation}); +@override@JsonKey(includeIfNull: false) final String? continuation; + +/// Create a copy of AccountsList +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$AccountsListCopyWith<_AccountsList> get copyWith => __$AccountsListCopyWithImpl<_AccountsList>(this, _$identity); + +@override +Map toJson() { + return _$AccountsListToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _AccountsList&&const DeepCollectionEquality().equals(other._accounts, _accounts)&&(identical(other.continuation, continuation) || other.continuation == continuation)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_accounts),continuation); + +@override +String toString() { + return 'AccountsList(accounts: $accounts, continuation: $continuation)'; +} + + } +/// @nodoc +abstract mixin class _$AccountsListCopyWith<$Res> implements $AccountsListCopyWith<$Res> { + factory _$AccountsListCopyWith(_AccountsList value, $Res Function(_AccountsList) _then) = __$AccountsListCopyWithImpl; +@override @useResult +$Res call({ + List accounts,@JsonKey(includeIfNull: false) String? continuation +}); + + + + +} /// @nodoc class __$AccountsListCopyWithImpl<$Res> implements _$AccountsListCopyWith<$Res> { @@ -169,25 +264,17 @@ class __$AccountsListCopyWithImpl<$Res> final _AccountsList _self; final $Res Function(_AccountsList) _then; - /// Create a copy of AccountsList - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? accounts = null, - Object? continuation = freezed, - }) { - return _then(_AccountsList( - accounts: null == accounts - ? _self._accounts - : accounts // ignore: cast_nullable_to_non_nullable - as List, - continuation: freezed == continuation - ? _self.continuation - : continuation // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of AccountsList +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? accounts = null,Object? continuation = freezed,}) { + return _then(_AccountsList( +accounts: null == accounts ? _self._accounts : accounts // ignore: cast_nullable_to_non_nullable +as List,continuation: freezed == continuation ? _self.continuation : continuation // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/accounts_list.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/accounts_list.g.dart index e703a708..7a632089 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/accounts_list.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/accounts_list.g.dart @@ -8,13 +8,14 @@ part of 'accounts_list.dart'; _AccountsList _$AccountsListFromJson(Map json) => _AccountsList( - accounts: - (json['accounts'] as List).map((e) => e as String).toList(), + accounts: (json['accounts'] as List) + .map((e) => e as String) + .toList(), continuation: json['continuation'] as String?, ); Map _$AccountsListToJson(_AccountsList instance) => { 'accounts': instance.accounts, - if (instance.continuation case final value?) 'continuation': value, + 'continuation': ?instance.continuation, }; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/address.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/address.dart index d0c76884..198bf406 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/address.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/address.dart @@ -7,9 +7,7 @@ part 'address.freezed.dart'; sealed class Address with _$Address { const Address._(); - const factory Address({ - required final String address, - }) = _FromString; + const factory Address({required final String address}) = _FromString; factory Address.fromJson(String json) => Address(address: json); @@ -25,11 +23,7 @@ sealed class Address with _$Address { String toBounceable() => !isRaw ? address - : ntPackAddress( - address: address, - bounceable: true, - isUrlSafe: true, - ); + : ntPackAddress(address: address, bounceable: true, isUrlSafe: true); /// Returns address in ellipse form String toEllipseString() => address.length > 6 diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/address.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/address.freezed.dart index 51dcaeb1..34139e47 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/address.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/address.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,99 +11,233 @@ part of 'address.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$Address { - String get address; - /// Create a copy of Address - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $AddressCopyWith
get copyWith => - _$AddressCopyWithImpl
(this as Address, _$identity); + String get address; +/// Create a copy of Address +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$AddressCopyWith
get copyWith => _$AddressCopyWithImpl
(this as Address, _$identity); + + + + + + + } /// @nodoc -abstract mixin class $AddressCopyWith<$Res> { - factory $AddressCopyWith(Address value, $Res Function(Address) _then) = - _$AddressCopyWithImpl; - @useResult - $Res call({String address}); -} +abstract mixin class $AddressCopyWith<$Res> { + factory $AddressCopyWith(Address value, $Res Function(Address) _then) = _$AddressCopyWithImpl; +@useResult +$Res call({ + String address +}); + + + +} /// @nodoc -class _$AddressCopyWithImpl<$Res> implements $AddressCopyWith<$Res> { +class _$AddressCopyWithImpl<$Res> + implements $AddressCopyWith<$Res> { _$AddressCopyWithImpl(this._self, this._then); final Address _self; final $Res Function(Address) _then; - /// Create a copy of Address - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? address = null, - }) { - return _then(_self.copyWith( - address: null == address - ? _self.address - : address // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of Address +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? address = null,}) { + return _then(_self.copyWith( +address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [Address]. +extension AddressPatterns on Address { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _FromString value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _FromString() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _FromString value) $default,){ +final _that = this; +switch (_that) { +case _FromString(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _FromString value)? $default,){ +final _that = this; +switch (_that) { +case _FromString() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String address)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _FromString() when $default != null: +return $default(_that.address);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String address) $default,) {final _that = this; +switch (_that) { +case _FromString(): +return $default(_that.address);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String address)? $default,) {final _that = this; +switch (_that) { +case _FromString() when $default != null: +return $default(_that.address);case _: + return null; + +} +} + } /// @nodoc + class _FromString extends Address { - const _FromString({required this.address}) : super._(); + const _FromString({required this.address}): super._(); + + +@override final String address; + +/// Create a copy of Address +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$FromStringCopyWith<_FromString> get copyWith => __$FromStringCopyWithImpl<_FromString>(this, _$identity); + + + + + - @override - final String address; - /// Create a copy of Address - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$FromStringCopyWith<_FromString> get copyWith => - __$FromStringCopyWithImpl<_FromString>(this, _$identity); } /// @nodoc -abstract mixin class _$FromStringCopyWith<$Res> - implements $AddressCopyWith<$Res> { - factory _$FromStringCopyWith( - _FromString value, $Res Function(_FromString) _then) = - __$FromStringCopyWithImpl; - @override - @useResult - $Res call({String address}); -} +abstract mixin class _$FromStringCopyWith<$Res> implements $AddressCopyWith<$Res> { + factory _$FromStringCopyWith(_FromString value, $Res Function(_FromString) _then) = __$FromStringCopyWithImpl; +@override @useResult +$Res call({ + String address +}); + + + +} /// @nodoc -class __$FromStringCopyWithImpl<$Res> implements _$FromStringCopyWith<$Res> { +class __$FromStringCopyWithImpl<$Res> + implements _$FromStringCopyWith<$Res> { __$FromStringCopyWithImpl(this._self, this._then); final _FromString _self; final $Res Function(_FromString) _then; - /// Create a copy of Address - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? address = null, - }) { - return _then(_FromString( - address: null == address - ? _self.address - : address // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of Address +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? address = null,}) { + return _then(_FromString( +address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/blockchain_config.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/blockchain_config.freezed.dart index fade011e..8d9eb877 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/blockchain_config.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/blockchain_config.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,56 +14,48 @@ T _$identity(T value) => value; /// @nodoc mixin _$BlockchainConfig { - int get capabilities; - int get globalId; - int get globalVersion; // base64-encoded ConfigParams - String get config; - - /// Create a copy of BlockchainConfig - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $BlockchainConfigCopyWith get copyWith => - _$BlockchainConfigCopyWithImpl( - this as BlockchainConfig, _$identity); + + int get capabilities; int get globalId; int get globalVersion;// base64-encoded ConfigParams + String get config; +/// Create a copy of BlockchainConfig +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$BlockchainConfigCopyWith get copyWith => _$BlockchainConfigCopyWithImpl(this as BlockchainConfig, _$identity); /// Serializes this BlockchainConfig to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is BlockchainConfig && - (identical(other.capabilities, capabilities) || - other.capabilities == capabilities) && - (identical(other.globalId, globalId) || - other.globalId == globalId) && - (identical(other.globalVersion, globalVersion) || - other.globalVersion == globalVersion) && - (identical(other.config, config) || other.config == config)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, capabilities, globalId, globalVersion, config); - - @override - String toString() { - return 'BlockchainConfig(capabilities: $capabilities, globalId: $globalId, globalVersion: $globalVersion, config: $config)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is BlockchainConfig&&(identical(other.capabilities, capabilities) || other.capabilities == capabilities)&&(identical(other.globalId, globalId) || other.globalId == globalId)&&(identical(other.globalVersion, globalVersion) || other.globalVersion == globalVersion)&&(identical(other.config, config) || other.config == config)); } -/// @nodoc -abstract mixin class $BlockchainConfigCopyWith<$Res> { - factory $BlockchainConfigCopyWith( - BlockchainConfig value, $Res Function(BlockchainConfig) _then) = - _$BlockchainConfigCopyWithImpl; - @useResult - $Res call({int capabilities, int globalId, int globalVersion, String config}); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,capabilities,globalId,globalVersion,config); + +@override +String toString() { + return 'BlockchainConfig(capabilities: $capabilities, globalId: $globalId, globalVersion: $globalVersion, config: $config)'; +} + + } +/// @nodoc +abstract mixin class $BlockchainConfigCopyWith<$Res> { + factory $BlockchainConfigCopyWith(BlockchainConfig value, $Res Function(BlockchainConfig) _then) = _$BlockchainConfigCopyWithImpl; +@useResult +$Res call({ + int capabilities, int globalId, int globalVersion, String config +}); + + + + +} /// @nodoc class _$BlockchainConfigCopyWithImpl<$Res> implements $BlockchainConfigCopyWith<$Res> { @@ -73,109 +64,198 @@ class _$BlockchainConfigCopyWithImpl<$Res> final BlockchainConfig _self; final $Res Function(BlockchainConfig) _then; - /// Create a copy of BlockchainConfig - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? capabilities = null, - Object? globalId = null, - Object? globalVersion = null, - Object? config = null, - }) { - return _then(_self.copyWith( - capabilities: null == capabilities - ? _self.capabilities - : capabilities // ignore: cast_nullable_to_non_nullable - as int, - globalId: null == globalId - ? _self.globalId - : globalId // ignore: cast_nullable_to_non_nullable - as int, - globalVersion: null == globalVersion - ? _self.globalVersion - : globalVersion // ignore: cast_nullable_to_non_nullable - as int, - config: null == config - ? _self.config - : config // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of BlockchainConfig +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? capabilities = null,Object? globalId = null,Object? globalVersion = null,Object? config = null,}) { + return _then(_self.copyWith( +capabilities: null == capabilities ? _self.capabilities : capabilities // ignore: cast_nullable_to_non_nullable +as int,globalId: null == globalId ? _self.globalId : globalId // ignore: cast_nullable_to_non_nullable +as int,globalVersion: null == globalVersion ? _self.globalVersion : globalVersion // ignore: cast_nullable_to_non_nullable +as int,config: null == config ? _self.config : config // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [BlockchainConfig]. +extension BlockchainConfigPatterns on BlockchainConfig { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _BlockchainConfig value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _BlockchainConfig() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _BlockchainConfig value) $default,){ +final _that = this; +switch (_that) { +case _BlockchainConfig(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _BlockchainConfig value)? $default,){ +final _that = this; +switch (_that) { +case _BlockchainConfig() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int capabilities, int globalId, int globalVersion, String config)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _BlockchainConfig() when $default != null: +return $default(_that.capabilities,_that.globalId,_that.globalVersion,_that.config);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int capabilities, int globalId, int globalVersion, String config) $default,) {final _that = this; +switch (_that) { +case _BlockchainConfig(): +return $default(_that.capabilities,_that.globalId,_that.globalVersion,_that.config);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int capabilities, int globalId, int globalVersion, String config)? $default,) {final _that = this; +switch (_that) { +case _BlockchainConfig() when $default != null: +return $default(_that.capabilities,_that.globalId,_that.globalVersion,_that.config);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _BlockchainConfig implements BlockchainConfig { - const _BlockchainConfig( - {required this.capabilities, - required this.globalId, - required this.globalVersion, - required this.config}); - factory _BlockchainConfig.fromJson(Map json) => - _$BlockchainConfigFromJson(json); - - @override - final int capabilities; - @override - final int globalId; - @override - final int globalVersion; + const _BlockchainConfig({required this.capabilities, required this.globalId, required this.globalVersion, required this.config}); + factory _BlockchainConfig.fromJson(Map json) => _$BlockchainConfigFromJson(json); + +@override final int capabilities; +@override final int globalId; +@override final int globalVersion; // base64-encoded ConfigParams - @override - final String config; - - /// Create a copy of BlockchainConfig - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$BlockchainConfigCopyWith<_BlockchainConfig> get copyWith => - __$BlockchainConfigCopyWithImpl<_BlockchainConfig>(this, _$identity); - - @override - Map toJson() { - return _$BlockchainConfigToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _BlockchainConfig && - (identical(other.capabilities, capabilities) || - other.capabilities == capabilities) && - (identical(other.globalId, globalId) || - other.globalId == globalId) && - (identical(other.globalVersion, globalVersion) || - other.globalVersion == globalVersion) && - (identical(other.config, config) || other.config == config)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, capabilities, globalId, globalVersion, config); - - @override - String toString() { - return 'BlockchainConfig(capabilities: $capabilities, globalId: $globalId, globalVersion: $globalVersion, config: $config)'; - } +@override final String config; + +/// Create a copy of BlockchainConfig +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$BlockchainConfigCopyWith<_BlockchainConfig> get copyWith => __$BlockchainConfigCopyWithImpl<_BlockchainConfig>(this, _$identity); + +@override +Map toJson() { + return _$BlockchainConfigToJson(this, ); } -/// @nodoc -abstract mixin class _$BlockchainConfigCopyWith<$Res> - implements $BlockchainConfigCopyWith<$Res> { - factory _$BlockchainConfigCopyWith( - _BlockchainConfig value, $Res Function(_BlockchainConfig) _then) = - __$BlockchainConfigCopyWithImpl; - @override - @useResult - $Res call({int capabilities, int globalId, int globalVersion, String config}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _BlockchainConfig&&(identical(other.capabilities, capabilities) || other.capabilities == capabilities)&&(identical(other.globalId, globalId) || other.globalId == globalId)&&(identical(other.globalVersion, globalVersion) || other.globalVersion == globalVersion)&&(identical(other.config, config) || other.config == config)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,capabilities,globalId,globalVersion,config); + +@override +String toString() { + return 'BlockchainConfig(capabilities: $capabilities, globalId: $globalId, globalVersion: $globalVersion, config: $config)'; +} + + } +/// @nodoc +abstract mixin class _$BlockchainConfigCopyWith<$Res> implements $BlockchainConfigCopyWith<$Res> { + factory _$BlockchainConfigCopyWith(_BlockchainConfig value, $Res Function(_BlockchainConfig) _then) = __$BlockchainConfigCopyWithImpl; +@override @useResult +$Res call({ + int capabilities, int globalId, int globalVersion, String config +}); + + + + +} /// @nodoc class __$BlockchainConfigCopyWithImpl<$Res> implements _$BlockchainConfigCopyWith<$Res> { @@ -184,35 +264,19 @@ class __$BlockchainConfigCopyWithImpl<$Res> final _BlockchainConfig _self; final $Res Function(_BlockchainConfig) _then; - /// Create a copy of BlockchainConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? capabilities = null, - Object? globalId = null, - Object? globalVersion = null, - Object? config = null, - }) { - return _then(_BlockchainConfig( - capabilities: null == capabilities - ? _self.capabilities - : capabilities // ignore: cast_nullable_to_non_nullable - as int, - globalId: null == globalId - ? _self.globalId - : globalId // ignore: cast_nullable_to_non_nullable - as int, - globalVersion: null == globalVersion - ? _self.globalVersion - : globalVersion // ignore: cast_nullable_to_non_nullable - as int, - config: null == config - ? _self.config - : config // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of BlockchainConfig +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? capabilities = null,Object? globalId = null,Object? globalVersion = null,Object? config = null,}) { + return _then(_BlockchainConfig( +capabilities: null == capabilities ? _self.capabilities : capabilities // ignore: cast_nullable_to_non_nullable +as int,globalId: null == globalId ? _self.globalId : globalId // ignore: cast_nullable_to_non_nullable +as int,globalVersion: null == globalVersion ? _self.globalVersion : globalVersion // ignore: cast_nullable_to_non_nullable +as int,config: null == config ? _self.config : config // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/contract_state.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/contract_state.freezed.dart index 618445b0..855cf192 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/contract_state.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/contract_state.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,67 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$ContractState { - BigInt get balance; - GenTimings get genTimings; - LastTransactionId? get lastTransactionId; - bool get isDeployed; - String? get codeHash; - - /// Create a copy of ContractState - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $ContractStateCopyWith get copyWith => - _$ContractStateCopyWithImpl( - this as ContractState, _$identity); + + BigInt get balance; GenTimings get genTimings; LastTransactionId? get lastTransactionId; bool get isDeployed; String? get codeHash; +/// Create a copy of ContractState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$ContractStateCopyWith get copyWith => _$ContractStateCopyWithImpl(this as ContractState, _$identity); /// Serializes this ContractState to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is ContractState && - (identical(other.balance, balance) || other.balance == balance) && - (identical(other.genTimings, genTimings) || - other.genTimings == genTimings) && - (identical(other.lastTransactionId, lastTransactionId) || - other.lastTransactionId == lastTransactionId) && - (identical(other.isDeployed, isDeployed) || - other.isDeployed == isDeployed) && - (identical(other.codeHash, codeHash) || - other.codeHash == codeHash)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, balance, genTimings, - lastTransactionId, isDeployed, codeHash); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is ContractState&&(identical(other.balance, balance) || other.balance == balance)&&(identical(other.genTimings, genTimings) || other.genTimings == genTimings)&&(identical(other.lastTransactionId, lastTransactionId) || other.lastTransactionId == lastTransactionId)&&(identical(other.isDeployed, isDeployed) || other.isDeployed == isDeployed)&&(identical(other.codeHash, codeHash) || other.codeHash == codeHash)); +} - @override - String toString() { - return 'ContractState(balance: $balance, genTimings: $genTimings, lastTransactionId: $lastTransactionId, isDeployed: $isDeployed, codeHash: $codeHash)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,balance,genTimings,lastTransactionId,isDeployed,codeHash); + +@override +String toString() { + return 'ContractState(balance: $balance, genTimings: $genTimings, lastTransactionId: $lastTransactionId, isDeployed: $isDeployed, codeHash: $codeHash)'; } -/// @nodoc -abstract mixin class $ContractStateCopyWith<$Res> { - factory $ContractStateCopyWith( - ContractState value, $Res Function(ContractState) _then) = - _$ContractStateCopyWithImpl; - @useResult - $Res call( - {BigInt balance, - GenTimings genTimings, - LastTransactionId? lastTransactionId, - bool isDeployed, - String? codeHash}); - - $GenTimingsCopyWith<$Res> get genTimings; - $LastTransactionIdCopyWith<$Res>? get lastTransactionId; + } +/// @nodoc +abstract mixin class $ContractStateCopyWith<$Res> { + factory $ContractStateCopyWith(ContractState value, $Res Function(ContractState) _then) = _$ContractStateCopyWithImpl; +@useResult +$Res call({ + BigInt balance, GenTimings genTimings, LastTransactionId? lastTransactionId, bool isDeployed, String? codeHash +}); + + +$GenTimingsCopyWith<$Res> get genTimings;$LastTransactionIdCopyWith<$Res>? get lastTransactionId; + +} /// @nodoc class _$ContractStateCopyWithImpl<$Res> implements $ContractStateCopyWith<$Res> { @@ -84,152 +63,220 @@ class _$ContractStateCopyWithImpl<$Res> final ContractState _self; final $Res Function(ContractState) _then; - /// Create a copy of ContractState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? balance = null, - Object? genTimings = null, - Object? lastTransactionId = freezed, - Object? isDeployed = null, - Object? codeHash = freezed, - }) { - return _then(_self.copyWith( - balance: null == balance - ? _self.balance - : balance // ignore: cast_nullable_to_non_nullable - as BigInt, - genTimings: null == genTimings - ? _self.genTimings - : genTimings // ignore: cast_nullable_to_non_nullable - as GenTimings, - lastTransactionId: freezed == lastTransactionId - ? _self.lastTransactionId - : lastTransactionId // ignore: cast_nullable_to_non_nullable - as LastTransactionId?, - isDeployed: null == isDeployed - ? _self.isDeployed - : isDeployed // ignore: cast_nullable_to_non_nullable - as bool, - codeHash: freezed == codeHash - ? _self.codeHash - : codeHash // ignore: cast_nullable_to_non_nullable - as String?, - )); +/// Create a copy of ContractState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? balance = null,Object? genTimings = null,Object? lastTransactionId = freezed,Object? isDeployed = null,Object? codeHash = freezed,}) { + return _then(_self.copyWith( +balance: null == balance ? _self.balance : balance // ignore: cast_nullable_to_non_nullable +as BigInt,genTimings: null == genTimings ? _self.genTimings : genTimings // ignore: cast_nullable_to_non_nullable +as GenTimings,lastTransactionId: freezed == lastTransactionId ? _self.lastTransactionId : lastTransactionId // ignore: cast_nullable_to_non_nullable +as LastTransactionId?,isDeployed: null == isDeployed ? _self.isDeployed : isDeployed // ignore: cast_nullable_to_non_nullable +as bool,codeHash: freezed == codeHash ? _self.codeHash : codeHash // ignore: cast_nullable_to_non_nullable +as String?, + )); +} +/// Create a copy of ContractState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GenTimingsCopyWith<$Res> get genTimings { + + return $GenTimingsCopyWith<$Res>(_self.genTimings, (value) { + return _then(_self.copyWith(genTimings: value)); + }); +}/// Create a copy of ContractState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$LastTransactionIdCopyWith<$Res>? get lastTransactionId { + if (_self.lastTransactionId == null) { + return null; } - /// Create a copy of ContractState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $GenTimingsCopyWith<$Res> get genTimings { - return $GenTimingsCopyWith<$Res>(_self.genTimings, (value) { - return _then(_self.copyWith(genTimings: value)); - }); - } + return $LastTransactionIdCopyWith<$Res>(_self.lastTransactionId!, (value) { + return _then(_self.copyWith(lastTransactionId: value)); + }); +} +} - /// Create a copy of ContractState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $LastTransactionIdCopyWith<$Res>? get lastTransactionId { - if (_self.lastTransactionId == null) { - return null; - } - return $LastTransactionIdCopyWith<$Res>(_self.lastTransactionId!, (value) { - return _then(_self.copyWith(lastTransactionId: value)); - }); - } +/// Adds pattern-matching-related methods to [ContractState]. +extension ContractStatePatterns on ContractState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _ContractState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _ContractState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _ContractState value) $default,){ +final _that = this; +switch (_that) { +case _ContractState(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _ContractState value)? $default,){ +final _that = this; +switch (_that) { +case _ContractState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( BigInt balance, GenTimings genTimings, LastTransactionId? lastTransactionId, bool isDeployed, String? codeHash)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _ContractState() when $default != null: +return $default(_that.balance,_that.genTimings,_that.lastTransactionId,_that.isDeployed,_that.codeHash);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( BigInt balance, GenTimings genTimings, LastTransactionId? lastTransactionId, bool isDeployed, String? codeHash) $default,) {final _that = this; +switch (_that) { +case _ContractState(): +return $default(_that.balance,_that.genTimings,_that.lastTransactionId,_that.isDeployed,_that.codeHash);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( BigInt balance, GenTimings genTimings, LastTransactionId? lastTransactionId, bool isDeployed, String? codeHash)? $default,) {final _that = this; +switch (_that) { +case _ContractState() when $default != null: +return $default(_that.balance,_that.genTimings,_that.lastTransactionId,_that.isDeployed,_that.codeHash);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _ContractState implements ContractState { - const _ContractState( - {required this.balance, - required this.genTimings, - this.lastTransactionId, - required this.isDeployed, - this.codeHash}); - factory _ContractState.fromJson(Map json) => - _$ContractStateFromJson(json); - - @override - final BigInt balance; - @override - final GenTimings genTimings; - @override - final LastTransactionId? lastTransactionId; - @override - final bool isDeployed; - @override - final String? codeHash; - - /// Create a copy of ContractState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$ContractStateCopyWith<_ContractState> get copyWith => - __$ContractStateCopyWithImpl<_ContractState>(this, _$identity); - - @override - Map toJson() { - return _$ContractStateToJson( - this, - ); - } + const _ContractState({required this.balance, required this.genTimings, this.lastTransactionId, required this.isDeployed, this.codeHash}); + factory _ContractState.fromJson(Map json) => _$ContractStateFromJson(json); + +@override final BigInt balance; +@override final GenTimings genTimings; +@override final LastTransactionId? lastTransactionId; +@override final bool isDeployed; +@override final String? codeHash; + +/// Create a copy of ContractState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$ContractStateCopyWith<_ContractState> get copyWith => __$ContractStateCopyWithImpl<_ContractState>(this, _$identity); + +@override +Map toJson() { + return _$ContractStateToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _ContractState && - (identical(other.balance, balance) || other.balance == balance) && - (identical(other.genTimings, genTimings) || - other.genTimings == genTimings) && - (identical(other.lastTransactionId, lastTransactionId) || - other.lastTransactionId == lastTransactionId) && - (identical(other.isDeployed, isDeployed) || - other.isDeployed == isDeployed) && - (identical(other.codeHash, codeHash) || - other.codeHash == codeHash)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _ContractState&&(identical(other.balance, balance) || other.balance == balance)&&(identical(other.genTimings, genTimings) || other.genTimings == genTimings)&&(identical(other.lastTransactionId, lastTransactionId) || other.lastTransactionId == lastTransactionId)&&(identical(other.isDeployed, isDeployed) || other.isDeployed == isDeployed)&&(identical(other.codeHash, codeHash) || other.codeHash == codeHash)); +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, balance, genTimings, - lastTransactionId, isDeployed, codeHash); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,balance,genTimings,lastTransactionId,isDeployed,codeHash); - @override - String toString() { - return 'ContractState(balance: $balance, genTimings: $genTimings, lastTransactionId: $lastTransactionId, isDeployed: $isDeployed, codeHash: $codeHash)'; - } +@override +String toString() { + return 'ContractState(balance: $balance, genTimings: $genTimings, lastTransactionId: $lastTransactionId, isDeployed: $isDeployed, codeHash: $codeHash)'; } -/// @nodoc -abstract mixin class _$ContractStateCopyWith<$Res> - implements $ContractStateCopyWith<$Res> { - factory _$ContractStateCopyWith( - _ContractState value, $Res Function(_ContractState) _then) = - __$ContractStateCopyWithImpl; - @override - @useResult - $Res call( - {BigInt balance, - GenTimings genTimings, - LastTransactionId? lastTransactionId, - bool isDeployed, - String? codeHash}); - - @override - $GenTimingsCopyWith<$Res> get genTimings; - @override - $LastTransactionIdCopyWith<$Res>? get lastTransactionId; + } +/// @nodoc +abstract mixin class _$ContractStateCopyWith<$Res> implements $ContractStateCopyWith<$Res> { + factory _$ContractStateCopyWith(_ContractState value, $Res Function(_ContractState) _then) = __$ContractStateCopyWithImpl; +@override @useResult +$Res call({ + BigInt balance, GenTimings genTimings, LastTransactionId? lastTransactionId, bool isDeployed, String? codeHash +}); + + +@override $GenTimingsCopyWith<$Res> get genTimings;@override $LastTransactionIdCopyWith<$Res>? get lastTransactionId; + +} /// @nodoc class __$ContractStateCopyWithImpl<$Res> implements _$ContractStateCopyWith<$Res> { @@ -238,64 +285,41 @@ class __$ContractStateCopyWithImpl<$Res> final _ContractState _self; final $Res Function(_ContractState) _then; - /// Create a copy of ContractState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? balance = null, - Object? genTimings = null, - Object? lastTransactionId = freezed, - Object? isDeployed = null, - Object? codeHash = freezed, - }) { - return _then(_ContractState( - balance: null == balance - ? _self.balance - : balance // ignore: cast_nullable_to_non_nullable - as BigInt, - genTimings: null == genTimings - ? _self.genTimings - : genTimings // ignore: cast_nullable_to_non_nullable - as GenTimings, - lastTransactionId: freezed == lastTransactionId - ? _self.lastTransactionId - : lastTransactionId // ignore: cast_nullable_to_non_nullable - as LastTransactionId?, - isDeployed: null == isDeployed - ? _self.isDeployed - : isDeployed // ignore: cast_nullable_to_non_nullable - as bool, - codeHash: freezed == codeHash - ? _self.codeHash - : codeHash // ignore: cast_nullable_to_non_nullable - as String?, - )); - } - - /// Create a copy of ContractState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $GenTimingsCopyWith<$Res> get genTimings { - return $GenTimingsCopyWith<$Res>(_self.genTimings, (value) { - return _then(_self.copyWith(genTimings: value)); - }); - } +/// Create a copy of ContractState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? balance = null,Object? genTimings = null,Object? lastTransactionId = freezed,Object? isDeployed = null,Object? codeHash = freezed,}) { + return _then(_ContractState( +balance: null == balance ? _self.balance : balance // ignore: cast_nullable_to_non_nullable +as BigInt,genTimings: null == genTimings ? _self.genTimings : genTimings // ignore: cast_nullable_to_non_nullable +as GenTimings,lastTransactionId: freezed == lastTransactionId ? _self.lastTransactionId : lastTransactionId // ignore: cast_nullable_to_non_nullable +as LastTransactionId?,isDeployed: null == isDeployed ? _self.isDeployed : isDeployed // ignore: cast_nullable_to_non_nullable +as bool,codeHash: freezed == codeHash ? _self.codeHash : codeHash // ignore: cast_nullable_to_non_nullable +as String?, + )); +} - /// Create a copy of ContractState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $LastTransactionIdCopyWith<$Res>? get lastTransactionId { +/// Create a copy of ContractState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GenTimingsCopyWith<$Res> get genTimings { + + return $GenTimingsCopyWith<$Res>(_self.genTimings, (value) { + return _then(_self.copyWith(genTimings: value)); + }); +}/// Create a copy of ContractState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$LastTransactionIdCopyWith<$Res>? get lastTransactionId { if (_self.lastTransactionId == null) { - return null; - } - - return $LastTransactionIdCopyWith<$Res>(_self.lastTransactionId!, (value) { - return _then(_self.copyWith(lastTransactionId: value)); - }); + return null; } + + return $LastTransactionIdCopyWith<$Res>(_self.lastTransactionId!, (value) { + return _then(_self.copyWith(lastTransactionId: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/contract_state.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/contract_state.g.dart index 4bc1226e..248b0d00 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/contract_state.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/contract_state.g.dart @@ -9,12 +9,14 @@ part of 'contract_state.dart'; _ContractState _$ContractStateFromJson(Map json) => _ContractState( balance: BigInt.parse(json['balance'] as String), - genTimings: - GenTimings.fromJson(json['genTimings'] as Map), + genTimings: GenTimings.fromJson( + json['genTimings'] as Map, + ), lastTransactionId: json['lastTransactionId'] == null ? null : LastTransactionId.fromJson( - json['lastTransactionId'] as Map), + json['lastTransactionId'] as Map, + ), isDeployed: json['isDeployed'] as bool, codeHash: json['codeHash'] as String?, ); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/existing_contract.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/existing_contract.freezed.dart index 5c6404e6..4970fc4b 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/existing_contract.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/existing_contract.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,58 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$ExistingContract { - String get account; - GenTimings get timings; - LastTransactionId get lastTransactionId; - - /// Create a copy of ExistingContract - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $ExistingContractCopyWith get copyWith => - _$ExistingContractCopyWithImpl( - this as ExistingContract, _$identity); + + String get account; GenTimings get timings; LastTransactionId get lastTransactionId; +/// Create a copy of ExistingContract +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$ExistingContractCopyWith get copyWith => _$ExistingContractCopyWithImpl(this as ExistingContract, _$identity); /// Serializes this ExistingContract to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is ExistingContract && - (identical(other.account, account) || other.account == account) && - (identical(other.timings, timings) || other.timings == timings) && - (identical(other.lastTransactionId, lastTransactionId) || - other.lastTransactionId == lastTransactionId)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, account, timings, lastTransactionId); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is ExistingContract&&(identical(other.account, account) || other.account == account)&&(identical(other.timings, timings) || other.timings == timings)&&(identical(other.lastTransactionId, lastTransactionId) || other.lastTransactionId == lastTransactionId)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,account,timings,lastTransactionId); - @override - String toString() { - return 'ExistingContract(account: $account, timings: $timings, lastTransactionId: $lastTransactionId)'; - } +@override +String toString() { + return 'ExistingContract(account: $account, timings: $timings, lastTransactionId: $lastTransactionId)'; } -/// @nodoc -abstract mixin class $ExistingContractCopyWith<$Res> { - factory $ExistingContractCopyWith( - ExistingContract value, $Res Function(ExistingContract) _then) = - _$ExistingContractCopyWithImpl; - @useResult - $Res call( - {String account, - GenTimings timings, - LastTransactionId lastTransactionId}); - $GenTimingsCopyWith<$Res> get timings; - $LastTransactionIdCopyWith<$Res> get lastTransactionId; } +/// @nodoc +abstract mixin class $ExistingContractCopyWith<$Res> { + factory $ExistingContractCopyWith(ExistingContract value, $Res Function(ExistingContract) _then) = _$ExistingContractCopyWithImpl; +@useResult +$Res call({ + String account, GenTimings timings, LastTransactionId lastTransactionId +}); + + +$GenTimingsCopyWith<$Res> get timings;$LastTransactionIdCopyWith<$Res> get lastTransactionId; + +} /// @nodoc class _$ExistingContractCopyWithImpl<$Res> implements $ExistingContractCopyWith<$Res> { @@ -75,125 +63,213 @@ class _$ExistingContractCopyWithImpl<$Res> final ExistingContract _self; final $Res Function(ExistingContract) _then; - /// Create a copy of ExistingContract - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? account = null, - Object? timings = null, - Object? lastTransactionId = null, - }) { - return _then(_self.copyWith( - account: null == account - ? _self.account - : account // ignore: cast_nullable_to_non_nullable - as String, - timings: null == timings - ? _self.timings - : timings // ignore: cast_nullable_to_non_nullable - as GenTimings, - lastTransactionId: null == lastTransactionId - ? _self.lastTransactionId - : lastTransactionId // ignore: cast_nullable_to_non_nullable - as LastTransactionId, - )); - } - - /// Create a copy of ExistingContract - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $GenTimingsCopyWith<$Res> get timings { - return $GenTimingsCopyWith<$Res>(_self.timings, (value) { - return _then(_self.copyWith(timings: value)); - }); - } - - /// Create a copy of ExistingContract - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $LastTransactionIdCopyWith<$Res> get lastTransactionId { - return $LastTransactionIdCopyWith<$Res>(_self.lastTransactionId, (value) { - return _then(_self.copyWith(lastTransactionId: value)); - }); - } +/// Create a copy of ExistingContract +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? account = null,Object? timings = null,Object? lastTransactionId = null,}) { + return _then(_self.copyWith( +account: null == account ? _self.account : account // ignore: cast_nullable_to_non_nullable +as String,timings: null == timings ? _self.timings : timings // ignore: cast_nullable_to_non_nullable +as GenTimings,lastTransactionId: null == lastTransactionId ? _self.lastTransactionId : lastTransactionId // ignore: cast_nullable_to_non_nullable +as LastTransactionId, + )); +} +/// Create a copy of ExistingContract +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GenTimingsCopyWith<$Res> get timings { + + return $GenTimingsCopyWith<$Res>(_self.timings, (value) { + return _then(_self.copyWith(timings: value)); + }); +}/// Create a copy of ExistingContract +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$LastTransactionIdCopyWith<$Res> get lastTransactionId { + + return $LastTransactionIdCopyWith<$Res>(_self.lastTransactionId, (value) { + return _then(_self.copyWith(lastTransactionId: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [ExistingContract]. +extension ExistingContractPatterns on ExistingContract { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _ExistingContract value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _ExistingContract() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _ExistingContract value) $default,){ +final _that = this; +switch (_that) { +case _ExistingContract(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _ExistingContract value)? $default,){ +final _that = this; +switch (_that) { +case _ExistingContract() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String account, GenTimings timings, LastTransactionId lastTransactionId)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _ExistingContract() when $default != null: +return $default(_that.account,_that.timings,_that.lastTransactionId);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String account, GenTimings timings, LastTransactionId lastTransactionId) $default,) {final _that = this; +switch (_that) { +case _ExistingContract(): +return $default(_that.account,_that.timings,_that.lastTransactionId);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String account, GenTimings timings, LastTransactionId lastTransactionId)? $default,) {final _that = this; +switch (_that) { +case _ExistingContract() when $default != null: +return $default(_that.account,_that.timings,_that.lastTransactionId);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _ExistingContract implements ExistingContract { - const _ExistingContract( - {required this.account, - required this.timings, - required this.lastTransactionId}); - factory _ExistingContract.fromJson(Map json) => - _$ExistingContractFromJson(json); - - @override - final String account; - @override - final GenTimings timings; - @override - final LastTransactionId lastTransactionId; - - /// Create a copy of ExistingContract - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$ExistingContractCopyWith<_ExistingContract> get copyWith => - __$ExistingContractCopyWithImpl<_ExistingContract>(this, _$identity); - - @override - Map toJson() { - return _$ExistingContractToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _ExistingContract && - (identical(other.account, account) || other.account == account) && - (identical(other.timings, timings) || other.timings == timings) && - (identical(other.lastTransactionId, lastTransactionId) || - other.lastTransactionId == lastTransactionId)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, account, timings, lastTransactionId); - - @override - String toString() { - return 'ExistingContract(account: $account, timings: $timings, lastTransactionId: $lastTransactionId)'; - } + const _ExistingContract({required this.account, required this.timings, required this.lastTransactionId}); + factory _ExistingContract.fromJson(Map json) => _$ExistingContractFromJson(json); + +@override final String account; +@override final GenTimings timings; +@override final LastTransactionId lastTransactionId; + +/// Create a copy of ExistingContract +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$ExistingContractCopyWith<_ExistingContract> get copyWith => __$ExistingContractCopyWithImpl<_ExistingContract>(this, _$identity); + +@override +Map toJson() { + return _$ExistingContractToJson(this, ); } -/// @nodoc -abstract mixin class _$ExistingContractCopyWith<$Res> - implements $ExistingContractCopyWith<$Res> { - factory _$ExistingContractCopyWith( - _ExistingContract value, $Res Function(_ExistingContract) _then) = - __$ExistingContractCopyWithImpl; - @override - @useResult - $Res call( - {String account, - GenTimings timings, - LastTransactionId lastTransactionId}); - - @override - $GenTimingsCopyWith<$Res> get timings; - @override - $LastTransactionIdCopyWith<$Res> get lastTransactionId; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _ExistingContract&&(identical(other.account, account) || other.account == account)&&(identical(other.timings, timings) || other.timings == timings)&&(identical(other.lastTransactionId, lastTransactionId) || other.lastTransactionId == lastTransactionId)); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,account,timings,lastTransactionId); + +@override +String toString() { + return 'ExistingContract(account: $account, timings: $timings, lastTransactionId: $lastTransactionId)'; +} + + +} + +/// @nodoc +abstract mixin class _$ExistingContractCopyWith<$Res> implements $ExistingContractCopyWith<$Res> { + factory _$ExistingContractCopyWith(_ExistingContract value, $Res Function(_ExistingContract) _then) = __$ExistingContractCopyWithImpl; +@override @useResult +$Res call({ + String account, GenTimings timings, LastTransactionId lastTransactionId +}); + + +@override $GenTimingsCopyWith<$Res> get timings;@override $LastTransactionIdCopyWith<$Res> get lastTransactionId; + +} /// @nodoc class __$ExistingContractCopyWithImpl<$Res> implements _$ExistingContractCopyWith<$Res> { @@ -202,50 +278,36 @@ class __$ExistingContractCopyWithImpl<$Res> final _ExistingContract _self; final $Res Function(_ExistingContract) _then; - /// Create a copy of ExistingContract - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? account = null, - Object? timings = null, - Object? lastTransactionId = null, - }) { - return _then(_ExistingContract( - account: null == account - ? _self.account - : account // ignore: cast_nullable_to_non_nullable - as String, - timings: null == timings - ? _self.timings - : timings // ignore: cast_nullable_to_non_nullable - as GenTimings, - lastTransactionId: null == lastTransactionId - ? _self.lastTransactionId - : lastTransactionId // ignore: cast_nullable_to_non_nullable - as LastTransactionId, - )); - } - - /// Create a copy of ExistingContract - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $GenTimingsCopyWith<$Res> get timings { - return $GenTimingsCopyWith<$Res>(_self.timings, (value) { - return _then(_self.copyWith(timings: value)); - }); - } - - /// Create a copy of ExistingContract - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $LastTransactionIdCopyWith<$Res> get lastTransactionId { - return $LastTransactionIdCopyWith<$Res>(_self.lastTransactionId, (value) { - return _then(_self.copyWith(lastTransactionId: value)); - }); - } +/// Create a copy of ExistingContract +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? account = null,Object? timings = null,Object? lastTransactionId = null,}) { + return _then(_ExistingContract( +account: null == account ? _self.account : account // ignore: cast_nullable_to_non_nullable +as String,timings: null == timings ? _self.timings : timings // ignore: cast_nullable_to_non_nullable +as GenTimings,lastTransactionId: null == lastTransactionId ? _self.lastTransactionId : lastTransactionId // ignore: cast_nullable_to_non_nullable +as LastTransactionId, + )); +} + +/// Create a copy of ExistingContract +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GenTimingsCopyWith<$Res> get timings { + + return $GenTimingsCopyWith<$Res>(_self.timings, (value) { + return _then(_self.copyWith(timings: value)); + }); +}/// Create a copy of ExistingContract +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$LastTransactionIdCopyWith<$Res> get lastTransactionId { + + return $LastTransactionIdCopyWith<$Res>(_self.lastTransactionId, (value) { + return _then(_self.copyWith(lastTransactionId: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/existing_contract.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/existing_contract.g.dart index 52e664c4..dea62d19 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/existing_contract.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/existing_contract.g.dart @@ -11,7 +11,8 @@ _ExistingContract _$ExistingContractFromJson(Map json) => account: json['account'] as String, timings: GenTimings.fromJson(json['timings'] as Map), lastTransactionId: LastTransactionId.fromJson( - json['lastTransactionId'] as Map), + json['lastTransactionId'] as Map, + ), ); Map _$ExistingContractToJson(_ExistingContract instance) => diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/expiration.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/expiration.freezed.dart index a79a5803..b8ed7c66 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/expiration.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/expiration.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,135 +11,294 @@ part of 'expiration.dart'; // dart format off T _$identity(T value) => value; -Expiration _$ExpirationFromJson(Map json) { - switch (json['type']) { - case 'never': - return ExpirationNever.fromJson(json); - case 'timeout': - return ExpirationTimeout.fromJson(json); - case 'timestamp': - return ExpirationTimestamp.fromJson(json); - - default: - throw CheckedFromJsonException( - json, 'type', 'Expiration', 'Invalid union type "${json['type']}"!'); - } +Expiration _$ExpirationFromJson( + Map json +) { + switch (json['type']) { + case 'never': + return ExpirationNever.fromJson( + json + ); + case 'timeout': + return ExpirationTimeout.fromJson( + json + ); + case 'timestamp': + return ExpirationTimestamp.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'Expiration', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$Expiration { + + + /// Serializes this Expiration to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is Expiration); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Expiration); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'Expiration()'; +} + - @override - String toString() { - return 'Expiration()'; - } } /// @nodoc -class $ExpirationCopyWith<$Res> { - $ExpirationCopyWith(Expiration _, $Res Function(Expiration) __); +class $ExpirationCopyWith<$Res> { +$ExpirationCopyWith(Expiration _, $Res Function(Expiration) __); +} + + +/// Adds pattern-matching-related methods to [Expiration]. +extension ExpirationPatterns on Expiration { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( ExpirationNever value)? never,TResult Function( ExpirationTimeout value)? timeout,TResult Function( ExpirationTimestamp value)? timestamp,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case ExpirationNever() when never != null: +return never(_that);case ExpirationTimeout() when timeout != null: +return timeout(_that);case ExpirationTimestamp() when timestamp != null: +return timestamp(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( ExpirationNever value) never,required TResult Function( ExpirationTimeout value) timeout,required TResult Function( ExpirationTimestamp value) timestamp,}){ +final _that = this; +switch (_that) { +case ExpirationNever(): +return never(_that);case ExpirationTimeout(): +return timeout(_that);case ExpirationTimestamp(): +return timestamp(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( ExpirationNever value)? never,TResult? Function( ExpirationTimeout value)? timeout,TResult? Function( ExpirationTimestamp value)? timestamp,}){ +final _that = this; +switch (_that) { +case ExpirationNever() when never != null: +return never(_that);case ExpirationTimeout() when timeout != null: +return timeout(_that);case ExpirationTimestamp() when timestamp != null: +return timestamp(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function()? never,TResult Function( int data)? timeout,TResult Function( int data)? timestamp,required TResult orElse(),}) {final _that = this; +switch (_that) { +case ExpirationNever() when never != null: +return never();case ExpirationTimeout() when timeout != null: +return timeout(_that.data);case ExpirationTimestamp() when timestamp != null: +return timestamp(_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function() never,required TResult Function( int data) timeout,required TResult Function( int data) timestamp,}) {final _that = this; +switch (_that) { +case ExpirationNever(): +return never();case ExpirationTimeout(): +return timeout(_that.data);case ExpirationTimestamp(): +return timestamp(_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function()? never,TResult? Function( int data)? timeout,TResult? Function( int data)? timestamp,}) {final _that = this; +switch (_that) { +case ExpirationNever() when never != null: +return never();case ExpirationTimeout() when timeout != null: +return timeout(_that.data);case ExpirationTimestamp() when timestamp != null: +return timestamp(_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class ExpirationNever implements Expiration { - const ExpirationNever({final String? $type}) : $type = $type ?? 'never'; - factory ExpirationNever.fromJson(Map json) => - _$ExpirationNeverFromJson(json); + const ExpirationNever({final String? $type}): $type = $type ?? 'never'; + factory ExpirationNever.fromJson(Map json) => _$ExpirationNeverFromJson(json); + - @JsonKey(name: 'type') - final String $type; - @override - Map toJson() { - return _$ExpirationNeverToJson( - this, - ); - } +@JsonKey(name: 'type') +final String $type; - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is ExpirationNever); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'Expiration.never()'; - } +@override +Map toJson() { + return _$ExpirationNeverToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is ExpirationNever); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'Expiration.never()'; +} + + +} + + + + /// @nodoc @JsonSerializable() + class ExpirationTimeout implements Expiration { - const ExpirationTimeout(this.data, {final String? $type}) - : $type = $type ?? 'timeout'; - factory ExpirationTimeout.fromJson(Map json) => - _$ExpirationTimeoutFromJson(json); - - final int data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of Expiration - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $ExpirationTimeoutCopyWith get copyWith => - _$ExpirationTimeoutCopyWithImpl(this, _$identity); - - @override - Map toJson() { - return _$ExpirationTimeoutToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is ExpirationTimeout && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'Expiration.timeout(data: $data)'; - } + const ExpirationTimeout(this.data, {final String? $type}): $type = $type ?? 'timeout'; + factory ExpirationTimeout.fromJson(Map json) => _$ExpirationTimeoutFromJson(json); + + final int data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of Expiration +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$ExpirationTimeoutCopyWith get copyWith => _$ExpirationTimeoutCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$ExpirationTimeoutToJson(this, ); } -/// @nodoc -abstract mixin class $ExpirationTimeoutCopyWith<$Res> - implements $ExpirationCopyWith<$Res> { - factory $ExpirationTimeoutCopyWith( - ExpirationTimeout value, $Res Function(ExpirationTimeout) _then) = - _$ExpirationTimeoutCopyWithImpl; - @useResult - $Res call({int data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is ExpirationTimeout&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'Expiration.timeout(data: $data)'; +} + + } +/// @nodoc +abstract mixin class $ExpirationTimeoutCopyWith<$Res> implements $ExpirationCopyWith<$Res> { + factory $ExpirationTimeoutCopyWith(ExpirationTimeout value, $Res Function(ExpirationTimeout) _then) = _$ExpirationTimeoutCopyWithImpl; +@useResult +$Res call({ + int data +}); + + + + +} /// @nodoc class _$ExpirationTimeoutCopyWithImpl<$Res> implements $ExpirationTimeoutCopyWith<$Res> { @@ -149,76 +307,71 @@ class _$ExpirationTimeoutCopyWithImpl<$Res> final ExpirationTimeout _self; final $Res Function(ExpirationTimeout) _then; - /// Create a copy of Expiration - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(ExpirationTimeout( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of Expiration +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(ExpirationTimeout( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + } /// @nodoc @JsonSerializable() + class ExpirationTimestamp implements Expiration { - const ExpirationTimestamp(this.data, {final String? $type}) - : $type = $type ?? 'timestamp'; - factory ExpirationTimestamp.fromJson(Map json) => - _$ExpirationTimestampFromJson(json); - - final int data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of Expiration - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $ExpirationTimestampCopyWith get copyWith => - _$ExpirationTimestampCopyWithImpl(this, _$identity); - - @override - Map toJson() { - return _$ExpirationTimestampToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is ExpirationTimestamp && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'Expiration.timestamp(data: $data)'; - } + const ExpirationTimestamp(this.data, {final String? $type}): $type = $type ?? 'timestamp'; + factory ExpirationTimestamp.fromJson(Map json) => _$ExpirationTimestampFromJson(json); + + final int data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of Expiration +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$ExpirationTimestampCopyWith get copyWith => _$ExpirationTimestampCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$ExpirationTimestampToJson(this, ); } -/// @nodoc -abstract mixin class $ExpirationTimestampCopyWith<$Res> - implements $ExpirationCopyWith<$Res> { - factory $ExpirationTimestampCopyWith( - ExpirationTimestamp value, $Res Function(ExpirationTimestamp) _then) = - _$ExpirationTimestampCopyWithImpl; - @useResult - $Res call({int data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is ExpirationTimestamp&&(identical(other.data, data) || other.data == data)); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'Expiration.timestamp(data: $data)'; +} + + +} + +/// @nodoc +abstract mixin class $ExpirationTimestampCopyWith<$Res> implements $ExpirationCopyWith<$Res> { + factory $ExpirationTimestampCopyWith(ExpirationTimestamp value, $Res Function(ExpirationTimestamp) _then) = _$ExpirationTimestampCopyWithImpl; +@useResult +$Res call({ + int data +}); + + + + +} /// @nodoc class _$ExpirationTimestampCopyWithImpl<$Res> implements $ExpirationTimestampCopyWith<$Res> { @@ -227,19 +380,16 @@ class _$ExpirationTimestampCopyWithImpl<$Res> final ExpirationTimestamp _self; final $Res Function(ExpirationTimestamp) _then; - /// Create a copy of Expiration - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(ExpirationTimestamp( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of Expiration +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(ExpirationTimestamp( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/expiration.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/expiration.g.dart index a4904213..17c4d43e 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/expiration.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/expiration.g.dart @@ -7,14 +7,10 @@ part of 'expiration.dart'; // ************************************************************************** ExpirationNever _$ExpirationNeverFromJson(Map json) => - ExpirationNever( - $type: json['type'] as String?, - ); + ExpirationNever($type: json['type'] as String?); Map _$ExpirationNeverToJson(ExpirationNever instance) => - { - 'type': instance.$type, - }; + {'type': instance.$type}; ExpirationTimeout _$ExpirationTimeoutFromJson(Map json) => ExpirationTimeout( @@ -23,10 +19,7 @@ ExpirationTimeout _$ExpirationTimeoutFromJson(Map json) => ); Map _$ExpirationTimeoutToJson(ExpirationTimeout instance) => - { - 'data': instance.data, - 'type': instance.$type, - }; + {'data': instance.data, 'type': instance.$type}; ExpirationTimestamp _$ExpirationTimestampFromJson(Map json) => ExpirationTimestamp( @@ -35,8 +28,5 @@ ExpirationTimestamp _$ExpirationTimestampFromJson(Map json) => ); Map _$ExpirationTimestampToJson( - ExpirationTimestamp instance) => - { - 'data': instance.data, - 'type': instance.$type, - }; + ExpirationTimestamp instance, +) => {'data': instance.data, 'type': instance.$type}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/full_contract_state.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/full_contract_state.freezed.dart index 882c6bbd..6f475f2d 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/full_contract_state.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/full_contract_state.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,70 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$FullContractState { - BigInt get balance; - GenTimings get genTimings; - LastTransactionId? get lastTransactionId; - bool get isDeployed; - String? get codeHash; - String get boc; - - /// Create a copy of FullContractState - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $FullContractStateCopyWith get copyWith => - _$FullContractStateCopyWithImpl( - this as FullContractState, _$identity); + + BigInt get balance; GenTimings get genTimings; LastTransactionId? get lastTransactionId; bool get isDeployed; String? get codeHash; String get boc; +/// Create a copy of FullContractState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$FullContractStateCopyWith get copyWith => _$FullContractStateCopyWithImpl(this as FullContractState, _$identity); /// Serializes this FullContractState to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is FullContractState && - (identical(other.balance, balance) || other.balance == balance) && - (identical(other.genTimings, genTimings) || - other.genTimings == genTimings) && - (identical(other.lastTransactionId, lastTransactionId) || - other.lastTransactionId == lastTransactionId) && - (identical(other.isDeployed, isDeployed) || - other.isDeployed == isDeployed) && - (identical(other.codeHash, codeHash) || - other.codeHash == codeHash) && - (identical(other.boc, boc) || other.boc == boc)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, balance, genTimings, - lastTransactionId, isDeployed, codeHash, boc); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is FullContractState&&(identical(other.balance, balance) || other.balance == balance)&&(identical(other.genTimings, genTimings) || other.genTimings == genTimings)&&(identical(other.lastTransactionId, lastTransactionId) || other.lastTransactionId == lastTransactionId)&&(identical(other.isDeployed, isDeployed) || other.isDeployed == isDeployed)&&(identical(other.codeHash, codeHash) || other.codeHash == codeHash)&&(identical(other.boc, boc) || other.boc == boc)); +} - @override - String toString() { - return 'FullContractState(balance: $balance, genTimings: $genTimings, lastTransactionId: $lastTransactionId, isDeployed: $isDeployed, codeHash: $codeHash, boc: $boc)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,balance,genTimings,lastTransactionId,isDeployed,codeHash,boc); + +@override +String toString() { + return 'FullContractState(balance: $balance, genTimings: $genTimings, lastTransactionId: $lastTransactionId, isDeployed: $isDeployed, codeHash: $codeHash, boc: $boc)'; } -/// @nodoc -abstract mixin class $FullContractStateCopyWith<$Res> { - factory $FullContractStateCopyWith( - FullContractState value, $Res Function(FullContractState) _then) = - _$FullContractStateCopyWithImpl; - @useResult - $Res call( - {BigInt balance, - GenTimings genTimings, - LastTransactionId? lastTransactionId, - bool isDeployed, - String? codeHash, - String boc}); - - $GenTimingsCopyWith<$Res> get genTimings; - $LastTransactionIdCopyWith<$Res>? get lastTransactionId; + } +/// @nodoc +abstract mixin class $FullContractStateCopyWith<$Res> { + factory $FullContractStateCopyWith(FullContractState value, $Res Function(FullContractState) _then) = _$FullContractStateCopyWithImpl; +@useResult +$Res call({ + BigInt balance, GenTimings genTimings, LastTransactionId? lastTransactionId, bool isDeployed, String? codeHash, String boc +}); + + +$GenTimingsCopyWith<$Res> get genTimings;$LastTransactionIdCopyWith<$Res>? get lastTransactionId; + +} /// @nodoc class _$FullContractStateCopyWithImpl<$Res> implements $FullContractStateCopyWith<$Res> { @@ -87,162 +63,222 @@ class _$FullContractStateCopyWithImpl<$Res> final FullContractState _self; final $Res Function(FullContractState) _then; - /// Create a copy of FullContractState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? balance = null, - Object? genTimings = null, - Object? lastTransactionId = freezed, - Object? isDeployed = null, - Object? codeHash = freezed, - Object? boc = null, - }) { - return _then(_self.copyWith( - balance: null == balance - ? _self.balance - : balance // ignore: cast_nullable_to_non_nullable - as BigInt, - genTimings: null == genTimings - ? _self.genTimings - : genTimings // ignore: cast_nullable_to_non_nullable - as GenTimings, - lastTransactionId: freezed == lastTransactionId - ? _self.lastTransactionId - : lastTransactionId // ignore: cast_nullable_to_non_nullable - as LastTransactionId?, - isDeployed: null == isDeployed - ? _self.isDeployed - : isDeployed // ignore: cast_nullable_to_non_nullable - as bool, - codeHash: freezed == codeHash - ? _self.codeHash - : codeHash // ignore: cast_nullable_to_non_nullable - as String?, - boc: null == boc - ? _self.boc - : boc // ignore: cast_nullable_to_non_nullable - as String, - )); +/// Create a copy of FullContractState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? balance = null,Object? genTimings = null,Object? lastTransactionId = freezed,Object? isDeployed = null,Object? codeHash = freezed,Object? boc = null,}) { + return _then(_self.copyWith( +balance: null == balance ? _self.balance : balance // ignore: cast_nullable_to_non_nullable +as BigInt,genTimings: null == genTimings ? _self.genTimings : genTimings // ignore: cast_nullable_to_non_nullable +as GenTimings,lastTransactionId: freezed == lastTransactionId ? _self.lastTransactionId : lastTransactionId // ignore: cast_nullable_to_non_nullable +as LastTransactionId?,isDeployed: null == isDeployed ? _self.isDeployed : isDeployed // ignore: cast_nullable_to_non_nullable +as bool,codeHash: freezed == codeHash ? _self.codeHash : codeHash // ignore: cast_nullable_to_non_nullable +as String?,boc: null == boc ? _self.boc : boc // ignore: cast_nullable_to_non_nullable +as String, + )); +} +/// Create a copy of FullContractState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GenTimingsCopyWith<$Res> get genTimings { + + return $GenTimingsCopyWith<$Res>(_self.genTimings, (value) { + return _then(_self.copyWith(genTimings: value)); + }); +}/// Create a copy of FullContractState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$LastTransactionIdCopyWith<$Res>? get lastTransactionId { + if (_self.lastTransactionId == null) { + return null; } - /// Create a copy of FullContractState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $GenTimingsCopyWith<$Res> get genTimings { - return $GenTimingsCopyWith<$Res>(_self.genTimings, (value) { - return _then(_self.copyWith(genTimings: value)); - }); - } + return $LastTransactionIdCopyWith<$Res>(_self.lastTransactionId!, (value) { + return _then(_self.copyWith(lastTransactionId: value)); + }); +} +} - /// Create a copy of FullContractState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $LastTransactionIdCopyWith<$Res>? get lastTransactionId { - if (_self.lastTransactionId == null) { - return null; - } - return $LastTransactionIdCopyWith<$Res>(_self.lastTransactionId!, (value) { - return _then(_self.copyWith(lastTransactionId: value)); - }); - } +/// Adds pattern-matching-related methods to [FullContractState]. +extension FullContractStatePatterns on FullContractState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _FullContractState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _FullContractState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _FullContractState value) $default,){ +final _that = this; +switch (_that) { +case _FullContractState(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _FullContractState value)? $default,){ +final _that = this; +switch (_that) { +case _FullContractState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( BigInt balance, GenTimings genTimings, LastTransactionId? lastTransactionId, bool isDeployed, String? codeHash, String boc)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _FullContractState() when $default != null: +return $default(_that.balance,_that.genTimings,_that.lastTransactionId,_that.isDeployed,_that.codeHash,_that.boc);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( BigInt balance, GenTimings genTimings, LastTransactionId? lastTransactionId, bool isDeployed, String? codeHash, String boc) $default,) {final _that = this; +switch (_that) { +case _FullContractState(): +return $default(_that.balance,_that.genTimings,_that.lastTransactionId,_that.isDeployed,_that.codeHash,_that.boc);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( BigInt balance, GenTimings genTimings, LastTransactionId? lastTransactionId, bool isDeployed, String? codeHash, String boc)? $default,) {final _that = this; +switch (_that) { +case _FullContractState() when $default != null: +return $default(_that.balance,_that.genTimings,_that.lastTransactionId,_that.isDeployed,_that.codeHash,_that.boc);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _FullContractState implements FullContractState { - const _FullContractState( - {required this.balance, - required this.genTimings, - this.lastTransactionId, - required this.isDeployed, - this.codeHash, - required this.boc}); - factory _FullContractState.fromJson(Map json) => - _$FullContractStateFromJson(json); - - @override - final BigInt balance; - @override - final GenTimings genTimings; - @override - final LastTransactionId? lastTransactionId; - @override - final bool isDeployed; - @override - final String? codeHash; - @override - final String boc; - - /// Create a copy of FullContractState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$FullContractStateCopyWith<_FullContractState> get copyWith => - __$FullContractStateCopyWithImpl<_FullContractState>(this, _$identity); - - @override - Map toJson() { - return _$FullContractStateToJson( - this, - ); - } + const _FullContractState({required this.balance, required this.genTimings, this.lastTransactionId, required this.isDeployed, this.codeHash, required this.boc}); + factory _FullContractState.fromJson(Map json) => _$FullContractStateFromJson(json); + +@override final BigInt balance; +@override final GenTimings genTimings; +@override final LastTransactionId? lastTransactionId; +@override final bool isDeployed; +@override final String? codeHash; +@override final String boc; + +/// Create a copy of FullContractState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$FullContractStateCopyWith<_FullContractState> get copyWith => __$FullContractStateCopyWithImpl<_FullContractState>(this, _$identity); + +@override +Map toJson() { + return _$FullContractStateToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _FullContractState && - (identical(other.balance, balance) || other.balance == balance) && - (identical(other.genTimings, genTimings) || - other.genTimings == genTimings) && - (identical(other.lastTransactionId, lastTransactionId) || - other.lastTransactionId == lastTransactionId) && - (identical(other.isDeployed, isDeployed) || - other.isDeployed == isDeployed) && - (identical(other.codeHash, codeHash) || - other.codeHash == codeHash) && - (identical(other.boc, boc) || other.boc == boc)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _FullContractState&&(identical(other.balance, balance) || other.balance == balance)&&(identical(other.genTimings, genTimings) || other.genTimings == genTimings)&&(identical(other.lastTransactionId, lastTransactionId) || other.lastTransactionId == lastTransactionId)&&(identical(other.isDeployed, isDeployed) || other.isDeployed == isDeployed)&&(identical(other.codeHash, codeHash) || other.codeHash == codeHash)&&(identical(other.boc, boc) || other.boc == boc)); +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, balance, genTimings, - lastTransactionId, isDeployed, codeHash, boc); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,balance,genTimings,lastTransactionId,isDeployed,codeHash,boc); - @override - String toString() { - return 'FullContractState(balance: $balance, genTimings: $genTimings, lastTransactionId: $lastTransactionId, isDeployed: $isDeployed, codeHash: $codeHash, boc: $boc)'; - } +@override +String toString() { + return 'FullContractState(balance: $balance, genTimings: $genTimings, lastTransactionId: $lastTransactionId, isDeployed: $isDeployed, codeHash: $codeHash, boc: $boc)'; } -/// @nodoc -abstract mixin class _$FullContractStateCopyWith<$Res> - implements $FullContractStateCopyWith<$Res> { - factory _$FullContractStateCopyWith( - _FullContractState value, $Res Function(_FullContractState) _then) = - __$FullContractStateCopyWithImpl; - @override - @useResult - $Res call( - {BigInt balance, - GenTimings genTimings, - LastTransactionId? lastTransactionId, - bool isDeployed, - String? codeHash, - String boc}); - - @override - $GenTimingsCopyWith<$Res> get genTimings; - @override - $LastTransactionIdCopyWith<$Res>? get lastTransactionId; + } +/// @nodoc +abstract mixin class _$FullContractStateCopyWith<$Res> implements $FullContractStateCopyWith<$Res> { + factory _$FullContractStateCopyWith(_FullContractState value, $Res Function(_FullContractState) _then) = __$FullContractStateCopyWithImpl; +@override @useResult +$Res call({ + BigInt balance, GenTimings genTimings, LastTransactionId? lastTransactionId, bool isDeployed, String? codeHash, String boc +}); + + +@override $GenTimingsCopyWith<$Res> get genTimings;@override $LastTransactionIdCopyWith<$Res>? get lastTransactionId; + +} /// @nodoc class __$FullContractStateCopyWithImpl<$Res> implements _$FullContractStateCopyWith<$Res> { @@ -251,69 +287,42 @@ class __$FullContractStateCopyWithImpl<$Res> final _FullContractState _self; final $Res Function(_FullContractState) _then; - /// Create a copy of FullContractState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? balance = null, - Object? genTimings = null, - Object? lastTransactionId = freezed, - Object? isDeployed = null, - Object? codeHash = freezed, - Object? boc = null, - }) { - return _then(_FullContractState( - balance: null == balance - ? _self.balance - : balance // ignore: cast_nullable_to_non_nullable - as BigInt, - genTimings: null == genTimings - ? _self.genTimings - : genTimings // ignore: cast_nullable_to_non_nullable - as GenTimings, - lastTransactionId: freezed == lastTransactionId - ? _self.lastTransactionId - : lastTransactionId // ignore: cast_nullable_to_non_nullable - as LastTransactionId?, - isDeployed: null == isDeployed - ? _self.isDeployed - : isDeployed // ignore: cast_nullable_to_non_nullable - as bool, - codeHash: freezed == codeHash - ? _self.codeHash - : codeHash // ignore: cast_nullable_to_non_nullable - as String?, - boc: null == boc - ? _self.boc - : boc // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of FullContractState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $GenTimingsCopyWith<$Res> get genTimings { - return $GenTimingsCopyWith<$Res>(_self.genTimings, (value) { - return _then(_self.copyWith(genTimings: value)); - }); - } +/// Create a copy of FullContractState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? balance = null,Object? genTimings = null,Object? lastTransactionId = freezed,Object? isDeployed = null,Object? codeHash = freezed,Object? boc = null,}) { + return _then(_FullContractState( +balance: null == balance ? _self.balance : balance // ignore: cast_nullable_to_non_nullable +as BigInt,genTimings: null == genTimings ? _self.genTimings : genTimings // ignore: cast_nullable_to_non_nullable +as GenTimings,lastTransactionId: freezed == lastTransactionId ? _self.lastTransactionId : lastTransactionId // ignore: cast_nullable_to_non_nullable +as LastTransactionId?,isDeployed: null == isDeployed ? _self.isDeployed : isDeployed // ignore: cast_nullable_to_non_nullable +as bool,codeHash: freezed == codeHash ? _self.codeHash : codeHash // ignore: cast_nullable_to_non_nullable +as String?,boc: null == boc ? _self.boc : boc // ignore: cast_nullable_to_non_nullable +as String, + )); +} - /// Create a copy of FullContractState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $LastTransactionIdCopyWith<$Res>? get lastTransactionId { +/// Create a copy of FullContractState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GenTimingsCopyWith<$Res> get genTimings { + + return $GenTimingsCopyWith<$Res>(_self.genTimings, (value) { + return _then(_self.copyWith(genTimings: value)); + }); +}/// Create a copy of FullContractState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$LastTransactionIdCopyWith<$Res>? get lastTransactionId { if (_self.lastTransactionId == null) { - return null; - } - - return $LastTransactionIdCopyWith<$Res>(_self.lastTransactionId!, (value) { - return _then(_self.copyWith(lastTransactionId: value)); - }); + return null; } + + return $LastTransactionIdCopyWith<$Res>(_self.lastTransactionId!, (value) { + return _then(_self.copyWith(lastTransactionId: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/full_contract_state.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/full_contract_state.g.dart index c8e493ff..13ecdf87 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/full_contract_state.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/full_contract_state.g.dart @@ -9,12 +9,14 @@ part of 'full_contract_state.dart'; _FullContractState _$FullContractStateFromJson(Map json) => _FullContractState( balance: BigInt.parse(json['balance'] as String), - genTimings: - GenTimings.fromJson(json['genTimings'] as Map), + genTimings: GenTimings.fromJson( + json['genTimings'] as Map, + ), lastTransactionId: json['lastTransactionId'] == null ? null : LastTransactionId.fromJson( - json['lastTransactionId'] as Map), + json['lastTransactionId'] as Map, + ), isDeployed: json['isDeployed'] as bool, codeHash: json['codeHash'] as String?, boc: json['boc'] as String, diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/gen_timings.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/gen_timings.freezed.dart index f76ecdaf..c3950bf2 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/gen_timings.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/gen_timings.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,160 +14,261 @@ T _$identity(T value) => value; /// @nodoc mixin _$GenTimings { - String get genLt; - int get genUtime; - /// Create a copy of GenTimings - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $GenTimingsCopyWith get copyWith => - _$GenTimingsCopyWithImpl(this as GenTimings, _$identity); + String get genLt; int get genUtime; +/// Create a copy of GenTimings +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$GenTimingsCopyWith get copyWith => _$GenTimingsCopyWithImpl(this as GenTimings, _$identity); /// Serializes this GenTimings to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is GenTimings && - (identical(other.genLt, genLt) || other.genLt == genLt) && - (identical(other.genUtime, genUtime) || - other.genUtime == genUtime)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, genLt, genUtime); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is GenTimings&&(identical(other.genLt, genLt) || other.genLt == genLt)&&(identical(other.genUtime, genUtime) || other.genUtime == genUtime)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,genLt,genUtime); - @override - String toString() { - return 'GenTimings(genLt: $genLt, genUtime: $genUtime)'; - } +@override +String toString() { + return 'GenTimings(genLt: $genLt, genUtime: $genUtime)'; } -/// @nodoc -abstract mixin class $GenTimingsCopyWith<$Res> { - factory $GenTimingsCopyWith( - GenTimings value, $Res Function(GenTimings) _then) = - _$GenTimingsCopyWithImpl; - @useResult - $Res call({String genLt, int genUtime}); + } /// @nodoc -class _$GenTimingsCopyWithImpl<$Res> implements $GenTimingsCopyWith<$Res> { +abstract mixin class $GenTimingsCopyWith<$Res> { + factory $GenTimingsCopyWith(GenTimings value, $Res Function(GenTimings) _then) = _$GenTimingsCopyWithImpl; +@useResult +$Res call({ + String genLt, int genUtime +}); + + + + +} +/// @nodoc +class _$GenTimingsCopyWithImpl<$Res> + implements $GenTimingsCopyWith<$Res> { _$GenTimingsCopyWithImpl(this._self, this._then); final GenTimings _self; final $Res Function(GenTimings) _then; - /// Create a copy of GenTimings - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? genLt = null, - Object? genUtime = null, - }) { - return _then(_self.copyWith( - genLt: null == genLt - ? _self.genLt - : genLt // ignore: cast_nullable_to_non_nullable - as String, - genUtime: null == genUtime - ? _self.genUtime - : genUtime // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of GenTimings +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? genLt = null,Object? genUtime = null,}) { + return _then(_self.copyWith( +genLt: null == genLt ? _self.genLt : genLt // ignore: cast_nullable_to_non_nullable +as String,genUtime: null == genUtime ? _self.genUtime : genUtime // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [GenTimings]. +extension GenTimingsPatterns on GenTimings { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _GenTimings value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _GenTimings() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _GenTimings value) $default,){ +final _that = this; +switch (_that) { +case _GenTimings(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _GenTimings value)? $default,){ +final _that = this; +switch (_that) { +case _GenTimings() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String genLt, int genUtime)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _GenTimings() when $default != null: +return $default(_that.genLt,_that.genUtime);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String genLt, int genUtime) $default,) {final _that = this; +switch (_that) { +case _GenTimings(): +return $default(_that.genLt,_that.genUtime);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String genLt, int genUtime)? $default,) {final _that = this; +switch (_that) { +case _GenTimings() when $default != null: +return $default(_that.genLt,_that.genUtime);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _GenTimings implements GenTimings { const _GenTimings({required this.genLt, required this.genUtime}); - factory _GenTimings.fromJson(Map json) => - _$GenTimingsFromJson(json); - - @override - final String genLt; - @override - final int genUtime; - - /// Create a copy of GenTimings - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$GenTimingsCopyWith<_GenTimings> get copyWith => - __$GenTimingsCopyWithImpl<_GenTimings>(this, _$identity); - - @override - Map toJson() { - return _$GenTimingsToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _GenTimings && - (identical(other.genLt, genLt) || other.genLt == genLt) && - (identical(other.genUtime, genUtime) || - other.genUtime == genUtime)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, genLt, genUtime); - - @override - String toString() { - return 'GenTimings(genLt: $genLt, genUtime: $genUtime)'; - } + factory _GenTimings.fromJson(Map json) => _$GenTimingsFromJson(json); + +@override final String genLt; +@override final int genUtime; + +/// Create a copy of GenTimings +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$GenTimingsCopyWith<_GenTimings> get copyWith => __$GenTimingsCopyWithImpl<_GenTimings>(this, _$identity); + +@override +Map toJson() { + return _$GenTimingsToJson(this, ); } -/// @nodoc -abstract mixin class _$GenTimingsCopyWith<$Res> - implements $GenTimingsCopyWith<$Res> { - factory _$GenTimingsCopyWith( - _GenTimings value, $Res Function(_GenTimings) _then) = - __$GenTimingsCopyWithImpl; - @override - @useResult - $Res call({String genLt, int genUtime}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _GenTimings&&(identical(other.genLt, genLt) || other.genLt == genLt)&&(identical(other.genUtime, genUtime) || other.genUtime == genUtime)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,genLt,genUtime); + +@override +String toString() { + return 'GenTimings(genLt: $genLt, genUtime: $genUtime)'; +} + + } /// @nodoc -class __$GenTimingsCopyWithImpl<$Res> implements _$GenTimingsCopyWith<$Res> { +abstract mixin class _$GenTimingsCopyWith<$Res> implements $GenTimingsCopyWith<$Res> { + factory _$GenTimingsCopyWith(_GenTimings value, $Res Function(_GenTimings) _then) = __$GenTimingsCopyWithImpl; +@override @useResult +$Res call({ + String genLt, int genUtime +}); + + + + +} +/// @nodoc +class __$GenTimingsCopyWithImpl<$Res> + implements _$GenTimingsCopyWith<$Res> { __$GenTimingsCopyWithImpl(this._self, this._then); final _GenTimings _self; final $Res Function(_GenTimings) _then; - /// Create a copy of GenTimings - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? genLt = null, - Object? genUtime = null, - }) { - return _then(_GenTimings( - genLt: null == genLt - ? _self.genLt - : genLt // ignore: cast_nullable_to_non_nullable - as String, - genUtime: null == genUtime - ? _self.genUtime - : genUtime // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of GenTimings +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? genLt = null,Object? genUtime = null,}) { + return _then(_GenTimings( +genLt: null == genLt ? _self.genLt : genLt // ignore: cast_nullable_to_non_nullable +as String,genUtime: null == genUtime ? _self.genUtime : genUtime // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/gen_timings.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/gen_timings.g.dart index 9c005bec..9deb9bed 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/gen_timings.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/gen_timings.g.dart @@ -7,12 +7,9 @@ part of 'gen_timings.dart'; // ************************************************************************** _GenTimings _$GenTimingsFromJson(Map json) => _GenTimings( - genLt: json['genLt'] as String, - genUtime: (json['genUtime'] as num).toInt(), - ); + genLt: json['genLt'] as String, + genUtime: (json['genUtime'] as num).toInt(), +); Map _$GenTimingsToJson(_GenTimings instance) => - { - 'genLt': instance.genLt, - 'genUtime': instance.genUtime, - }; + {'genLt': instance.genLt, 'genUtime': instance.genUtime}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/internal_message.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/internal_message.freezed.dart index d633f0fa..a43d5d3c 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/internal_message.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/internal_message.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,64 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$InternalMessage { - Address? get source; - Address get destination; - BigInt get amount; - bool get bounce; - String get body; - - /// Create a copy of InternalMessage - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $InternalMessageCopyWith get copyWith => - _$InternalMessageCopyWithImpl( - this as InternalMessage, _$identity); + + Address? get source; Address get destination; BigInt get amount; bool get bounce; String get body; +/// Create a copy of InternalMessage +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$InternalMessageCopyWith get copyWith => _$InternalMessageCopyWithImpl(this as InternalMessage, _$identity); /// Serializes this InternalMessage to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is InternalMessage && - (identical(other.source, source) || other.source == source) && - (identical(other.destination, destination) || - other.destination == destination) && - (identical(other.amount, amount) || other.amount == amount) && - (identical(other.bounce, bounce) || other.bounce == bounce) && - (identical(other.body, body) || other.body == body)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, source, destination, amount, bounce, body); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is InternalMessage&&(identical(other.source, source) || other.source == source)&&(identical(other.destination, destination) || other.destination == destination)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.bounce, bounce) || other.bounce == bounce)&&(identical(other.body, body) || other.body == body)); +} - @override - String toString() { - return 'InternalMessage(source: $source, destination: $destination, amount: $amount, bounce: $bounce, body: $body)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,source,destination,amount,bounce,body); + +@override +String toString() { + return 'InternalMessage(source: $source, destination: $destination, amount: $amount, bounce: $bounce, body: $body)'; } -/// @nodoc -abstract mixin class $InternalMessageCopyWith<$Res> { - factory $InternalMessageCopyWith( - InternalMessage value, $Res Function(InternalMessage) _then) = - _$InternalMessageCopyWithImpl; - @useResult - $Res call( - {Address? source, - Address destination, - BigInt amount, - bool bounce, - String body}); - - $AddressCopyWith<$Res>? get source; - $AddressCopyWith<$Res> get destination; + } +/// @nodoc +abstract mixin class $InternalMessageCopyWith<$Res> { + factory $InternalMessageCopyWith(InternalMessage value, $Res Function(InternalMessage) _then) = _$InternalMessageCopyWithImpl; +@useResult +$Res call({ + Address? source, Address destination, BigInt amount, bool bounce, String body +}); + + +$AddressCopyWith<$Res>? get source;$AddressCopyWith<$Res> get destination; + +} /// @nodoc class _$InternalMessageCopyWithImpl<$Res> implements $InternalMessageCopyWith<$Res> { @@ -81,149 +63,220 @@ class _$InternalMessageCopyWithImpl<$Res> final InternalMessage _self; final $Res Function(InternalMessage) _then; - /// Create a copy of InternalMessage - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? source = freezed, - Object? destination = null, - Object? amount = null, - Object? bounce = null, - Object? body = null, - }) { - return _then(_self.copyWith( - source: freezed == source - ? _self.source - : source // ignore: cast_nullable_to_non_nullable - as Address?, - destination: null == destination - ? _self.destination - : destination // ignore: cast_nullable_to_non_nullable - as Address, - amount: null == amount - ? _self.amount - : amount // ignore: cast_nullable_to_non_nullable - as BigInt, - bounce: null == bounce - ? _self.bounce - : bounce // ignore: cast_nullable_to_non_nullable - as bool, - body: null == body - ? _self.body - : body // ignore: cast_nullable_to_non_nullable - as String, - )); +/// Create a copy of InternalMessage +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? source = freezed,Object? destination = null,Object? amount = null,Object? bounce = null,Object? body = null,}) { + return _then(_self.copyWith( +source: freezed == source ? _self.source : source // ignore: cast_nullable_to_non_nullable +as Address?,destination: null == destination ? _self.destination : destination // ignore: cast_nullable_to_non_nullable +as Address,amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable +as BigInt,bounce: null == bounce ? _self.bounce : bounce // ignore: cast_nullable_to_non_nullable +as bool,body: null == body ? _self.body : body // ignore: cast_nullable_to_non_nullable +as String, + )); +} +/// Create a copy of InternalMessage +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res>? get source { + if (_self.source == null) { + return null; } - /// Create a copy of InternalMessage - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res>? get source { - if (_self.source == null) { - return null; - } + return $AddressCopyWith<$Res>(_self.source!, (value) { + return _then(_self.copyWith(source: value)); + }); +}/// Create a copy of InternalMessage +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get destination { + + return $AddressCopyWith<$Res>(_self.destination, (value) { + return _then(_self.copyWith(destination: value)); + }); +} +} - return $AddressCopyWith<$Res>(_self.source!, (value) { - return _then(_self.copyWith(source: value)); - }); - } - /// Create a copy of InternalMessage - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get destination { - return $AddressCopyWith<$Res>(_self.destination, (value) { - return _then(_self.copyWith(destination: value)); - }); - } +/// Adds pattern-matching-related methods to [InternalMessage]. +extension InternalMessagePatterns on InternalMessage { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _InternalMessage value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _InternalMessage() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _InternalMessage value) $default,){ +final _that = this; +switch (_that) { +case _InternalMessage(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _InternalMessage value)? $default,){ +final _that = this; +switch (_that) { +case _InternalMessage() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Address? source, Address destination, BigInt amount, bool bounce, String body)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _InternalMessage() when $default != null: +return $default(_that.source,_that.destination,_that.amount,_that.bounce,_that.body);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Address? source, Address destination, BigInt amount, bool bounce, String body) $default,) {final _that = this; +switch (_that) { +case _InternalMessage(): +return $default(_that.source,_that.destination,_that.amount,_that.bounce,_that.body);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Address? source, Address destination, BigInt amount, bool bounce, String body)? $default,) {final _that = this; +switch (_that) { +case _InternalMessage() when $default != null: +return $default(_that.source,_that.destination,_that.amount,_that.bounce,_that.body);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _InternalMessage implements InternalMessage { - _InternalMessage( - {this.source, - required this.destination, - required this.amount, - required this.bounce, - required this.body}); - factory _InternalMessage.fromJson(Map json) => - _$InternalMessageFromJson(json); - - @override - final Address? source; - @override - final Address destination; - @override - final BigInt amount; - @override - final bool bounce; - @override - final String body; - - /// Create a copy of InternalMessage - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$InternalMessageCopyWith<_InternalMessage> get copyWith => - __$InternalMessageCopyWithImpl<_InternalMessage>(this, _$identity); - - @override - Map toJson() { - return _$InternalMessageToJson( - this, - ); - } + _InternalMessage({this.source, required this.destination, required this.amount, required this.bounce, required this.body}); + factory _InternalMessage.fromJson(Map json) => _$InternalMessageFromJson(json); + +@override final Address? source; +@override final Address destination; +@override final BigInt amount; +@override final bool bounce; +@override final String body; + +/// Create a copy of InternalMessage +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$InternalMessageCopyWith<_InternalMessage> get copyWith => __$InternalMessageCopyWithImpl<_InternalMessage>(this, _$identity); + +@override +Map toJson() { + return _$InternalMessageToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _InternalMessage && - (identical(other.source, source) || other.source == source) && - (identical(other.destination, destination) || - other.destination == destination) && - (identical(other.amount, amount) || other.amount == amount) && - (identical(other.bounce, bounce) || other.bounce == bounce) && - (identical(other.body, body) || other.body == body)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _InternalMessage&&(identical(other.source, source) || other.source == source)&&(identical(other.destination, destination) || other.destination == destination)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.bounce, bounce) || other.bounce == bounce)&&(identical(other.body, body) || other.body == body)); +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, source, destination, amount, bounce, body); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,source,destination,amount,bounce,body); - @override - String toString() { - return 'InternalMessage(source: $source, destination: $destination, amount: $amount, bounce: $bounce, body: $body)'; - } +@override +String toString() { + return 'InternalMessage(source: $source, destination: $destination, amount: $amount, bounce: $bounce, body: $body)'; } -/// @nodoc -abstract mixin class _$InternalMessageCopyWith<$Res> - implements $InternalMessageCopyWith<$Res> { - factory _$InternalMessageCopyWith( - _InternalMessage value, $Res Function(_InternalMessage) _then) = - __$InternalMessageCopyWithImpl; - @override - @useResult - $Res call( - {Address? source, - Address destination, - BigInt amount, - bool bounce, - String body}); - - @override - $AddressCopyWith<$Res>? get source; - @override - $AddressCopyWith<$Res> get destination; + } +/// @nodoc +abstract mixin class _$InternalMessageCopyWith<$Res> implements $InternalMessageCopyWith<$Res> { + factory _$InternalMessageCopyWith(_InternalMessage value, $Res Function(_InternalMessage) _then) = __$InternalMessageCopyWithImpl; +@override @useResult +$Res call({ + Address? source, Address destination, BigInt amount, bool bounce, String body +}); + + +@override $AddressCopyWith<$Res>? get source;@override $AddressCopyWith<$Res> get destination; + +} /// @nodoc class __$InternalMessageCopyWithImpl<$Res> implements _$InternalMessageCopyWith<$Res> { @@ -232,64 +285,41 @@ class __$InternalMessageCopyWithImpl<$Res> final _InternalMessage _self; final $Res Function(_InternalMessage) _then; - /// Create a copy of InternalMessage - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? source = freezed, - Object? destination = null, - Object? amount = null, - Object? bounce = null, - Object? body = null, - }) { - return _then(_InternalMessage( - source: freezed == source - ? _self.source - : source // ignore: cast_nullable_to_non_nullable - as Address?, - destination: null == destination - ? _self.destination - : destination // ignore: cast_nullable_to_non_nullable - as Address, - amount: null == amount - ? _self.amount - : amount // ignore: cast_nullable_to_non_nullable - as BigInt, - bounce: null == bounce - ? _self.bounce - : bounce // ignore: cast_nullable_to_non_nullable - as bool, - body: null == body - ? _self.body - : body // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of InternalMessage +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? source = freezed,Object? destination = null,Object? amount = null,Object? bounce = null,Object? body = null,}) { + return _then(_InternalMessage( +source: freezed == source ? _self.source : source // ignore: cast_nullable_to_non_nullable +as Address?,destination: null == destination ? _self.destination : destination // ignore: cast_nullable_to_non_nullable +as Address,amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable +as BigInt,bounce: null == bounce ? _self.bounce : bounce // ignore: cast_nullable_to_non_nullable +as bool,body: null == body ? _self.body : body // ignore: cast_nullable_to_non_nullable +as String, + )); +} - /// Create a copy of InternalMessage - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res>? get source { +/// Create a copy of InternalMessage +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res>? get source { if (_self.source == null) { - return null; - } - - return $AddressCopyWith<$Res>(_self.source!, (value) { - return _then(_self.copyWith(source: value)); - }); + return null; } - /// Create a copy of InternalMessage - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get destination { - return $AddressCopyWith<$Res>(_self.destination, (value) { - return _then(_self.copyWith(destination: value)); - }); - } + return $AddressCopyWith<$Res>(_self.source!, (value) { + return _then(_self.copyWith(source: value)); + }); +}/// Create a copy of InternalMessage +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get destination { + + return $AddressCopyWith<$Res>(_self.destination, (value) { + return _then(_self.copyWith(destination: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/last_transaction_id.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/last_transaction_id.freezed.dart index aec589aa..b00a08f6 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/last_transaction_id.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/last_transaction_id.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,52 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$LastTransactionId { - bool get isExact; - String get lt; - @JsonKey(includeIfNull: false) - String? get hash; - - /// Create a copy of LastTransactionId - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $LastTransactionIdCopyWith get copyWith => - _$LastTransactionIdCopyWithImpl( - this as LastTransactionId, _$identity); + + bool get isExact; String get lt;@JsonKey(includeIfNull: false) String? get hash; +/// Create a copy of LastTransactionId +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$LastTransactionIdCopyWith get copyWith => _$LastTransactionIdCopyWithImpl(this as LastTransactionId, _$identity); /// Serializes this LastTransactionId to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is LastTransactionId && - (identical(other.isExact, isExact) || other.isExact == isExact) && - (identical(other.lt, lt) || other.lt == lt) && - (identical(other.hash, hash) || other.hash == hash)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, isExact, lt, hash); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LastTransactionId&&(identical(other.isExact, isExact) || other.isExact == isExact)&&(identical(other.lt, lt) || other.lt == lt)&&(identical(other.hash, hash) || other.hash == hash)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,isExact,lt,hash); - @override - String toString() { - return 'LastTransactionId(isExact: $isExact, lt: $lt, hash: $hash)'; - } +@override +String toString() { + return 'LastTransactionId(isExact: $isExact, lt: $lt, hash: $hash)'; } -/// @nodoc -abstract mixin class $LastTransactionIdCopyWith<$Res> { - factory $LastTransactionIdCopyWith( - LastTransactionId value, $Res Function(LastTransactionId) _then) = - _$LastTransactionIdCopyWithImpl; - @useResult - $Res call( - {bool isExact, String lt, @JsonKey(includeIfNull: false) String? hash}); + } +/// @nodoc +abstract mixin class $LastTransactionIdCopyWith<$Res> { + factory $LastTransactionIdCopyWith(LastTransactionId value, $Res Function(LastTransactionId) _then) = _$LastTransactionIdCopyWithImpl; +@useResult +$Res call({ + bool isExact, String lt,@JsonKey(includeIfNull: false) String? hash +}); + + + + +} /// @nodoc class _$LastTransactionIdCopyWithImpl<$Res> implements $LastTransactionIdCopyWith<$Res> { @@ -69,97 +63,195 @@ class _$LastTransactionIdCopyWithImpl<$Res> final LastTransactionId _self; final $Res Function(LastTransactionId) _then; - /// Create a copy of LastTransactionId - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? isExact = null, - Object? lt = null, - Object? hash = freezed, - }) { - return _then(_self.copyWith( - isExact: null == isExact - ? _self.isExact - : isExact // ignore: cast_nullable_to_non_nullable - as bool, - lt: null == lt - ? _self.lt - : lt // ignore: cast_nullable_to_non_nullable - as String, - hash: freezed == hash - ? _self.hash - : hash // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of LastTransactionId +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? isExact = null,Object? lt = null,Object? hash = freezed,}) { + return _then(_self.copyWith( +isExact: null == isExact ? _self.isExact : isExact // ignore: cast_nullable_to_non_nullable +as bool,lt: null == lt ? _self.lt : lt // ignore: cast_nullable_to_non_nullable +as String,hash: freezed == hash ? _self.hash : hash // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [LastTransactionId]. +extension LastTransactionIdPatterns on LastTransactionId { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LastTransactionId value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LastTransactionId() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LastTransactionId value) $default,){ +final _that = this; +switch (_that) { +case _LastTransactionId(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LastTransactionId value)? $default,){ +final _that = this; +switch (_that) { +case _LastTransactionId() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool isExact, String lt, @JsonKey(includeIfNull: false) String? hash)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LastTransactionId() when $default != null: +return $default(_that.isExact,_that.lt,_that.hash);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool isExact, String lt, @JsonKey(includeIfNull: false) String? hash) $default,) {final _that = this; +switch (_that) { +case _LastTransactionId(): +return $default(_that.isExact,_that.lt,_that.hash);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool isExact, String lt, @JsonKey(includeIfNull: false) String? hash)? $default,) {final _that = this; +switch (_that) { +case _LastTransactionId() when $default != null: +return $default(_that.isExact,_that.lt,_that.hash);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _LastTransactionId implements LastTransactionId { - const _LastTransactionId( - {required this.isExact, - required this.lt, - @JsonKey(includeIfNull: false) this.hash}); - factory _LastTransactionId.fromJson(Map json) => - _$LastTransactionIdFromJson(json); - - @override - final bool isExact; - @override - final String lt; - @override - @JsonKey(includeIfNull: false) - final String? hash; - - /// Create a copy of LastTransactionId - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$LastTransactionIdCopyWith<_LastTransactionId> get copyWith => - __$LastTransactionIdCopyWithImpl<_LastTransactionId>(this, _$identity); - - @override - Map toJson() { - return _$LastTransactionIdToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _LastTransactionId && - (identical(other.isExact, isExact) || other.isExact == isExact) && - (identical(other.lt, lt) || other.lt == lt) && - (identical(other.hash, hash) || other.hash == hash)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, isExact, lt, hash); - - @override - String toString() { - return 'LastTransactionId(isExact: $isExact, lt: $lt, hash: $hash)'; - } + const _LastTransactionId({required this.isExact, required this.lt, @JsonKey(includeIfNull: false) this.hash}); + factory _LastTransactionId.fromJson(Map json) => _$LastTransactionIdFromJson(json); + +@override final bool isExact; +@override final String lt; +@override@JsonKey(includeIfNull: false) final String? hash; + +/// Create a copy of LastTransactionId +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LastTransactionIdCopyWith<_LastTransactionId> get copyWith => __$LastTransactionIdCopyWithImpl<_LastTransactionId>(this, _$identity); + +@override +Map toJson() { + return _$LastTransactionIdToJson(this, ); } -/// @nodoc -abstract mixin class _$LastTransactionIdCopyWith<$Res> - implements $LastTransactionIdCopyWith<$Res> { - factory _$LastTransactionIdCopyWith( - _LastTransactionId value, $Res Function(_LastTransactionId) _then) = - __$LastTransactionIdCopyWithImpl; - @override - @useResult - $Res call( - {bool isExact, String lt, @JsonKey(includeIfNull: false) String? hash}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LastTransactionId&&(identical(other.isExact, isExact) || other.isExact == isExact)&&(identical(other.lt, lt) || other.lt == lt)&&(identical(other.hash, hash) || other.hash == hash)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,isExact,lt,hash); + +@override +String toString() { + return 'LastTransactionId(isExact: $isExact, lt: $lt, hash: $hash)'; +} + + } +/// @nodoc +abstract mixin class _$LastTransactionIdCopyWith<$Res> implements $LastTransactionIdCopyWith<$Res> { + factory _$LastTransactionIdCopyWith(_LastTransactionId value, $Res Function(_LastTransactionId) _then) = __$LastTransactionIdCopyWithImpl; +@override @useResult +$Res call({ + bool isExact, String lt,@JsonKey(includeIfNull: false) String? hash +}); + + + + +} /// @nodoc class __$LastTransactionIdCopyWithImpl<$Res> implements _$LastTransactionIdCopyWith<$Res> { @@ -168,30 +260,18 @@ class __$LastTransactionIdCopyWithImpl<$Res> final _LastTransactionId _self; final $Res Function(_LastTransactionId) _then; - /// Create a copy of LastTransactionId - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? isExact = null, - Object? lt = null, - Object? hash = freezed, - }) { - return _then(_LastTransactionId( - isExact: null == isExact - ? _self.isExact - : isExact // ignore: cast_nullable_to_non_nullable - as bool, - lt: null == lt - ? _self.lt - : lt // ignore: cast_nullable_to_non_nullable - as String, - hash: freezed == hash - ? _self.hash - : hash // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of LastTransactionId +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? isExact = null,Object? lt = null,Object? hash = freezed,}) { + return _then(_LastTransactionId( +isExact: null == isExact ? _self.isExact : isExact // ignore: cast_nullable_to_non_nullable +as bool,lt: null == lt ? _self.lt : lt // ignore: cast_nullable_to_non_nullable +as String,hash: freezed == hash ? _self.hash : hash // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/last_transaction_id.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/last_transaction_id.g.dart index b4645153..65833870 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/last_transaction_id.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/last_transaction_id.g.dart @@ -17,5 +17,5 @@ Map _$LastTransactionIdToJson(_LastTransactionId instance) => { 'isExact': instance.isExact, 'lt': instance.lt, - if (instance.hash case final value?) 'hash': value, + 'hash': ?instance.hash, }; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/message.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/message.freezed.dart index 1ec3d3b2..521c6743 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/message.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/message.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,337 +14,327 @@ T _$identity(T value) => value; /// @nodoc mixin _$Message { - String get hash; - Address? get src; - Address? get dst; - BigInt get value; - bool get bounce; - bool get bounced; - String? get body; - String? get bodyHash; - - /// Create a copy of Message - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $MessageCopyWith get copyWith => - _$MessageCopyWithImpl(this as Message, _$identity); + + String get hash; Address? get src; Address? get dst; BigInt get value; bool get bounce; bool get bounced; String? get body; String? get bodyHash; +/// Create a copy of Message +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$MessageCopyWith get copyWith => _$MessageCopyWithImpl(this as Message, _$identity); /// Serializes this Message to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is Message && - (identical(other.hash, hash) || other.hash == hash) && - (identical(other.src, src) || other.src == src) && - (identical(other.dst, dst) || other.dst == dst) && - (identical(other.value, value) || other.value == value) && - (identical(other.bounce, bounce) || other.bounce == bounce) && - (identical(other.bounced, bounced) || other.bounced == bounced) && - (identical(other.body, body) || other.body == body) && - (identical(other.bodyHash, bodyHash) || - other.bodyHash == bodyHash)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, hash, src, dst, value, bounce, bounced, body, bodyHash); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Message&&(identical(other.hash, hash) || other.hash == hash)&&(identical(other.src, src) || other.src == src)&&(identical(other.dst, dst) || other.dst == dst)&&(identical(other.value, value) || other.value == value)&&(identical(other.bounce, bounce) || other.bounce == bounce)&&(identical(other.bounced, bounced) || other.bounced == bounced)&&(identical(other.body, body) || other.body == body)&&(identical(other.bodyHash, bodyHash) || other.bodyHash == bodyHash)); +} - @override - String toString() { - return 'Message(hash: $hash, src: $src, dst: $dst, value: $value, bounce: $bounce, bounced: $bounced, body: $body, bodyHash: $bodyHash)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,hash,src,dst,value,bounce,bounced,body,bodyHash); + +@override +String toString() { + return 'Message(hash: $hash, src: $src, dst: $dst, value: $value, bounce: $bounce, bounced: $bounced, body: $body, bodyHash: $bodyHash)'; } -/// @nodoc -abstract mixin class $MessageCopyWith<$Res> { - factory $MessageCopyWith(Message value, $Res Function(Message) _then) = - _$MessageCopyWithImpl; - @useResult - $Res call( - {String hash, - Address? src, - Address? dst, - BigInt value, - bool bounce, - bool bounced, - String? body, - String? bodyHash}); - - $AddressCopyWith<$Res>? get src; - $AddressCopyWith<$Res>? get dst; + } /// @nodoc -class _$MessageCopyWithImpl<$Res> implements $MessageCopyWith<$Res> { +abstract mixin class $MessageCopyWith<$Res> { + factory $MessageCopyWith(Message value, $Res Function(Message) _then) = _$MessageCopyWithImpl; +@useResult +$Res call({ + String hash, Address? src, Address? dst, BigInt value, bool bounce, bool bounced, String? body, String? bodyHash +}); + + +$AddressCopyWith<$Res>? get src;$AddressCopyWith<$Res>? get dst; + +} +/// @nodoc +class _$MessageCopyWithImpl<$Res> + implements $MessageCopyWith<$Res> { _$MessageCopyWithImpl(this._self, this._then); final Message _self; final $Res Function(Message) _then; - /// Create a copy of Message - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? hash = null, - Object? src = freezed, - Object? dst = freezed, - Object? value = null, - Object? bounce = null, - Object? bounced = null, - Object? body = freezed, - Object? bodyHash = freezed, - }) { - return _then(_self.copyWith( - hash: null == hash - ? _self.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - src: freezed == src - ? _self.src - : src // ignore: cast_nullable_to_non_nullable - as Address?, - dst: freezed == dst - ? _self.dst - : dst // ignore: cast_nullable_to_non_nullable - as Address?, - value: null == value - ? _self.value - : value // ignore: cast_nullable_to_non_nullable - as BigInt, - bounce: null == bounce - ? _self.bounce - : bounce // ignore: cast_nullable_to_non_nullable - as bool, - bounced: null == bounced - ? _self.bounced - : bounced // ignore: cast_nullable_to_non_nullable - as bool, - body: freezed == body - ? _self.body - : body // ignore: cast_nullable_to_non_nullable - as String?, - bodyHash: freezed == bodyHash - ? _self.bodyHash - : bodyHash // ignore: cast_nullable_to_non_nullable - as String?, - )); - } - - /// Create a copy of Message - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res>? get src { +/// Create a copy of Message +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? hash = null,Object? src = freezed,Object? dst = freezed,Object? value = null,Object? bounce = null,Object? bounced = null,Object? body = freezed,Object? bodyHash = freezed,}) { + return _then(_self.copyWith( +hash: null == hash ? _self.hash : hash // ignore: cast_nullable_to_non_nullable +as String,src: freezed == src ? _self.src : src // ignore: cast_nullable_to_non_nullable +as Address?,dst: freezed == dst ? _self.dst : dst // ignore: cast_nullable_to_non_nullable +as Address?,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable +as BigInt,bounce: null == bounce ? _self.bounce : bounce // ignore: cast_nullable_to_non_nullable +as bool,bounced: null == bounced ? _self.bounced : bounced // ignore: cast_nullable_to_non_nullable +as bool,body: freezed == body ? _self.body : body // ignore: cast_nullable_to_non_nullable +as String?,bodyHash: freezed == bodyHash ? _self.bodyHash : bodyHash // ignore: cast_nullable_to_non_nullable +as String?, + )); +} +/// Create a copy of Message +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res>? get src { if (_self.src == null) { - return null; - } - - return $AddressCopyWith<$Res>(_self.src!, (value) { - return _then(_self.copyWith(src: value)); - }); + return null; } - /// Create a copy of Message - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res>? get dst { + return $AddressCopyWith<$Res>(_self.src!, (value) { + return _then(_self.copyWith(src: value)); + }); +}/// Create a copy of Message +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res>? get dst { if (_self.dst == null) { - return null; - } - - return $AddressCopyWith<$Res>(_self.dst!, (value) { - return _then(_self.copyWith(dst: value)); - }); + return null; } + + return $AddressCopyWith<$Res>(_self.dst!, (value) { + return _then(_self.copyWith(dst: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [Message]. +extension MessagePatterns on Message { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _Message value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Message() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _Message value) $default,){ +final _that = this; +switch (_that) { +case _Message(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _Message value)? $default,){ +final _that = this; +switch (_that) { +case _Message() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String hash, Address? src, Address? dst, BigInt value, bool bounce, bool bounced, String? body, String? bodyHash)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Message() when $default != null: +return $default(_that.hash,_that.src,_that.dst,_that.value,_that.bounce,_that.bounced,_that.body,_that.bodyHash);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String hash, Address? src, Address? dst, BigInt value, bool bounce, bool bounced, String? body, String? bodyHash) $default,) {final _that = this; +switch (_that) { +case _Message(): +return $default(_that.hash,_that.src,_that.dst,_that.value,_that.bounce,_that.bounced,_that.body,_that.bodyHash);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String hash, Address? src, Address? dst, BigInt value, bool bounce, bool bounced, String? body, String? bodyHash)? $default,) {final _that = this; +switch (_that) { +case _Message() when $default != null: +return $default(_that.hash,_that.src,_that.dst,_that.value,_that.bounce,_that.bounced,_that.body,_that.bodyHash);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _Message implements Message { - const _Message( - {required this.hash, - this.src, - this.dst, - required this.value, - required this.bounce, - required this.bounced, - this.body, - this.bodyHash}); - factory _Message.fromJson(Map json) => - _$MessageFromJson(json); - - @override - final String hash; - @override - final Address? src; - @override - final Address? dst; - @override - final BigInt value; - @override - final bool bounce; - @override - final bool bounced; - @override - final String? body; - @override - final String? bodyHash; - - /// Create a copy of Message - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$MessageCopyWith<_Message> get copyWith => - __$MessageCopyWithImpl<_Message>(this, _$identity); - - @override - Map toJson() { - return _$MessageToJson( - this, - ); - } + const _Message({required this.hash, this.src, this.dst, required this.value, required this.bounce, required this.bounced, this.body, this.bodyHash}); + factory _Message.fromJson(Map json) => _$MessageFromJson(json); + +@override final String hash; +@override final Address? src; +@override final Address? dst; +@override final BigInt value; +@override final bool bounce; +@override final bool bounced; +@override final String? body; +@override final String? bodyHash; + +/// Create a copy of Message +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$MessageCopyWith<_Message> get copyWith => __$MessageCopyWithImpl<_Message>(this, _$identity); + +@override +Map toJson() { + return _$MessageToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _Message && - (identical(other.hash, hash) || other.hash == hash) && - (identical(other.src, src) || other.src == src) && - (identical(other.dst, dst) || other.dst == dst) && - (identical(other.value, value) || other.value == value) && - (identical(other.bounce, bounce) || other.bounce == bounce) && - (identical(other.bounced, bounced) || other.bounced == bounced) && - (identical(other.body, body) || other.body == body) && - (identical(other.bodyHash, bodyHash) || - other.bodyHash == bodyHash)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Message&&(identical(other.hash, hash) || other.hash == hash)&&(identical(other.src, src) || other.src == src)&&(identical(other.dst, dst) || other.dst == dst)&&(identical(other.value, value) || other.value == value)&&(identical(other.bounce, bounce) || other.bounce == bounce)&&(identical(other.bounced, bounced) || other.bounced == bounced)&&(identical(other.body, body) || other.body == body)&&(identical(other.bodyHash, bodyHash) || other.bodyHash == bodyHash)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,hash,src,dst,value,bounce,bounced,body,bodyHash); + +@override +String toString() { + return 'Message(hash: $hash, src: $src, dst: $dst, value: $value, bounce: $bounce, bounced: $bounced, body: $body, bodyHash: $bodyHash)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, hash, src, dst, value, bounce, bounced, body, bodyHash); - @override - String toString() { - return 'Message(hash: $hash, src: $src, dst: $dst, value: $value, bounce: $bounce, bounced: $bounced, body: $body, bodyHash: $bodyHash)'; - } } /// @nodoc abstract mixin class _$MessageCopyWith<$Res> implements $MessageCopyWith<$Res> { - factory _$MessageCopyWith(_Message value, $Res Function(_Message) _then) = - __$MessageCopyWithImpl; - @override - @useResult - $Res call( - {String hash, - Address? src, - Address? dst, - BigInt value, - bool bounce, - bool bounced, - String? body, - String? bodyHash}); - - @override - $AddressCopyWith<$Res>? get src; - @override - $AddressCopyWith<$Res>? get dst; -} + factory _$MessageCopyWith(_Message value, $Res Function(_Message) _then) = __$MessageCopyWithImpl; +@override @useResult +$Res call({ + String hash, Address? src, Address? dst, BigInt value, bool bounce, bool bounced, String? body, String? bodyHash +}); + + +@override $AddressCopyWith<$Res>? get src;@override $AddressCopyWith<$Res>? get dst; +} /// @nodoc -class __$MessageCopyWithImpl<$Res> implements _$MessageCopyWith<$Res> { +class __$MessageCopyWithImpl<$Res> + implements _$MessageCopyWith<$Res> { __$MessageCopyWithImpl(this._self, this._then); final _Message _self; final $Res Function(_Message) _then; - /// Create a copy of Message - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? hash = null, - Object? src = freezed, - Object? dst = freezed, - Object? value = null, - Object? bounce = null, - Object? bounced = null, - Object? body = freezed, - Object? bodyHash = freezed, - }) { - return _then(_Message( - hash: null == hash - ? _self.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - src: freezed == src - ? _self.src - : src // ignore: cast_nullable_to_non_nullable - as Address?, - dst: freezed == dst - ? _self.dst - : dst // ignore: cast_nullable_to_non_nullable - as Address?, - value: null == value - ? _self.value - : value // ignore: cast_nullable_to_non_nullable - as BigInt, - bounce: null == bounce - ? _self.bounce - : bounce // ignore: cast_nullable_to_non_nullable - as bool, - bounced: null == bounced - ? _self.bounced - : bounced // ignore: cast_nullable_to_non_nullable - as bool, - body: freezed == body - ? _self.body - : body // ignore: cast_nullable_to_non_nullable - as String?, - bodyHash: freezed == bodyHash - ? _self.bodyHash - : bodyHash // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of Message +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? hash = null,Object? src = freezed,Object? dst = freezed,Object? value = null,Object? bounce = null,Object? bounced = null,Object? body = freezed,Object? bodyHash = freezed,}) { + return _then(_Message( +hash: null == hash ? _self.hash : hash // ignore: cast_nullable_to_non_nullable +as String,src: freezed == src ? _self.src : src // ignore: cast_nullable_to_non_nullable +as Address?,dst: freezed == dst ? _self.dst : dst // ignore: cast_nullable_to_non_nullable +as Address?,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable +as BigInt,bounce: null == bounce ? _self.bounce : bounce // ignore: cast_nullable_to_non_nullable +as bool,bounced: null == bounced ? _self.bounced : bounced // ignore: cast_nullable_to_non_nullable +as bool,body: freezed == body ? _self.body : body // ignore: cast_nullable_to_non_nullable +as String?,bodyHash: freezed == bodyHash ? _self.bodyHash : bodyHash // ignore: cast_nullable_to_non_nullable +as String?, + )); +} - /// Create a copy of Message - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res>? get src { +/// Create a copy of Message +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res>? get src { if (_self.src == null) { - return null; - } - - return $AddressCopyWith<$Res>(_self.src!, (value) { - return _then(_self.copyWith(src: value)); - }); + return null; } - /// Create a copy of Message - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res>? get dst { + return $AddressCopyWith<$Res>(_self.src!, (value) { + return _then(_self.copyWith(src: value)); + }); +}/// Create a copy of Message +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res>? get dst { if (_self.dst == null) { - return null; - } - - return $AddressCopyWith<$Res>(_self.dst!, (value) { - return _then(_self.copyWith(dst: value)); - }); + return null; } + + return $AddressCopyWith<$Res>(_self.dst!, (value) { + return _then(_self.copyWith(dst: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/message.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/message.g.dart index 44237843..bfe3692e 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/message.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/message.g.dart @@ -7,23 +7,23 @@ part of 'message.dart'; // ************************************************************************** _Message _$MessageFromJson(Map json) => _Message( - hash: json['hash'] as String, - src: json['src'] == null ? null : Address.fromJson(json['src'] as String), - dst: json['dst'] == null ? null : Address.fromJson(json['dst'] as String), - value: BigInt.parse(json['value'] as String), - bounce: json['bounce'] as bool, - bounced: json['bounced'] as bool, - body: json['body'] as String?, - bodyHash: json['bodyHash'] as String?, - ); + hash: json['hash'] as String, + src: json['src'] == null ? null : Address.fromJson(json['src'] as String), + dst: json['dst'] == null ? null : Address.fromJson(json['dst'] as String), + value: BigInt.parse(json['value'] as String), + bounce: json['bounce'] as bool, + bounced: json['bounced'] as bool, + body: json['body'] as String?, + bodyHash: json['bodyHash'] as String?, +); Map _$MessageToJson(_Message instance) => { - 'hash': instance.hash, - 'src': instance.src?.toJson(), - 'dst': instance.dst?.toJson(), - 'value': instance.value.toString(), - 'bounce': instance.bounce, - 'bounced': instance.bounced, - 'body': instance.body, - 'bodyHash': instance.bodyHash, - }; + 'hash': instance.hash, + 'src': instance.src?.toJson(), + 'dst': instance.dst?.toJson(), + 'value': instance.value.toString(), + 'bounce': instance.bounce, + 'bounced': instance.bounced, + 'body': instance.body, + 'bodyHash': instance.bodyHash, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/not_existing_contract.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/not_existing_contract.dart index 8a2ae4e3..2489bfd0 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/not_existing_contract.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/not_existing_contract.dart @@ -6,9 +6,8 @@ part 'not_existing_contract.g.dart'; @freezed sealed class NotExistingContract with _$NotExistingContract { - const factory NotExistingContract({ - required final GenTimings timings, - }) = _NotExistingContract; + const factory NotExistingContract({required final GenTimings timings}) = + _NotExistingContract; factory NotExistingContract.fromJson(Map json) => _$NotExistingContractFromJson(json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/not_existing_contract.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/not_existing_contract.freezed.dart index 486d27b0..f817ea21 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/not_existing_contract.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/not_existing_contract.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,48 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$NotExistingContract { - GenTimings get timings; - /// Create a copy of NotExistingContract - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $NotExistingContractCopyWith get copyWith => - _$NotExistingContractCopyWithImpl( - this as NotExistingContract, _$identity); + GenTimings get timings; +/// Create a copy of NotExistingContract +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$NotExistingContractCopyWith get copyWith => _$NotExistingContractCopyWithImpl(this as NotExistingContract, _$identity); /// Serializes this NotExistingContract to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is NotExistingContract && - (identical(other.timings, timings) || other.timings == timings)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, timings); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is NotExistingContract&&(identical(other.timings, timings) || other.timings == timings)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,timings); - @override - String toString() { - return 'NotExistingContract(timings: $timings)'; - } +@override +String toString() { + return 'NotExistingContract(timings: $timings)'; } -/// @nodoc -abstract mixin class $NotExistingContractCopyWith<$Res> { - factory $NotExistingContractCopyWith( - NotExistingContract value, $Res Function(NotExistingContract) _then) = - _$NotExistingContractCopyWithImpl; - @useResult - $Res call({GenTimings timings}); - $GenTimingsCopyWith<$Res> get timings; } +/// @nodoc +abstract mixin class $NotExistingContractCopyWith<$Res> { + factory $NotExistingContractCopyWith(NotExistingContract value, $Res Function(NotExistingContract) _then) = _$NotExistingContractCopyWithImpl; +@useResult +$Res call({ + GenTimings timings +}); + + +$GenTimingsCopyWith<$Res> get timings; + +} /// @nodoc class _$NotExistingContractCopyWithImpl<$Res> implements $NotExistingContractCopyWith<$Res> { @@ -65,90 +63,200 @@ class _$NotExistingContractCopyWithImpl<$Res> final NotExistingContract _self; final $Res Function(NotExistingContract) _then; - /// Create a copy of NotExistingContract - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? timings = null, - }) { - return _then(_self.copyWith( - timings: null == timings - ? _self.timings - : timings // ignore: cast_nullable_to_non_nullable - as GenTimings, - )); - } - - /// Create a copy of NotExistingContract - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $GenTimingsCopyWith<$Res> get timings { - return $GenTimingsCopyWith<$Res>(_self.timings, (value) { - return _then(_self.copyWith(timings: value)); - }); - } +/// Create a copy of NotExistingContract +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? timings = null,}) { + return _then(_self.copyWith( +timings: null == timings ? _self.timings : timings // ignore: cast_nullable_to_non_nullable +as GenTimings, + )); +} +/// Create a copy of NotExistingContract +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GenTimingsCopyWith<$Res> get timings { + + return $GenTimingsCopyWith<$Res>(_self.timings, (value) { + return _then(_self.copyWith(timings: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [NotExistingContract]. +extension NotExistingContractPatterns on NotExistingContract { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _NotExistingContract value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _NotExistingContract() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _NotExistingContract value) $default,){ +final _that = this; +switch (_that) { +case _NotExistingContract(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _NotExistingContract value)? $default,){ +final _that = this; +switch (_that) { +case _NotExistingContract() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( GenTimings timings)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _NotExistingContract() when $default != null: +return $default(_that.timings);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( GenTimings timings) $default,) {final _that = this; +switch (_that) { +case _NotExistingContract(): +return $default(_that.timings);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( GenTimings timings)? $default,) {final _that = this; +switch (_that) { +case _NotExistingContract() when $default != null: +return $default(_that.timings);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _NotExistingContract implements NotExistingContract { const _NotExistingContract({required this.timings}); - factory _NotExistingContract.fromJson(Map json) => - _$NotExistingContractFromJson(json); - - @override - final GenTimings timings; - - /// Create a copy of NotExistingContract - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$NotExistingContractCopyWith<_NotExistingContract> get copyWith => - __$NotExistingContractCopyWithImpl<_NotExistingContract>( - this, _$identity); - - @override - Map toJson() { - return _$NotExistingContractToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _NotExistingContract && - (identical(other.timings, timings) || other.timings == timings)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, timings); - - @override - String toString() { - return 'NotExistingContract(timings: $timings)'; - } + factory _NotExistingContract.fromJson(Map json) => _$NotExistingContractFromJson(json); + +@override final GenTimings timings; + +/// Create a copy of NotExistingContract +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$NotExistingContractCopyWith<_NotExistingContract> get copyWith => __$NotExistingContractCopyWithImpl<_NotExistingContract>(this, _$identity); + +@override +Map toJson() { + return _$NotExistingContractToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _NotExistingContract&&(identical(other.timings, timings) || other.timings == timings)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,timings); + +@override +String toString() { + return 'NotExistingContract(timings: $timings)'; } -/// @nodoc -abstract mixin class _$NotExistingContractCopyWith<$Res> - implements $NotExistingContractCopyWith<$Res> { - factory _$NotExistingContractCopyWith(_NotExistingContract value, - $Res Function(_NotExistingContract) _then) = - __$NotExistingContractCopyWithImpl; - @override - @useResult - $Res call({GenTimings timings}); - @override - $GenTimingsCopyWith<$Res> get timings; } +/// @nodoc +abstract mixin class _$NotExistingContractCopyWith<$Res> implements $NotExistingContractCopyWith<$Res> { + factory _$NotExistingContractCopyWith(_NotExistingContract value, $Res Function(_NotExistingContract) _then) = __$NotExistingContractCopyWithImpl; +@override @useResult +$Res call({ + GenTimings timings +}); + + +@override $GenTimingsCopyWith<$Res> get timings; + +} /// @nodoc class __$NotExistingContractCopyWithImpl<$Res> implements _$NotExistingContractCopyWith<$Res> { @@ -157,30 +265,25 @@ class __$NotExistingContractCopyWithImpl<$Res> final _NotExistingContract _self; final $Res Function(_NotExistingContract) _then; - /// Create a copy of NotExistingContract - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? timings = null, - }) { - return _then(_NotExistingContract( - timings: null == timings - ? _self.timings - : timings // ignore: cast_nullable_to_non_nullable - as GenTimings, - )); - } - - /// Create a copy of NotExistingContract - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $GenTimingsCopyWith<$Res> get timings { - return $GenTimingsCopyWith<$Res>(_self.timings, (value) { - return _then(_self.copyWith(timings: value)); - }); - } +/// Create a copy of NotExistingContract +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? timings = null,}) { + return _then(_NotExistingContract( +timings: null == timings ? _self.timings : timings // ignore: cast_nullable_to_non_nullable +as GenTimings, + )); +} + +/// Create a copy of NotExistingContract +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$GenTimingsCopyWith<$Res> get timings { + + return $GenTimingsCopyWith<$Res>(_self.timings, (value) { + return _then(_self.copyWith(timings: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/not_existing_contract.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/not_existing_contract.g.dart index b12de2fa..294fb620 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/not_existing_contract.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/not_existing_contract.g.dart @@ -12,7 +12,5 @@ _NotExistingContract _$NotExistingContractFromJson(Map json) => ); Map _$NotExistingContractToJson( - _NotExistingContract instance) => - { - 'timings': instance.timings.toJson(), - }; + _NotExistingContract instance, +) => {'timings': instance.timings.toJson()}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_expired_payload.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_expired_payload.dart index 80645ea0..6c798161 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_expired_payload.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_expired_payload.dart @@ -7,10 +7,7 @@ part 'on_message_expired_payload.g.dart'; @freezed sealed class OnMessageExpiredPayload with _$OnMessageExpiredPayload { - @JsonSerializable( - fieldRename: FieldRename.snake, - explicitToJson: true, - ) + @JsonSerializable(fieldRename: FieldRename.snake, explicitToJson: true) const factory OnMessageExpiredPayload({ required final PendingTransaction pendingTransaction, }) = _OnMessageExpiredPayload; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_expired_payload.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_expired_payload.freezed.dart index 3c2bf916..ad88c075 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_expired_payload.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_expired_payload.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,49 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$OnMessageExpiredPayload { - PendingTransaction get pendingTransaction; - /// Create a copy of OnMessageExpiredPayload - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $OnMessageExpiredPayloadCopyWith get copyWith => - _$OnMessageExpiredPayloadCopyWithImpl( - this as OnMessageExpiredPayload, _$identity); + PendingTransaction get pendingTransaction; +/// Create a copy of OnMessageExpiredPayload +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$OnMessageExpiredPayloadCopyWith get copyWith => _$OnMessageExpiredPayloadCopyWithImpl(this as OnMessageExpiredPayload, _$identity); /// Serializes this OnMessageExpiredPayload to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is OnMessageExpiredPayload && - (identical(other.pendingTransaction, pendingTransaction) || - other.pendingTransaction == pendingTransaction)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, pendingTransaction); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is OnMessageExpiredPayload&&(identical(other.pendingTransaction, pendingTransaction) || other.pendingTransaction == pendingTransaction)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,pendingTransaction); - @override - String toString() { - return 'OnMessageExpiredPayload(pendingTransaction: $pendingTransaction)'; - } +@override +String toString() { + return 'OnMessageExpiredPayload(pendingTransaction: $pendingTransaction)'; } -/// @nodoc -abstract mixin class $OnMessageExpiredPayloadCopyWith<$Res> { - factory $OnMessageExpiredPayloadCopyWith(OnMessageExpiredPayload value, - $Res Function(OnMessageExpiredPayload) _then) = - _$OnMessageExpiredPayloadCopyWithImpl; - @useResult - $Res call({PendingTransaction pendingTransaction}); - $PendingTransactionCopyWith<$Res> get pendingTransaction; } +/// @nodoc +abstract mixin class $OnMessageExpiredPayloadCopyWith<$Res> { + factory $OnMessageExpiredPayloadCopyWith(OnMessageExpiredPayload value, $Res Function(OnMessageExpiredPayload) _then) = _$OnMessageExpiredPayloadCopyWithImpl; +@useResult +$Res call({ + PendingTransaction pendingTransaction +}); + + +$PendingTransactionCopyWith<$Res> get pendingTransaction; + +} /// @nodoc class _$OnMessageExpiredPayloadCopyWithImpl<$Res> implements $OnMessageExpiredPayloadCopyWith<$Res> { @@ -66,30 +63,149 @@ class _$OnMessageExpiredPayloadCopyWithImpl<$Res> final OnMessageExpiredPayload _self; final $Res Function(OnMessageExpiredPayload) _then; - /// Create a copy of OnMessageExpiredPayload - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? pendingTransaction = null, - }) { - return _then(_self.copyWith( - pendingTransaction: null == pendingTransaction - ? _self.pendingTransaction - : pendingTransaction // ignore: cast_nullable_to_non_nullable - as PendingTransaction, - )); - } - - /// Create a copy of OnMessageExpiredPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PendingTransactionCopyWith<$Res> get pendingTransaction { - return $PendingTransactionCopyWith<$Res>(_self.pendingTransaction, (value) { - return _then(_self.copyWith(pendingTransaction: value)); - }); - } +/// Create a copy of OnMessageExpiredPayload +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? pendingTransaction = null,}) { + return _then(_self.copyWith( +pendingTransaction: null == pendingTransaction ? _self.pendingTransaction : pendingTransaction // ignore: cast_nullable_to_non_nullable +as PendingTransaction, + )); +} +/// Create a copy of OnMessageExpiredPayload +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PendingTransactionCopyWith<$Res> get pendingTransaction { + + return $PendingTransactionCopyWith<$Res>(_self.pendingTransaction, (value) { + return _then(_self.copyWith(pendingTransaction: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [OnMessageExpiredPayload]. +extension OnMessageExpiredPayloadPatterns on OnMessageExpiredPayload { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _OnMessageExpiredPayload value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _OnMessageExpiredPayload() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _OnMessageExpiredPayload value) $default,){ +final _that = this; +switch (_that) { +case _OnMessageExpiredPayload(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _OnMessageExpiredPayload value)? $default,){ +final _that = this; +switch (_that) { +case _OnMessageExpiredPayload() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PendingTransaction pendingTransaction)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _OnMessageExpiredPayload() when $default != null: +return $default(_that.pendingTransaction);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PendingTransaction pendingTransaction) $default,) {final _that = this; +switch (_that) { +case _OnMessageExpiredPayload(): +return $default(_that.pendingTransaction);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PendingTransaction pendingTransaction)? $default,) {final _that = this; +switch (_that) { +case _OnMessageExpiredPayload() when $default != null: +return $default(_that.pendingTransaction);case _: + return null; + +} +} + } /// @nodoc @@ -97,61 +213,50 @@ class _$OnMessageExpiredPayloadCopyWithImpl<$Res> @JsonSerializable(fieldRename: FieldRename.snake, explicitToJson: true) class _OnMessageExpiredPayload implements OnMessageExpiredPayload { const _OnMessageExpiredPayload({required this.pendingTransaction}); - factory _OnMessageExpiredPayload.fromJson(Map json) => - _$OnMessageExpiredPayloadFromJson(json); - - @override - final PendingTransaction pendingTransaction; - - /// Create a copy of OnMessageExpiredPayload - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$OnMessageExpiredPayloadCopyWith<_OnMessageExpiredPayload> get copyWith => - __$OnMessageExpiredPayloadCopyWithImpl<_OnMessageExpiredPayload>( - this, _$identity); - - @override - Map toJson() { - return _$OnMessageExpiredPayloadToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _OnMessageExpiredPayload && - (identical(other.pendingTransaction, pendingTransaction) || - other.pendingTransaction == pendingTransaction)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, pendingTransaction); - - @override - String toString() { - return 'OnMessageExpiredPayload(pendingTransaction: $pendingTransaction)'; - } + factory _OnMessageExpiredPayload.fromJson(Map json) => _$OnMessageExpiredPayloadFromJson(json); + +@override final PendingTransaction pendingTransaction; + +/// Create a copy of OnMessageExpiredPayload +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$OnMessageExpiredPayloadCopyWith<_OnMessageExpiredPayload> get copyWith => __$OnMessageExpiredPayloadCopyWithImpl<_OnMessageExpiredPayload>(this, _$identity); + +@override +Map toJson() { + return _$OnMessageExpiredPayloadToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _OnMessageExpiredPayload&&(identical(other.pendingTransaction, pendingTransaction) || other.pendingTransaction == pendingTransaction)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,pendingTransaction); + +@override +String toString() { + return 'OnMessageExpiredPayload(pendingTransaction: $pendingTransaction)'; } -/// @nodoc -abstract mixin class _$OnMessageExpiredPayloadCopyWith<$Res> - implements $OnMessageExpiredPayloadCopyWith<$Res> { - factory _$OnMessageExpiredPayloadCopyWith(_OnMessageExpiredPayload value, - $Res Function(_OnMessageExpiredPayload) _then) = - __$OnMessageExpiredPayloadCopyWithImpl; - @override - @useResult - $Res call({PendingTransaction pendingTransaction}); - @override - $PendingTransactionCopyWith<$Res> get pendingTransaction; } +/// @nodoc +abstract mixin class _$OnMessageExpiredPayloadCopyWith<$Res> implements $OnMessageExpiredPayloadCopyWith<$Res> { + factory _$OnMessageExpiredPayloadCopyWith(_OnMessageExpiredPayload value, $Res Function(_OnMessageExpiredPayload) _then) = __$OnMessageExpiredPayloadCopyWithImpl; +@override @useResult +$Res call({ + PendingTransaction pendingTransaction +}); + + +@override $PendingTransactionCopyWith<$Res> get pendingTransaction; + +} /// @nodoc class __$OnMessageExpiredPayloadCopyWithImpl<$Res> implements _$OnMessageExpiredPayloadCopyWith<$Res> { @@ -160,30 +265,25 @@ class __$OnMessageExpiredPayloadCopyWithImpl<$Res> final _OnMessageExpiredPayload _self; final $Res Function(_OnMessageExpiredPayload) _then; - /// Create a copy of OnMessageExpiredPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? pendingTransaction = null, - }) { - return _then(_OnMessageExpiredPayload( - pendingTransaction: null == pendingTransaction - ? _self.pendingTransaction - : pendingTransaction // ignore: cast_nullable_to_non_nullable - as PendingTransaction, - )); - } - - /// Create a copy of OnMessageExpiredPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PendingTransactionCopyWith<$Res> get pendingTransaction { - return $PendingTransactionCopyWith<$Res>(_self.pendingTransaction, (value) { - return _then(_self.copyWith(pendingTransaction: value)); - }); - } +/// Create a copy of OnMessageExpiredPayload +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? pendingTransaction = null,}) { + return _then(_OnMessageExpiredPayload( +pendingTransaction: null == pendingTransaction ? _self.pendingTransaction : pendingTransaction // ignore: cast_nullable_to_non_nullable +as PendingTransaction, + )); +} + +/// Create a copy of OnMessageExpiredPayload +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PendingTransactionCopyWith<$Res> get pendingTransaction { + + return $PendingTransactionCopyWith<$Res>(_self.pendingTransaction, (value) { + return _then(_self.copyWith(pendingTransaction: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_expired_payload.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_expired_payload.g.dart index 9a14791a..a4fb6d69 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_expired_payload.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_expired_payload.g.dart @@ -7,14 +7,15 @@ part of 'on_message_expired_payload.dart'; // ************************************************************************** _OnMessageExpiredPayload _$OnMessageExpiredPayloadFromJson( - Map json) => - _OnMessageExpiredPayload( - pendingTransaction: PendingTransaction.fromJson( - json['pending_transaction'] as Map), - ); + Map json, +) => _OnMessageExpiredPayload( + pendingTransaction: PendingTransaction.fromJson( + json['pending_transaction'] as Map, + ), +); Map _$OnMessageExpiredPayloadToJson( - _OnMessageExpiredPayload instance) => - { - 'pending_transaction': instance.pendingTransaction.toJson(), - }; + _OnMessageExpiredPayload instance, +) => { + 'pending_transaction': instance.pendingTransaction.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_sent_payload.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_sent_payload.dart index 109c68ea..edaf17f3 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_sent_payload.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_sent_payload.dart @@ -8,10 +8,7 @@ part 'on_message_sent_payload.g.dart'; @freezed sealed class OnMessageSentPayload with _$OnMessageSentPayload { - @JsonSerializable( - fieldRename: FieldRename.snake, - explicitToJson: true, - ) + @JsonSerializable(fieldRename: FieldRename.snake, explicitToJson: true) const factory OnMessageSentPayload({ required final PendingTransaction pendingTransaction, final Transaction? transaction, diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_sent_payload.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_sent_payload.freezed.dart index 49bc3892..8a8b1d9a 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_sent_payload.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_sent_payload.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,53 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$OnMessageSentPayload { - PendingTransaction get pendingTransaction; - Transaction? get transaction; - /// Create a copy of OnMessageSentPayload - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $OnMessageSentPayloadCopyWith get copyWith => - _$OnMessageSentPayloadCopyWithImpl( - this as OnMessageSentPayload, _$identity); + PendingTransaction get pendingTransaction; Transaction? get transaction; +/// Create a copy of OnMessageSentPayload +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$OnMessageSentPayloadCopyWith get copyWith => _$OnMessageSentPayloadCopyWithImpl(this as OnMessageSentPayload, _$identity); /// Serializes this OnMessageSentPayload to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is OnMessageSentPayload && - (identical(other.pendingTransaction, pendingTransaction) || - other.pendingTransaction == pendingTransaction) && - (identical(other.transaction, transaction) || - other.transaction == transaction)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, pendingTransaction, transaction); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is OnMessageSentPayload&&(identical(other.pendingTransaction, pendingTransaction) || other.pendingTransaction == pendingTransaction)&&(identical(other.transaction, transaction) || other.transaction == transaction)); +} - @override - String toString() { - return 'OnMessageSentPayload(pendingTransaction: $pendingTransaction, transaction: $transaction)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,pendingTransaction,transaction); + +@override +String toString() { + return 'OnMessageSentPayload(pendingTransaction: $pendingTransaction, transaction: $transaction)'; } -/// @nodoc -abstract mixin class $OnMessageSentPayloadCopyWith<$Res> { - factory $OnMessageSentPayloadCopyWith(OnMessageSentPayload value, - $Res Function(OnMessageSentPayload) _then) = - _$OnMessageSentPayloadCopyWithImpl; - @useResult - $Res call({PendingTransaction pendingTransaction, Transaction? transaction}); - $PendingTransactionCopyWith<$Res> get pendingTransaction; - $TransactionCopyWith<$Res>? get transaction; } +/// @nodoc +abstract mixin class $OnMessageSentPayloadCopyWith<$Res> { + factory $OnMessageSentPayloadCopyWith(OnMessageSentPayload value, $Res Function(OnMessageSentPayload) _then) = _$OnMessageSentPayloadCopyWithImpl; +@useResult +$Res call({ + PendingTransaction pendingTransaction, Transaction? transaction +}); + + +$PendingTransactionCopyWith<$Res> get pendingTransaction;$TransactionCopyWith<$Res>? get transaction; + +} /// @nodoc class _$OnMessageSentPayloadCopyWithImpl<$Res> implements $OnMessageSentPayloadCopyWith<$Res> { @@ -70,118 +63,214 @@ class _$OnMessageSentPayloadCopyWithImpl<$Res> final OnMessageSentPayload _self; final $Res Function(OnMessageSentPayload) _then; - /// Create a copy of OnMessageSentPayload - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? pendingTransaction = null, - Object? transaction = freezed, - }) { - return _then(_self.copyWith( - pendingTransaction: null == pendingTransaction - ? _self.pendingTransaction - : pendingTransaction // ignore: cast_nullable_to_non_nullable - as PendingTransaction, - transaction: freezed == transaction - ? _self.transaction - : transaction // ignore: cast_nullable_to_non_nullable - as Transaction?, - )); +/// Create a copy of OnMessageSentPayload +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? pendingTransaction = null,Object? transaction = freezed,}) { + return _then(_self.copyWith( +pendingTransaction: null == pendingTransaction ? _self.pendingTransaction : pendingTransaction // ignore: cast_nullable_to_non_nullable +as PendingTransaction,transaction: freezed == transaction ? _self.transaction : transaction // ignore: cast_nullable_to_non_nullable +as Transaction?, + )); +} +/// Create a copy of OnMessageSentPayload +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PendingTransactionCopyWith<$Res> get pendingTransaction { + + return $PendingTransactionCopyWith<$Res>(_self.pendingTransaction, (value) { + return _then(_self.copyWith(pendingTransaction: value)); + }); +}/// Create a copy of OnMessageSentPayload +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionCopyWith<$Res>? get transaction { + if (_self.transaction == null) { + return null; } - /// Create a copy of OnMessageSentPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PendingTransactionCopyWith<$Res> get pendingTransaction { - return $PendingTransactionCopyWith<$Res>(_self.pendingTransaction, (value) { - return _then(_self.copyWith(pendingTransaction: value)); - }); - } + return $TransactionCopyWith<$Res>(_self.transaction!, (value) { + return _then(_self.copyWith(transaction: value)); + }); +} +} - /// Create a copy of OnMessageSentPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionCopyWith<$Res>? get transaction { - if (_self.transaction == null) { - return null; - } - return $TransactionCopyWith<$Res>(_self.transaction!, (value) { - return _then(_self.copyWith(transaction: value)); - }); - } +/// Adds pattern-matching-related methods to [OnMessageSentPayload]. +extension OnMessageSentPayloadPatterns on OnMessageSentPayload { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _OnMessageSentPayload value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _OnMessageSentPayload() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _OnMessageSentPayload value) $default,){ +final _that = this; +switch (_that) { +case _OnMessageSentPayload(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _OnMessageSentPayload value)? $default,){ +final _that = this; +switch (_that) { +case _OnMessageSentPayload() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PendingTransaction pendingTransaction, Transaction? transaction)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _OnMessageSentPayload() when $default != null: +return $default(_that.pendingTransaction,_that.transaction);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PendingTransaction pendingTransaction, Transaction? transaction) $default,) {final _that = this; +switch (_that) { +case _OnMessageSentPayload(): +return $default(_that.pendingTransaction,_that.transaction);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PendingTransaction pendingTransaction, Transaction? transaction)? $default,) {final _that = this; +switch (_that) { +case _OnMessageSentPayload() when $default != null: +return $default(_that.pendingTransaction,_that.transaction);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake, explicitToJson: true) class _OnMessageSentPayload implements OnMessageSentPayload { - const _OnMessageSentPayload( - {required this.pendingTransaction, this.transaction}); - factory _OnMessageSentPayload.fromJson(Map json) => - _$OnMessageSentPayloadFromJson(json); - - @override - final PendingTransaction pendingTransaction; - @override - final Transaction? transaction; - - /// Create a copy of OnMessageSentPayload - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$OnMessageSentPayloadCopyWith<_OnMessageSentPayload> get copyWith => - __$OnMessageSentPayloadCopyWithImpl<_OnMessageSentPayload>( - this, _$identity); - - @override - Map toJson() { - return _$OnMessageSentPayloadToJson( - this, - ); - } + const _OnMessageSentPayload({required this.pendingTransaction, this.transaction}); + factory _OnMessageSentPayload.fromJson(Map json) => _$OnMessageSentPayloadFromJson(json); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _OnMessageSentPayload && - (identical(other.pendingTransaction, pendingTransaction) || - other.pendingTransaction == pendingTransaction) && - (identical(other.transaction, transaction) || - other.transaction == transaction)); - } +@override final PendingTransaction pendingTransaction; +@override final Transaction? transaction; - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, pendingTransaction, transaction); +/// Create a copy of OnMessageSentPayload +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$OnMessageSentPayloadCopyWith<_OnMessageSentPayload> get copyWith => __$OnMessageSentPayloadCopyWithImpl<_OnMessageSentPayload>(this, _$identity); - @override - String toString() { - return 'OnMessageSentPayload(pendingTransaction: $pendingTransaction, transaction: $transaction)'; - } +@override +Map toJson() { + return _$OnMessageSentPayloadToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _OnMessageSentPayload&&(identical(other.pendingTransaction, pendingTransaction) || other.pendingTransaction == pendingTransaction)&&(identical(other.transaction, transaction) || other.transaction == transaction)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,pendingTransaction,transaction); + +@override +String toString() { + return 'OnMessageSentPayload(pendingTransaction: $pendingTransaction, transaction: $transaction)'; } -/// @nodoc -abstract mixin class _$OnMessageSentPayloadCopyWith<$Res> - implements $OnMessageSentPayloadCopyWith<$Res> { - factory _$OnMessageSentPayloadCopyWith(_OnMessageSentPayload value, - $Res Function(_OnMessageSentPayload) _then) = - __$OnMessageSentPayloadCopyWithImpl; - @override - @useResult - $Res call({PendingTransaction pendingTransaction, Transaction? transaction}); - @override - $PendingTransactionCopyWith<$Res> get pendingTransaction; - @override - $TransactionCopyWith<$Res>? get transaction; } +/// @nodoc +abstract mixin class _$OnMessageSentPayloadCopyWith<$Res> implements $OnMessageSentPayloadCopyWith<$Res> { + factory _$OnMessageSentPayloadCopyWith(_OnMessageSentPayload value, $Res Function(_OnMessageSentPayload) _then) = __$OnMessageSentPayloadCopyWithImpl; +@override @useResult +$Res call({ + PendingTransaction pendingTransaction, Transaction? transaction +}); + + +@override $PendingTransactionCopyWith<$Res> get pendingTransaction;@override $TransactionCopyWith<$Res>? get transaction; + +} /// @nodoc class __$OnMessageSentPayloadCopyWithImpl<$Res> implements _$OnMessageSentPayloadCopyWith<$Res> { @@ -190,49 +279,38 @@ class __$OnMessageSentPayloadCopyWithImpl<$Res> final _OnMessageSentPayload _self; final $Res Function(_OnMessageSentPayload) _then; - /// Create a copy of OnMessageSentPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? pendingTransaction = null, - Object? transaction = freezed, - }) { - return _then(_OnMessageSentPayload( - pendingTransaction: null == pendingTransaction - ? _self.pendingTransaction - : pendingTransaction // ignore: cast_nullable_to_non_nullable - as PendingTransaction, - transaction: freezed == transaction - ? _self.transaction - : transaction // ignore: cast_nullable_to_non_nullable - as Transaction?, - )); - } - - /// Create a copy of OnMessageSentPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PendingTransactionCopyWith<$Res> get pendingTransaction { - return $PendingTransactionCopyWith<$Res>(_self.pendingTransaction, (value) { - return _then(_self.copyWith(pendingTransaction: value)); - }); - } +/// Create a copy of OnMessageSentPayload +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? pendingTransaction = null,Object? transaction = freezed,}) { + return _then(_OnMessageSentPayload( +pendingTransaction: null == pendingTransaction ? _self.pendingTransaction : pendingTransaction // ignore: cast_nullable_to_non_nullable +as PendingTransaction,transaction: freezed == transaction ? _self.transaction : transaction // ignore: cast_nullable_to_non_nullable +as Transaction?, + )); +} - /// Create a copy of OnMessageSentPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionCopyWith<$Res>? get transaction { +/// Create a copy of OnMessageSentPayload +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PendingTransactionCopyWith<$Res> get pendingTransaction { + + return $PendingTransactionCopyWith<$Res>(_self.pendingTransaction, (value) { + return _then(_self.copyWith(pendingTransaction: value)); + }); +}/// Create a copy of OnMessageSentPayload +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionCopyWith<$Res>? get transaction { if (_self.transaction == null) { - return null; - } - - return $TransactionCopyWith<$Res>(_self.transaction!, (value) { - return _then(_self.copyWith(transaction: value)); - }); + return null; } + + return $TransactionCopyWith<$Res>(_self.transaction!, (value) { + return _then(_self.copyWith(transaction: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_sent_payload.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_sent_payload.g.dart index a0689fe9..2a1dfeef 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_sent_payload.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_message_sent_payload.g.dart @@ -7,18 +7,19 @@ part of 'on_message_sent_payload.dart'; // ************************************************************************** _OnMessageSentPayload _$OnMessageSentPayloadFromJson( - Map json) => - _OnMessageSentPayload( - pendingTransaction: PendingTransaction.fromJson( - json['pending_transaction'] as Map), - transaction: json['transaction'] == null - ? null - : Transaction.fromJson(json['transaction'] as Map), - ); + Map json, +) => _OnMessageSentPayload( + pendingTransaction: PendingTransaction.fromJson( + json['pending_transaction'] as Map, + ), + transaction: json['transaction'] == null + ? null + : Transaction.fromJson(json['transaction'] as Map), +); Map _$OnMessageSentPayloadToJson( - _OnMessageSentPayload instance) => - { - 'pending_transaction': instance.pendingTransaction.toJson(), - 'transaction': instance.transaction?.toJson(), - }; + _OnMessageSentPayload instance, +) => { + 'pending_transaction': instance.pendingTransaction.toJson(), + 'transaction': instance.transaction?.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_state_changed_payload.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_state_changed_payload.dart index a725b216..6b6e8469 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_state_changed_payload.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_state_changed_payload.dart @@ -7,13 +7,9 @@ part 'on_state_changed_payload.g.dart'; @freezed sealed class OnStateChangedPayload with _$OnStateChangedPayload { - @JsonSerializable( - fieldRename: FieldRename.snake, - explicitToJson: true, - ) - const factory OnStateChangedPayload({ - required final ContractState newState, - }) = _OnStateChangedPayload; + @JsonSerializable(fieldRename: FieldRename.snake, explicitToJson: true) + const factory OnStateChangedPayload({required final ContractState newState}) = + _OnStateChangedPayload; factory OnStateChangedPayload.fromJson(Map json) => _$OnStateChangedPayloadFromJson(json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_state_changed_payload.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_state_changed_payload.freezed.dart index 8c7f5d1f..23d28c88 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_state_changed_payload.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_state_changed_payload.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,49 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$OnStateChangedPayload { - ContractState get newState; - /// Create a copy of OnStateChangedPayload - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $OnStateChangedPayloadCopyWith get copyWith => - _$OnStateChangedPayloadCopyWithImpl( - this as OnStateChangedPayload, _$identity); + ContractState get newState; +/// Create a copy of OnStateChangedPayload +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$OnStateChangedPayloadCopyWith get copyWith => _$OnStateChangedPayloadCopyWithImpl(this as OnStateChangedPayload, _$identity); /// Serializes this OnStateChangedPayload to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is OnStateChangedPayload && - (identical(other.newState, newState) || - other.newState == newState)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, newState); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is OnStateChangedPayload&&(identical(other.newState, newState) || other.newState == newState)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,newState); - @override - String toString() { - return 'OnStateChangedPayload(newState: $newState)'; - } +@override +String toString() { + return 'OnStateChangedPayload(newState: $newState)'; } -/// @nodoc -abstract mixin class $OnStateChangedPayloadCopyWith<$Res> { - factory $OnStateChangedPayloadCopyWith(OnStateChangedPayload value, - $Res Function(OnStateChangedPayload) _then) = - _$OnStateChangedPayloadCopyWithImpl; - @useResult - $Res call({ContractState newState}); - $ContractStateCopyWith<$Res> get newState; } +/// @nodoc +abstract mixin class $OnStateChangedPayloadCopyWith<$Res> { + factory $OnStateChangedPayloadCopyWith(OnStateChangedPayload value, $Res Function(OnStateChangedPayload) _then) = _$OnStateChangedPayloadCopyWithImpl; +@useResult +$Res call({ + ContractState newState +}); + + +$ContractStateCopyWith<$Res> get newState; + +} /// @nodoc class _$OnStateChangedPayloadCopyWithImpl<$Res> implements $OnStateChangedPayloadCopyWith<$Res> { @@ -66,30 +63,149 @@ class _$OnStateChangedPayloadCopyWithImpl<$Res> final OnStateChangedPayload _self; final $Res Function(OnStateChangedPayload) _then; - /// Create a copy of OnStateChangedPayload - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? newState = null, - }) { - return _then(_self.copyWith( - newState: null == newState - ? _self.newState - : newState // ignore: cast_nullable_to_non_nullable - as ContractState, - )); - } - - /// Create a copy of OnStateChangedPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $ContractStateCopyWith<$Res> get newState { - return $ContractStateCopyWith<$Res>(_self.newState, (value) { - return _then(_self.copyWith(newState: value)); - }); - } +/// Create a copy of OnStateChangedPayload +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? newState = null,}) { + return _then(_self.copyWith( +newState: null == newState ? _self.newState : newState // ignore: cast_nullable_to_non_nullable +as ContractState, + )); +} +/// Create a copy of OnStateChangedPayload +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$ContractStateCopyWith<$Res> get newState { + + return $ContractStateCopyWith<$Res>(_self.newState, (value) { + return _then(_self.copyWith(newState: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [OnStateChangedPayload]. +extension OnStateChangedPayloadPatterns on OnStateChangedPayload { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _OnStateChangedPayload value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _OnStateChangedPayload() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _OnStateChangedPayload value) $default,){ +final _that = this; +switch (_that) { +case _OnStateChangedPayload(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _OnStateChangedPayload value)? $default,){ +final _that = this; +switch (_that) { +case _OnStateChangedPayload() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( ContractState newState)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _OnStateChangedPayload() when $default != null: +return $default(_that.newState);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( ContractState newState) $default,) {final _that = this; +switch (_that) { +case _OnStateChangedPayload(): +return $default(_that.newState);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( ContractState newState)? $default,) {final _that = this; +switch (_that) { +case _OnStateChangedPayload() when $default != null: +return $default(_that.newState);case _: + return null; + +} +} + } /// @nodoc @@ -97,61 +213,50 @@ class _$OnStateChangedPayloadCopyWithImpl<$Res> @JsonSerializable(fieldRename: FieldRename.snake, explicitToJson: true) class _OnStateChangedPayload implements OnStateChangedPayload { const _OnStateChangedPayload({required this.newState}); - factory _OnStateChangedPayload.fromJson(Map json) => - _$OnStateChangedPayloadFromJson(json); - - @override - final ContractState newState; - - /// Create a copy of OnStateChangedPayload - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$OnStateChangedPayloadCopyWith<_OnStateChangedPayload> get copyWith => - __$OnStateChangedPayloadCopyWithImpl<_OnStateChangedPayload>( - this, _$identity); - - @override - Map toJson() { - return _$OnStateChangedPayloadToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _OnStateChangedPayload && - (identical(other.newState, newState) || - other.newState == newState)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, newState); - - @override - String toString() { - return 'OnStateChangedPayload(newState: $newState)'; - } + factory _OnStateChangedPayload.fromJson(Map json) => _$OnStateChangedPayloadFromJson(json); + +@override final ContractState newState; + +/// Create a copy of OnStateChangedPayload +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$OnStateChangedPayloadCopyWith<_OnStateChangedPayload> get copyWith => __$OnStateChangedPayloadCopyWithImpl<_OnStateChangedPayload>(this, _$identity); + +@override +Map toJson() { + return _$OnStateChangedPayloadToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _OnStateChangedPayload&&(identical(other.newState, newState) || other.newState == newState)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,newState); + +@override +String toString() { + return 'OnStateChangedPayload(newState: $newState)'; } -/// @nodoc -abstract mixin class _$OnStateChangedPayloadCopyWith<$Res> - implements $OnStateChangedPayloadCopyWith<$Res> { - factory _$OnStateChangedPayloadCopyWith(_OnStateChangedPayload value, - $Res Function(_OnStateChangedPayload) _then) = - __$OnStateChangedPayloadCopyWithImpl; - @override - @useResult - $Res call({ContractState newState}); - @override - $ContractStateCopyWith<$Res> get newState; } +/// @nodoc +abstract mixin class _$OnStateChangedPayloadCopyWith<$Res> implements $OnStateChangedPayloadCopyWith<$Res> { + factory _$OnStateChangedPayloadCopyWith(_OnStateChangedPayload value, $Res Function(_OnStateChangedPayload) _then) = __$OnStateChangedPayloadCopyWithImpl; +@override @useResult +$Res call({ + ContractState newState +}); + + +@override $ContractStateCopyWith<$Res> get newState; + +} /// @nodoc class __$OnStateChangedPayloadCopyWithImpl<$Res> implements _$OnStateChangedPayloadCopyWith<$Res> { @@ -160,30 +265,25 @@ class __$OnStateChangedPayloadCopyWithImpl<$Res> final _OnStateChangedPayload _self; final $Res Function(_OnStateChangedPayload) _then; - /// Create a copy of OnStateChangedPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? newState = null, - }) { - return _then(_OnStateChangedPayload( - newState: null == newState - ? _self.newState - : newState // ignore: cast_nullable_to_non_nullable - as ContractState, - )); - } - - /// Create a copy of OnStateChangedPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $ContractStateCopyWith<$Res> get newState { - return $ContractStateCopyWith<$Res>(_self.newState, (value) { - return _then(_self.copyWith(newState: value)); - }); - } +/// Create a copy of OnStateChangedPayload +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? newState = null,}) { + return _then(_OnStateChangedPayload( +newState: null == newState ? _self.newState : newState // ignore: cast_nullable_to_non_nullable +as ContractState, + )); +} + +/// Create a copy of OnStateChangedPayload +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$ContractStateCopyWith<$Res> get newState { + + return $ContractStateCopyWith<$Res>(_self.newState, (value) { + return _then(_self.copyWith(newState: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_state_changed_payload.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_state_changed_payload.g.dart index 2539967a..33c630e3 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_state_changed_payload.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_state_changed_payload.g.dart @@ -7,14 +7,11 @@ part of 'on_state_changed_payload.dart'; // ************************************************************************** _OnStateChangedPayload _$OnStateChangedPayloadFromJson( - Map json) => - _OnStateChangedPayload( - newState: - ContractState.fromJson(json['new_state'] as Map), - ); + Map json, +) => _OnStateChangedPayload( + newState: ContractState.fromJson(json['new_state'] as Map), +); Map _$OnStateChangedPayloadToJson( - _OnStateChangedPayload instance) => - { - 'new_state': instance.newState.toJson(), - }; + _OnStateChangedPayload instance, +) => {'new_state': instance.newState.toJson()}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_transactions_found_payload.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_transactions_found_payload.dart index 47fd785a..1a2604d5 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_transactions_found_payload.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_transactions_found_payload.dart @@ -8,10 +8,7 @@ part 'on_transactions_found_payload.g.dart'; @freezed sealed class OnTransactionsFoundPayload with _$OnTransactionsFoundPayload { - @JsonSerializable( - fieldRename: FieldRename.snake, - explicitToJson: true, - ) + @JsonSerializable(fieldRename: FieldRename.snake, explicitToJson: true) const factory OnTransactionsFoundPayload({ required final List transactions, required final TransactionsBatchInfo batchInfo, diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_transactions_found_payload.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_transactions_found_payload.freezed.dart index 23047141..8b76677f 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_transactions_found_payload.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_transactions_found_payload.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,54 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$OnTransactionsFoundPayload { - List get transactions; - TransactionsBatchInfo get batchInfo; - - /// Create a copy of OnTransactionsFoundPayload - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $OnTransactionsFoundPayloadCopyWith - get copyWith => - _$OnTransactionsFoundPayloadCopyWithImpl( - this as OnTransactionsFoundPayload, _$identity); + + List get transactions; TransactionsBatchInfo get batchInfo; +/// Create a copy of OnTransactionsFoundPayload +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$OnTransactionsFoundPayloadCopyWith get copyWith => _$OnTransactionsFoundPayloadCopyWithImpl(this as OnTransactionsFoundPayload, _$identity); /// Serializes this OnTransactionsFoundPayload to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is OnTransactionsFoundPayload && - const DeepCollectionEquality() - .equals(other.transactions, transactions) && - (identical(other.batchInfo, batchInfo) || - other.batchInfo == batchInfo)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(transactions), batchInfo); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is OnTransactionsFoundPayload&&const DeepCollectionEquality().equals(other.transactions, transactions)&&(identical(other.batchInfo, batchInfo) || other.batchInfo == batchInfo)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(transactions),batchInfo); - @override - String toString() { - return 'OnTransactionsFoundPayload(transactions: $transactions, batchInfo: $batchInfo)'; - } +@override +String toString() { + return 'OnTransactionsFoundPayload(transactions: $transactions, batchInfo: $batchInfo)'; } -/// @nodoc -abstract mixin class $OnTransactionsFoundPayloadCopyWith<$Res> { - factory $OnTransactionsFoundPayloadCopyWith(OnTransactionsFoundPayload value, - $Res Function(OnTransactionsFoundPayload) _then) = - _$OnTransactionsFoundPayloadCopyWithImpl; - @useResult - $Res call({List transactions, TransactionsBatchInfo batchInfo}); - $TransactionsBatchInfoCopyWith<$Res> get batchInfo; } +/// @nodoc +abstract mixin class $OnTransactionsFoundPayloadCopyWith<$Res> { + factory $OnTransactionsFoundPayloadCopyWith(OnTransactionsFoundPayload value, $Res Function(OnTransactionsFoundPayload) _then) = _$OnTransactionsFoundPayloadCopyWithImpl; +@useResult +$Res call({ + List transactions, TransactionsBatchInfo batchInfo +}); + + +$TransactionsBatchInfoCopyWith<$Res> get batchInfo; + +} /// @nodoc class _$OnTransactionsFoundPayloadCopyWithImpl<$Res> implements $OnTransactionsFoundPayloadCopyWith<$Res> { @@ -71,111 +63,208 @@ class _$OnTransactionsFoundPayloadCopyWithImpl<$Res> final OnTransactionsFoundPayload _self; final $Res Function(OnTransactionsFoundPayload) _then; - /// Create a copy of OnTransactionsFoundPayload - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? transactions = null, - Object? batchInfo = null, - }) { - return _then(_self.copyWith( - transactions: null == transactions - ? _self.transactions - : transactions // ignore: cast_nullable_to_non_nullable - as List, - batchInfo: null == batchInfo - ? _self.batchInfo - : batchInfo // ignore: cast_nullable_to_non_nullable - as TransactionsBatchInfo, - )); - } - - /// Create a copy of OnTransactionsFoundPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionsBatchInfoCopyWith<$Res> get batchInfo { - return $TransactionsBatchInfoCopyWith<$Res>(_self.batchInfo, (value) { - return _then(_self.copyWith(batchInfo: value)); - }); - } +/// Create a copy of OnTransactionsFoundPayload +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? transactions = null,Object? batchInfo = null,}) { + return _then(_self.copyWith( +transactions: null == transactions ? _self.transactions : transactions // ignore: cast_nullable_to_non_nullable +as List,batchInfo: null == batchInfo ? _self.batchInfo : batchInfo // ignore: cast_nullable_to_non_nullable +as TransactionsBatchInfo, + )); +} +/// Create a copy of OnTransactionsFoundPayload +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionsBatchInfoCopyWith<$Res> get batchInfo { + + return $TransactionsBatchInfoCopyWith<$Res>(_self.batchInfo, (value) { + return _then(_self.copyWith(batchInfo: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [OnTransactionsFoundPayload]. +extension OnTransactionsFoundPayloadPatterns on OnTransactionsFoundPayload { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _OnTransactionsFoundPayload value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _OnTransactionsFoundPayload() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _OnTransactionsFoundPayload value) $default,){ +final _that = this; +switch (_that) { +case _OnTransactionsFoundPayload(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _OnTransactionsFoundPayload value)? $default,){ +final _that = this; +switch (_that) { +case _OnTransactionsFoundPayload() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List transactions, TransactionsBatchInfo batchInfo)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _OnTransactionsFoundPayload() when $default != null: +return $default(_that.transactions,_that.batchInfo);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List transactions, TransactionsBatchInfo batchInfo) $default,) {final _that = this; +switch (_that) { +case _OnTransactionsFoundPayload(): +return $default(_that.transactions,_that.batchInfo);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List transactions, TransactionsBatchInfo batchInfo)? $default,) {final _that = this; +switch (_that) { +case _OnTransactionsFoundPayload() when $default != null: +return $default(_that.transactions,_that.batchInfo);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake, explicitToJson: true) class _OnTransactionsFoundPayload implements OnTransactionsFoundPayload { - const _OnTransactionsFoundPayload( - {required final List transactions, required this.batchInfo}) - : _transactions = transactions; - factory _OnTransactionsFoundPayload.fromJson(Map json) => - _$OnTransactionsFoundPayloadFromJson(json); - - final List _transactions; - @override - List get transactions { - if (_transactions is EqualUnmodifiableListView) return _transactions; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_transactions); - } - - @override - final TransactionsBatchInfo batchInfo; - - /// Create a copy of OnTransactionsFoundPayload - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$OnTransactionsFoundPayloadCopyWith<_OnTransactionsFoundPayload> - get copyWith => __$OnTransactionsFoundPayloadCopyWithImpl< - _OnTransactionsFoundPayload>(this, _$identity); - - @override - Map toJson() { - return _$OnTransactionsFoundPayloadToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _OnTransactionsFoundPayload && - const DeepCollectionEquality() - .equals(other._transactions, _transactions) && - (identical(other.batchInfo, batchInfo) || - other.batchInfo == batchInfo)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(_transactions), batchInfo); - - @override - String toString() { - return 'OnTransactionsFoundPayload(transactions: $transactions, batchInfo: $batchInfo)'; - } + const _OnTransactionsFoundPayload({required final List transactions, required this.batchInfo}): _transactions = transactions; + factory _OnTransactionsFoundPayload.fromJson(Map json) => _$OnTransactionsFoundPayloadFromJson(json); + + final List _transactions; +@override List get transactions { + if (_transactions is EqualUnmodifiableListView) return _transactions; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_transactions); } -/// @nodoc -abstract mixin class _$OnTransactionsFoundPayloadCopyWith<$Res> - implements $OnTransactionsFoundPayloadCopyWith<$Res> { - factory _$OnTransactionsFoundPayloadCopyWith( - _OnTransactionsFoundPayload value, - $Res Function(_OnTransactionsFoundPayload) _then) = - __$OnTransactionsFoundPayloadCopyWithImpl; - @override - @useResult - $Res call({List transactions, TransactionsBatchInfo batchInfo}); +@override final TransactionsBatchInfo batchInfo; + +/// Create a copy of OnTransactionsFoundPayload +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$OnTransactionsFoundPayloadCopyWith<_OnTransactionsFoundPayload> get copyWith => __$OnTransactionsFoundPayloadCopyWithImpl<_OnTransactionsFoundPayload>(this, _$identity); + +@override +Map toJson() { + return _$OnTransactionsFoundPayloadToJson(this, ); +} - @override - $TransactionsBatchInfoCopyWith<$Res> get batchInfo; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _OnTransactionsFoundPayload&&const DeepCollectionEquality().equals(other._transactions, _transactions)&&(identical(other.batchInfo, batchInfo) || other.batchInfo == batchInfo)); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_transactions),batchInfo); + +@override +String toString() { + return 'OnTransactionsFoundPayload(transactions: $transactions, batchInfo: $batchInfo)'; +} + + +} + +/// @nodoc +abstract mixin class _$OnTransactionsFoundPayloadCopyWith<$Res> implements $OnTransactionsFoundPayloadCopyWith<$Res> { + factory _$OnTransactionsFoundPayloadCopyWith(_OnTransactionsFoundPayload value, $Res Function(_OnTransactionsFoundPayload) _then) = __$OnTransactionsFoundPayloadCopyWithImpl; +@override @useResult +$Res call({ + List transactions, TransactionsBatchInfo batchInfo +}); + + +@override $TransactionsBatchInfoCopyWith<$Res> get batchInfo; + +} /// @nodoc class __$OnTransactionsFoundPayloadCopyWithImpl<$Res> implements _$OnTransactionsFoundPayloadCopyWith<$Res> { @@ -184,35 +273,26 @@ class __$OnTransactionsFoundPayloadCopyWithImpl<$Res> final _OnTransactionsFoundPayload _self; final $Res Function(_OnTransactionsFoundPayload) _then; - /// Create a copy of OnTransactionsFoundPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? transactions = null, - Object? batchInfo = null, - }) { - return _then(_OnTransactionsFoundPayload( - transactions: null == transactions - ? _self._transactions - : transactions // ignore: cast_nullable_to_non_nullable - as List, - batchInfo: null == batchInfo - ? _self.batchInfo - : batchInfo // ignore: cast_nullable_to_non_nullable - as TransactionsBatchInfo, - )); - } - - /// Create a copy of OnTransactionsFoundPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionsBatchInfoCopyWith<$Res> get batchInfo { - return $TransactionsBatchInfoCopyWith<$Res>(_self.batchInfo, (value) { - return _then(_self.copyWith(batchInfo: value)); - }); - } +/// Create a copy of OnTransactionsFoundPayload +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? transactions = null,Object? batchInfo = null,}) { + return _then(_OnTransactionsFoundPayload( +transactions: null == transactions ? _self._transactions : transactions // ignore: cast_nullable_to_non_nullable +as List,batchInfo: null == batchInfo ? _self.batchInfo : batchInfo // ignore: cast_nullable_to_non_nullable +as TransactionsBatchInfo, + )); +} + +/// Create a copy of OnTransactionsFoundPayload +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionsBatchInfoCopyWith<$Res> get batchInfo { + + return $TransactionsBatchInfoCopyWith<$Res>(_self.batchInfo, (value) { + return _then(_self.copyWith(batchInfo: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_transactions_found_payload.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_transactions_found_payload.g.dart index b834fad3..4d98a629 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_transactions_found_payload.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/on_transactions_found_payload.g.dart @@ -7,18 +7,19 @@ part of 'on_transactions_found_payload.dart'; // ************************************************************************** _OnTransactionsFoundPayload _$OnTransactionsFoundPayloadFromJson( - Map json) => - _OnTransactionsFoundPayload( - transactions: (json['transactions'] as List) - .map((e) => Transaction.fromJson(e as Map)) - .toList(), - batchInfo: TransactionsBatchInfo.fromJson( - json['batch_info'] as Map), - ); + Map json, +) => _OnTransactionsFoundPayload( + transactions: (json['transactions'] as List) + .map((e) => Transaction.fromJson(e as Map)) + .toList(), + batchInfo: TransactionsBatchInfo.fromJson( + json['batch_info'] as Map, + ), +); Map _$OnTransactionsFoundPayloadToJson( - _OnTransactionsFoundPayload instance) => - { - 'transactions': instance.transactions.map((e) => e.toJson()).toList(), - 'batch_info': instance.batchInfo.toJson(), - }; + _OnTransactionsFoundPayload instance, +) => { + 'transactions': instance.transactions.map((e) => e.toJson()).toList(), + 'batch_info': instance.batchInfo.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/pending_transaction.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/pending_transaction.freezed.dart index 102bec45..2e7f47ea 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/pending_transaction.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/pending_transaction.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,58 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$PendingTransaction { - String get messageHash; - Address? get src; - @dateSecondsSinceEpochJsonConverter - DateTime get expireAt; - - /// Create a copy of PendingTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $PendingTransactionCopyWith get copyWith => - _$PendingTransactionCopyWithImpl( - this as PendingTransaction, _$identity); + + String get messageHash; Address? get src;@dateSecondsSinceEpochJsonConverter DateTime get expireAt; +/// Create a copy of PendingTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$PendingTransactionCopyWith get copyWith => _$PendingTransactionCopyWithImpl(this as PendingTransaction, _$identity); /// Serializes this PendingTransaction to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is PendingTransaction && - (identical(other.messageHash, messageHash) || - other.messageHash == messageHash) && - (identical(other.src, src) || other.src == src) && - (identical(other.expireAt, expireAt) || - other.expireAt == expireAt)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, messageHash, src, expireAt); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is PendingTransaction&&(identical(other.messageHash, messageHash) || other.messageHash == messageHash)&&(identical(other.src, src) || other.src == src)&&(identical(other.expireAt, expireAt) || other.expireAt == expireAt)); +} - @override - String toString() { - return 'PendingTransaction(messageHash: $messageHash, src: $src, expireAt: $expireAt)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,messageHash,src,expireAt); + +@override +String toString() { + return 'PendingTransaction(messageHash: $messageHash, src: $src, expireAt: $expireAt)'; } -/// @nodoc -abstract mixin class $PendingTransactionCopyWith<$Res> { - factory $PendingTransactionCopyWith( - PendingTransaction value, $Res Function(PendingTransaction) _then) = - _$PendingTransactionCopyWithImpl; - @useResult - $Res call( - {String messageHash, - Address? src, - @dateSecondsSinceEpochJsonConverter DateTime expireAt}); - $AddressCopyWith<$Res>? get src; } +/// @nodoc +abstract mixin class $PendingTransactionCopyWith<$Res> { + factory $PendingTransactionCopyWith(PendingTransaction value, $Res Function(PendingTransaction) _then) = _$PendingTransactionCopyWithImpl; +@useResult +$Res call({ + String messageHash, Address? src,@dateSecondsSinceEpochJsonConverter DateTime expireAt +}); + + +$AddressCopyWith<$Res>? get src; + +} /// @nodoc class _$PendingTransactionCopyWithImpl<$Res> implements $PendingTransactionCopyWith<$Res> { @@ -75,119 +63,207 @@ class _$PendingTransactionCopyWithImpl<$Res> final PendingTransaction _self; final $Res Function(PendingTransaction) _then; - /// Create a copy of PendingTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? messageHash = null, - Object? src = freezed, - Object? expireAt = null, - }) { - return _then(_self.copyWith( - messageHash: null == messageHash - ? _self.messageHash - : messageHash // ignore: cast_nullable_to_non_nullable - as String, - src: freezed == src - ? _self.src - : src // ignore: cast_nullable_to_non_nullable - as Address?, - expireAt: null == expireAt - ? _self.expireAt - : expireAt // ignore: cast_nullable_to_non_nullable - as DateTime, - )); +/// Create a copy of PendingTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? messageHash = null,Object? src = freezed,Object? expireAt = null,}) { + return _then(_self.copyWith( +messageHash: null == messageHash ? _self.messageHash : messageHash // ignore: cast_nullable_to_non_nullable +as String,src: freezed == src ? _self.src : src // ignore: cast_nullable_to_non_nullable +as Address?,expireAt: null == expireAt ? _self.expireAt : expireAt // ignore: cast_nullable_to_non_nullable +as DateTime, + )); +} +/// Create a copy of PendingTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res>? get src { + if (_self.src == null) { + return null; } - /// Create a copy of PendingTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res>? get src { - if (_self.src == null) { - return null; - } + return $AddressCopyWith<$Res>(_self.src!, (value) { + return _then(_self.copyWith(src: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [PendingTransaction]. +extension PendingTransactionPatterns on PendingTransaction { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _PendingTransaction value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _PendingTransaction() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _PendingTransaction value) $default,){ +final _that = this; +switch (_that) { +case _PendingTransaction(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _PendingTransaction value)? $default,){ +final _that = this; +switch (_that) { +case _PendingTransaction() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String messageHash, Address? src, @dateSecondsSinceEpochJsonConverter DateTime expireAt)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _PendingTransaction() when $default != null: +return $default(_that.messageHash,_that.src,_that.expireAt);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String messageHash, Address? src, @dateSecondsSinceEpochJsonConverter DateTime expireAt) $default,) {final _that = this; +switch (_that) { +case _PendingTransaction(): +return $default(_that.messageHash,_that.src,_that.expireAt);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String messageHash, Address? src, @dateSecondsSinceEpochJsonConverter DateTime expireAt)? $default,) {final _that = this; +switch (_that) { +case _PendingTransaction() when $default != null: +return $default(_that.messageHash,_that.src,_that.expireAt);case _: + return null; + +} +} - return $AddressCopyWith<$Res>(_self.src!, (value) { - return _then(_self.copyWith(src: value)); - }); - } } /// @nodoc @JsonSerializable() + class _PendingTransaction extends PendingTransaction { - const _PendingTransaction( - {required this.messageHash, - this.src, - @dateSecondsSinceEpochJsonConverter required this.expireAt}) - : super._(); - factory _PendingTransaction.fromJson(Map json) => - _$PendingTransactionFromJson(json); - - @override - final String messageHash; - @override - final Address? src; - @override - @dateSecondsSinceEpochJsonConverter - final DateTime expireAt; - - /// Create a copy of PendingTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$PendingTransactionCopyWith<_PendingTransaction> get copyWith => - __$PendingTransactionCopyWithImpl<_PendingTransaction>(this, _$identity); - - @override - Map toJson() { - return _$PendingTransactionToJson( - this, - ); - } + const _PendingTransaction({required this.messageHash, this.src, @dateSecondsSinceEpochJsonConverter required this.expireAt}): super._(); + factory _PendingTransaction.fromJson(Map json) => _$PendingTransactionFromJson(json); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _PendingTransaction && - (identical(other.messageHash, messageHash) || - other.messageHash == messageHash) && - (identical(other.src, src) || other.src == src) && - (identical(other.expireAt, expireAt) || - other.expireAt == expireAt)); - } +@override final String messageHash; +@override final Address? src; +@override@dateSecondsSinceEpochJsonConverter final DateTime expireAt; - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, messageHash, src, expireAt); +/// Create a copy of PendingTransaction +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$PendingTransactionCopyWith<_PendingTransaction> get copyWith => __$PendingTransactionCopyWithImpl<_PendingTransaction>(this, _$identity); - @override - String toString() { - return 'PendingTransaction(messageHash: $messageHash, src: $src, expireAt: $expireAt)'; - } +@override +Map toJson() { + return _$PendingTransactionToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _PendingTransaction&&(identical(other.messageHash, messageHash) || other.messageHash == messageHash)&&(identical(other.src, src) || other.src == src)&&(identical(other.expireAt, expireAt) || other.expireAt == expireAt)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,messageHash,src,expireAt); + +@override +String toString() { + return 'PendingTransaction(messageHash: $messageHash, src: $src, expireAt: $expireAt)'; } -/// @nodoc -abstract mixin class _$PendingTransactionCopyWith<$Res> - implements $PendingTransactionCopyWith<$Res> { - factory _$PendingTransactionCopyWith( - _PendingTransaction value, $Res Function(_PendingTransaction) _then) = - __$PendingTransactionCopyWithImpl; - @override - @useResult - $Res call( - {String messageHash, - Address? src, - @dateSecondsSinceEpochJsonConverter DateTime expireAt}); - @override - $AddressCopyWith<$Res>? get src; } +/// @nodoc +abstract mixin class _$PendingTransactionCopyWith<$Res> implements $PendingTransactionCopyWith<$Res> { + factory _$PendingTransactionCopyWith(_PendingTransaction value, $Res Function(_PendingTransaction) _then) = __$PendingTransactionCopyWithImpl; +@override @useResult +$Res call({ + String messageHash, Address? src,@dateSecondsSinceEpochJsonConverter DateTime expireAt +}); + + +@override $AddressCopyWith<$Res>? get src; + +} /// @nodoc class __$PendingTransactionCopyWithImpl<$Res> implements _$PendingTransactionCopyWith<$Res> { @@ -196,44 +272,30 @@ class __$PendingTransactionCopyWithImpl<$Res> final _PendingTransaction _self; final $Res Function(_PendingTransaction) _then; - /// Create a copy of PendingTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? messageHash = null, - Object? src = freezed, - Object? expireAt = null, - }) { - return _then(_PendingTransaction( - messageHash: null == messageHash - ? _self.messageHash - : messageHash // ignore: cast_nullable_to_non_nullable - as String, - src: freezed == src - ? _self.src - : src // ignore: cast_nullable_to_non_nullable - as Address?, - expireAt: null == expireAt - ? _self.expireAt - : expireAt // ignore: cast_nullable_to_non_nullable - as DateTime, - )); - } +/// Create a copy of PendingTransaction +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? messageHash = null,Object? src = freezed,Object? expireAt = null,}) { + return _then(_PendingTransaction( +messageHash: null == messageHash ? _self.messageHash : messageHash // ignore: cast_nullable_to_non_nullable +as String,src: freezed == src ? _self.src : src // ignore: cast_nullable_to_non_nullable +as Address?,expireAt: null == expireAt ? _self.expireAt : expireAt // ignore: cast_nullable_to_non_nullable +as DateTime, + )); +} - /// Create a copy of PendingTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res>? get src { +/// Create a copy of PendingTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res>? get src { if (_self.src == null) { - return null; - } - - return $AddressCopyWith<$Res>(_self.src!, (value) { - return _then(_self.copyWith(src: value)); - }); + return null; } + + return $AddressCopyWith<$Res>(_self.src!, (value) { + return _then(_self.copyWith(src: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/pending_transaction.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/pending_transaction.g.dart index fb8853b9..a0f16794 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/pending_transaction.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/pending_transaction.g.dart @@ -10,8 +10,9 @@ _PendingTransaction _$PendingTransactionFromJson(Map json) => _PendingTransaction( messageHash: json['messageHash'] as String, src: json['src'] == null ? null : Address.fromJson(json['src'] as String), - expireAt: dateSecondsSinceEpochJsonConverter - .fromJson((json['expireAt'] as num).toInt()), + expireAt: dateSecondsSinceEpochJsonConverter.fromJson( + (json['expireAt'] as num).toInt(), + ), ); Map _$PendingTransactionToJson(_PendingTransaction instance) => diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/public_key.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/public_key.dart index c2aa6fd8..bf2901a8 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/public_key.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/public_key.dart @@ -3,14 +3,11 @@ import 'package:freezed_annotation/freezed_annotation.dart'; part 'public_key.freezed.dart'; @Freezed(fromJson: false, toJson: false) - /// Public key of the account sealed class PublicKey with _$PublicKey { const PublicKey._(); - const factory PublicKey({ - required final String publicKey, - }) = _FromString; + const factory PublicKey({required final String publicKey}) = _FromString; factory PublicKey.fromJson(String json) => PublicKey(publicKey: json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/public_key.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/public_key.freezed.dart index 53bcf28b..c0af777f 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/public_key.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/public_key.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,123 +11,247 @@ part of 'public_key.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$PublicKey { - String get publicKey; - /// Create a copy of PublicKey - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $PublicKeyCopyWith get copyWith => - _$PublicKeyCopyWithImpl(this as PublicKey, _$identity); + String get publicKey; +/// Create a copy of PublicKey +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$PublicKeyCopyWith get copyWith => _$PublicKeyCopyWithImpl(this as PublicKey, _$identity); + - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is PublicKey && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey)); - } - @override - int get hashCode => Object.hash(runtimeType, publicKey); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is PublicKey&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)); } -/// @nodoc -abstract mixin class $PublicKeyCopyWith<$Res> { - factory $PublicKeyCopyWith(PublicKey value, $Res Function(PublicKey) _then) = - _$PublicKeyCopyWithImpl; - @useResult - $Res call({String publicKey}); + +@override +int get hashCode => Object.hash(runtimeType,publicKey); + + + } /// @nodoc -class _$PublicKeyCopyWithImpl<$Res> implements $PublicKeyCopyWith<$Res> { +abstract mixin class $PublicKeyCopyWith<$Res> { + factory $PublicKeyCopyWith(PublicKey value, $Res Function(PublicKey) _then) = _$PublicKeyCopyWithImpl; +@useResult +$Res call({ + String publicKey +}); + + + + +} +/// @nodoc +class _$PublicKeyCopyWithImpl<$Res> + implements $PublicKeyCopyWith<$Res> { _$PublicKeyCopyWithImpl(this._self, this._then); final PublicKey _self; final $Res Function(PublicKey) _then; - /// Create a copy of PublicKey - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? publicKey = null, - }) { - return _then(_self.copyWith( - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of PublicKey +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? publicKey = null,}) { + return _then(_self.copyWith( +publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [PublicKey]. +extension PublicKeyPatterns on PublicKey { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _FromString value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _FromString() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _FromString value) $default,){ +final _that = this; +switch (_that) { +case _FromString(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _FromString value)? $default,){ +final _that = this; +switch (_that) { +case _FromString() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String publicKey)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _FromString() when $default != null: +return $default(_that.publicKey);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String publicKey) $default,) {final _that = this; +switch (_that) { +case _FromString(): +return $default(_that.publicKey);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String publicKey)? $default,) {final _that = this; +switch (_that) { +case _FromString() when $default != null: +return $default(_that.publicKey);case _: + return null; + +} +} + } /// @nodoc + class _FromString extends PublicKey { - const _FromString({required this.publicKey}) : super._(); + const _FromString({required this.publicKey}): super._(); + + +@override final String publicKey; - @override - final String publicKey; +/// Create a copy of PublicKey +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$FromStringCopyWith<_FromString> get copyWith => __$FromStringCopyWithImpl<_FromString>(this, _$identity); - /// Create a copy of PublicKey - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$FromStringCopyWith<_FromString> get copyWith => - __$FromStringCopyWithImpl<_FromString>(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _FromString && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey)); - } - @override - int get hashCode => Object.hash(runtimeType, publicKey); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _FromString&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)); } -/// @nodoc -abstract mixin class _$FromStringCopyWith<$Res> - implements $PublicKeyCopyWith<$Res> { - factory _$FromStringCopyWith( - _FromString value, $Res Function(_FromString) _then) = - __$FromStringCopyWithImpl; - @override - @useResult - $Res call({String publicKey}); + +@override +int get hashCode => Object.hash(runtimeType,publicKey); + + + } /// @nodoc -class __$FromStringCopyWithImpl<$Res> implements _$FromStringCopyWith<$Res> { +abstract mixin class _$FromStringCopyWith<$Res> implements $PublicKeyCopyWith<$Res> { + factory _$FromStringCopyWith(_FromString value, $Res Function(_FromString) _then) = __$FromStringCopyWithImpl; +@override @useResult +$Res call({ + String publicKey +}); + + + + +} +/// @nodoc +class __$FromStringCopyWithImpl<$Res> + implements _$FromStringCopyWith<$Res> { __$FromStringCopyWithImpl(this._self, this._then); final _FromString _self; final $Res Function(_FromString) _then; - /// Create a copy of PublicKey - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? publicKey = null, - }) { - return _then(_FromString( - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of PublicKey +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? publicKey = null,}) { + return _then(_FromString( +publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_contract_state.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_contract_state.freezed.dart index 82e326c0..0900038e 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_contract_state.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_contract_state.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,111 +11,245 @@ part of 'raw_contract_state.dart'; // dart format off T _$identity(T value) => value; -RawContractState _$RawContractStateFromJson(Map json) { - switch (json['type']) { - case 'notExists': - return RawContractStateNotExists.fromJson(json); - case 'exists': - return RawContractStateExists.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'type', 'RawContractState', - 'Invalid union type "${json['type']}"!'); - } +RawContractState _$RawContractStateFromJson( + Map json +) { + switch (json['type']) { + case 'notExists': + return RawContractStateNotExists.fromJson( + json + ); + case 'exists': + return RawContractStateExists.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'RawContractState', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$RawContractState { - Object get data; + + Object get data; /// Serializes this RawContractState to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is RawContractState && - const DeepCollectionEquality().equals(other.data, data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(data)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is RawContractState&&const DeepCollectionEquality().equals(other.data, data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(data)); + +@override +String toString() { + return 'RawContractState(data: $data)'; +} + - @override - String toString() { - return 'RawContractState(data: $data)'; - } } /// @nodoc -class $RawContractStateCopyWith<$Res> { - $RawContractStateCopyWith( - RawContractState _, $Res Function(RawContractState) __); +class $RawContractStateCopyWith<$Res> { +$RawContractStateCopyWith(RawContractState _, $Res Function(RawContractState) __); +} + + +/// Adds pattern-matching-related methods to [RawContractState]. +extension RawContractStatePatterns on RawContractState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( RawContractStateNotExists value)? notExists,TResult Function( RawContractStateExists value)? exists,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case RawContractStateNotExists() when notExists != null: +return notExists(_that);case RawContractStateExists() when exists != null: +return exists(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( RawContractStateNotExists value) notExists,required TResult Function( RawContractStateExists value) exists,}){ +final _that = this; +switch (_that) { +case RawContractStateNotExists(): +return notExists(_that);case RawContractStateExists(): +return exists(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( RawContractStateNotExists value)? notExists,TResult? Function( RawContractStateExists value)? exists,}){ +final _that = this; +switch (_that) { +case RawContractStateNotExists() when notExists != null: +return notExists(_that);case RawContractStateExists() when exists != null: +return exists(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( NotExistingContract data)? notExists,TResult Function( ExistingContract data)? exists,required TResult orElse(),}) {final _that = this; +switch (_that) { +case RawContractStateNotExists() when notExists != null: +return notExists(_that.data);case RawContractStateExists() when exists != null: +return exists(_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( NotExistingContract data) notExists,required TResult Function( ExistingContract data) exists,}) {final _that = this; +switch (_that) { +case RawContractStateNotExists(): +return notExists(_that.data);case RawContractStateExists(): +return exists(_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( NotExistingContract data)? notExists,TResult? Function( ExistingContract data)? exists,}) {final _that = this; +switch (_that) { +case RawContractStateNotExists() when notExists != null: +return notExists(_that.data);case RawContractStateExists() when exists != null: +return exists(_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class RawContractStateNotExists extends RawContractState { - const RawContractStateNotExists(this.data, {final String? $type}) - : $type = $type ?? 'notExists', - super._(); - factory RawContractStateNotExists.fromJson(Map json) => - _$RawContractStateNotExistsFromJson(json); - - @override - final NotExistingContract data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of RawContractState - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $RawContractStateNotExistsCopyWith get copyWith => - _$RawContractStateNotExistsCopyWithImpl( - this, _$identity); - - @override - Map toJson() { - return _$RawContractStateNotExistsToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is RawContractStateNotExists && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'RawContractState.notExists(data: $data)'; - } + const RawContractStateNotExists(this.data, {final String? $type}): $type = $type ?? 'notExists',super._(); + factory RawContractStateNotExists.fromJson(Map json) => _$RawContractStateNotExistsFromJson(json); + +@override final NotExistingContract data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of RawContractState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$RawContractStateNotExistsCopyWith get copyWith => _$RawContractStateNotExistsCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$RawContractStateNotExistsToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is RawContractStateNotExists&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'RawContractState.notExists(data: $data)'; } -/// @nodoc -abstract mixin class $RawContractStateNotExistsCopyWith<$Res> - implements $RawContractStateCopyWith<$Res> { - factory $RawContractStateNotExistsCopyWith(RawContractStateNotExists value, - $Res Function(RawContractStateNotExists) _then) = - _$RawContractStateNotExistsCopyWithImpl; - @useResult - $Res call({NotExistingContract data}); - $NotExistingContractCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $RawContractStateNotExistsCopyWith<$Res> implements $RawContractStateCopyWith<$Res> { + factory $RawContractStateNotExistsCopyWith(RawContractStateNotExists value, $Res Function(RawContractStateNotExists) _then) = _$RawContractStateNotExistsCopyWithImpl; +@useResult +$Res call({ + NotExistingContract data +}); + + +$NotExistingContractCopyWith<$Res> get data; + +} /// @nodoc class _$RawContractStateNotExistsCopyWithImpl<$Res> implements $RawContractStateNotExistsCopyWith<$Res> { @@ -125,91 +258,80 @@ class _$RawContractStateNotExistsCopyWithImpl<$Res> final RawContractStateNotExists _self; final $Res Function(RawContractStateNotExists) _then; - /// Create a copy of RawContractState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(RawContractStateNotExists( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as NotExistingContract, - )); - } - - /// Create a copy of RawContractState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $NotExistingContractCopyWith<$Res> get data { - return $NotExistingContractCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of RawContractState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(RawContractStateNotExists( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as NotExistingContract, + )); +} + +/// Create a copy of RawContractState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$NotExistingContractCopyWith<$Res> get data { + + return $NotExistingContractCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class RawContractStateExists extends RawContractState { - const RawContractStateExists(this.data, {final String? $type}) - : $type = $type ?? 'exists', - super._(); - factory RawContractStateExists.fromJson(Map json) => - _$RawContractStateExistsFromJson(json); - - @override - final ExistingContract data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of RawContractState - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $RawContractStateExistsCopyWith get copyWith => - _$RawContractStateExistsCopyWithImpl( - this, _$identity); - - @override - Map toJson() { - return _$RawContractStateExistsToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is RawContractStateExists && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'RawContractState.exists(data: $data)'; - } + const RawContractStateExists(this.data, {final String? $type}): $type = $type ?? 'exists',super._(); + factory RawContractStateExists.fromJson(Map json) => _$RawContractStateExistsFromJson(json); + +@override final ExistingContract data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of RawContractState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$RawContractStateExistsCopyWith get copyWith => _$RawContractStateExistsCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$RawContractStateExistsToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is RawContractStateExists&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'RawContractState.exists(data: $data)'; } -/// @nodoc -abstract mixin class $RawContractStateExistsCopyWith<$Res> - implements $RawContractStateCopyWith<$Res> { - factory $RawContractStateExistsCopyWith(RawContractStateExists value, - $Res Function(RawContractStateExists) _then) = - _$RawContractStateExistsCopyWithImpl; - @useResult - $Res call({ExistingContract data}); - $ExistingContractCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $RawContractStateExistsCopyWith<$Res> implements $RawContractStateCopyWith<$Res> { + factory $RawContractStateExistsCopyWith(RawContractStateExists value, $Res Function(RawContractStateExists) _then) = _$RawContractStateExistsCopyWithImpl; +@useResult +$Res call({ + ExistingContract data +}); + + +$ExistingContractCopyWith<$Res> get data; + +} /// @nodoc class _$RawContractStateExistsCopyWithImpl<$Res> implements $RawContractStateExistsCopyWith<$Res> { @@ -218,29 +340,25 @@ class _$RawContractStateExistsCopyWithImpl<$Res> final RawContractStateExists _self; final $Res Function(RawContractStateExists) _then; - /// Create a copy of RawContractState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(RawContractStateExists( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as ExistingContract, - )); - } - - /// Create a copy of RawContractState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $ExistingContractCopyWith<$Res> get data { - return $ExistingContractCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of RawContractState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(RawContractStateExists( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as ExistingContract, + )); +} + +/// Create a copy of RawContractState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$ExistingContractCopyWith<$Res> get data { + + return $ExistingContractCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_contract_state.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_contract_state.g.dart index e0b36090..8625fc11 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_contract_state.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_contract_state.g.dart @@ -7,29 +7,23 @@ part of 'raw_contract_state.dart'; // ************************************************************************** RawContractStateNotExists _$RawContractStateNotExistsFromJson( - Map json) => - RawContractStateNotExists( - NotExistingContract.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => RawContractStateNotExists( + NotExistingContract.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$RawContractStateNotExistsToJson( - RawContractStateNotExists instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + RawContractStateNotExists instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; RawContractStateExists _$RawContractStateExistsFromJson( - Map json) => - RawContractStateExists( - ExistingContract.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => RawContractStateExists( + ExistingContract.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$RawContractStateExistsToJson( - RawContractStateExists instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + RawContractStateExists instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_transaction.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_transaction.freezed.dart index fbf7a98b..28eb8da4 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_transaction.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_transaction.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,50 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$RawTransaction { - String get hash; - Transaction get data; - /// Create a copy of RawTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $RawTransactionCopyWith get copyWith => - _$RawTransactionCopyWithImpl( - this as RawTransaction, _$identity); + String get hash; Transaction get data; +/// Create a copy of RawTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$RawTransactionCopyWith get copyWith => _$RawTransactionCopyWithImpl(this as RawTransaction, _$identity); /// Serializes this RawTransaction to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is RawTransaction && - (identical(other.hash, hash) || other.hash == hash) && - (identical(other.data, data) || other.data == data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, hash, data); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is RawTransaction&&(identical(other.hash, hash) || other.hash == hash)&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,hash,data); - @override - String toString() { - return 'RawTransaction(hash: $hash, data: $data)'; - } +@override +String toString() { + return 'RawTransaction(hash: $hash, data: $data)'; } -/// @nodoc -abstract mixin class $RawTransactionCopyWith<$Res> { - factory $RawTransactionCopyWith( - RawTransaction value, $Res Function(RawTransaction) _then) = - _$RawTransactionCopyWithImpl; - @useResult - $Res call({String hash, Transaction data}); - $TransactionCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $RawTransactionCopyWith<$Res> { + factory $RawTransactionCopyWith(RawTransaction value, $Res Function(RawTransaction) _then) = _$RawTransactionCopyWithImpl; +@useResult +$Res call({ + String hash, Transaction data +}); + + +$TransactionCopyWith<$Res> get data; + +} /// @nodoc class _$RawTransactionCopyWithImpl<$Res> implements $RawTransactionCopyWith<$Res> { @@ -67,97 +63,202 @@ class _$RawTransactionCopyWithImpl<$Res> final RawTransaction _self; final $Res Function(RawTransaction) _then; - /// Create a copy of RawTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? hash = null, - Object? data = null, - }) { - return _then(_self.copyWith( - hash: null == hash - ? _self.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - data: null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as Transaction, - )); - } - - /// Create a copy of RawTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionCopyWith<$Res> get data { - return $TransactionCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of RawTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? hash = null,Object? data = null,}) { + return _then(_self.copyWith( +hash: null == hash ? _self.hash : hash // ignore: cast_nullable_to_non_nullable +as String,data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as Transaction, + )); +} +/// Create a copy of RawTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionCopyWith<$Res> get data { + + return $TransactionCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [RawTransaction]. +extension RawTransactionPatterns on RawTransaction { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _RawTransaction value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _RawTransaction() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _RawTransaction value) $default,){ +final _that = this; +switch (_that) { +case _RawTransaction(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _RawTransaction value)? $default,){ +final _that = this; +switch (_that) { +case _RawTransaction() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String hash, Transaction data)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _RawTransaction() when $default != null: +return $default(_that.hash,_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String hash, Transaction data) $default,) {final _that = this; +switch (_that) { +case _RawTransaction(): +return $default(_that.hash,_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String hash, Transaction data)? $default,) {final _that = this; +switch (_that) { +case _RawTransaction() when $default != null: +return $default(_that.hash,_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _RawTransaction implements RawTransaction { const _RawTransaction({required this.hash, required this.data}); - factory _RawTransaction.fromJson(Map json) => - _$RawTransactionFromJson(json); - - @override - final String hash; - @override - final Transaction data; - - /// Create a copy of RawTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$RawTransactionCopyWith<_RawTransaction> get copyWith => - __$RawTransactionCopyWithImpl<_RawTransaction>(this, _$identity); - - @override - Map toJson() { - return _$RawTransactionToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _RawTransaction && - (identical(other.hash, hash) || other.hash == hash) && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, hash, data); - - @override - String toString() { - return 'RawTransaction(hash: $hash, data: $data)'; - } + factory _RawTransaction.fromJson(Map json) => _$RawTransactionFromJson(json); + +@override final String hash; +@override final Transaction data; + +/// Create a copy of RawTransaction +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$RawTransactionCopyWith<_RawTransaction> get copyWith => __$RawTransactionCopyWithImpl<_RawTransaction>(this, _$identity); + +@override +Map toJson() { + return _$RawTransactionToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _RawTransaction&&(identical(other.hash, hash) || other.hash == hash)&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,hash,data); + +@override +String toString() { + return 'RawTransaction(hash: $hash, data: $data)'; } -/// @nodoc -abstract mixin class _$RawTransactionCopyWith<$Res> - implements $RawTransactionCopyWith<$Res> { - factory _$RawTransactionCopyWith( - _RawTransaction value, $Res Function(_RawTransaction) _then) = - __$RawTransactionCopyWithImpl; - @override - @useResult - $Res call({String hash, Transaction data}); - @override - $TransactionCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class _$RawTransactionCopyWith<$Res> implements $RawTransactionCopyWith<$Res> { + factory _$RawTransactionCopyWith(_RawTransaction value, $Res Function(_RawTransaction) _then) = __$RawTransactionCopyWithImpl; +@override @useResult +$Res call({ + String hash, Transaction data +}); + + +@override $TransactionCopyWith<$Res> get data; + +} /// @nodoc class __$RawTransactionCopyWithImpl<$Res> implements _$RawTransactionCopyWith<$Res> { @@ -166,35 +267,26 @@ class __$RawTransactionCopyWithImpl<$Res> final _RawTransaction _self; final $Res Function(_RawTransaction) _then; - /// Create a copy of RawTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? hash = null, - Object? data = null, - }) { - return _then(_RawTransaction( - hash: null == hash - ? _self.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - data: null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as Transaction, - )); - } - - /// Create a copy of RawTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionCopyWith<$Res> get data { - return $TransactionCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of RawTransaction +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? hash = null,Object? data = null,}) { + return _then(_RawTransaction( +hash: null == hash ? _self.hash : hash // ignore: cast_nullable_to_non_nullable +as String,data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as Transaction, + )); +} + +/// Create a copy of RawTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionCopyWith<$Res> get data { + + return $TransactionCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_transaction.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_transaction.g.dart index 6f320b92..1b110988 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_transaction.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/raw_transaction.g.dart @@ -13,7 +13,4 @@ _RawTransaction _$RawTransactionFromJson(Map json) => ); Map _$RawTransactionToJson(_RawTransaction instance) => - { - 'hash': instance.hash, - 'data': instance.data.toJson(), - }; + {'hash': instance.hash, 'data': instance.data.toJson()}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/storage_fee_info.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/storage_fee_info.freezed.dart index 083b8b21..2ab02dcb 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/storage_fee_info.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/storage_fee_info.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,65 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$StorageFeeInfo { - String get storageFee; - String? get storageFeeDebt; - String get accountStatus; - String get freezeDueLimit; - String get deleteDueLimit; - - /// Create a copy of StorageFeeInfo - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $StorageFeeInfoCopyWith get copyWith => - _$StorageFeeInfoCopyWithImpl( - this as StorageFeeInfo, _$identity); + + String get storageFee; String? get storageFeeDebt; String get accountStatus; String get freezeDueLimit; String get deleteDueLimit; +/// Create a copy of StorageFeeInfo +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$StorageFeeInfoCopyWith get copyWith => _$StorageFeeInfoCopyWithImpl(this as StorageFeeInfo, _$identity); /// Serializes this StorageFeeInfo to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is StorageFeeInfo && - (identical(other.storageFee, storageFee) || - other.storageFee == storageFee) && - (identical(other.storageFeeDebt, storageFeeDebt) || - other.storageFeeDebt == storageFeeDebt) && - (identical(other.accountStatus, accountStatus) || - other.accountStatus == accountStatus) && - (identical(other.freezeDueLimit, freezeDueLimit) || - other.freezeDueLimit == freezeDueLimit) && - (identical(other.deleteDueLimit, deleteDueLimit) || - other.deleteDueLimit == deleteDueLimit)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, storageFee, storageFeeDebt, - accountStatus, freezeDueLimit, deleteDueLimit); - - @override - String toString() { - return 'StorageFeeInfo(storageFee: $storageFee, storageFeeDebt: $storageFeeDebt, accountStatus: $accountStatus, freezeDueLimit: $freezeDueLimit, deleteDueLimit: $deleteDueLimit)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is StorageFeeInfo&&(identical(other.storageFee, storageFee) || other.storageFee == storageFee)&&(identical(other.storageFeeDebt, storageFeeDebt) || other.storageFeeDebt == storageFeeDebt)&&(identical(other.accountStatus, accountStatus) || other.accountStatus == accountStatus)&&(identical(other.freezeDueLimit, freezeDueLimit) || other.freezeDueLimit == freezeDueLimit)&&(identical(other.deleteDueLimit, deleteDueLimit) || other.deleteDueLimit == deleteDueLimit)); } -/// @nodoc -abstract mixin class $StorageFeeInfoCopyWith<$Res> { - factory $StorageFeeInfoCopyWith( - StorageFeeInfo value, $Res Function(StorageFeeInfo) _then) = - _$StorageFeeInfoCopyWithImpl; - @useResult - $Res call( - {String storageFee, - String? storageFeeDebt, - String accountStatus, - String freezeDueLimit, - String deleteDueLimit}); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,storageFee,storageFeeDebt,accountStatus,freezeDueLimit,deleteDueLimit); + +@override +String toString() { + return 'StorageFeeInfo(storageFee: $storageFee, storageFeeDebt: $storageFeeDebt, accountStatus: $accountStatus, freezeDueLimit: $freezeDueLimit, deleteDueLimit: $deleteDueLimit)'; +} + + } +/// @nodoc +abstract mixin class $StorageFeeInfoCopyWith<$Res> { + factory $StorageFeeInfoCopyWith(StorageFeeInfo value, $Res Function(StorageFeeInfo) _then) = _$StorageFeeInfoCopyWithImpl; +@useResult +$Res call({ + String storageFee, String? storageFeeDebt, String accountStatus, String freezeDueLimit, String deleteDueLimit +}); + + + + +} /// @nodoc class _$StorageFeeInfoCopyWithImpl<$Res> implements $StorageFeeInfoCopyWith<$Res> { @@ -82,124 +63,199 @@ class _$StorageFeeInfoCopyWithImpl<$Res> final StorageFeeInfo _self; final $Res Function(StorageFeeInfo) _then; - /// Create a copy of StorageFeeInfo - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? storageFee = null, - Object? storageFeeDebt = freezed, - Object? accountStatus = null, - Object? freezeDueLimit = null, - Object? deleteDueLimit = null, - }) { - return _then(_self.copyWith( - storageFee: null == storageFee - ? _self.storageFee - : storageFee // ignore: cast_nullable_to_non_nullable - as String, - storageFeeDebt: freezed == storageFeeDebt - ? _self.storageFeeDebt - : storageFeeDebt // ignore: cast_nullable_to_non_nullable - as String?, - accountStatus: null == accountStatus - ? _self.accountStatus - : accountStatus // ignore: cast_nullable_to_non_nullable - as String, - freezeDueLimit: null == freezeDueLimit - ? _self.freezeDueLimit - : freezeDueLimit // ignore: cast_nullable_to_non_nullable - as String, - deleteDueLimit: null == deleteDueLimit - ? _self.deleteDueLimit - : deleteDueLimit // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of StorageFeeInfo +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? storageFee = null,Object? storageFeeDebt = freezed,Object? accountStatus = null,Object? freezeDueLimit = null,Object? deleteDueLimit = null,}) { + return _then(_self.copyWith( +storageFee: null == storageFee ? _self.storageFee : storageFee // ignore: cast_nullable_to_non_nullable +as String,storageFeeDebt: freezed == storageFeeDebt ? _self.storageFeeDebt : storageFeeDebt // ignore: cast_nullable_to_non_nullable +as String?,accountStatus: null == accountStatus ? _self.accountStatus : accountStatus // ignore: cast_nullable_to_non_nullable +as String,freezeDueLimit: null == freezeDueLimit ? _self.freezeDueLimit : freezeDueLimit // ignore: cast_nullable_to_non_nullable +as String,deleteDueLimit: null == deleteDueLimit ? _self.deleteDueLimit : deleteDueLimit // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [StorageFeeInfo]. +extension StorageFeeInfoPatterns on StorageFeeInfo { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _StorageFeeInfo value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _StorageFeeInfo() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _StorageFeeInfo value) $default,){ +final _that = this; +switch (_that) { +case _StorageFeeInfo(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _StorageFeeInfo value)? $default,){ +final _that = this; +switch (_that) { +case _StorageFeeInfo() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String storageFee, String? storageFeeDebt, String accountStatus, String freezeDueLimit, String deleteDueLimit)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _StorageFeeInfo() when $default != null: +return $default(_that.storageFee,_that.storageFeeDebt,_that.accountStatus,_that.freezeDueLimit,_that.deleteDueLimit);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String storageFee, String? storageFeeDebt, String accountStatus, String freezeDueLimit, String deleteDueLimit) $default,) {final _that = this; +switch (_that) { +case _StorageFeeInfo(): +return $default(_that.storageFee,_that.storageFeeDebt,_that.accountStatus,_that.freezeDueLimit,_that.deleteDueLimit);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String storageFee, String? storageFeeDebt, String accountStatus, String freezeDueLimit, String deleteDueLimit)? $default,) {final _that = this; +switch (_that) { +case _StorageFeeInfo() when $default != null: +return $default(_that.storageFee,_that.storageFeeDebt,_that.accountStatus,_that.freezeDueLimit,_that.deleteDueLimit);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _StorageFeeInfo implements StorageFeeInfo { - const _StorageFeeInfo( - {required this.storageFee, - required this.storageFeeDebt, - required this.accountStatus, - required this.freezeDueLimit, - required this.deleteDueLimit}); - factory _StorageFeeInfo.fromJson(Map json) => - _$StorageFeeInfoFromJson(json); - - @override - final String storageFee; - @override - final String? storageFeeDebt; - @override - final String accountStatus; - @override - final String freezeDueLimit; - @override - final String deleteDueLimit; - - /// Create a copy of StorageFeeInfo - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$StorageFeeInfoCopyWith<_StorageFeeInfo> get copyWith => - __$StorageFeeInfoCopyWithImpl<_StorageFeeInfo>(this, _$identity); - - @override - Map toJson() { - return _$StorageFeeInfoToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _StorageFeeInfo && - (identical(other.storageFee, storageFee) || - other.storageFee == storageFee) && - (identical(other.storageFeeDebt, storageFeeDebt) || - other.storageFeeDebt == storageFeeDebt) && - (identical(other.accountStatus, accountStatus) || - other.accountStatus == accountStatus) && - (identical(other.freezeDueLimit, freezeDueLimit) || - other.freezeDueLimit == freezeDueLimit) && - (identical(other.deleteDueLimit, deleteDueLimit) || - other.deleteDueLimit == deleteDueLimit)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, storageFee, storageFeeDebt, - accountStatus, freezeDueLimit, deleteDueLimit); - - @override - String toString() { - return 'StorageFeeInfo(storageFee: $storageFee, storageFeeDebt: $storageFeeDebt, accountStatus: $accountStatus, freezeDueLimit: $freezeDueLimit, deleteDueLimit: $deleteDueLimit)'; - } + const _StorageFeeInfo({required this.storageFee, required this.storageFeeDebt, required this.accountStatus, required this.freezeDueLimit, required this.deleteDueLimit}); + factory _StorageFeeInfo.fromJson(Map json) => _$StorageFeeInfoFromJson(json); + +@override final String storageFee; +@override final String? storageFeeDebt; +@override final String accountStatus; +@override final String freezeDueLimit; +@override final String deleteDueLimit; + +/// Create a copy of StorageFeeInfo +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$StorageFeeInfoCopyWith<_StorageFeeInfo> get copyWith => __$StorageFeeInfoCopyWithImpl<_StorageFeeInfo>(this, _$identity); + +@override +Map toJson() { + return _$StorageFeeInfoToJson(this, ); } -/// @nodoc -abstract mixin class _$StorageFeeInfoCopyWith<$Res> - implements $StorageFeeInfoCopyWith<$Res> { - factory _$StorageFeeInfoCopyWith( - _StorageFeeInfo value, $Res Function(_StorageFeeInfo) _then) = - __$StorageFeeInfoCopyWithImpl; - @override - @useResult - $Res call( - {String storageFee, - String? storageFeeDebt, - String accountStatus, - String freezeDueLimit, - String deleteDueLimit}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _StorageFeeInfo&&(identical(other.storageFee, storageFee) || other.storageFee == storageFee)&&(identical(other.storageFeeDebt, storageFeeDebt) || other.storageFeeDebt == storageFeeDebt)&&(identical(other.accountStatus, accountStatus) || other.accountStatus == accountStatus)&&(identical(other.freezeDueLimit, freezeDueLimit) || other.freezeDueLimit == freezeDueLimit)&&(identical(other.deleteDueLimit, deleteDueLimit) || other.deleteDueLimit == deleteDueLimit)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,storageFee,storageFeeDebt,accountStatus,freezeDueLimit,deleteDueLimit); + +@override +String toString() { + return 'StorageFeeInfo(storageFee: $storageFee, storageFeeDebt: $storageFeeDebt, accountStatus: $accountStatus, freezeDueLimit: $freezeDueLimit, deleteDueLimit: $deleteDueLimit)'; +} + + } +/// @nodoc +abstract mixin class _$StorageFeeInfoCopyWith<$Res> implements $StorageFeeInfoCopyWith<$Res> { + factory _$StorageFeeInfoCopyWith(_StorageFeeInfo value, $Res Function(_StorageFeeInfo) _then) = __$StorageFeeInfoCopyWithImpl; +@override @useResult +$Res call({ + String storageFee, String? storageFeeDebt, String accountStatus, String freezeDueLimit, String deleteDueLimit +}); + + + + +} /// @nodoc class __$StorageFeeInfoCopyWithImpl<$Res> implements _$StorageFeeInfoCopyWith<$Res> { @@ -208,40 +264,20 @@ class __$StorageFeeInfoCopyWithImpl<$Res> final _StorageFeeInfo _self; final $Res Function(_StorageFeeInfo) _then; - /// Create a copy of StorageFeeInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? storageFee = null, - Object? storageFeeDebt = freezed, - Object? accountStatus = null, - Object? freezeDueLimit = null, - Object? deleteDueLimit = null, - }) { - return _then(_StorageFeeInfo( - storageFee: null == storageFee - ? _self.storageFee - : storageFee // ignore: cast_nullable_to_non_nullable - as String, - storageFeeDebt: freezed == storageFeeDebt - ? _self.storageFeeDebt - : storageFeeDebt // ignore: cast_nullable_to_non_nullable - as String?, - accountStatus: null == accountStatus - ? _self.accountStatus - : accountStatus // ignore: cast_nullable_to_non_nullable - as String, - freezeDueLimit: null == freezeDueLimit - ? _self.freezeDueLimit - : freezeDueLimit // ignore: cast_nullable_to_non_nullable - as String, - deleteDueLimit: null == deleteDueLimit - ? _self.deleteDueLimit - : deleteDueLimit // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of StorageFeeInfo +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? storageFee = null,Object? storageFeeDebt = freezed,Object? accountStatus = null,Object? freezeDueLimit = null,Object? deleteDueLimit = null,}) { + return _then(_StorageFeeInfo( +storageFee: null == storageFee ? _self.storageFee : storageFee // ignore: cast_nullable_to_non_nullable +as String,storageFeeDebt: freezed == storageFeeDebt ? _self.storageFeeDebt : storageFeeDebt // ignore: cast_nullable_to_non_nullable +as String?,accountStatus: null == accountStatus ? _self.accountStatus : accountStatus // ignore: cast_nullable_to_non_nullable +as String,freezeDueLimit: null == freezeDueLimit ? _self.freezeDueLimit : freezeDueLimit // ignore: cast_nullable_to_non_nullable +as String,deleteDueLimit: null == deleteDueLimit ? _self.deleteDueLimit : deleteDueLimit // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/subscription_handler_message.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/subscription_handler_message.freezed.dart index 352143f3..ca7571d1 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/subscription_handler_message.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/subscription_handler_message.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,49 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$SubscriptionHandlerMessage { - String get event; - String get payload; - - /// Create a copy of SubscriptionHandlerMessage - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $SubscriptionHandlerMessageCopyWith - get copyWith => - _$SubscriptionHandlerMessageCopyWithImpl( - this as SubscriptionHandlerMessage, _$identity); + + String get event; String get payload; +/// Create a copy of SubscriptionHandlerMessage +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$SubscriptionHandlerMessageCopyWith get copyWith => _$SubscriptionHandlerMessageCopyWithImpl(this as SubscriptionHandlerMessage, _$identity); /// Serializes this SubscriptionHandlerMessage to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is SubscriptionHandlerMessage && - (identical(other.event, event) || other.event == event) && - (identical(other.payload, payload) || other.payload == payload)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, event, payload); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is SubscriptionHandlerMessage&&(identical(other.event, event) || other.event == event)&&(identical(other.payload, payload) || other.payload == payload)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,event,payload); - @override - String toString() { - return 'SubscriptionHandlerMessage(event: $event, payload: $payload)'; - } +@override +String toString() { + return 'SubscriptionHandlerMessage(event: $event, payload: $payload)'; } -/// @nodoc -abstract mixin class $SubscriptionHandlerMessageCopyWith<$Res> { - factory $SubscriptionHandlerMessageCopyWith(SubscriptionHandlerMessage value, - $Res Function(SubscriptionHandlerMessage) _then) = - _$SubscriptionHandlerMessageCopyWithImpl; - @useResult - $Res call({String event, String payload}); + } +/// @nodoc +abstract mixin class $SubscriptionHandlerMessageCopyWith<$Res> { + factory $SubscriptionHandlerMessageCopyWith(SubscriptionHandlerMessage value, $Res Function(SubscriptionHandlerMessage) _then) = _$SubscriptionHandlerMessageCopyWithImpl; +@useResult +$Res call({ + String event, String payload +}); + + + + +} /// @nodoc class _$SubscriptionHandlerMessageCopyWithImpl<$Res> implements $SubscriptionHandlerMessageCopyWith<$Res> { @@ -66,87 +63,193 @@ class _$SubscriptionHandlerMessageCopyWithImpl<$Res> final SubscriptionHandlerMessage _self; final $Res Function(SubscriptionHandlerMessage) _then; - /// Create a copy of SubscriptionHandlerMessage - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? event = null, - Object? payload = null, - }) { - return _then(_self.copyWith( - event: null == event - ? _self.event - : event // ignore: cast_nullable_to_non_nullable - as String, - payload: null == payload - ? _self.payload - : payload // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of SubscriptionHandlerMessage +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? event = null,Object? payload = null,}) { + return _then(_self.copyWith( +event: null == event ? _self.event : event // ignore: cast_nullable_to_non_nullable +as String,payload: null == payload ? _self.payload : payload // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [SubscriptionHandlerMessage]. +extension SubscriptionHandlerMessagePatterns on SubscriptionHandlerMessage { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _SubscriptionHandlerMessage value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _SubscriptionHandlerMessage() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _SubscriptionHandlerMessage value) $default,){ +final _that = this; +switch (_that) { +case _SubscriptionHandlerMessage(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _SubscriptionHandlerMessage value)? $default,){ +final _that = this; +switch (_that) { +case _SubscriptionHandlerMessage() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String event, String payload)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _SubscriptionHandlerMessage() when $default != null: +return $default(_that.event,_that.payload);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String event, String payload) $default,) {final _that = this; +switch (_that) { +case _SubscriptionHandlerMessage(): +return $default(_that.event,_that.payload);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String event, String payload)? $default,) {final _that = this; +switch (_that) { +case _SubscriptionHandlerMessage() when $default != null: +return $default(_that.event,_that.payload);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _SubscriptionHandlerMessage implements SubscriptionHandlerMessage { - const _SubscriptionHandlerMessage( - {required this.event, required this.payload}); - factory _SubscriptionHandlerMessage.fromJson(Map json) => - _$SubscriptionHandlerMessageFromJson(json); - - @override - final String event; - @override - final String payload; - - /// Create a copy of SubscriptionHandlerMessage - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$SubscriptionHandlerMessageCopyWith<_SubscriptionHandlerMessage> - get copyWith => __$SubscriptionHandlerMessageCopyWithImpl< - _SubscriptionHandlerMessage>(this, _$identity); - - @override - Map toJson() { - return _$SubscriptionHandlerMessageToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _SubscriptionHandlerMessage && - (identical(other.event, event) || other.event == event) && - (identical(other.payload, payload) || other.payload == payload)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, event, payload); - - @override - String toString() { - return 'SubscriptionHandlerMessage(event: $event, payload: $payload)'; - } + const _SubscriptionHandlerMessage({required this.event, required this.payload}); + factory _SubscriptionHandlerMessage.fromJson(Map json) => _$SubscriptionHandlerMessageFromJson(json); + +@override final String event; +@override final String payload; + +/// Create a copy of SubscriptionHandlerMessage +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$SubscriptionHandlerMessageCopyWith<_SubscriptionHandlerMessage> get copyWith => __$SubscriptionHandlerMessageCopyWithImpl<_SubscriptionHandlerMessage>(this, _$identity); + +@override +Map toJson() { + return _$SubscriptionHandlerMessageToJson(this, ); } -/// @nodoc -abstract mixin class _$SubscriptionHandlerMessageCopyWith<$Res> - implements $SubscriptionHandlerMessageCopyWith<$Res> { - factory _$SubscriptionHandlerMessageCopyWith( - _SubscriptionHandlerMessage value, - $Res Function(_SubscriptionHandlerMessage) _then) = - __$SubscriptionHandlerMessageCopyWithImpl; - @override - @useResult - $Res call({String event, String payload}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _SubscriptionHandlerMessage&&(identical(other.event, event) || other.event == event)&&(identical(other.payload, payload) || other.payload == payload)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,event,payload); + +@override +String toString() { + return 'SubscriptionHandlerMessage(event: $event, payload: $payload)'; +} + + } +/// @nodoc +abstract mixin class _$SubscriptionHandlerMessageCopyWith<$Res> implements $SubscriptionHandlerMessageCopyWith<$Res> { + factory _$SubscriptionHandlerMessageCopyWith(_SubscriptionHandlerMessage value, $Res Function(_SubscriptionHandlerMessage) _then) = __$SubscriptionHandlerMessageCopyWithImpl; +@override @useResult +$Res call({ + String event, String payload +}); + + + + +} /// @nodoc class __$SubscriptionHandlerMessageCopyWithImpl<$Res> implements _$SubscriptionHandlerMessageCopyWith<$Res> { @@ -155,25 +258,17 @@ class __$SubscriptionHandlerMessageCopyWithImpl<$Res> final _SubscriptionHandlerMessage _self; final $Res Function(_SubscriptionHandlerMessage) _then; - /// Create a copy of SubscriptionHandlerMessage - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? event = null, - Object? payload = null, - }) { - return _then(_SubscriptionHandlerMessage( - event: null == event - ? _self.event - : event // ignore: cast_nullable_to_non_nullable - as String, - payload: null == payload - ? _self.payload - : payload // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of SubscriptionHandlerMessage +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? event = null,Object? payload = null,}) { + return _then(_SubscriptionHandlerMessage( +event: null == event ? _self.event : event // ignore: cast_nullable_to_non_nullable +as String,payload: null == payload ? _self.payload : payload // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/subscription_handler_message.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/subscription_handler_message.g.dart index d1d8f975..234b142a 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/subscription_handler_message.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/subscription_handler_message.g.dart @@ -7,15 +7,12 @@ part of 'subscription_handler_message.dart'; // ************************************************************************** _SubscriptionHandlerMessage _$SubscriptionHandlerMessageFromJson( - Map json) => - _SubscriptionHandlerMessage( - event: json['event'] as String, - payload: json['payload'] as String, - ); + Map json, +) => _SubscriptionHandlerMessage( + event: json['event'] as String, + payload: json['payload'] as String, +); Map _$SubscriptionHandlerMessageToJson( - _SubscriptionHandlerMessage instance) => - { - 'event': instance.event, - 'payload': instance.payload, - }; + _SubscriptionHandlerMessage instance, +) => {'event': instance.event, 'payload': instance.payload}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/token_wallet_transaction.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/token_wallet_transaction.dart index 51f10b9e..e4b59c39 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/token_wallet_transaction.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/token_wallet_transaction.dart @@ -15,27 +15,24 @@ sealed class TokenWalletTransaction with _$TokenWalletTransaction { ) = TokenWalletTransactionInternalTransfer; const factory TokenWalletTransaction.incomingTransfer( - final TokenIncomingTransfer data) = - TokenWalletTransactionIncomingTransfer; + final TokenIncomingTransfer data, + ) = TokenWalletTransactionIncomingTransfer; const factory TokenWalletTransaction.outgoingTransfer( - final TokenOutgoingTransfer data) = - TokenWalletTransactionOutgoingTransfer; + final TokenOutgoingTransfer data, + ) = TokenWalletTransactionOutgoingTransfer; const factory TokenWalletTransaction.swapBack(final TokenSwapBack data) = TokenWalletTransactionSwapBack; - const factory TokenWalletTransaction.accept( - final BigInt data, - ) = TokenWalletTransactionAccept; + const factory TokenWalletTransaction.accept(final BigInt data) = + TokenWalletTransactionAccept; - const factory TokenWalletTransaction.transferBounced( - final BigInt data, - ) = TokenWalletTransactionTransferBounced; + const factory TokenWalletTransaction.transferBounced(final BigInt data) = + TokenWalletTransactionTransferBounced; - const factory TokenWalletTransaction.swapBackBounced( - final BigInt data, - ) = TokenWalletTransactionSwapBackBounced; + const factory TokenWalletTransaction.swapBackBounced(final BigInt data) = + TokenWalletTransactionSwapBackBounced; factory TokenWalletTransaction.fromJson(Map json) => _$TokenWalletTransactionFromJson(json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/token_wallet_transaction.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/token_wallet_transaction.freezed.dart index 45008bb7..9ba4e7df 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/token_wallet_transaction.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/token_wallet_transaction.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -13,123 +12,304 @@ part of 'token_wallet_transaction.dart'; // dart format off T _$identity(T value) => value; TokenWalletTransaction _$TokenWalletTransactionFromJson( - Map json) { - switch (json['type']) { - case 'transfer': - return TokenWalletTransactionTransfer.fromJson(json); - case 'internal_transfer': - return TokenWalletTransactionInternalTransfer.fromJson(json); - case 'incoming_transfer': - return TokenWalletTransactionIncomingTransfer.fromJson(json); - case 'outgoing_transfer': - return TokenWalletTransactionOutgoingTransfer.fromJson(json); - case 'swap_back': - return TokenWalletTransactionSwapBack.fromJson(json); - case 'accept': - return TokenWalletTransactionAccept.fromJson(json); - case 'transfer_bounced': - return TokenWalletTransactionTransferBounced.fromJson(json); - case 'swap_back_bounced': - return TokenWalletTransactionSwapBackBounced.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'type', 'TokenWalletTransaction', - 'Invalid union type "${json['type']}"!'); - } + Map json +) { + switch (json['type']) { + case 'transfer': + return TokenWalletTransactionTransfer.fromJson( + json + ); + case 'internal_transfer': + return TokenWalletTransactionInternalTransfer.fromJson( + json + ); + case 'incoming_transfer': + return TokenWalletTransactionIncomingTransfer.fromJson( + json + ); + case 'outgoing_transfer': + return TokenWalletTransactionOutgoingTransfer.fromJson( + json + ); + case 'swap_back': + return TokenWalletTransactionSwapBack.fromJson( + json + ); + case 'accept': + return TokenWalletTransactionAccept.fromJson( + json + ); + case 'transfer_bounced': + return TokenWalletTransactionTransferBounced.fromJson( + json + ); + case 'swap_back_bounced': + return TokenWalletTransactionSwapBackBounced.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'TokenWalletTransaction', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$TokenWalletTransaction { - Object get data; + + Object get data; /// Serializes this TokenWalletTransaction to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenWalletTransaction && - const DeepCollectionEquality().equals(other.data, data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(data)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenWalletTransaction&&const DeepCollectionEquality().equals(other.data, data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(data)); + +@override +String toString() { + return 'TokenWalletTransaction(data: $data)'; +} + - @override - String toString() { - return 'TokenWalletTransaction(data: $data)'; - } } /// @nodoc -class $TokenWalletTransactionCopyWith<$Res> { - $TokenWalletTransactionCopyWith( - TokenWalletTransaction _, $Res Function(TokenWalletTransaction) __); +class $TokenWalletTransactionCopyWith<$Res> { +$TokenWalletTransactionCopyWith(TokenWalletTransaction _, $Res Function(TokenWalletTransaction) __); +} + + +/// Adds pattern-matching-related methods to [TokenWalletTransaction]. +extension TokenWalletTransactionPatterns on TokenWalletTransaction { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( TokenWalletTransactionTransfer value)? transfer,TResult Function( TokenWalletTransactionInternalTransfer value)? internalTransfer,TResult Function( TokenWalletTransactionIncomingTransfer value)? incomingTransfer,TResult Function( TokenWalletTransactionOutgoingTransfer value)? outgoingTransfer,TResult Function( TokenWalletTransactionSwapBack value)? swapBack,TResult Function( TokenWalletTransactionAccept value)? accept,TResult Function( TokenWalletTransactionTransferBounced value)? transferBounced,TResult Function( TokenWalletTransactionSwapBackBounced value)? swapBackBounced,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case TokenWalletTransactionTransfer() when transfer != null: +return transfer(_that);case TokenWalletTransactionInternalTransfer() when internalTransfer != null: +return internalTransfer(_that);case TokenWalletTransactionIncomingTransfer() when incomingTransfer != null: +return incomingTransfer(_that);case TokenWalletTransactionOutgoingTransfer() when outgoingTransfer != null: +return outgoingTransfer(_that);case TokenWalletTransactionSwapBack() when swapBack != null: +return swapBack(_that);case TokenWalletTransactionAccept() when accept != null: +return accept(_that);case TokenWalletTransactionTransferBounced() when transferBounced != null: +return transferBounced(_that);case TokenWalletTransactionSwapBackBounced() when swapBackBounced != null: +return swapBackBounced(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( TokenWalletTransactionTransfer value) transfer,required TResult Function( TokenWalletTransactionInternalTransfer value) internalTransfer,required TResult Function( TokenWalletTransactionIncomingTransfer value) incomingTransfer,required TResult Function( TokenWalletTransactionOutgoingTransfer value) outgoingTransfer,required TResult Function( TokenWalletTransactionSwapBack value) swapBack,required TResult Function( TokenWalletTransactionAccept value) accept,required TResult Function( TokenWalletTransactionTransferBounced value) transferBounced,required TResult Function( TokenWalletTransactionSwapBackBounced value) swapBackBounced,}){ +final _that = this; +switch (_that) { +case TokenWalletTransactionTransfer(): +return transfer(_that);case TokenWalletTransactionInternalTransfer(): +return internalTransfer(_that);case TokenWalletTransactionIncomingTransfer(): +return incomingTransfer(_that);case TokenWalletTransactionOutgoingTransfer(): +return outgoingTransfer(_that);case TokenWalletTransactionSwapBack(): +return swapBack(_that);case TokenWalletTransactionAccept(): +return accept(_that);case TokenWalletTransactionTransferBounced(): +return transferBounced(_that);case TokenWalletTransactionSwapBackBounced(): +return swapBackBounced(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( TokenWalletTransactionTransfer value)? transfer,TResult? Function( TokenWalletTransactionInternalTransfer value)? internalTransfer,TResult? Function( TokenWalletTransactionIncomingTransfer value)? incomingTransfer,TResult? Function( TokenWalletTransactionOutgoingTransfer value)? outgoingTransfer,TResult? Function( TokenWalletTransactionSwapBack value)? swapBack,TResult? Function( TokenWalletTransactionAccept value)? accept,TResult? Function( TokenWalletTransactionTransferBounced value)? transferBounced,TResult? Function( TokenWalletTransactionSwapBackBounced value)? swapBackBounced,}){ +final _that = this; +switch (_that) { +case TokenWalletTransactionTransfer() when transfer != null: +return transfer(_that);case TokenWalletTransactionInternalTransfer() when internalTransfer != null: +return internalTransfer(_that);case TokenWalletTransactionIncomingTransfer() when incomingTransfer != null: +return incomingTransfer(_that);case TokenWalletTransactionOutgoingTransfer() when outgoingTransfer != null: +return outgoingTransfer(_that);case TokenWalletTransactionSwapBack() when swapBack != null: +return swapBack(_that);case TokenWalletTransactionAccept() when accept != null: +return accept(_that);case TokenWalletTransactionTransferBounced() when transferBounced != null: +return transferBounced(_that);case TokenWalletTransactionSwapBackBounced() when swapBackBounced != null: +return swapBackBounced(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( JettonOutgoingTransfer data)? transfer,TResult Function( JettonIncomingTransfer data)? internalTransfer,TResult Function( TokenIncomingTransfer data)? incomingTransfer,TResult Function( TokenOutgoingTransfer data)? outgoingTransfer,TResult Function( TokenSwapBack data)? swapBack,TResult Function( BigInt data)? accept,TResult Function( BigInt data)? transferBounced,TResult Function( BigInt data)? swapBackBounced,required TResult orElse(),}) {final _that = this; +switch (_that) { +case TokenWalletTransactionTransfer() when transfer != null: +return transfer(_that.data);case TokenWalletTransactionInternalTransfer() when internalTransfer != null: +return internalTransfer(_that.data);case TokenWalletTransactionIncomingTransfer() when incomingTransfer != null: +return incomingTransfer(_that.data);case TokenWalletTransactionOutgoingTransfer() when outgoingTransfer != null: +return outgoingTransfer(_that.data);case TokenWalletTransactionSwapBack() when swapBack != null: +return swapBack(_that.data);case TokenWalletTransactionAccept() when accept != null: +return accept(_that.data);case TokenWalletTransactionTransferBounced() when transferBounced != null: +return transferBounced(_that.data);case TokenWalletTransactionSwapBackBounced() when swapBackBounced != null: +return swapBackBounced(_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( JettonOutgoingTransfer data) transfer,required TResult Function( JettonIncomingTransfer data) internalTransfer,required TResult Function( TokenIncomingTransfer data) incomingTransfer,required TResult Function( TokenOutgoingTransfer data) outgoingTransfer,required TResult Function( TokenSwapBack data) swapBack,required TResult Function( BigInt data) accept,required TResult Function( BigInt data) transferBounced,required TResult Function( BigInt data) swapBackBounced,}) {final _that = this; +switch (_that) { +case TokenWalletTransactionTransfer(): +return transfer(_that.data);case TokenWalletTransactionInternalTransfer(): +return internalTransfer(_that.data);case TokenWalletTransactionIncomingTransfer(): +return incomingTransfer(_that.data);case TokenWalletTransactionOutgoingTransfer(): +return outgoingTransfer(_that.data);case TokenWalletTransactionSwapBack(): +return swapBack(_that.data);case TokenWalletTransactionAccept(): +return accept(_that.data);case TokenWalletTransactionTransferBounced(): +return transferBounced(_that.data);case TokenWalletTransactionSwapBackBounced(): +return swapBackBounced(_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( JettonOutgoingTransfer data)? transfer,TResult? Function( JettonIncomingTransfer data)? internalTransfer,TResult? Function( TokenIncomingTransfer data)? incomingTransfer,TResult? Function( TokenOutgoingTransfer data)? outgoingTransfer,TResult? Function( TokenSwapBack data)? swapBack,TResult? Function( BigInt data)? accept,TResult? Function( BigInt data)? transferBounced,TResult? Function( BigInt data)? swapBackBounced,}) {final _that = this; +switch (_that) { +case TokenWalletTransactionTransfer() when transfer != null: +return transfer(_that.data);case TokenWalletTransactionInternalTransfer() when internalTransfer != null: +return internalTransfer(_that.data);case TokenWalletTransactionIncomingTransfer() when incomingTransfer != null: +return incomingTransfer(_that.data);case TokenWalletTransactionOutgoingTransfer() when outgoingTransfer != null: +return outgoingTransfer(_that.data);case TokenWalletTransactionSwapBack() when swapBack != null: +return swapBack(_that.data);case TokenWalletTransactionAccept() when accept != null: +return accept(_that.data);case TokenWalletTransactionTransferBounced() when transferBounced != null: +return transferBounced(_that.data);case TokenWalletTransactionSwapBackBounced() when swapBackBounced != null: +return swapBackBounced(_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class TokenWalletTransactionTransfer implements TokenWalletTransaction { - const TokenWalletTransactionTransfer(this.data, {final String? $type}) - : $type = $type ?? 'transfer'; - factory TokenWalletTransactionTransfer.fromJson(Map json) => - _$TokenWalletTransactionTransferFromJson(json); - - @override - final JettonOutgoingTransfer data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TokenWalletTransactionTransferCopyWith - get copyWith => _$TokenWalletTransactionTransferCopyWithImpl< - TokenWalletTransactionTransfer>(this, _$identity); - - @override - Map toJson() { - return _$TokenWalletTransactionTransferToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenWalletTransactionTransfer && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TokenWalletTransaction.transfer(data: $data)'; - } + const TokenWalletTransactionTransfer(this.data, {final String? $type}): $type = $type ?? 'transfer'; + factory TokenWalletTransactionTransfer.fromJson(Map json) => _$TokenWalletTransactionTransferFromJson(json); + +@override final JettonOutgoingTransfer data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TokenWalletTransactionTransferCopyWith get copyWith => _$TokenWalletTransactionTransferCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TokenWalletTransactionTransferToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenWalletTransactionTransfer&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TokenWalletTransaction.transfer(data: $data)'; } -/// @nodoc -abstract mixin class $TokenWalletTransactionTransferCopyWith<$Res> - implements $TokenWalletTransactionCopyWith<$Res> { - factory $TokenWalletTransactionTransferCopyWith( - TokenWalletTransactionTransfer value, - $Res Function(TokenWalletTransactionTransfer) _then) = - _$TokenWalletTransactionTransferCopyWithImpl; - @useResult - $Res call({JettonOutgoingTransfer data}); - $JettonOutgoingTransferCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $TokenWalletTransactionTransferCopyWith<$Res> implements $TokenWalletTransactionCopyWith<$Res> { + factory $TokenWalletTransactionTransferCopyWith(TokenWalletTransactionTransfer value, $Res Function(TokenWalletTransactionTransfer) _then) = _$TokenWalletTransactionTransferCopyWithImpl; +@useResult +$Res call({ + JettonOutgoingTransfer data +}); + + +$JettonOutgoingTransferCopyWith<$Res> get data; + +} /// @nodoc class _$TokenWalletTransactionTransferCopyWithImpl<$Res> implements $TokenWalletTransactionTransferCopyWith<$Res> { @@ -138,93 +318,80 @@ class _$TokenWalletTransactionTransferCopyWithImpl<$Res> final TokenWalletTransactionTransfer _self; final $Res Function(TokenWalletTransactionTransfer) _then; - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TokenWalletTransactionTransfer( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as JettonOutgoingTransfer, - )); - } - - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $JettonOutgoingTransferCopyWith<$Res> get data { - return $JettonOutgoingTransferCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TokenWalletTransactionTransfer( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as JettonOutgoingTransfer, + )); +} + +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$JettonOutgoingTransferCopyWith<$Res> get data { + + return $JettonOutgoingTransferCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class TokenWalletTransactionInternalTransfer implements TokenWalletTransaction { - const TokenWalletTransactionInternalTransfer(this.data, {final String? $type}) - : $type = $type ?? 'internal_transfer'; - factory TokenWalletTransactionInternalTransfer.fromJson( - Map json) => - _$TokenWalletTransactionInternalTransferFromJson(json); - - @override - final JettonIncomingTransfer data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TokenWalletTransactionInternalTransferCopyWith< - TokenWalletTransactionInternalTransfer> - get copyWith => _$TokenWalletTransactionInternalTransferCopyWithImpl< - TokenWalletTransactionInternalTransfer>(this, _$identity); - - @override - Map toJson() { - return _$TokenWalletTransactionInternalTransferToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenWalletTransactionInternalTransfer && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TokenWalletTransaction.internalTransfer(data: $data)'; - } + const TokenWalletTransactionInternalTransfer(this.data, {final String? $type}): $type = $type ?? 'internal_transfer'; + factory TokenWalletTransactionInternalTransfer.fromJson(Map json) => _$TokenWalletTransactionInternalTransferFromJson(json); + +@override final JettonIncomingTransfer data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TokenWalletTransactionInternalTransferCopyWith get copyWith => _$TokenWalletTransactionInternalTransferCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TokenWalletTransactionInternalTransferToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenWalletTransactionInternalTransfer&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TokenWalletTransaction.internalTransfer(data: $data)'; } -/// @nodoc -abstract mixin class $TokenWalletTransactionInternalTransferCopyWith<$Res> - implements $TokenWalletTransactionCopyWith<$Res> { - factory $TokenWalletTransactionInternalTransferCopyWith( - TokenWalletTransactionInternalTransfer value, - $Res Function(TokenWalletTransactionInternalTransfer) _then) = - _$TokenWalletTransactionInternalTransferCopyWithImpl; - @useResult - $Res call({JettonIncomingTransfer data}); - $JettonIncomingTransferCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $TokenWalletTransactionInternalTransferCopyWith<$Res> implements $TokenWalletTransactionCopyWith<$Res> { + factory $TokenWalletTransactionInternalTransferCopyWith(TokenWalletTransactionInternalTransfer value, $Res Function(TokenWalletTransactionInternalTransfer) _then) = _$TokenWalletTransactionInternalTransferCopyWithImpl; +@useResult +$Res call({ + JettonIncomingTransfer data +}); + + +$JettonIncomingTransferCopyWith<$Res> get data; + +} /// @nodoc class _$TokenWalletTransactionInternalTransferCopyWithImpl<$Res> implements $TokenWalletTransactionInternalTransferCopyWith<$Res> { @@ -233,93 +400,80 @@ class _$TokenWalletTransactionInternalTransferCopyWithImpl<$Res> final TokenWalletTransactionInternalTransfer _self; final $Res Function(TokenWalletTransactionInternalTransfer) _then; - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TokenWalletTransactionInternalTransfer( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as JettonIncomingTransfer, - )); - } - - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $JettonIncomingTransferCopyWith<$Res> get data { - return $JettonIncomingTransferCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TokenWalletTransactionInternalTransfer( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as JettonIncomingTransfer, + )); +} + +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$JettonIncomingTransferCopyWith<$Res> get data { + + return $JettonIncomingTransferCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class TokenWalletTransactionIncomingTransfer implements TokenWalletTransaction { - const TokenWalletTransactionIncomingTransfer(this.data, {final String? $type}) - : $type = $type ?? 'incoming_transfer'; - factory TokenWalletTransactionIncomingTransfer.fromJson( - Map json) => - _$TokenWalletTransactionIncomingTransferFromJson(json); - - @override - final TokenIncomingTransfer data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TokenWalletTransactionIncomingTransferCopyWith< - TokenWalletTransactionIncomingTransfer> - get copyWith => _$TokenWalletTransactionIncomingTransferCopyWithImpl< - TokenWalletTransactionIncomingTransfer>(this, _$identity); - - @override - Map toJson() { - return _$TokenWalletTransactionIncomingTransferToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenWalletTransactionIncomingTransfer && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TokenWalletTransaction.incomingTransfer(data: $data)'; - } + const TokenWalletTransactionIncomingTransfer(this.data, {final String? $type}): $type = $type ?? 'incoming_transfer'; + factory TokenWalletTransactionIncomingTransfer.fromJson(Map json) => _$TokenWalletTransactionIncomingTransferFromJson(json); + +@override final TokenIncomingTransfer data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TokenWalletTransactionIncomingTransferCopyWith get copyWith => _$TokenWalletTransactionIncomingTransferCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TokenWalletTransactionIncomingTransferToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenWalletTransactionIncomingTransfer&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TokenWalletTransaction.incomingTransfer(data: $data)'; } -/// @nodoc -abstract mixin class $TokenWalletTransactionIncomingTransferCopyWith<$Res> - implements $TokenWalletTransactionCopyWith<$Res> { - factory $TokenWalletTransactionIncomingTransferCopyWith( - TokenWalletTransactionIncomingTransfer value, - $Res Function(TokenWalletTransactionIncomingTransfer) _then) = - _$TokenWalletTransactionIncomingTransferCopyWithImpl; - @useResult - $Res call({TokenIncomingTransfer data}); - $TokenIncomingTransferCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $TokenWalletTransactionIncomingTransferCopyWith<$Res> implements $TokenWalletTransactionCopyWith<$Res> { + factory $TokenWalletTransactionIncomingTransferCopyWith(TokenWalletTransactionIncomingTransfer value, $Res Function(TokenWalletTransactionIncomingTransfer) _then) = _$TokenWalletTransactionIncomingTransferCopyWithImpl; +@useResult +$Res call({ + TokenIncomingTransfer data +}); + + +$TokenIncomingTransferCopyWith<$Res> get data; + +} /// @nodoc class _$TokenWalletTransactionIncomingTransferCopyWithImpl<$Res> implements $TokenWalletTransactionIncomingTransferCopyWith<$Res> { @@ -328,93 +482,80 @@ class _$TokenWalletTransactionIncomingTransferCopyWithImpl<$Res> final TokenWalletTransactionIncomingTransfer _self; final $Res Function(TokenWalletTransactionIncomingTransfer) _then; - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TokenWalletTransactionIncomingTransfer( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as TokenIncomingTransfer, - )); - } - - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TokenIncomingTransferCopyWith<$Res> get data { - return $TokenIncomingTransferCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TokenWalletTransactionIncomingTransfer( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as TokenIncomingTransfer, + )); +} + +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TokenIncomingTransferCopyWith<$Res> get data { + + return $TokenIncomingTransferCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class TokenWalletTransactionOutgoingTransfer implements TokenWalletTransaction { - const TokenWalletTransactionOutgoingTransfer(this.data, {final String? $type}) - : $type = $type ?? 'outgoing_transfer'; - factory TokenWalletTransactionOutgoingTransfer.fromJson( - Map json) => - _$TokenWalletTransactionOutgoingTransferFromJson(json); - - @override - final TokenOutgoingTransfer data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TokenWalletTransactionOutgoingTransferCopyWith< - TokenWalletTransactionOutgoingTransfer> - get copyWith => _$TokenWalletTransactionOutgoingTransferCopyWithImpl< - TokenWalletTransactionOutgoingTransfer>(this, _$identity); - - @override - Map toJson() { - return _$TokenWalletTransactionOutgoingTransferToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenWalletTransactionOutgoingTransfer && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TokenWalletTransaction.outgoingTransfer(data: $data)'; - } + const TokenWalletTransactionOutgoingTransfer(this.data, {final String? $type}): $type = $type ?? 'outgoing_transfer'; + factory TokenWalletTransactionOutgoingTransfer.fromJson(Map json) => _$TokenWalletTransactionOutgoingTransferFromJson(json); + +@override final TokenOutgoingTransfer data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TokenWalletTransactionOutgoingTransferCopyWith get copyWith => _$TokenWalletTransactionOutgoingTransferCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TokenWalletTransactionOutgoingTransferToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenWalletTransactionOutgoingTransfer&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TokenWalletTransaction.outgoingTransfer(data: $data)'; } -/// @nodoc -abstract mixin class $TokenWalletTransactionOutgoingTransferCopyWith<$Res> - implements $TokenWalletTransactionCopyWith<$Res> { - factory $TokenWalletTransactionOutgoingTransferCopyWith( - TokenWalletTransactionOutgoingTransfer value, - $Res Function(TokenWalletTransactionOutgoingTransfer) _then) = - _$TokenWalletTransactionOutgoingTransferCopyWithImpl; - @useResult - $Res call({TokenOutgoingTransfer data}); - $TokenOutgoingTransferCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $TokenWalletTransactionOutgoingTransferCopyWith<$Res> implements $TokenWalletTransactionCopyWith<$Res> { + factory $TokenWalletTransactionOutgoingTransferCopyWith(TokenWalletTransactionOutgoingTransfer value, $Res Function(TokenWalletTransactionOutgoingTransfer) _then) = _$TokenWalletTransactionOutgoingTransferCopyWithImpl; +@useResult +$Res call({ + TokenOutgoingTransfer data +}); + + +$TokenOutgoingTransferCopyWith<$Res> get data; + +} /// @nodoc class _$TokenWalletTransactionOutgoingTransferCopyWithImpl<$Res> implements $TokenWalletTransactionOutgoingTransferCopyWith<$Res> { @@ -423,91 +564,80 @@ class _$TokenWalletTransactionOutgoingTransferCopyWithImpl<$Res> final TokenWalletTransactionOutgoingTransfer _self; final $Res Function(TokenWalletTransactionOutgoingTransfer) _then; - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TokenWalletTransactionOutgoingTransfer( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as TokenOutgoingTransfer, - )); - } - - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TokenOutgoingTransferCopyWith<$Res> get data { - return $TokenOutgoingTransferCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TokenWalletTransactionOutgoingTransfer( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as TokenOutgoingTransfer, + )); +} + +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TokenOutgoingTransferCopyWith<$Res> get data { + + return $TokenOutgoingTransferCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class TokenWalletTransactionSwapBack implements TokenWalletTransaction { - const TokenWalletTransactionSwapBack(this.data, {final String? $type}) - : $type = $type ?? 'swap_back'; - factory TokenWalletTransactionSwapBack.fromJson(Map json) => - _$TokenWalletTransactionSwapBackFromJson(json); - - @override - final TokenSwapBack data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TokenWalletTransactionSwapBackCopyWith - get copyWith => _$TokenWalletTransactionSwapBackCopyWithImpl< - TokenWalletTransactionSwapBack>(this, _$identity); - - @override - Map toJson() { - return _$TokenWalletTransactionSwapBackToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenWalletTransactionSwapBack && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TokenWalletTransaction.swapBack(data: $data)'; - } + const TokenWalletTransactionSwapBack(this.data, {final String? $type}): $type = $type ?? 'swap_back'; + factory TokenWalletTransactionSwapBack.fromJson(Map json) => _$TokenWalletTransactionSwapBackFromJson(json); + +@override final TokenSwapBack data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TokenWalletTransactionSwapBackCopyWith get copyWith => _$TokenWalletTransactionSwapBackCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TokenWalletTransactionSwapBackToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenWalletTransactionSwapBack&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TokenWalletTransaction.swapBack(data: $data)'; } -/// @nodoc -abstract mixin class $TokenWalletTransactionSwapBackCopyWith<$Res> - implements $TokenWalletTransactionCopyWith<$Res> { - factory $TokenWalletTransactionSwapBackCopyWith( - TokenWalletTransactionSwapBack value, - $Res Function(TokenWalletTransactionSwapBack) _then) = - _$TokenWalletTransactionSwapBackCopyWithImpl; - @useResult - $Res call({TokenSwapBack data}); - $TokenSwapBackCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $TokenWalletTransactionSwapBackCopyWith<$Res> implements $TokenWalletTransactionCopyWith<$Res> { + factory $TokenWalletTransactionSwapBackCopyWith(TokenWalletTransactionSwapBack value, $Res Function(TokenWalletTransactionSwapBack) _then) = _$TokenWalletTransactionSwapBackCopyWithImpl; +@useResult +$Res call({ + TokenSwapBack data +}); + + +$TokenSwapBackCopyWith<$Res> get data; + +} /// @nodoc class _$TokenWalletTransactionSwapBackCopyWithImpl<$Res> implements $TokenWalletTransactionSwapBackCopyWith<$Res> { @@ -516,89 +646,80 @@ class _$TokenWalletTransactionSwapBackCopyWithImpl<$Res> final TokenWalletTransactionSwapBack _self; final $Res Function(TokenWalletTransactionSwapBack) _then; - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TokenWalletTransactionSwapBack( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as TokenSwapBack, - )); - } - - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TokenSwapBackCopyWith<$Res> get data { - return $TokenSwapBackCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TokenWalletTransactionSwapBack( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as TokenSwapBack, + )); +} + +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TokenSwapBackCopyWith<$Res> get data { + + return $TokenSwapBackCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class TokenWalletTransactionAccept implements TokenWalletTransaction { - const TokenWalletTransactionAccept(this.data, {final String? $type}) - : $type = $type ?? 'accept'; - factory TokenWalletTransactionAccept.fromJson(Map json) => - _$TokenWalletTransactionAcceptFromJson(json); - - @override - final BigInt data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TokenWalletTransactionAcceptCopyWith - get copyWith => _$TokenWalletTransactionAcceptCopyWithImpl< - TokenWalletTransactionAccept>(this, _$identity); - - @override - Map toJson() { - return _$TokenWalletTransactionAcceptToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenWalletTransactionAccept && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TokenWalletTransaction.accept(data: $data)'; - } + const TokenWalletTransactionAccept(this.data, {final String? $type}): $type = $type ?? 'accept'; + factory TokenWalletTransactionAccept.fromJson(Map json) => _$TokenWalletTransactionAcceptFromJson(json); + +@override final BigInt data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TokenWalletTransactionAcceptCopyWith get copyWith => _$TokenWalletTransactionAcceptCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TokenWalletTransactionAcceptToJson(this, ); } -/// @nodoc -abstract mixin class $TokenWalletTransactionAcceptCopyWith<$Res> - implements $TokenWalletTransactionCopyWith<$Res> { - factory $TokenWalletTransactionAcceptCopyWith( - TokenWalletTransactionAccept value, - $Res Function(TokenWalletTransactionAccept) _then) = - _$TokenWalletTransactionAcceptCopyWithImpl; - @useResult - $Res call({BigInt data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenWalletTransactionAccept&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TokenWalletTransaction.accept(data: $data)'; +} + + } +/// @nodoc +abstract mixin class $TokenWalletTransactionAcceptCopyWith<$Res> implements $TokenWalletTransactionCopyWith<$Res> { + factory $TokenWalletTransactionAcceptCopyWith(TokenWalletTransactionAccept value, $Res Function(TokenWalletTransactionAccept) _then) = _$TokenWalletTransactionAcceptCopyWithImpl; +@useResult +$Res call({ + BigInt data +}); + + + + +} /// @nodoc class _$TokenWalletTransactionAcceptCopyWithImpl<$Res> implements $TokenWalletTransactionAcceptCopyWith<$Res> { @@ -607,81 +728,71 @@ class _$TokenWalletTransactionAcceptCopyWithImpl<$Res> final TokenWalletTransactionAccept _self; final $Res Function(TokenWalletTransactionAccept) _then; - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TokenWalletTransactionAccept( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TokenWalletTransactionAccept( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as BigInt, + )); +} + + } /// @nodoc @JsonSerializable() + class TokenWalletTransactionTransferBounced implements TokenWalletTransaction { - const TokenWalletTransactionTransferBounced(this.data, {final String? $type}) - : $type = $type ?? 'transfer_bounced'; - factory TokenWalletTransactionTransferBounced.fromJson( - Map json) => - _$TokenWalletTransactionTransferBouncedFromJson(json); - - @override - final BigInt data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TokenWalletTransactionTransferBouncedCopyWith< - TokenWalletTransactionTransferBounced> - get copyWith => _$TokenWalletTransactionTransferBouncedCopyWithImpl< - TokenWalletTransactionTransferBounced>(this, _$identity); - - @override - Map toJson() { - return _$TokenWalletTransactionTransferBouncedToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenWalletTransactionTransferBounced && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TokenWalletTransaction.transferBounced(data: $data)'; - } + const TokenWalletTransactionTransferBounced(this.data, {final String? $type}): $type = $type ?? 'transfer_bounced'; + factory TokenWalletTransactionTransferBounced.fromJson(Map json) => _$TokenWalletTransactionTransferBouncedFromJson(json); + +@override final BigInt data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TokenWalletTransactionTransferBouncedCopyWith get copyWith => _$TokenWalletTransactionTransferBouncedCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TokenWalletTransactionTransferBouncedToJson(this, ); } -/// @nodoc -abstract mixin class $TokenWalletTransactionTransferBouncedCopyWith<$Res> - implements $TokenWalletTransactionCopyWith<$Res> { - factory $TokenWalletTransactionTransferBouncedCopyWith( - TokenWalletTransactionTransferBounced value, - $Res Function(TokenWalletTransactionTransferBounced) _then) = - _$TokenWalletTransactionTransferBouncedCopyWithImpl; - @useResult - $Res call({BigInt data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenWalletTransactionTransferBounced&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TokenWalletTransaction.transferBounced(data: $data)'; +} + + } +/// @nodoc +abstract mixin class $TokenWalletTransactionTransferBouncedCopyWith<$Res> implements $TokenWalletTransactionCopyWith<$Res> { + factory $TokenWalletTransactionTransferBouncedCopyWith(TokenWalletTransactionTransferBounced value, $Res Function(TokenWalletTransactionTransferBounced) _then) = _$TokenWalletTransactionTransferBouncedCopyWithImpl; +@useResult +$Res call({ + BigInt data +}); + + + + +} /// @nodoc class _$TokenWalletTransactionTransferBouncedCopyWithImpl<$Res> implements $TokenWalletTransactionTransferBouncedCopyWith<$Res> { @@ -690,81 +801,71 @@ class _$TokenWalletTransactionTransferBouncedCopyWithImpl<$Res> final TokenWalletTransactionTransferBounced _self; final $Res Function(TokenWalletTransactionTransferBounced) _then; - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TokenWalletTransactionTransferBounced( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TokenWalletTransactionTransferBounced( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as BigInt, + )); +} + + } /// @nodoc @JsonSerializable() + class TokenWalletTransactionSwapBackBounced implements TokenWalletTransaction { - const TokenWalletTransactionSwapBackBounced(this.data, {final String? $type}) - : $type = $type ?? 'swap_back_bounced'; - factory TokenWalletTransactionSwapBackBounced.fromJson( - Map json) => - _$TokenWalletTransactionSwapBackBouncedFromJson(json); - - @override - final BigInt data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TokenWalletTransactionSwapBackBouncedCopyWith< - TokenWalletTransactionSwapBackBounced> - get copyWith => _$TokenWalletTransactionSwapBackBouncedCopyWithImpl< - TokenWalletTransactionSwapBackBounced>(this, _$identity); - - @override - Map toJson() { - return _$TokenWalletTransactionSwapBackBouncedToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenWalletTransactionSwapBackBounced && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TokenWalletTransaction.swapBackBounced(data: $data)'; - } + const TokenWalletTransactionSwapBackBounced(this.data, {final String? $type}): $type = $type ?? 'swap_back_bounced'; + factory TokenWalletTransactionSwapBackBounced.fromJson(Map json) => _$TokenWalletTransactionSwapBackBouncedFromJson(json); + +@override final BigInt data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TokenWalletTransactionSwapBackBouncedCopyWith get copyWith => _$TokenWalletTransactionSwapBackBouncedCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TokenWalletTransactionSwapBackBouncedToJson(this, ); } -/// @nodoc -abstract mixin class $TokenWalletTransactionSwapBackBouncedCopyWith<$Res> - implements $TokenWalletTransactionCopyWith<$Res> { - factory $TokenWalletTransactionSwapBackBouncedCopyWith( - TokenWalletTransactionSwapBackBounced value, - $Res Function(TokenWalletTransactionSwapBackBounced) _then) = - _$TokenWalletTransactionSwapBackBouncedCopyWithImpl; - @useResult - $Res call({BigInt data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenWalletTransactionSwapBackBounced&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TokenWalletTransaction.swapBackBounced(data: $data)'; } + +} + +/// @nodoc +abstract mixin class $TokenWalletTransactionSwapBackBouncedCopyWith<$Res> implements $TokenWalletTransactionCopyWith<$Res> { + factory $TokenWalletTransactionSwapBackBouncedCopyWith(TokenWalletTransactionSwapBackBounced value, $Res Function(TokenWalletTransactionSwapBackBounced) _then) = _$TokenWalletTransactionSwapBackBouncedCopyWithImpl; +@useResult +$Res call({ + BigInt data +}); + + + + +} /// @nodoc class _$TokenWalletTransactionSwapBackBouncedCopyWithImpl<$Res> implements $TokenWalletTransactionSwapBackBouncedCopyWith<$Res> { @@ -773,19 +874,16 @@ class _$TokenWalletTransactionSwapBackBouncedCopyWithImpl<$Res> final TokenWalletTransactionSwapBackBounced _self; final $Res Function(TokenWalletTransactionSwapBackBounced) _then; - /// Create a copy of TokenWalletTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TokenWalletTransactionSwapBackBounced( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } +/// Create a copy of TokenWalletTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TokenWalletTransactionSwapBackBounced( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as BigInt, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/token_wallet_transaction.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/token_wallet_transaction.g.dart index 9f9a1677..ae16d703 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/token_wallet_transaction.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/token_wallet_transaction.g.dart @@ -7,118 +7,98 @@ part of 'token_wallet_transaction.dart'; // ************************************************************************** TokenWalletTransactionTransfer _$TokenWalletTransactionTransferFromJson( - Map json) => - TokenWalletTransactionTransfer( - JettonOutgoingTransfer.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => TokenWalletTransactionTransfer( + JettonOutgoingTransfer.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$TokenWalletTransactionTransferToJson( - TokenWalletTransactionTransfer instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + TokenWalletTransactionTransfer instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; TokenWalletTransactionInternalTransfer - _$TokenWalletTransactionInternalTransferFromJson( - Map json) => - TokenWalletTransactionInternalTransfer( - JettonIncomingTransfer.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); +_$TokenWalletTransactionInternalTransferFromJson(Map json) => + TokenWalletTransactionInternalTransfer( + JettonIncomingTransfer.fromJson(json['data'] as Map), + $type: json['type'] as String?, + ); Map _$TokenWalletTransactionInternalTransferToJson( - TokenWalletTransactionInternalTransfer instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + TokenWalletTransactionInternalTransfer instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; TokenWalletTransactionIncomingTransfer - _$TokenWalletTransactionIncomingTransferFromJson( - Map json) => - TokenWalletTransactionIncomingTransfer( - TokenIncomingTransfer.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); +_$TokenWalletTransactionIncomingTransferFromJson(Map json) => + TokenWalletTransactionIncomingTransfer( + TokenIncomingTransfer.fromJson(json['data'] as Map), + $type: json['type'] as String?, + ); Map _$TokenWalletTransactionIncomingTransferToJson( - TokenWalletTransactionIncomingTransfer instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + TokenWalletTransactionIncomingTransfer instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; TokenWalletTransactionOutgoingTransfer - _$TokenWalletTransactionOutgoingTransferFromJson( - Map json) => - TokenWalletTransactionOutgoingTransfer( - TokenOutgoingTransfer.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); +_$TokenWalletTransactionOutgoingTransferFromJson(Map json) => + TokenWalletTransactionOutgoingTransfer( + TokenOutgoingTransfer.fromJson(json['data'] as Map), + $type: json['type'] as String?, + ); Map _$TokenWalletTransactionOutgoingTransferToJson( - TokenWalletTransactionOutgoingTransfer instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + TokenWalletTransactionOutgoingTransfer instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; TokenWalletTransactionSwapBack _$TokenWalletTransactionSwapBackFromJson( - Map json) => - TokenWalletTransactionSwapBack( - TokenSwapBack.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => TokenWalletTransactionSwapBack( + TokenSwapBack.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$TokenWalletTransactionSwapBackToJson( - TokenWalletTransactionSwapBack instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + TokenWalletTransactionSwapBack instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; TokenWalletTransactionAccept _$TokenWalletTransactionAcceptFromJson( - Map json) => - TokenWalletTransactionAccept( - BigInt.parse(json['data'] as String), - $type: json['type'] as String?, - ); + Map json, +) => TokenWalletTransactionAccept( + BigInt.parse(json['data'] as String), + $type: json['type'] as String?, +); Map _$TokenWalletTransactionAcceptToJson( - TokenWalletTransactionAccept instance) => - { - 'data': instance.data.toString(), - 'type': instance.$type, - }; + TokenWalletTransactionAccept instance, +) => { + 'data': instance.data.toString(), + 'type': instance.$type, +}; TokenWalletTransactionTransferBounced - _$TokenWalletTransactionTransferBouncedFromJson( - Map json) => - TokenWalletTransactionTransferBounced( - BigInt.parse(json['data'] as String), - $type: json['type'] as String?, - ); +_$TokenWalletTransactionTransferBouncedFromJson(Map json) => + TokenWalletTransactionTransferBounced( + BigInt.parse(json['data'] as String), + $type: json['type'] as String?, + ); Map _$TokenWalletTransactionTransferBouncedToJson( - TokenWalletTransactionTransferBounced instance) => - { - 'data': instance.data.toString(), - 'type': instance.$type, - }; + TokenWalletTransactionTransferBounced instance, +) => { + 'data': instance.data.toString(), + 'type': instance.$type, +}; TokenWalletTransactionSwapBackBounced - _$TokenWalletTransactionSwapBackBouncedFromJson( - Map json) => - TokenWalletTransactionSwapBackBounced( - BigInt.parse(json['data'] as String), - $type: json['type'] as String?, - ); +_$TokenWalletTransactionSwapBackBouncedFromJson(Map json) => + TokenWalletTransactionSwapBackBounced( + BigInt.parse(json['data'] as String), + $type: json['type'] as String?, + ); Map _$TokenWalletTransactionSwapBackBouncedToJson( - TokenWalletTransactionSwapBackBounced instance) => - { - 'data': instance.data.toString(), - 'type': instance.$type, - }; + TokenWalletTransactionSwapBackBounced instance, +) => { + 'data': instance.data.toString(), + 'type': instance.$type, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction.freezed.dart index 8c2fda95..c639cbc6 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,481 +14,357 @@ T _$identity(T value) => value; /// @nodoc mixin _$Transaction { - TransactionId get id; - TransactionId? get prevTransactionId; - @dateSecondsSinceEpochJsonConverter - DateTime get createdAt; - bool get aborted; - @JsonKey(includeIfNull: false) - int? get exitCode; - @JsonKey(includeIfNull: false) - int? get resultCode; - AccountStatus get origStatus; - AccountStatus get endStatus; - BigInt get totalFees; - Message get inMessage; - List get outMessages; - String? get boc; - - /// Create a copy of Transaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransactionCopyWith get copyWith => - _$TransactionCopyWithImpl(this as Transaction, _$identity); + + TransactionId get id; TransactionId? get prevTransactionId;@dateSecondsSinceEpochJsonConverter DateTime get createdAt; bool get aborted;@JsonKey(includeIfNull: false) int? get exitCode;@JsonKey(includeIfNull: false) int? get resultCode; AccountStatus get origStatus; AccountStatus get endStatus; BigInt get totalFees; Message get inMessage; List get outMessages; String? get boc; +/// Create a copy of Transaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransactionCopyWith get copyWith => _$TransactionCopyWithImpl(this as Transaction, _$identity); /// Serializes this Transaction to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is Transaction && - (identical(other.id, id) || other.id == id) && - (identical(other.prevTransactionId, prevTransactionId) || - other.prevTransactionId == prevTransactionId) && - (identical(other.createdAt, createdAt) || - other.createdAt == createdAt) && - (identical(other.aborted, aborted) || other.aborted == aborted) && - (identical(other.exitCode, exitCode) || - other.exitCode == exitCode) && - (identical(other.resultCode, resultCode) || - other.resultCode == resultCode) && - (identical(other.origStatus, origStatus) || - other.origStatus == origStatus) && - (identical(other.endStatus, endStatus) || - other.endStatus == endStatus) && - (identical(other.totalFees, totalFees) || - other.totalFees == totalFees) && - (identical(other.inMessage, inMessage) || - other.inMessage == inMessage) && - const DeepCollectionEquality() - .equals(other.outMessages, outMessages) && - (identical(other.boc, boc) || other.boc == boc)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - id, - prevTransactionId, - createdAt, - aborted, - exitCode, - resultCode, - origStatus, - endStatus, - totalFees, - inMessage, - const DeepCollectionEquality().hash(outMessages), - boc); - - @override - String toString() { - return 'Transaction(id: $id, prevTransactionId: $prevTransactionId, createdAt: $createdAt, aborted: $aborted, exitCode: $exitCode, resultCode: $resultCode, origStatus: $origStatus, endStatus: $endStatus, totalFees: $totalFees, inMessage: $inMessage, outMessages: $outMessages, boc: $boc)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Transaction&&(identical(other.id, id) || other.id == id)&&(identical(other.prevTransactionId, prevTransactionId) || other.prevTransactionId == prevTransactionId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.aborted, aborted) || other.aborted == aborted)&&(identical(other.exitCode, exitCode) || other.exitCode == exitCode)&&(identical(other.resultCode, resultCode) || other.resultCode == resultCode)&&(identical(other.origStatus, origStatus) || other.origStatus == origStatus)&&(identical(other.endStatus, endStatus) || other.endStatus == endStatus)&&(identical(other.totalFees, totalFees) || other.totalFees == totalFees)&&(identical(other.inMessage, inMessage) || other.inMessage == inMessage)&&const DeepCollectionEquality().equals(other.outMessages, outMessages)&&(identical(other.boc, boc) || other.boc == boc)); } -/// @nodoc -abstract mixin class $TransactionCopyWith<$Res> { - factory $TransactionCopyWith( - Transaction value, $Res Function(Transaction) _then) = - _$TransactionCopyWithImpl; - @useResult - $Res call( - {TransactionId id, - TransactionId? prevTransactionId, - @dateSecondsSinceEpochJsonConverter DateTime createdAt, - bool aborted, - @JsonKey(includeIfNull: false) int? exitCode, - @JsonKey(includeIfNull: false) int? resultCode, - AccountStatus origStatus, - AccountStatus endStatus, - BigInt totalFees, - Message inMessage, - List outMessages, - String? boc}); - - $TransactionIdCopyWith<$Res> get id; - $TransactionIdCopyWith<$Res>? get prevTransactionId; - $MessageCopyWith<$Res> get inMessage; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,prevTransactionId,createdAt,aborted,exitCode,resultCode,origStatus,endStatus,totalFees,inMessage,const DeepCollectionEquality().hash(outMessages),boc); + +@override +String toString() { + return 'Transaction(id: $id, prevTransactionId: $prevTransactionId, createdAt: $createdAt, aborted: $aborted, exitCode: $exitCode, resultCode: $resultCode, origStatus: $origStatus, endStatus: $endStatus, totalFees: $totalFees, inMessage: $inMessage, outMessages: $outMessages, boc: $boc)'; +} + + } /// @nodoc -class _$TransactionCopyWithImpl<$Res> implements $TransactionCopyWith<$Res> { +abstract mixin class $TransactionCopyWith<$Res> { + factory $TransactionCopyWith(Transaction value, $Res Function(Transaction) _then) = _$TransactionCopyWithImpl; +@useResult +$Res call({ + TransactionId id, TransactionId? prevTransactionId,@dateSecondsSinceEpochJsonConverter DateTime createdAt, bool aborted,@JsonKey(includeIfNull: false) int? exitCode,@JsonKey(includeIfNull: false) int? resultCode, AccountStatus origStatus, AccountStatus endStatus, BigInt totalFees, Message inMessage, List outMessages, String? boc +}); + + +$TransactionIdCopyWith<$Res> get id;$TransactionIdCopyWith<$Res>? get prevTransactionId;$MessageCopyWith<$Res> get inMessage; + +} +/// @nodoc +class _$TransactionCopyWithImpl<$Res> + implements $TransactionCopyWith<$Res> { _$TransactionCopyWithImpl(this._self, this._then); final Transaction _self; final $Res Function(Transaction) _then; - /// Create a copy of Transaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? prevTransactionId = freezed, - Object? createdAt = null, - Object? aborted = null, - Object? exitCode = freezed, - Object? resultCode = freezed, - Object? origStatus = null, - Object? endStatus = null, - Object? totalFees = null, - Object? inMessage = null, - Object? outMessages = null, - Object? boc = freezed, - }) { - return _then(_self.copyWith( - id: null == id - ? _self.id - : id // ignore: cast_nullable_to_non_nullable - as TransactionId, - prevTransactionId: freezed == prevTransactionId - ? _self.prevTransactionId - : prevTransactionId // ignore: cast_nullable_to_non_nullable - as TransactionId?, - createdAt: null == createdAt - ? _self.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - aborted: null == aborted - ? _self.aborted - : aborted // ignore: cast_nullable_to_non_nullable - as bool, - exitCode: freezed == exitCode - ? _self.exitCode - : exitCode // ignore: cast_nullable_to_non_nullable - as int?, - resultCode: freezed == resultCode - ? _self.resultCode - : resultCode // ignore: cast_nullable_to_non_nullable - as int?, - origStatus: null == origStatus - ? _self.origStatus - : origStatus // ignore: cast_nullable_to_non_nullable - as AccountStatus, - endStatus: null == endStatus - ? _self.endStatus - : endStatus // ignore: cast_nullable_to_non_nullable - as AccountStatus, - totalFees: null == totalFees - ? _self.totalFees - : totalFees // ignore: cast_nullable_to_non_nullable - as BigInt, - inMessage: null == inMessage - ? _self.inMessage - : inMessage // ignore: cast_nullable_to_non_nullable - as Message, - outMessages: null == outMessages - ? _self.outMessages - : outMessages // ignore: cast_nullable_to_non_nullable - as List, - boc: freezed == boc - ? _self.boc - : boc // ignore: cast_nullable_to_non_nullable - as String?, - )); +/// Create a copy of Transaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? prevTransactionId = freezed,Object? createdAt = null,Object? aborted = null,Object? exitCode = freezed,Object? resultCode = freezed,Object? origStatus = null,Object? endStatus = null,Object? totalFees = null,Object? inMessage = null,Object? outMessages = null,Object? boc = freezed,}) { + return _then(_self.copyWith( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as TransactionId,prevTransactionId: freezed == prevTransactionId ? _self.prevTransactionId : prevTransactionId // ignore: cast_nullable_to_non_nullable +as TransactionId?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable +as DateTime,aborted: null == aborted ? _self.aborted : aborted // ignore: cast_nullable_to_non_nullable +as bool,exitCode: freezed == exitCode ? _self.exitCode : exitCode // ignore: cast_nullable_to_non_nullable +as int?,resultCode: freezed == resultCode ? _self.resultCode : resultCode // ignore: cast_nullable_to_non_nullable +as int?,origStatus: null == origStatus ? _self.origStatus : origStatus // ignore: cast_nullable_to_non_nullable +as AccountStatus,endStatus: null == endStatus ? _self.endStatus : endStatus // ignore: cast_nullable_to_non_nullable +as AccountStatus,totalFees: null == totalFees ? _self.totalFees : totalFees // ignore: cast_nullable_to_non_nullable +as BigInt,inMessage: null == inMessage ? _self.inMessage : inMessage // ignore: cast_nullable_to_non_nullable +as Message,outMessages: null == outMessages ? _self.outMessages : outMessages // ignore: cast_nullable_to_non_nullable +as List,boc: freezed == boc ? _self.boc : boc // ignore: cast_nullable_to_non_nullable +as String?, + )); +} +/// Create a copy of Transaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionIdCopyWith<$Res> get id { + + return $TransactionIdCopyWith<$Res>(_self.id, (value) { + return _then(_self.copyWith(id: value)); + }); +}/// Create a copy of Transaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionIdCopyWith<$Res>? get prevTransactionId { + if (_self.prevTransactionId == null) { + return null; } - /// Create a copy of Transaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionIdCopyWith<$Res> get id { - return $TransactionIdCopyWith<$Res>(_self.id, (value) { - return _then(_self.copyWith(id: value)); - }); - } + return $TransactionIdCopyWith<$Res>(_self.prevTransactionId!, (value) { + return _then(_self.copyWith(prevTransactionId: value)); + }); +}/// Create a copy of Transaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$MessageCopyWith<$Res> get inMessage { + + return $MessageCopyWith<$Res>(_self.inMessage, (value) { + return _then(_self.copyWith(inMessage: value)); + }); +} +} - /// Create a copy of Transaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionIdCopyWith<$Res>? get prevTransactionId { - if (_self.prevTransactionId == null) { - return null; - } - return $TransactionIdCopyWith<$Res>(_self.prevTransactionId!, (value) { - return _then(_self.copyWith(prevTransactionId: value)); - }); - } +/// Adds pattern-matching-related methods to [Transaction]. +extension TransactionPatterns on Transaction { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _Transaction value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Transaction() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _Transaction value) $default,){ +final _that = this; +switch (_that) { +case _Transaction(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _Transaction value)? $default,){ +final _that = this; +switch (_that) { +case _Transaction() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( TransactionId id, TransactionId? prevTransactionId, @dateSecondsSinceEpochJsonConverter DateTime createdAt, bool aborted, @JsonKey(includeIfNull: false) int? exitCode, @JsonKey(includeIfNull: false) int? resultCode, AccountStatus origStatus, AccountStatus endStatus, BigInt totalFees, Message inMessage, List outMessages, String? boc)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Transaction() when $default != null: +return $default(_that.id,_that.prevTransactionId,_that.createdAt,_that.aborted,_that.exitCode,_that.resultCode,_that.origStatus,_that.endStatus,_that.totalFees,_that.inMessage,_that.outMessages,_that.boc);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( TransactionId id, TransactionId? prevTransactionId, @dateSecondsSinceEpochJsonConverter DateTime createdAt, bool aborted, @JsonKey(includeIfNull: false) int? exitCode, @JsonKey(includeIfNull: false) int? resultCode, AccountStatus origStatus, AccountStatus endStatus, BigInt totalFees, Message inMessage, List outMessages, String? boc) $default,) {final _that = this; +switch (_that) { +case _Transaction(): +return $default(_that.id,_that.prevTransactionId,_that.createdAt,_that.aborted,_that.exitCode,_that.resultCode,_that.origStatus,_that.endStatus,_that.totalFees,_that.inMessage,_that.outMessages,_that.boc);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( TransactionId id, TransactionId? prevTransactionId, @dateSecondsSinceEpochJsonConverter DateTime createdAt, bool aborted, @JsonKey(includeIfNull: false) int? exitCode, @JsonKey(includeIfNull: false) int? resultCode, AccountStatus origStatus, AccountStatus endStatus, BigInt totalFees, Message inMessage, List outMessages, String? boc)? $default,) {final _that = this; +switch (_that) { +case _Transaction() when $default != null: +return $default(_that.id,_that.prevTransactionId,_that.createdAt,_that.aborted,_that.exitCode,_that.resultCode,_that.origStatus,_that.endStatus,_that.totalFees,_that.inMessage,_that.outMessages,_that.boc);case _: + return null; + +} +} - /// Create a copy of Transaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $MessageCopyWith<$Res> get inMessage { - return $MessageCopyWith<$Res>(_self.inMessage, (value) { - return _then(_self.copyWith(inMessage: value)); - }); - } } /// @nodoc @JsonSerializable() + class _Transaction extends Transaction { - const _Transaction( - {required this.id, - this.prevTransactionId, - @dateSecondsSinceEpochJsonConverter required this.createdAt, - required this.aborted, - @JsonKey(includeIfNull: false) this.exitCode, - @JsonKey(includeIfNull: false) this.resultCode, - required this.origStatus, - required this.endStatus, - required this.totalFees, - required this.inMessage, - required final List outMessages, - required this.boc}) - : _outMessages = outMessages, - super._(); - factory _Transaction.fromJson(Map json) => - _$TransactionFromJson(json); - - @override - final TransactionId id; - @override - final TransactionId? prevTransactionId; - @override - @dateSecondsSinceEpochJsonConverter - final DateTime createdAt; - @override - final bool aborted; - @override - @JsonKey(includeIfNull: false) - final int? exitCode; - @override - @JsonKey(includeIfNull: false) - final int? resultCode; - @override - final AccountStatus origStatus; - @override - final AccountStatus endStatus; - @override - final BigInt totalFees; - @override - final Message inMessage; - final List _outMessages; - @override - List get outMessages { - if (_outMessages is EqualUnmodifiableListView) return _outMessages; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_outMessages); - } + const _Transaction({required this.id, this.prevTransactionId, @dateSecondsSinceEpochJsonConverter required this.createdAt, required this.aborted, @JsonKey(includeIfNull: false) this.exitCode, @JsonKey(includeIfNull: false) this.resultCode, required this.origStatus, required this.endStatus, required this.totalFees, required this.inMessage, required final List outMessages, required this.boc}): _outMessages = outMessages,super._(); + factory _Transaction.fromJson(Map json) => _$TransactionFromJson(json); + +@override final TransactionId id; +@override final TransactionId? prevTransactionId; +@override@dateSecondsSinceEpochJsonConverter final DateTime createdAt; +@override final bool aborted; +@override@JsonKey(includeIfNull: false) final int? exitCode; +@override@JsonKey(includeIfNull: false) final int? resultCode; +@override final AccountStatus origStatus; +@override final AccountStatus endStatus; +@override final BigInt totalFees; +@override final Message inMessage; + final List _outMessages; +@override List get outMessages { + if (_outMessages is EqualUnmodifiableListView) return _outMessages; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_outMessages); +} - @override - final String? boc; - - /// Create a copy of Transaction - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TransactionCopyWith<_Transaction> get copyWith => - __$TransactionCopyWithImpl<_Transaction>(this, _$identity); - - @override - Map toJson() { - return _$TransactionToJson( - this, - ); - } +@override final String? boc; - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _Transaction && - (identical(other.id, id) || other.id == id) && - (identical(other.prevTransactionId, prevTransactionId) || - other.prevTransactionId == prevTransactionId) && - (identical(other.createdAt, createdAt) || - other.createdAt == createdAt) && - (identical(other.aborted, aborted) || other.aborted == aborted) && - (identical(other.exitCode, exitCode) || - other.exitCode == exitCode) && - (identical(other.resultCode, resultCode) || - other.resultCode == resultCode) && - (identical(other.origStatus, origStatus) || - other.origStatus == origStatus) && - (identical(other.endStatus, endStatus) || - other.endStatus == endStatus) && - (identical(other.totalFees, totalFees) || - other.totalFees == totalFees) && - (identical(other.inMessage, inMessage) || - other.inMessage == inMessage) && - const DeepCollectionEquality() - .equals(other._outMessages, _outMessages) && - (identical(other.boc, boc) || other.boc == boc)); - } +/// Create a copy of Transaction +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TransactionCopyWith<_Transaction> get copyWith => __$TransactionCopyWithImpl<_Transaction>(this, _$identity); - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - id, - prevTransactionId, - createdAt, - aborted, - exitCode, - resultCode, - origStatus, - endStatus, - totalFees, - inMessage, - const DeepCollectionEquality().hash(_outMessages), - boc); - - @override - String toString() { - return 'Transaction(id: $id, prevTransactionId: $prevTransactionId, createdAt: $createdAt, aborted: $aborted, exitCode: $exitCode, resultCode: $resultCode, origStatus: $origStatus, endStatus: $endStatus, totalFees: $totalFees, inMessage: $inMessage, outMessages: $outMessages, boc: $boc)'; - } +@override +Map toJson() { + return _$TransactionToJson(this, ); } -/// @nodoc -abstract mixin class _$TransactionCopyWith<$Res> - implements $TransactionCopyWith<$Res> { - factory _$TransactionCopyWith( - _Transaction value, $Res Function(_Transaction) _then) = - __$TransactionCopyWithImpl; - @override - @useResult - $Res call( - {TransactionId id, - TransactionId? prevTransactionId, - @dateSecondsSinceEpochJsonConverter DateTime createdAt, - bool aborted, - @JsonKey(includeIfNull: false) int? exitCode, - @JsonKey(includeIfNull: false) int? resultCode, - AccountStatus origStatus, - AccountStatus endStatus, - BigInt totalFees, - Message inMessage, - List outMessages, - String? boc}); - - @override - $TransactionIdCopyWith<$Res> get id; - @override - $TransactionIdCopyWith<$Res>? get prevTransactionId; - @override - $MessageCopyWith<$Res> get inMessage; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Transaction&&(identical(other.id, id) || other.id == id)&&(identical(other.prevTransactionId, prevTransactionId) || other.prevTransactionId == prevTransactionId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.aborted, aborted) || other.aborted == aborted)&&(identical(other.exitCode, exitCode) || other.exitCode == exitCode)&&(identical(other.resultCode, resultCode) || other.resultCode == resultCode)&&(identical(other.origStatus, origStatus) || other.origStatus == origStatus)&&(identical(other.endStatus, endStatus) || other.endStatus == endStatus)&&(identical(other.totalFees, totalFees) || other.totalFees == totalFees)&&(identical(other.inMessage, inMessage) || other.inMessage == inMessage)&&const DeepCollectionEquality().equals(other._outMessages, _outMessages)&&(identical(other.boc, boc) || other.boc == boc)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,prevTransactionId,createdAt,aborted,exitCode,resultCode,origStatus,endStatus,totalFees,inMessage,const DeepCollectionEquality().hash(_outMessages),boc); + +@override +String toString() { + return 'Transaction(id: $id, prevTransactionId: $prevTransactionId, createdAt: $createdAt, aborted: $aborted, exitCode: $exitCode, resultCode: $resultCode, origStatus: $origStatus, endStatus: $endStatus, totalFees: $totalFees, inMessage: $inMessage, outMessages: $outMessages, boc: $boc)'; +} + + } /// @nodoc -class __$TransactionCopyWithImpl<$Res> implements _$TransactionCopyWith<$Res> { +abstract mixin class _$TransactionCopyWith<$Res> implements $TransactionCopyWith<$Res> { + factory _$TransactionCopyWith(_Transaction value, $Res Function(_Transaction) _then) = __$TransactionCopyWithImpl; +@override @useResult +$Res call({ + TransactionId id, TransactionId? prevTransactionId,@dateSecondsSinceEpochJsonConverter DateTime createdAt, bool aborted,@JsonKey(includeIfNull: false) int? exitCode,@JsonKey(includeIfNull: false) int? resultCode, AccountStatus origStatus, AccountStatus endStatus, BigInt totalFees, Message inMessage, List outMessages, String? boc +}); + + +@override $TransactionIdCopyWith<$Res> get id;@override $TransactionIdCopyWith<$Res>? get prevTransactionId;@override $MessageCopyWith<$Res> get inMessage; + +} +/// @nodoc +class __$TransactionCopyWithImpl<$Res> + implements _$TransactionCopyWith<$Res> { __$TransactionCopyWithImpl(this._self, this._then); final _Transaction _self; final $Res Function(_Transaction) _then; - /// Create a copy of Transaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? id = null, - Object? prevTransactionId = freezed, - Object? createdAt = null, - Object? aborted = null, - Object? exitCode = freezed, - Object? resultCode = freezed, - Object? origStatus = null, - Object? endStatus = null, - Object? totalFees = null, - Object? inMessage = null, - Object? outMessages = null, - Object? boc = freezed, - }) { - return _then(_Transaction( - id: null == id - ? _self.id - : id // ignore: cast_nullable_to_non_nullable - as TransactionId, - prevTransactionId: freezed == prevTransactionId - ? _self.prevTransactionId - : prevTransactionId // ignore: cast_nullable_to_non_nullable - as TransactionId?, - createdAt: null == createdAt - ? _self.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - aborted: null == aborted - ? _self.aborted - : aborted // ignore: cast_nullable_to_non_nullable - as bool, - exitCode: freezed == exitCode - ? _self.exitCode - : exitCode // ignore: cast_nullable_to_non_nullable - as int?, - resultCode: freezed == resultCode - ? _self.resultCode - : resultCode // ignore: cast_nullable_to_non_nullable - as int?, - origStatus: null == origStatus - ? _self.origStatus - : origStatus // ignore: cast_nullable_to_non_nullable - as AccountStatus, - endStatus: null == endStatus - ? _self.endStatus - : endStatus // ignore: cast_nullable_to_non_nullable - as AccountStatus, - totalFees: null == totalFees - ? _self.totalFees - : totalFees // ignore: cast_nullable_to_non_nullable - as BigInt, - inMessage: null == inMessage - ? _self.inMessage - : inMessage // ignore: cast_nullable_to_non_nullable - as Message, - outMessages: null == outMessages - ? _self._outMessages - : outMessages // ignore: cast_nullable_to_non_nullable - as List, - boc: freezed == boc - ? _self.boc - : boc // ignore: cast_nullable_to_non_nullable - as String?, - )); - } - - /// Create a copy of Transaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionIdCopyWith<$Res> get id { - return $TransactionIdCopyWith<$Res>(_self.id, (value) { - return _then(_self.copyWith(id: value)); - }); - } +/// Create a copy of Transaction +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? prevTransactionId = freezed,Object? createdAt = null,Object? aborted = null,Object? exitCode = freezed,Object? resultCode = freezed,Object? origStatus = null,Object? endStatus = null,Object? totalFees = null,Object? inMessage = null,Object? outMessages = null,Object? boc = freezed,}) { + return _then(_Transaction( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as TransactionId,prevTransactionId: freezed == prevTransactionId ? _self.prevTransactionId : prevTransactionId // ignore: cast_nullable_to_non_nullable +as TransactionId?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable +as DateTime,aborted: null == aborted ? _self.aborted : aborted // ignore: cast_nullable_to_non_nullable +as bool,exitCode: freezed == exitCode ? _self.exitCode : exitCode // ignore: cast_nullable_to_non_nullable +as int?,resultCode: freezed == resultCode ? _self.resultCode : resultCode // ignore: cast_nullable_to_non_nullable +as int?,origStatus: null == origStatus ? _self.origStatus : origStatus // ignore: cast_nullable_to_non_nullable +as AccountStatus,endStatus: null == endStatus ? _self.endStatus : endStatus // ignore: cast_nullable_to_non_nullable +as AccountStatus,totalFees: null == totalFees ? _self.totalFees : totalFees // ignore: cast_nullable_to_non_nullable +as BigInt,inMessage: null == inMessage ? _self.inMessage : inMessage // ignore: cast_nullable_to_non_nullable +as Message,outMessages: null == outMessages ? _self._outMessages : outMessages // ignore: cast_nullable_to_non_nullable +as List,boc: freezed == boc ? _self.boc : boc // ignore: cast_nullable_to_non_nullable +as String?, + )); +} - /// Create a copy of Transaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionIdCopyWith<$Res>? get prevTransactionId { +/// Create a copy of Transaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionIdCopyWith<$Res> get id { + + return $TransactionIdCopyWith<$Res>(_self.id, (value) { + return _then(_self.copyWith(id: value)); + }); +}/// Create a copy of Transaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionIdCopyWith<$Res>? get prevTransactionId { if (_self.prevTransactionId == null) { - return null; - } - - return $TransactionIdCopyWith<$Res>(_self.prevTransactionId!, (value) { - return _then(_self.copyWith(prevTransactionId: value)); - }); + return null; } - /// Create a copy of Transaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $MessageCopyWith<$Res> get inMessage { - return $MessageCopyWith<$Res>(_self.inMessage, (value) { - return _then(_self.copyWith(inMessage: value)); - }); - } + return $TransactionIdCopyWith<$Res>(_self.prevTransactionId!, (value) { + return _then(_self.copyWith(prevTransactionId: value)); + }); +}/// Create a copy of Transaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$MessageCopyWith<$Res> get inMessage { + + return $MessageCopyWith<$Res>(_self.inMessage, (value) { + return _then(_self.copyWith(inMessage: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction.g.dart index ebfc8e42..8ce6f4ce 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction.g.dart @@ -7,42 +7,44 @@ part of 'transaction.dart'; // ************************************************************************** _Transaction _$TransactionFromJson(Map json) => _Transaction( - id: TransactionId.fromJson(json['id'] as Map), - prevTransactionId: json['prevTransactionId'] == null - ? null - : TransactionId.fromJson( - json['prevTransactionId'] as Map), - createdAt: dateSecondsSinceEpochJsonConverter - .fromJson((json['createdAt'] as num).toInt()), - aborted: json['aborted'] as bool, - exitCode: (json['exitCode'] as num?)?.toInt(), - resultCode: (json['resultCode'] as num?)?.toInt(), - origStatus: $enumDecode(_$AccountStatusEnumMap, json['origStatus']), - endStatus: $enumDecode(_$AccountStatusEnumMap, json['endStatus']), - totalFees: BigInt.parse(json['totalFees'] as String), - inMessage: Message.fromJson(json['inMessage'] as Map), - outMessages: (json['outMessages'] as List) - .map((e) => Message.fromJson(e as Map)) - .toList(), - boc: json['boc'] as String?, - ); + id: TransactionId.fromJson(json['id'] as Map), + prevTransactionId: json['prevTransactionId'] == null + ? null + : TransactionId.fromJson( + json['prevTransactionId'] as Map, + ), + createdAt: dateSecondsSinceEpochJsonConverter.fromJson( + (json['createdAt'] as num).toInt(), + ), + aborted: json['aborted'] as bool, + exitCode: (json['exitCode'] as num?)?.toInt(), + resultCode: (json['resultCode'] as num?)?.toInt(), + origStatus: $enumDecode(_$AccountStatusEnumMap, json['origStatus']), + endStatus: $enumDecode(_$AccountStatusEnumMap, json['endStatus']), + totalFees: BigInt.parse(json['totalFees'] as String), + inMessage: Message.fromJson(json['inMessage'] as Map), + outMessages: (json['outMessages'] as List) + .map((e) => Message.fromJson(e as Map)) + .toList(), + boc: json['boc'] as String?, +); -Map _$TransactionToJson(_Transaction instance) => - { - 'id': instance.id.toJson(), - 'prevTransactionId': instance.prevTransactionId?.toJson(), - 'createdAt': - dateSecondsSinceEpochJsonConverter.toJson(instance.createdAt), - 'aborted': instance.aborted, - if (instance.exitCode case final value?) 'exitCode': value, - if (instance.resultCode case final value?) 'resultCode': value, - 'origStatus': _$AccountStatusEnumMap[instance.origStatus]!, - 'endStatus': _$AccountStatusEnumMap[instance.endStatus]!, - 'totalFees': instance.totalFees.toString(), - 'inMessage': instance.inMessage.toJson(), - 'outMessages': instance.outMessages.map((e) => e.toJson()).toList(), - 'boc': instance.boc, - }; +Map _$TransactionToJson( + _Transaction instance, +) => { + 'id': instance.id.toJson(), + 'prevTransactionId': instance.prevTransactionId?.toJson(), + 'createdAt': dateSecondsSinceEpochJsonConverter.toJson(instance.createdAt), + 'aborted': instance.aborted, + 'exitCode': ?instance.exitCode, + 'resultCode': ?instance.resultCode, + 'origStatus': _$AccountStatusEnumMap[instance.origStatus]!, + 'endStatus': _$AccountStatusEnumMap[instance.endStatus]!, + 'totalFees': instance.totalFees.toString(), + 'inMessage': instance.inMessage.toJson(), + 'outMessages': instance.outMessages.map((e) => e.toJson()).toList(), + 'boc': instance.boc, +}; const _$AccountStatusEnumMap = { AccountStatus.uninit: 'uninit', diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_id.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_id.freezed.dart index 924ebcc7..a4f911d7 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_id.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_id.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,48 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TransactionId { - String get lt; - String get hash; - /// Create a copy of TransactionId - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransactionIdCopyWith get copyWith => - _$TransactionIdCopyWithImpl( - this as TransactionId, _$identity); + String get lt; String get hash; +/// Create a copy of TransactionId +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransactionIdCopyWith get copyWith => _$TransactionIdCopyWithImpl(this as TransactionId, _$identity); /// Serializes this TransactionId to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransactionId && - (identical(other.lt, lt) || other.lt == lt) && - (identical(other.hash, hash) || other.hash == hash)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, lt, hash); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransactionId&&(identical(other.lt, lt) || other.lt == lt)&&(identical(other.hash, hash) || other.hash == hash)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,lt,hash); - @override - String toString() { - return 'TransactionId(lt: $lt, hash: $hash)'; - } +@override +String toString() { + return 'TransactionId(lt: $lt, hash: $hash)'; } -/// @nodoc -abstract mixin class $TransactionIdCopyWith<$Res> { - factory $TransactionIdCopyWith( - TransactionId value, $Res Function(TransactionId) _then) = - _$TransactionIdCopyWithImpl; - @useResult - $Res call({String lt, String hash}); + } +/// @nodoc +abstract mixin class $TransactionIdCopyWith<$Res> { + factory $TransactionIdCopyWith(TransactionId value, $Res Function(TransactionId) _then) = _$TransactionIdCopyWithImpl; +@useResult +$Res call({ + String lt, String hash +}); + + + + +} /// @nodoc class _$TransactionIdCopyWithImpl<$Res> implements $TransactionIdCopyWith<$Res> { @@ -65,84 +63,193 @@ class _$TransactionIdCopyWithImpl<$Res> final TransactionId _self; final $Res Function(TransactionId) _then; - /// Create a copy of TransactionId - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? lt = null, - Object? hash = null, - }) { - return _then(_self.copyWith( - lt: null == lt - ? _self.lt - : lt // ignore: cast_nullable_to_non_nullable - as String, - hash: null == hash - ? _self.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of TransactionId +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? lt = null,Object? hash = null,}) { + return _then(_self.copyWith( +lt: null == lt ? _self.lt : lt // ignore: cast_nullable_to_non_nullable +as String,hash: null == hash ? _self.hash : hash // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [TransactionId]. +extension TransactionIdPatterns on TransactionId { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TransactionId value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TransactionId() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TransactionId value) $default,){ +final _that = this; +switch (_that) { +case _TransactionId(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TransactionId value)? $default,){ +final _that = this; +switch (_that) { +case _TransactionId() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String lt, String hash)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TransactionId() when $default != null: +return $default(_that.lt,_that.hash);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String lt, String hash) $default,) {final _that = this; +switch (_that) { +case _TransactionId(): +return $default(_that.lt,_that.hash);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String lt, String hash)? $default,) {final _that = this; +switch (_that) { +case _TransactionId() when $default != null: +return $default(_that.lt,_that.hash);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _TransactionId implements TransactionId { const _TransactionId({required this.lt, required this.hash}); - factory _TransactionId.fromJson(Map json) => - _$TransactionIdFromJson(json); - - @override - final String lt; - @override - final String hash; - - /// Create a copy of TransactionId - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TransactionIdCopyWith<_TransactionId> get copyWith => - __$TransactionIdCopyWithImpl<_TransactionId>(this, _$identity); - - @override - Map toJson() { - return _$TransactionIdToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TransactionId && - (identical(other.lt, lt) || other.lt == lt) && - (identical(other.hash, hash) || other.hash == hash)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, lt, hash); - - @override - String toString() { - return 'TransactionId(lt: $lt, hash: $hash)'; - } + factory _TransactionId.fromJson(Map json) => _$TransactionIdFromJson(json); + +@override final String lt; +@override final String hash; + +/// Create a copy of TransactionId +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TransactionIdCopyWith<_TransactionId> get copyWith => __$TransactionIdCopyWithImpl<_TransactionId>(this, _$identity); + +@override +Map toJson() { + return _$TransactionIdToJson(this, ); } -/// @nodoc -abstract mixin class _$TransactionIdCopyWith<$Res> - implements $TransactionIdCopyWith<$Res> { - factory _$TransactionIdCopyWith( - _TransactionId value, $Res Function(_TransactionId) _then) = - __$TransactionIdCopyWithImpl; - @override - @useResult - $Res call({String lt, String hash}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TransactionId&&(identical(other.lt, lt) || other.lt == lt)&&(identical(other.hash, hash) || other.hash == hash)); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,lt,hash); + +@override +String toString() { + return 'TransactionId(lt: $lt, hash: $hash)'; +} + + +} + +/// @nodoc +abstract mixin class _$TransactionIdCopyWith<$Res> implements $TransactionIdCopyWith<$Res> { + factory _$TransactionIdCopyWith(_TransactionId value, $Res Function(_TransactionId) _then) = __$TransactionIdCopyWithImpl; +@override @useResult +$Res call({ + String lt, String hash +}); + + + + +} /// @nodoc class __$TransactionIdCopyWithImpl<$Res> implements _$TransactionIdCopyWith<$Res> { @@ -151,25 +258,17 @@ class __$TransactionIdCopyWithImpl<$Res> final _TransactionId _self; final $Res Function(_TransactionId) _then; - /// Create a copy of TransactionId - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? lt = null, - Object? hash = null, - }) { - return _then(_TransactionId( - lt: null == lt - ? _self.lt - : lt // ignore: cast_nullable_to_non_nullable - as String, - hash: null == hash - ? _self.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of TransactionId +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? lt = null,Object? hash = null,}) { + return _then(_TransactionId( +lt: null == lt ? _self.lt : lt // ignore: cast_nullable_to_non_nullable +as String,hash: null == hash ? _self.hash : hash // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_id.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_id.g.dart index cacce19c..ef3b4c4c 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_id.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_id.g.dart @@ -7,13 +7,7 @@ part of 'transaction_id.dart'; // ************************************************************************** _TransactionId _$TransactionIdFromJson(Map json) => - _TransactionId( - lt: json['lt'] as String, - hash: json['hash'] as String, - ); + _TransactionId(lt: json['lt'] as String, hash: json['hash'] as String); Map _$TransactionIdToJson(_TransactionId instance) => - { - 'lt': instance.lt, - 'hash': instance.hash, - }; + {'lt': instance.lt, 'hash': instance.hash}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_with_data.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_with_data.dart index ba2cfa2b..38d8e63b 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_with_data.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_with_data.dart @@ -18,8 +18,7 @@ abstract class TransactionWithData factory TransactionWithData.fromJson( Map json, T Function(Object? json) fromJsonT, - ) => - _$TransactionWithDataFromJson(json, fromJsonT); + ) => _$TransactionWithDataFromJson(json, fromJsonT); @override int compareTo(TransactionWithData other) => diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_with_data.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_with_data.freezed.dart index eb229802..7619a994 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_with_data.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_with_data.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,191 +14,285 @@ T _$identity(T value) => value; /// @nodoc mixin _$TransactionWithData { - Transaction get transaction; - T? get data; - /// Create a copy of TransactionWithData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransactionWithDataCopyWith> get copyWith => - _$TransactionWithDataCopyWithImpl>( - this as TransactionWithData, _$identity); + Transaction get transaction; T? get data; +/// Create a copy of TransactionWithData +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransactionWithDataCopyWith> get copyWith => _$TransactionWithDataCopyWithImpl>(this as TransactionWithData, _$identity); /// Serializes this TransactionWithData to a JSON map. Map toJson(Object? Function(T) toJsonT); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransactionWithData && - (identical(other.transaction, transaction) || - other.transaction == transaction) && - const DeepCollectionEquality().equals(other.data, data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, transaction, const DeepCollectionEquality().hash(data)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransactionWithData&&(identical(other.transaction, transaction) || other.transaction == transaction)&&const DeepCollectionEquality().equals(other.data, data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,transaction,const DeepCollectionEquality().hash(data)); - @override - String toString() { - return 'TransactionWithData<$T>(transaction: $transaction, data: $data)'; - } +@override +String toString() { + return 'TransactionWithData<$T>(transaction: $transaction, data: $data)'; } -/// @nodoc -abstract mixin class $TransactionWithDataCopyWith { - factory $TransactionWithDataCopyWith(TransactionWithData value, - $Res Function(TransactionWithData) _then) = - _$TransactionWithDataCopyWithImpl; - @useResult - $Res call({Transaction transaction, T? data}); - $TransactionCopyWith<$Res> get transaction; } /// @nodoc -class _$TransactionWithDataCopyWithImpl +abstract mixin class $TransactionWithDataCopyWith { + factory $TransactionWithDataCopyWith(TransactionWithData value, $Res Function(TransactionWithData) _then) = _$TransactionWithDataCopyWithImpl; +@useResult +$Res call({ + Transaction transaction, T? data +}); + + +$TransactionCopyWith<$Res> get transaction; + +} +/// @nodoc +class _$TransactionWithDataCopyWithImpl implements $TransactionWithDataCopyWith { _$TransactionWithDataCopyWithImpl(this._self, this._then); final TransactionWithData _self; final $Res Function(TransactionWithData) _then; - /// Create a copy of TransactionWithData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? transaction = null, - Object? data = freezed, - }) { - return _then(_self.copyWith( - transaction: null == transaction - ? _self.transaction - : transaction // ignore: cast_nullable_to_non_nullable - as Transaction, - data: freezed == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as T?, - )); - } - - /// Create a copy of TransactionWithData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionCopyWith<$Res> get transaction { - return $TransactionCopyWith<$Res>(_self.transaction, (value) { - return _then(_self.copyWith(transaction: value)); - }); - } +/// Create a copy of TransactionWithData +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? transaction = null,Object? data = freezed,}) { + return _then(_self.copyWith( +transaction: null == transaction ? _self.transaction : transaction // ignore: cast_nullable_to_non_nullable +as Transaction,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as T?, + )); +} +/// Create a copy of TransactionWithData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionCopyWith<$Res> get transaction { + + return $TransactionCopyWith<$Res>(_self.transaction, (value) { + return _then(_self.copyWith(transaction: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [TransactionWithData]. +extension TransactionWithDataPatterns on TransactionWithData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TransactionWithData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TransactionWithData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TransactionWithData value) $default,){ +final _that = this; +switch (_that) { +case _TransactionWithData(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TransactionWithData value)? $default,){ +final _that = this; +switch (_that) { +case _TransactionWithData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Transaction transaction, T? data)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TransactionWithData() when $default != null: +return $default(_that.transaction,_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Transaction transaction, T? data) $default,) {final _that = this; +switch (_that) { +case _TransactionWithData(): +return $default(_that.transaction,_that.data);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Transaction transaction, T? data)? $default,) {final _that = this; +switch (_that) { +case _TransactionWithData() when $default != null: +return $default(_that.transaction,_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(genericArgumentFactories: true) + class _TransactionWithData extends TransactionWithData { - const _TransactionWithData({required this.transaction, this.data}) - : super._(); - factory _TransactionWithData.fromJson( - Map json, T Function(Object?) fromJsonT) => - _$TransactionWithDataFromJson(json, fromJsonT); - - @override - final Transaction transaction; - @override - final T? data; - - /// Create a copy of TransactionWithData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TransactionWithDataCopyWith> get copyWith => - __$TransactionWithDataCopyWithImpl>( - this, _$identity); - - @override - Map toJson(Object? Function(T) toJsonT) { - return _$TransactionWithDataToJson(this, toJsonT); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TransactionWithData && - (identical(other.transaction, transaction) || - other.transaction == transaction) && - const DeepCollectionEquality().equals(other.data, data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, transaction, const DeepCollectionEquality().hash(data)); - - @override - String toString() { - return 'TransactionWithData<$T>(transaction: $transaction, data: $data)'; - } + const _TransactionWithData({required this.transaction, this.data}): super._(); + factory _TransactionWithData.fromJson(Map json,T Function(Object?) fromJsonT) => _$TransactionWithDataFromJson(json,fromJsonT); + +@override final Transaction transaction; +@override final T? data; + +/// Create a copy of TransactionWithData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TransactionWithDataCopyWith> get copyWith => __$TransactionWithDataCopyWithImpl>(this, _$identity); + +@override +Map toJson(Object? Function(T) toJsonT) { + return _$TransactionWithDataToJson(this, toJsonT); } -/// @nodoc -abstract mixin class _$TransactionWithDataCopyWith - implements $TransactionWithDataCopyWith { - factory _$TransactionWithDataCopyWith(_TransactionWithData value, - $Res Function(_TransactionWithData) _then) = - __$TransactionWithDataCopyWithImpl; - @override - @useResult - $Res call({Transaction transaction, T? data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TransactionWithData&&(identical(other.transaction, transaction) || other.transaction == transaction)&&const DeepCollectionEquality().equals(other.data, data)); +} - @override - $TransactionCopyWith<$Res> get transaction; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,transaction,const DeepCollectionEquality().hash(data)); + +@override +String toString() { + return 'TransactionWithData<$T>(transaction: $transaction, data: $data)'; } + +} + +/// @nodoc +abstract mixin class _$TransactionWithDataCopyWith implements $TransactionWithDataCopyWith { + factory _$TransactionWithDataCopyWith(_TransactionWithData value, $Res Function(_TransactionWithData) _then) = __$TransactionWithDataCopyWithImpl; +@override @useResult +$Res call({ + Transaction transaction, T? data +}); + + +@override $TransactionCopyWith<$Res> get transaction; + +} /// @nodoc -class __$TransactionWithDataCopyWithImpl +class __$TransactionWithDataCopyWithImpl implements _$TransactionWithDataCopyWith { __$TransactionWithDataCopyWithImpl(this._self, this._then); final _TransactionWithData _self; final $Res Function(_TransactionWithData) _then; - /// Create a copy of TransactionWithData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? transaction = null, - Object? data = freezed, - }) { - return _then(_TransactionWithData( - transaction: null == transaction - ? _self.transaction - : transaction // ignore: cast_nullable_to_non_nullable - as Transaction, - data: freezed == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as T?, - )); - } - - /// Create a copy of TransactionWithData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionCopyWith<$Res> get transaction { - return $TransactionCopyWith<$Res>(_self.transaction, (value) { - return _then(_self.copyWith(transaction: value)); - }); - } +/// Create a copy of TransactionWithData +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? transaction = null,Object? data = freezed,}) { + return _then(_TransactionWithData( +transaction: null == transaction ? _self.transaction : transaction // ignore: cast_nullable_to_non_nullable +as Transaction,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as T?, + )); +} + +/// Create a copy of TransactionWithData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionCopyWith<$Res> get transaction { + + return $TransactionCopyWith<$Res>(_self.transaction, (value) { + return _then(_self.copyWith(transaction: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_with_data.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_with_data.g.dart index eb2d500d..8f6ea46a 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_with_data.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transaction_with_data.g.dart @@ -9,30 +9,27 @@ part of 'transaction_with_data.dart'; _TransactionWithData _$TransactionWithDataFromJson( Map json, T Function(Object? json) fromJsonT, -) => - _TransactionWithData( - transaction: - Transaction.fromJson(json['transaction'] as Map), - data: _$nullableGenericFromJson(json['data'], fromJsonT), - ); +) => _TransactionWithData( + transaction: Transaction.fromJson( + json['transaction'] as Map, + ), + data: _$nullableGenericFromJson(json['data'], fromJsonT), +); Map _$TransactionWithDataToJson( _TransactionWithData instance, Object? Function(T value) toJsonT, -) => - { - 'transaction': instance.transaction.toJson(), - 'data': _$nullableGenericToJson(instance.data, toJsonT), - }; +) => { + 'transaction': instance.transaction.toJson(), + 'data': _$nullableGenericToJson(instance.data, toJsonT), +}; T? _$nullableGenericFromJson( Object? input, T Function(Object? json) fromJson, -) => - input == null ? null : fromJson(input); +) => input == null ? null : fromJson(input); Object? _$nullableGenericToJson( T? input, Object? Function(T value) toJson, -) => - input == null ? null : toJson(input); +) => input == null ? null : toJson(input); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_batch_info.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_batch_info.freezed.dart index 744d2b99..b6c494f6 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_batch_info.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_batch_info.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,51 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TransactionsBatchInfo { - String get minLt; - String get maxLt; - TransactionsBatchType get batchType; - - /// Create a copy of TransactionsBatchInfo - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransactionsBatchInfoCopyWith get copyWith => - _$TransactionsBatchInfoCopyWithImpl( - this as TransactionsBatchInfo, _$identity); + + String get minLt; String get maxLt; TransactionsBatchType get batchType; +/// Create a copy of TransactionsBatchInfo +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransactionsBatchInfoCopyWith get copyWith => _$TransactionsBatchInfoCopyWithImpl(this as TransactionsBatchInfo, _$identity); /// Serializes this TransactionsBatchInfo to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransactionsBatchInfo && - (identical(other.minLt, minLt) || other.minLt == minLt) && - (identical(other.maxLt, maxLt) || other.maxLt == maxLt) && - (identical(other.batchType, batchType) || - other.batchType == batchType)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, minLt, maxLt, batchType); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransactionsBatchInfo&&(identical(other.minLt, minLt) || other.minLt == minLt)&&(identical(other.maxLt, maxLt) || other.maxLt == maxLt)&&(identical(other.batchType, batchType) || other.batchType == batchType)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,minLt,maxLt,batchType); - @override - String toString() { - return 'TransactionsBatchInfo(minLt: $minLt, maxLt: $maxLt, batchType: $batchType)'; - } +@override +String toString() { + return 'TransactionsBatchInfo(minLt: $minLt, maxLt: $maxLt, batchType: $batchType)'; } -/// @nodoc -abstract mixin class $TransactionsBatchInfoCopyWith<$Res> { - factory $TransactionsBatchInfoCopyWith(TransactionsBatchInfo value, - $Res Function(TransactionsBatchInfo) _then) = - _$TransactionsBatchInfoCopyWithImpl; - @useResult - $Res call({String minLt, String maxLt, TransactionsBatchType batchType}); + } +/// @nodoc +abstract mixin class $TransactionsBatchInfoCopyWith<$Res> { + factory $TransactionsBatchInfoCopyWith(TransactionsBatchInfo value, $Res Function(TransactionsBatchInfo) _then) = _$TransactionsBatchInfoCopyWithImpl; +@useResult +$Res call({ + String minLt, String maxLt, TransactionsBatchType batchType +}); + + + + +} /// @nodoc class _$TransactionsBatchInfoCopyWithImpl<$Res> implements $TransactionsBatchInfoCopyWith<$Res> { @@ -68,95 +63,195 @@ class _$TransactionsBatchInfoCopyWithImpl<$Res> final TransactionsBatchInfo _self; final $Res Function(TransactionsBatchInfo) _then; - /// Create a copy of TransactionsBatchInfo - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? minLt = null, - Object? maxLt = null, - Object? batchType = null, - }) { - return _then(_self.copyWith( - minLt: null == minLt - ? _self.minLt - : minLt // ignore: cast_nullable_to_non_nullable - as String, - maxLt: null == maxLt - ? _self.maxLt - : maxLt // ignore: cast_nullable_to_non_nullable - as String, - batchType: null == batchType - ? _self.batchType - : batchType // ignore: cast_nullable_to_non_nullable - as TransactionsBatchType, - )); - } +/// Create a copy of TransactionsBatchInfo +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? minLt = null,Object? maxLt = null,Object? batchType = null,}) { + return _then(_self.copyWith( +minLt: null == minLt ? _self.minLt : minLt // ignore: cast_nullable_to_non_nullable +as String,maxLt: null == maxLt ? _self.maxLt : maxLt // ignore: cast_nullable_to_non_nullable +as String,batchType: null == batchType ? _self.batchType : batchType // ignore: cast_nullable_to_non_nullable +as TransactionsBatchType, + )); +} + +} + + +/// Adds pattern-matching-related methods to [TransactionsBatchInfo]. +extension TransactionsBatchInfoPatterns on TransactionsBatchInfo { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TransactionsBatchInfo value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TransactionsBatchInfo() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TransactionsBatchInfo value) $default,){ +final _that = this; +switch (_that) { +case _TransactionsBatchInfo(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TransactionsBatchInfo value)? $default,){ +final _that = this; +switch (_that) { +case _TransactionsBatchInfo() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String minLt, String maxLt, TransactionsBatchType batchType)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TransactionsBatchInfo() when $default != null: +return $default(_that.minLt,_that.maxLt,_that.batchType);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String minLt, String maxLt, TransactionsBatchType batchType) $default,) {final _that = this; +switch (_that) { +case _TransactionsBatchInfo(): +return $default(_that.minLt,_that.maxLt,_that.batchType);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String minLt, String maxLt, TransactionsBatchType batchType)? $default,) {final _that = this; +switch (_that) { +case _TransactionsBatchInfo() when $default != null: +return $default(_that.minLt,_that.maxLt,_that.batchType);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _TransactionsBatchInfo implements TransactionsBatchInfo { - const _TransactionsBatchInfo( - {required this.minLt, required this.maxLt, required this.batchType}); - factory _TransactionsBatchInfo.fromJson(Map json) => - _$TransactionsBatchInfoFromJson(json); - - @override - final String minLt; - @override - final String maxLt; - @override - final TransactionsBatchType batchType; - - /// Create a copy of TransactionsBatchInfo - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TransactionsBatchInfoCopyWith<_TransactionsBatchInfo> get copyWith => - __$TransactionsBatchInfoCopyWithImpl<_TransactionsBatchInfo>( - this, _$identity); - - @override - Map toJson() { - return _$TransactionsBatchInfoToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TransactionsBatchInfo && - (identical(other.minLt, minLt) || other.minLt == minLt) && - (identical(other.maxLt, maxLt) || other.maxLt == maxLt) && - (identical(other.batchType, batchType) || - other.batchType == batchType)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, minLt, maxLt, batchType); - - @override - String toString() { - return 'TransactionsBatchInfo(minLt: $minLt, maxLt: $maxLt, batchType: $batchType)'; - } + const _TransactionsBatchInfo({required this.minLt, required this.maxLt, required this.batchType}); + factory _TransactionsBatchInfo.fromJson(Map json) => _$TransactionsBatchInfoFromJson(json); + +@override final String minLt; +@override final String maxLt; +@override final TransactionsBatchType batchType; + +/// Create a copy of TransactionsBatchInfo +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TransactionsBatchInfoCopyWith<_TransactionsBatchInfo> get copyWith => __$TransactionsBatchInfoCopyWithImpl<_TransactionsBatchInfo>(this, _$identity); + +@override +Map toJson() { + return _$TransactionsBatchInfoToJson(this, ); } -/// @nodoc -abstract mixin class _$TransactionsBatchInfoCopyWith<$Res> - implements $TransactionsBatchInfoCopyWith<$Res> { - factory _$TransactionsBatchInfoCopyWith(_TransactionsBatchInfo value, - $Res Function(_TransactionsBatchInfo) _then) = - __$TransactionsBatchInfoCopyWithImpl; - @override - @useResult - $Res call({String minLt, String maxLt, TransactionsBatchType batchType}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TransactionsBatchInfo&&(identical(other.minLt, minLt) || other.minLt == minLt)&&(identical(other.maxLt, maxLt) || other.maxLt == maxLt)&&(identical(other.batchType, batchType) || other.batchType == batchType)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,minLt,maxLt,batchType); + +@override +String toString() { + return 'TransactionsBatchInfo(minLt: $minLt, maxLt: $maxLt, batchType: $batchType)'; +} + + } +/// @nodoc +abstract mixin class _$TransactionsBatchInfoCopyWith<$Res> implements $TransactionsBatchInfoCopyWith<$Res> { + factory _$TransactionsBatchInfoCopyWith(_TransactionsBatchInfo value, $Res Function(_TransactionsBatchInfo) _then) = __$TransactionsBatchInfoCopyWithImpl; +@override @useResult +$Res call({ + String minLt, String maxLt, TransactionsBatchType batchType +}); + + + + +} /// @nodoc class __$TransactionsBatchInfoCopyWithImpl<$Res> implements _$TransactionsBatchInfoCopyWith<$Res> { @@ -165,30 +260,18 @@ class __$TransactionsBatchInfoCopyWithImpl<$Res> final _TransactionsBatchInfo _self; final $Res Function(_TransactionsBatchInfo) _then; - /// Create a copy of TransactionsBatchInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? minLt = null, - Object? maxLt = null, - Object? batchType = null, - }) { - return _then(_TransactionsBatchInfo( - minLt: null == minLt - ? _self.minLt - : minLt // ignore: cast_nullable_to_non_nullable - as String, - maxLt: null == maxLt - ? _self.maxLt - : maxLt // ignore: cast_nullable_to_non_nullable - as String, - batchType: null == batchType - ? _self.batchType - : batchType // ignore: cast_nullable_to_non_nullable - as TransactionsBatchType, - )); - } +/// Create a copy of TransactionsBatchInfo +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? minLt = null,Object? maxLt = null,Object? batchType = null,}) { + return _then(_TransactionsBatchInfo( +minLt: null == minLt ? _self.minLt : minLt // ignore: cast_nullable_to_non_nullable +as String,maxLt: null == maxLt ? _self.maxLt : maxLt // ignore: cast_nullable_to_non_nullable +as String,batchType: null == batchType ? _self.batchType : batchType // ignore: cast_nullable_to_non_nullable +as TransactionsBatchType, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_batch_info.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_batch_info.g.dart index 30892e6a..3237950a 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_batch_info.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_batch_info.g.dart @@ -7,20 +7,20 @@ part of 'transactions_batch_info.dart'; // ************************************************************************** _TransactionsBatchInfo _$TransactionsBatchInfoFromJson( - Map json) => - _TransactionsBatchInfo( - minLt: json['minLt'] as String, - maxLt: json['maxLt'] as String, - batchType: $enumDecode(_$TransactionsBatchTypeEnumMap, json['batchType']), - ); + Map json, +) => _TransactionsBatchInfo( + minLt: json['minLt'] as String, + maxLt: json['maxLt'] as String, + batchType: $enumDecode(_$TransactionsBatchTypeEnumMap, json['batchType']), +); Map _$TransactionsBatchInfoToJson( - _TransactionsBatchInfo instance) => - { - 'minLt': instance.minLt, - 'maxLt': instance.maxLt, - 'batchType': _$TransactionsBatchTypeEnumMap[instance.batchType]!, - }; + _TransactionsBatchInfo instance, +) => { + 'minLt': instance.minLt, + 'maxLt': instance.maxLt, + 'batchType': _$TransactionsBatchTypeEnumMap[instance.batchType]!, +}; const _$TransactionsBatchTypeEnumMap = { TransactionsBatchType.oldTransactions: 'old', diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_list.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_list.freezed.dart index 3ad0a450..7a03dfc9 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_list.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_list.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,60 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TransactionsList { - List get transactions; - @JsonKey(includeIfNull: false) - TransactionId? get continuation; - TransactionsBatchInfo? get info; - - /// Create a copy of TransactionsList - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransactionsListCopyWith get copyWith => - _$TransactionsListCopyWithImpl( - this as TransactionsList, _$identity); + + List get transactions;@JsonKey(includeIfNull: false) TransactionId? get continuation; TransactionsBatchInfo? get info; +/// Create a copy of TransactionsList +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransactionsListCopyWith get copyWith => _$TransactionsListCopyWithImpl(this as TransactionsList, _$identity); /// Serializes this TransactionsList to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransactionsList && - const DeepCollectionEquality() - .equals(other.transactions, transactions) && - (identical(other.continuation, continuation) || - other.continuation == continuation) && - (identical(other.info, info) || other.info == info)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(transactions), continuation, info); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransactionsList&&const DeepCollectionEquality().equals(other.transactions, transactions)&&(identical(other.continuation, continuation) || other.continuation == continuation)&&(identical(other.info, info) || other.info == info)); +} - @override - String toString() { - return 'TransactionsList(transactions: $transactions, continuation: $continuation, info: $info)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(transactions),continuation,info); + +@override +String toString() { + return 'TransactionsList(transactions: $transactions, continuation: $continuation, info: $info)'; } -/// @nodoc -abstract mixin class $TransactionsListCopyWith<$Res> { - factory $TransactionsListCopyWith( - TransactionsList value, $Res Function(TransactionsList) _then) = - _$TransactionsListCopyWithImpl; - @useResult - $Res call( - {List transactions, - @JsonKey(includeIfNull: false) TransactionId? continuation, - TransactionsBatchInfo? info}); - - $TransactionIdCopyWith<$Res>? get continuation; - $TransactionsBatchInfoCopyWith<$Res>? get info; + } +/// @nodoc +abstract mixin class $TransactionsListCopyWith<$Res> { + factory $TransactionsListCopyWith(TransactionsList value, $Res Function(TransactionsList) _then) = _$TransactionsListCopyWithImpl; +@useResult +$Res call({ + List transactions,@JsonKey(includeIfNull: false) TransactionId? continuation, TransactionsBatchInfo? info +}); + + +$TransactionIdCopyWith<$Res>? get continuation;$TransactionsBatchInfoCopyWith<$Res>? get info; + +} /// @nodoc class _$TransactionsListCopyWithImpl<$Res> implements $TransactionsListCopyWith<$Res> { @@ -77,142 +63,225 @@ class _$TransactionsListCopyWithImpl<$Res> final TransactionsList _self; final $Res Function(TransactionsList) _then; - /// Create a copy of TransactionsList - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? transactions = null, - Object? continuation = freezed, - Object? info = freezed, - }) { - return _then(_self.copyWith( - transactions: null == transactions - ? _self.transactions - : transactions // ignore: cast_nullable_to_non_nullable - as List, - continuation: freezed == continuation - ? _self.continuation - : continuation // ignore: cast_nullable_to_non_nullable - as TransactionId?, - info: freezed == info - ? _self.info - : info // ignore: cast_nullable_to_non_nullable - as TransactionsBatchInfo?, - )); - } - - /// Create a copy of TransactionsList - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionIdCopyWith<$Res>? get continuation { +/// Create a copy of TransactionsList +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? transactions = null,Object? continuation = freezed,Object? info = freezed,}) { + return _then(_self.copyWith( +transactions: null == transactions ? _self.transactions : transactions // ignore: cast_nullable_to_non_nullable +as List,continuation: freezed == continuation ? _self.continuation : continuation // ignore: cast_nullable_to_non_nullable +as TransactionId?,info: freezed == info ? _self.info : info // ignore: cast_nullable_to_non_nullable +as TransactionsBatchInfo?, + )); +} +/// Create a copy of TransactionsList +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionIdCopyWith<$Res>? get continuation { if (_self.continuation == null) { - return null; - } - - return $TransactionIdCopyWith<$Res>(_self.continuation!, (value) { - return _then(_self.copyWith(continuation: value)); - }); + return null; } - /// Create a copy of TransactionsList - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionsBatchInfoCopyWith<$Res>? get info { + return $TransactionIdCopyWith<$Res>(_self.continuation!, (value) { + return _then(_self.copyWith(continuation: value)); + }); +}/// Create a copy of TransactionsList +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionsBatchInfoCopyWith<$Res>? get info { if (_self.info == null) { - return null; - } - - return $TransactionsBatchInfoCopyWith<$Res>(_self.info!, (value) { - return _then(_self.copyWith(info: value)); - }); + return null; } + + return $TransactionsBatchInfoCopyWith<$Res>(_self.info!, (value) { + return _then(_self.copyWith(info: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [TransactionsList]. +extension TransactionsListPatterns on TransactionsList { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TransactionsList value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TransactionsList() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TransactionsList value) $default,){ +final _that = this; +switch (_that) { +case _TransactionsList(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TransactionsList value)? $default,){ +final _that = this; +switch (_that) { +case _TransactionsList() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List transactions, @JsonKey(includeIfNull: false) TransactionId? continuation, TransactionsBatchInfo? info)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TransactionsList() when $default != null: +return $default(_that.transactions,_that.continuation,_that.info);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List transactions, @JsonKey(includeIfNull: false) TransactionId? continuation, TransactionsBatchInfo? info) $default,) {final _that = this; +switch (_that) { +case _TransactionsList(): +return $default(_that.transactions,_that.continuation,_that.info);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List transactions, @JsonKey(includeIfNull: false) TransactionId? continuation, TransactionsBatchInfo? info)? $default,) {final _that = this; +switch (_that) { +case _TransactionsList() when $default != null: +return $default(_that.transactions,_that.continuation,_that.info);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _TransactionsList implements TransactionsList { - const _TransactionsList( - {required final List transactions, - @JsonKey(includeIfNull: false) this.continuation, - this.info}) - : _transactions = transactions; - factory _TransactionsList.fromJson(Map json) => - _$TransactionsListFromJson(json); - - final List _transactions; - @override - List get transactions { - if (_transactions is EqualUnmodifiableListView) return _transactions; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_transactions); - } + const _TransactionsList({required final List transactions, @JsonKey(includeIfNull: false) this.continuation, this.info}): _transactions = transactions; + factory _TransactionsList.fromJson(Map json) => _$TransactionsListFromJson(json); + + final List _transactions; +@override List get transactions { + if (_transactions is EqualUnmodifiableListView) return _transactions; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_transactions); +} - @override - @JsonKey(includeIfNull: false) - final TransactionId? continuation; - @override - final TransactionsBatchInfo? info; - - /// Create a copy of TransactionsList - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TransactionsListCopyWith<_TransactionsList> get copyWith => - __$TransactionsListCopyWithImpl<_TransactionsList>(this, _$identity); - - @override - Map toJson() { - return _$TransactionsListToJson( - this, - ); - } +@override@JsonKey(includeIfNull: false) final TransactionId? continuation; +@override final TransactionsBatchInfo? info; - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TransactionsList && - const DeepCollectionEquality() - .equals(other._transactions, _transactions) && - (identical(other.continuation, continuation) || - other.continuation == continuation) && - (identical(other.info, info) || other.info == info)); - } +/// Create a copy of TransactionsList +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TransactionsListCopyWith<_TransactionsList> get copyWith => __$TransactionsListCopyWithImpl<_TransactionsList>(this, _$identity); - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(_transactions), continuation, info); +@override +Map toJson() { + return _$TransactionsListToJson(this, ); +} - @override - String toString() { - return 'TransactionsList(transactions: $transactions, continuation: $continuation, info: $info)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TransactionsList&&const DeepCollectionEquality().equals(other._transactions, _transactions)&&(identical(other.continuation, continuation) || other.continuation == continuation)&&(identical(other.info, info) || other.info == info)); } -/// @nodoc -abstract mixin class _$TransactionsListCopyWith<$Res> - implements $TransactionsListCopyWith<$Res> { - factory _$TransactionsListCopyWith( - _TransactionsList value, $Res Function(_TransactionsList) _then) = - __$TransactionsListCopyWithImpl; - @override - @useResult - $Res call( - {List transactions, - @JsonKey(includeIfNull: false) TransactionId? continuation, - TransactionsBatchInfo? info}); - - @override - $TransactionIdCopyWith<$Res>? get continuation; - @override - $TransactionsBatchInfoCopyWith<$Res>? get info; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_transactions),continuation,info); + +@override +String toString() { + return 'TransactionsList(transactions: $transactions, continuation: $continuation, info: $info)'; +} + + } +/// @nodoc +abstract mixin class _$TransactionsListCopyWith<$Res> implements $TransactionsListCopyWith<$Res> { + factory _$TransactionsListCopyWith(_TransactionsList value, $Res Function(_TransactionsList) _then) = __$TransactionsListCopyWithImpl; +@override @useResult +$Res call({ + List transactions,@JsonKey(includeIfNull: false) TransactionId? continuation, TransactionsBatchInfo? info +}); + + +@override $TransactionIdCopyWith<$Res>? get continuation;@override $TransactionsBatchInfoCopyWith<$Res>? get info; + +} /// @nodoc class __$TransactionsListCopyWithImpl<$Res> implements _$TransactionsListCopyWith<$Res> { @@ -221,58 +290,42 @@ class __$TransactionsListCopyWithImpl<$Res> final _TransactionsList _self; final $Res Function(_TransactionsList) _then; - /// Create a copy of TransactionsList - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? transactions = null, - Object? continuation = freezed, - Object? info = freezed, - }) { - return _then(_TransactionsList( - transactions: null == transactions - ? _self._transactions - : transactions // ignore: cast_nullable_to_non_nullable - as List, - continuation: freezed == continuation - ? _self.continuation - : continuation // ignore: cast_nullable_to_non_nullable - as TransactionId?, - info: freezed == info - ? _self.info - : info // ignore: cast_nullable_to_non_nullable - as TransactionsBatchInfo?, - )); - } +/// Create a copy of TransactionsList +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? transactions = null,Object? continuation = freezed,Object? info = freezed,}) { + return _then(_TransactionsList( +transactions: null == transactions ? _self._transactions : transactions // ignore: cast_nullable_to_non_nullable +as List,continuation: freezed == continuation ? _self.continuation : continuation // ignore: cast_nullable_to_non_nullable +as TransactionId?,info: freezed == info ? _self.info : info // ignore: cast_nullable_to_non_nullable +as TransactionsBatchInfo?, + )); +} - /// Create a copy of TransactionsList - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionIdCopyWith<$Res>? get continuation { +/// Create a copy of TransactionsList +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionIdCopyWith<$Res>? get continuation { if (_self.continuation == null) { - return null; - } - - return $TransactionIdCopyWith<$Res>(_self.continuation!, (value) { - return _then(_self.copyWith(continuation: value)); - }); + return null; } - /// Create a copy of TransactionsList - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionsBatchInfoCopyWith<$Res>? get info { + return $TransactionIdCopyWith<$Res>(_self.continuation!, (value) { + return _then(_self.copyWith(continuation: value)); + }); +}/// Create a copy of TransactionsList +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionsBatchInfoCopyWith<$Res>? get info { if (_self.info == null) { - return null; - } - - return $TransactionsBatchInfoCopyWith<$Res>(_self.info!, (value) { - return _then(_self.copyWith(info: value)); - }); + return null; } + + return $TransactionsBatchInfoCopyWith<$Res>(_self.info!, (value) { + return _then(_self.copyWith(info: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_list.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_list.g.dart index e1ba6cc5..f9b16353 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_list.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/models/transactions_list.g.dart @@ -6,25 +6,23 @@ part of 'transactions_list.dart'; // JsonSerializableGenerator // ************************************************************************** -_TransactionsList _$TransactionsListFromJson(Map json) => - _TransactionsList( - transactions: (json['transactions'] as List) - .map((e) => Transaction.fromJson(e as Map)) - .toList(), - continuation: json['continuation'] == null - ? null - : TransactionId.fromJson( - json['continuation'] as Map), - info: json['info'] == null - ? null - : TransactionsBatchInfo.fromJson( - json['info'] as Map), - ); +_TransactionsList _$TransactionsListFromJson( + Map json, +) => _TransactionsList( + transactions: (json['transactions'] as List) + .map((e) => Transaction.fromJson(e as Map)) + .toList(), + continuation: json['continuation'] == null + ? null + : TransactionId.fromJson(json['continuation'] as Map), + info: json['info'] == null + ? null + : TransactionsBatchInfo.fromJson(json['info'] as Map), +); Map _$TransactionsListToJson(_TransactionsList instance) => { 'transactions': instance.transactions.map((e) => e.toJson()).toList(), - if (instance.continuation?.toJson() case final value?) - 'continuation': value, + 'continuation': ?instance.continuation?.toJson(), 'info': instance.info?.toJson(), }; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/on_balance_changed_payload.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/on_balance_changed_payload.dart index 59a43238..cf9760f0 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/on_balance_changed_payload.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/on_balance_changed_payload.dart @@ -5,9 +5,8 @@ part 'on_balance_changed_payload.g.dart'; @freezed sealed class OnBalanceChangedPayload with _$OnBalanceChangedPayload { - const factory OnBalanceChangedPayload({ - required final BigInt balance, - }) = _OnBalanceChangedPayload; + const factory OnBalanceChangedPayload({required final BigInt balance}) = + _OnBalanceChangedPayload; factory OnBalanceChangedPayload.fromJson(Map json) => _$OnBalanceChangedPayloadFromJson(json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/on_balance_changed_payload.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/on_balance_changed_payload.freezed.dart index 4a7f97c6..822dd724 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/on_balance_changed_payload.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/on_balance_changed_payload.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,46 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$OnBalanceChangedPayload { - BigInt get balance; - /// Create a copy of OnBalanceChangedPayload - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $OnBalanceChangedPayloadCopyWith get copyWith => - _$OnBalanceChangedPayloadCopyWithImpl( - this as OnBalanceChangedPayload, _$identity); + BigInt get balance; +/// Create a copy of OnBalanceChangedPayload +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$OnBalanceChangedPayloadCopyWith get copyWith => _$OnBalanceChangedPayloadCopyWithImpl(this as OnBalanceChangedPayload, _$identity); /// Serializes this OnBalanceChangedPayload to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is OnBalanceChangedPayload && - (identical(other.balance, balance) || other.balance == balance)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, balance); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is OnBalanceChangedPayload&&(identical(other.balance, balance) || other.balance == balance)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,balance); - @override - String toString() { - return 'OnBalanceChangedPayload(balance: $balance)'; - } +@override +String toString() { + return 'OnBalanceChangedPayload(balance: $balance)'; } -/// @nodoc -abstract mixin class $OnBalanceChangedPayloadCopyWith<$Res> { - factory $OnBalanceChangedPayloadCopyWith(OnBalanceChangedPayload value, - $Res Function(OnBalanceChangedPayload) _then) = - _$OnBalanceChangedPayloadCopyWithImpl; - @useResult - $Res call({BigInt balance}); + } +/// @nodoc +abstract mixin class $OnBalanceChangedPayloadCopyWith<$Res> { + factory $OnBalanceChangedPayloadCopyWith(OnBalanceChangedPayload value, $Res Function(OnBalanceChangedPayload) _then) = _$OnBalanceChangedPayloadCopyWithImpl; +@useResult +$Res call({ + BigInt balance +}); + + + + +} /// @nodoc class _$OnBalanceChangedPayloadCopyWithImpl<$Res> implements $OnBalanceChangedPayloadCopyWith<$Res> { @@ -63,77 +63,191 @@ class _$OnBalanceChangedPayloadCopyWithImpl<$Res> final OnBalanceChangedPayload _self; final $Res Function(OnBalanceChangedPayload) _then; - /// Create a copy of OnBalanceChangedPayload - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? balance = null, - }) { - return _then(_self.copyWith( - balance: null == balance - ? _self.balance - : balance // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } +/// Create a copy of OnBalanceChangedPayload +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? balance = null,}) { + return _then(_self.copyWith( +balance: null == balance ? _self.balance : balance // ignore: cast_nullable_to_non_nullable +as BigInt, + )); +} + +} + + +/// Adds pattern-matching-related methods to [OnBalanceChangedPayload]. +extension OnBalanceChangedPayloadPatterns on OnBalanceChangedPayload { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _OnBalanceChangedPayload value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _OnBalanceChangedPayload() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _OnBalanceChangedPayload value) $default,){ +final _that = this; +switch (_that) { +case _OnBalanceChangedPayload(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _OnBalanceChangedPayload value)? $default,){ +final _that = this; +switch (_that) { +case _OnBalanceChangedPayload() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( BigInt balance)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _OnBalanceChangedPayload() when $default != null: +return $default(_that.balance);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( BigInt balance) $default,) {final _that = this; +switch (_that) { +case _OnBalanceChangedPayload(): +return $default(_that.balance);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( BigInt balance)? $default,) {final _that = this; +switch (_that) { +case _OnBalanceChangedPayload() when $default != null: +return $default(_that.balance);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _OnBalanceChangedPayload implements OnBalanceChangedPayload { const _OnBalanceChangedPayload({required this.balance}); - factory _OnBalanceChangedPayload.fromJson(Map json) => - _$OnBalanceChangedPayloadFromJson(json); - - @override - final BigInt balance; - - /// Create a copy of OnBalanceChangedPayload - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$OnBalanceChangedPayloadCopyWith<_OnBalanceChangedPayload> get copyWith => - __$OnBalanceChangedPayloadCopyWithImpl<_OnBalanceChangedPayload>( - this, _$identity); - - @override - Map toJson() { - return _$OnBalanceChangedPayloadToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _OnBalanceChangedPayload && - (identical(other.balance, balance) || other.balance == balance)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, balance); - - @override - String toString() { - return 'OnBalanceChangedPayload(balance: $balance)'; - } + factory _OnBalanceChangedPayload.fromJson(Map json) => _$OnBalanceChangedPayloadFromJson(json); + +@override final BigInt balance; + +/// Create a copy of OnBalanceChangedPayload +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$OnBalanceChangedPayloadCopyWith<_OnBalanceChangedPayload> get copyWith => __$OnBalanceChangedPayloadCopyWithImpl<_OnBalanceChangedPayload>(this, _$identity); + +@override +Map toJson() { + return _$OnBalanceChangedPayloadToJson(this, ); } -/// @nodoc -abstract mixin class _$OnBalanceChangedPayloadCopyWith<$Res> - implements $OnBalanceChangedPayloadCopyWith<$Res> { - factory _$OnBalanceChangedPayloadCopyWith(_OnBalanceChangedPayload value, - $Res Function(_OnBalanceChangedPayload) _then) = - __$OnBalanceChangedPayloadCopyWithImpl; - @override - @useResult - $Res call({BigInt balance}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _OnBalanceChangedPayload&&(identical(other.balance, balance) || other.balance == balance)); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,balance); + +@override +String toString() { + return 'OnBalanceChangedPayload(balance: $balance)'; +} + + +} + +/// @nodoc +abstract mixin class _$OnBalanceChangedPayloadCopyWith<$Res> implements $OnBalanceChangedPayloadCopyWith<$Res> { + factory _$OnBalanceChangedPayloadCopyWith(_OnBalanceChangedPayload value, $Res Function(_OnBalanceChangedPayload) _then) = __$OnBalanceChangedPayloadCopyWithImpl; +@override @useResult +$Res call({ + BigInt balance +}); + + + + +} /// @nodoc class __$OnBalanceChangedPayloadCopyWithImpl<$Res> implements _$OnBalanceChangedPayloadCopyWith<$Res> { @@ -142,20 +256,16 @@ class __$OnBalanceChangedPayloadCopyWithImpl<$Res> final _OnBalanceChangedPayload _self; final $Res Function(_OnBalanceChangedPayload) _then; - /// Create a copy of OnBalanceChangedPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? balance = null, - }) { - return _then(_OnBalanceChangedPayload( - balance: null == balance - ? _self.balance - : balance // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } +/// Create a copy of OnBalanceChangedPayload +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? balance = null,}) { + return _then(_OnBalanceChangedPayload( +balance: null == balance ? _self.balance : balance // ignore: cast_nullable_to_non_nullable +as BigInt, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/on_balance_changed_payload.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/on_balance_changed_payload.g.dart index 31ee43be..1f444f6a 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/on_balance_changed_payload.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/on_balance_changed_payload.g.dart @@ -7,13 +7,9 @@ part of 'on_balance_changed_payload.dart'; // ************************************************************************** _OnBalanceChangedPayload _$OnBalanceChangedPayloadFromJson( - Map json) => - _OnBalanceChangedPayload( - balance: BigInt.parse(json['balance'] as String), - ); + Map json, +) => _OnBalanceChangedPayload(balance: BigInt.parse(json['balance'] as String)); Map _$OnBalanceChangedPayloadToJson( - _OnBalanceChangedPayload instance) => - { - 'balance': instance.balance.toString(), - }; + _OnBalanceChangedPayload instance, +) => {'balance': instance.balance.toString()}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/root_token_contract_details.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/root_token_contract_details.freezed.dart index cd071d76..b0f3dbdc 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/root_token_contract_details.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/root_token_contract_details.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,68 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$RootTokenContractDetails { - TokenWalletVersion get version; - String get name; - String get symbol; - int get decimals; - Address get ownerAddress; - String get totalSupply; - - /// Create a copy of RootTokenContractDetails - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $RootTokenContractDetailsCopyWith get copyWith => - _$RootTokenContractDetailsCopyWithImpl( - this as RootTokenContractDetails, _$identity); + + TokenWalletVersion get version; String get name; String get symbol; int get decimals; Address get ownerAddress; String get totalSupply; +/// Create a copy of RootTokenContractDetails +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$RootTokenContractDetailsCopyWith get copyWith => _$RootTokenContractDetailsCopyWithImpl(this as RootTokenContractDetails, _$identity); /// Serializes this RootTokenContractDetails to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is RootTokenContractDetails && - (identical(other.version, version) || other.version == version) && - (identical(other.name, name) || other.name == name) && - (identical(other.symbol, symbol) || other.symbol == symbol) && - (identical(other.decimals, decimals) || - other.decimals == decimals) && - (identical(other.ownerAddress, ownerAddress) || - other.ownerAddress == ownerAddress) && - (identical(other.totalSupply, totalSupply) || - other.totalSupply == totalSupply)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, version, name, symbol, decimals, ownerAddress, totalSupply); - - @override - String toString() { - return 'RootTokenContractDetails(version: $version, name: $name, symbol: $symbol, decimals: $decimals, ownerAddress: $ownerAddress, totalSupply: $totalSupply)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is RootTokenContractDetails&&(identical(other.version, version) || other.version == version)&&(identical(other.name, name) || other.name == name)&&(identical(other.symbol, symbol) || other.symbol == symbol)&&(identical(other.decimals, decimals) || other.decimals == decimals)&&(identical(other.ownerAddress, ownerAddress) || other.ownerAddress == ownerAddress)&&(identical(other.totalSupply, totalSupply) || other.totalSupply == totalSupply)); } -/// @nodoc -abstract mixin class $RootTokenContractDetailsCopyWith<$Res> { - factory $RootTokenContractDetailsCopyWith(RootTokenContractDetails value, - $Res Function(RootTokenContractDetails) _then) = - _$RootTokenContractDetailsCopyWithImpl; - @useResult - $Res call( - {TokenWalletVersion version, - String name, - String symbol, - int decimals, - Address ownerAddress, - String totalSupply}); - - $AddressCopyWith<$Res> get ownerAddress; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,version,name,symbol,decimals,ownerAddress,totalSupply); + +@override +String toString() { + return 'RootTokenContractDetails(version: $version, name: $name, symbol: $symbol, decimals: $decimals, ownerAddress: $ownerAddress, totalSupply: $totalSupply)'; +} + + } +/// @nodoc +abstract mixin class $RootTokenContractDetailsCopyWith<$Res> { + factory $RootTokenContractDetailsCopyWith(RootTokenContractDetails value, $Res Function(RootTokenContractDetails) _then) = _$RootTokenContractDetailsCopyWithImpl; +@useResult +$Res call({ + TokenWalletVersion version, String name, String symbol, int decimals, Address ownerAddress, String totalSupply +}); + + +$AddressCopyWith<$Res> get ownerAddress; + +} /// @nodoc class _$RootTokenContractDetailsCopyWithImpl<$Res> implements $RootTokenContractDetailsCopyWith<$Res> { @@ -85,147 +63,210 @@ class _$RootTokenContractDetailsCopyWithImpl<$Res> final RootTokenContractDetails _self; final $Res Function(RootTokenContractDetails) _then; - /// Create a copy of RootTokenContractDetails - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? version = null, - Object? name = null, - Object? symbol = null, - Object? decimals = null, - Object? ownerAddress = null, - Object? totalSupply = null, - }) { - return _then(_self.copyWith( - version: null == version - ? _self.version - : version // ignore: cast_nullable_to_non_nullable - as TokenWalletVersion, - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - symbol: null == symbol - ? _self.symbol - : symbol // ignore: cast_nullable_to_non_nullable - as String, - decimals: null == decimals - ? _self.decimals - : decimals // ignore: cast_nullable_to_non_nullable - as int, - ownerAddress: null == ownerAddress - ? _self.ownerAddress - : ownerAddress // ignore: cast_nullable_to_non_nullable - as Address, - totalSupply: null == totalSupply - ? _self.totalSupply - : totalSupply // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of RootTokenContractDetails - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get ownerAddress { - return $AddressCopyWith<$Res>(_self.ownerAddress, (value) { - return _then(_self.copyWith(ownerAddress: value)); - }); - } +/// Create a copy of RootTokenContractDetails +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? version = null,Object? name = null,Object? symbol = null,Object? decimals = null,Object? ownerAddress = null,Object? totalSupply = null,}) { + return _then(_self.copyWith( +version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable +as TokenWalletVersion,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,symbol: null == symbol ? _self.symbol : symbol // ignore: cast_nullable_to_non_nullable +as String,decimals: null == decimals ? _self.decimals : decimals // ignore: cast_nullable_to_non_nullable +as int,ownerAddress: null == ownerAddress ? _self.ownerAddress : ownerAddress // ignore: cast_nullable_to_non_nullable +as Address,totalSupply: null == totalSupply ? _self.totalSupply : totalSupply // ignore: cast_nullable_to_non_nullable +as String, + )); +} +/// Create a copy of RootTokenContractDetails +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get ownerAddress { + + return $AddressCopyWith<$Res>(_self.ownerAddress, (value) { + return _then(_self.copyWith(ownerAddress: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [RootTokenContractDetails]. +extension RootTokenContractDetailsPatterns on RootTokenContractDetails { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _RootTokenContractDetails value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _RootTokenContractDetails() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _RootTokenContractDetails value) $default,){ +final _that = this; +switch (_that) { +case _RootTokenContractDetails(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _RootTokenContractDetails value)? $default,){ +final _that = this; +switch (_that) { +case _RootTokenContractDetails() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( TokenWalletVersion version, String name, String symbol, int decimals, Address ownerAddress, String totalSupply)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _RootTokenContractDetails() when $default != null: +return $default(_that.version,_that.name,_that.symbol,_that.decimals,_that.ownerAddress,_that.totalSupply);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( TokenWalletVersion version, String name, String symbol, int decimals, Address ownerAddress, String totalSupply) $default,) {final _that = this; +switch (_that) { +case _RootTokenContractDetails(): +return $default(_that.version,_that.name,_that.symbol,_that.decimals,_that.ownerAddress,_that.totalSupply);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( TokenWalletVersion version, String name, String symbol, int decimals, Address ownerAddress, String totalSupply)? $default,) {final _that = this; +switch (_that) { +case _RootTokenContractDetails() when $default != null: +return $default(_that.version,_that.name,_that.symbol,_that.decimals,_that.ownerAddress,_that.totalSupply);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _RootTokenContractDetails implements RootTokenContractDetails { - const _RootTokenContractDetails( - {required this.version, - required this.name, - required this.symbol, - required this.decimals, - required this.ownerAddress, - required this.totalSupply}); - factory _RootTokenContractDetails.fromJson(Map json) => - _$RootTokenContractDetailsFromJson(json); - - @override - final TokenWalletVersion version; - @override - final String name; - @override - final String symbol; - @override - final int decimals; - @override - final Address ownerAddress; - @override - final String totalSupply; - - /// Create a copy of RootTokenContractDetails - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$RootTokenContractDetailsCopyWith<_RootTokenContractDetails> get copyWith => - __$RootTokenContractDetailsCopyWithImpl<_RootTokenContractDetails>( - this, _$identity); - - @override - Map toJson() { - return _$RootTokenContractDetailsToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _RootTokenContractDetails && - (identical(other.version, version) || other.version == version) && - (identical(other.name, name) || other.name == name) && - (identical(other.symbol, symbol) || other.symbol == symbol) && - (identical(other.decimals, decimals) || - other.decimals == decimals) && - (identical(other.ownerAddress, ownerAddress) || - other.ownerAddress == ownerAddress) && - (identical(other.totalSupply, totalSupply) || - other.totalSupply == totalSupply)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, version, name, symbol, decimals, ownerAddress, totalSupply); - - @override - String toString() { - return 'RootTokenContractDetails(version: $version, name: $name, symbol: $symbol, decimals: $decimals, ownerAddress: $ownerAddress, totalSupply: $totalSupply)'; - } + const _RootTokenContractDetails({required this.version, required this.name, required this.symbol, required this.decimals, required this.ownerAddress, required this.totalSupply}); + factory _RootTokenContractDetails.fromJson(Map json) => _$RootTokenContractDetailsFromJson(json); + +@override final TokenWalletVersion version; +@override final String name; +@override final String symbol; +@override final int decimals; +@override final Address ownerAddress; +@override final String totalSupply; + +/// Create a copy of RootTokenContractDetails +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$RootTokenContractDetailsCopyWith<_RootTokenContractDetails> get copyWith => __$RootTokenContractDetailsCopyWithImpl<_RootTokenContractDetails>(this, _$identity); + +@override +Map toJson() { + return _$RootTokenContractDetailsToJson(this, ); } -/// @nodoc -abstract mixin class _$RootTokenContractDetailsCopyWith<$Res> - implements $RootTokenContractDetailsCopyWith<$Res> { - factory _$RootTokenContractDetailsCopyWith(_RootTokenContractDetails value, - $Res Function(_RootTokenContractDetails) _then) = - __$RootTokenContractDetailsCopyWithImpl; - @override - @useResult - $Res call( - {TokenWalletVersion version, - String name, - String symbol, - int decimals, - Address ownerAddress, - String totalSupply}); - - @override - $AddressCopyWith<$Res> get ownerAddress; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _RootTokenContractDetails&&(identical(other.version, version) || other.version == version)&&(identical(other.name, name) || other.name == name)&&(identical(other.symbol, symbol) || other.symbol == symbol)&&(identical(other.decimals, decimals) || other.decimals == decimals)&&(identical(other.ownerAddress, ownerAddress) || other.ownerAddress == ownerAddress)&&(identical(other.totalSupply, totalSupply) || other.totalSupply == totalSupply)); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,version,name,symbol,decimals,ownerAddress,totalSupply); + +@override +String toString() { + return 'RootTokenContractDetails(version: $version, name: $name, symbol: $symbol, decimals: $decimals, ownerAddress: $ownerAddress, totalSupply: $totalSupply)'; +} + + +} + +/// @nodoc +abstract mixin class _$RootTokenContractDetailsCopyWith<$Res> implements $RootTokenContractDetailsCopyWith<$Res> { + factory _$RootTokenContractDetailsCopyWith(_RootTokenContractDetails value, $Res Function(_RootTokenContractDetails) _then) = __$RootTokenContractDetailsCopyWithImpl; +@override @useResult +$Res call({ + TokenWalletVersion version, String name, String symbol, int decimals, Address ownerAddress, String totalSupply +}); + + +@override $AddressCopyWith<$Res> get ownerAddress; + +} /// @nodoc class __$RootTokenContractDetailsCopyWithImpl<$Res> implements _$RootTokenContractDetailsCopyWith<$Res> { @@ -234,55 +275,30 @@ class __$RootTokenContractDetailsCopyWithImpl<$Res> final _RootTokenContractDetails _self; final $Res Function(_RootTokenContractDetails) _then; - /// Create a copy of RootTokenContractDetails - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? version = null, - Object? name = null, - Object? symbol = null, - Object? decimals = null, - Object? ownerAddress = null, - Object? totalSupply = null, - }) { - return _then(_RootTokenContractDetails( - version: null == version - ? _self.version - : version // ignore: cast_nullable_to_non_nullable - as TokenWalletVersion, - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - symbol: null == symbol - ? _self.symbol - : symbol // ignore: cast_nullable_to_non_nullable - as String, - decimals: null == decimals - ? _self.decimals - : decimals // ignore: cast_nullable_to_non_nullable - as int, - ownerAddress: null == ownerAddress - ? _self.ownerAddress - : ownerAddress // ignore: cast_nullable_to_non_nullable - as Address, - totalSupply: null == totalSupply - ? _self.totalSupply - : totalSupply // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of RootTokenContractDetails - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get ownerAddress { - return $AddressCopyWith<$Res>(_self.ownerAddress, (value) { - return _then(_self.copyWith(ownerAddress: value)); - }); - } +/// Create a copy of RootTokenContractDetails +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? version = null,Object? name = null,Object? symbol = null,Object? decimals = null,Object? ownerAddress = null,Object? totalSupply = null,}) { + return _then(_RootTokenContractDetails( +version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable +as TokenWalletVersion,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,symbol: null == symbol ? _self.symbol : symbol // ignore: cast_nullable_to_non_nullable +as String,decimals: null == decimals ? _self.decimals : decimals // ignore: cast_nullable_to_non_nullable +as int,ownerAddress: null == ownerAddress ? _self.ownerAddress : ownerAddress // ignore: cast_nullable_to_non_nullable +as Address,totalSupply: null == totalSupply ? _self.totalSupply : totalSupply // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +/// Create a copy of RootTokenContractDetails +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get ownerAddress { + + return $AddressCopyWith<$Res>(_self.ownerAddress, (value) { + return _then(_self.copyWith(ownerAddress: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/root_token_contract_details.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/root_token_contract_details.g.dart index c2d77bae..be4a8774 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/root_token_contract_details.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/root_token_contract_details.g.dart @@ -7,26 +7,26 @@ part of 'root_token_contract_details.dart'; // ************************************************************************** _RootTokenContractDetails _$RootTokenContractDetailsFromJson( - Map json) => - _RootTokenContractDetails( - version: $enumDecode(_$TokenWalletVersionEnumMap, json['version']), - name: json['name'] as String, - symbol: json['symbol'] as String, - decimals: (json['decimals'] as num).toInt(), - ownerAddress: Address.fromJson(json['owner_address'] as String), - totalSupply: json['total_supply'] as String, - ); + Map json, +) => _RootTokenContractDetails( + version: $enumDecode(_$TokenWalletVersionEnumMap, json['version']), + name: json['name'] as String, + symbol: json['symbol'] as String, + decimals: (json['decimals'] as num).toInt(), + ownerAddress: Address.fromJson(json['owner_address'] as String), + totalSupply: json['total_supply'] as String, +); Map _$RootTokenContractDetailsToJson( - _RootTokenContractDetails instance) => - { - 'version': _$TokenWalletVersionEnumMap[instance.version]!, - 'name': instance.name, - 'symbol': instance.symbol, - 'decimals': instance.decimals, - 'owner_address': instance.ownerAddress.toJson(), - 'total_supply': instance.totalSupply, - }; + _RootTokenContractDetails instance, +) => { + 'version': _$TokenWalletVersionEnumMap[instance.version]!, + 'name': instance.name, + 'symbol': instance.symbol, + 'decimals': instance.decimals, + 'owner_address': instance.ownerAddress.toJson(), + 'total_supply': instance.totalSupply, +}; const _$TokenWalletVersionEnumMap = { TokenWalletVersion.oldTip3v4: 'OldTip3v4', diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/symbol.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/symbol.freezed.dart index 1db601ad..3d446e2b 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/symbol.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/symbol.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,223 +14,285 @@ T _$identity(T value) => value; /// @nodoc mixin _$Symbol { - String get name; - String get fullName; - int get decimals; - Address get rootTokenContract; - - /// Create a copy of Symbol - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $SymbolCopyWith get copyWith => - _$SymbolCopyWithImpl(this as Symbol, _$identity); + + String get name; String get fullName; int get decimals; Address get rootTokenContract; +/// Create a copy of Symbol +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$SymbolCopyWith get copyWith => _$SymbolCopyWithImpl(this as Symbol, _$identity); /// Serializes this Symbol to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is Symbol && - (identical(other.name, name) || other.name == name) && - (identical(other.fullName, fullName) || - other.fullName == fullName) && - (identical(other.decimals, decimals) || - other.decimals == decimals) && - (identical(other.rootTokenContract, rootTokenContract) || - other.rootTokenContract == rootTokenContract)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, name, fullName, decimals, rootTokenContract); - - @override - String toString() { - return 'Symbol(name: $name, fullName: $fullName, decimals: $decimals, rootTokenContract: $rootTokenContract)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Symbol&&(identical(other.name, name) || other.name == name)&&(identical(other.fullName, fullName) || other.fullName == fullName)&&(identical(other.decimals, decimals) || other.decimals == decimals)&&(identical(other.rootTokenContract, rootTokenContract) || other.rootTokenContract == rootTokenContract)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,fullName,decimals,rootTokenContract); + +@override +String toString() { + return 'Symbol(name: $name, fullName: $fullName, decimals: $decimals, rootTokenContract: $rootTokenContract)'; } -/// @nodoc -abstract mixin class $SymbolCopyWith<$Res> { - factory $SymbolCopyWith(Symbol value, $Res Function(Symbol) _then) = - _$SymbolCopyWithImpl; - @useResult - $Res call( - {String name, String fullName, int decimals, Address rootTokenContract}); - $AddressCopyWith<$Res> get rootTokenContract; } /// @nodoc -class _$SymbolCopyWithImpl<$Res> implements $SymbolCopyWith<$Res> { +abstract mixin class $SymbolCopyWith<$Res> { + factory $SymbolCopyWith(Symbol value, $Res Function(Symbol) _then) = _$SymbolCopyWithImpl; +@useResult +$Res call({ + String name, String fullName, int decimals, Address rootTokenContract +}); + + +$AddressCopyWith<$Res> get rootTokenContract; + +} +/// @nodoc +class _$SymbolCopyWithImpl<$Res> + implements $SymbolCopyWith<$Res> { _$SymbolCopyWithImpl(this._self, this._then); final Symbol _self; final $Res Function(Symbol) _then; - /// Create a copy of Symbol - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = null, - Object? fullName = null, - Object? decimals = null, - Object? rootTokenContract = null, - }) { - return _then(_self.copyWith( - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - fullName: null == fullName - ? _self.fullName - : fullName // ignore: cast_nullable_to_non_nullable - as String, - decimals: null == decimals - ? _self.decimals - : decimals // ignore: cast_nullable_to_non_nullable - as int, - rootTokenContract: null == rootTokenContract - ? _self.rootTokenContract - : rootTokenContract // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of Symbol - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get rootTokenContract { - return $AddressCopyWith<$Res>(_self.rootTokenContract, (value) { - return _then(_self.copyWith(rootTokenContract: value)); - }); - } +/// Create a copy of Symbol +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? fullName = null,Object? decimals = null,Object? rootTokenContract = null,}) { + return _then(_self.copyWith( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,fullName: null == fullName ? _self.fullName : fullName // ignore: cast_nullable_to_non_nullable +as String,decimals: null == decimals ? _self.decimals : decimals // ignore: cast_nullable_to_non_nullable +as int,rootTokenContract: null == rootTokenContract ? _self.rootTokenContract : rootTokenContract // ignore: cast_nullable_to_non_nullable +as Address, + )); +} +/// Create a copy of Symbol +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get rootTokenContract { + + return $AddressCopyWith<$Res>(_self.rootTokenContract, (value) { + return _then(_self.copyWith(rootTokenContract: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [Symbol]. +extension SymbolPatterns on Symbol { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _Symbol value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Symbol() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _Symbol value) $default,){ +final _that = this; +switch (_that) { +case _Symbol(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _Symbol value)? $default,){ +final _that = this; +switch (_that) { +case _Symbol() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String name, String fullName, int decimals, Address rootTokenContract)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Symbol() when $default != null: +return $default(_that.name,_that.fullName,_that.decimals,_that.rootTokenContract);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String name, String fullName, int decimals, Address rootTokenContract) $default,) {final _that = this; +switch (_that) { +case _Symbol(): +return $default(_that.name,_that.fullName,_that.decimals,_that.rootTokenContract);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String name, String fullName, int decimals, Address rootTokenContract)? $default,) {final _that = this; +switch (_that) { +case _Symbol() when $default != null: +return $default(_that.name,_that.fullName,_that.decimals,_that.rootTokenContract);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _Symbol implements Symbol { - const _Symbol( - {required this.name, - required this.fullName, - required this.decimals, - required this.rootTokenContract}); + const _Symbol({required this.name, required this.fullName, required this.decimals, required this.rootTokenContract}); factory _Symbol.fromJson(Map json) => _$SymbolFromJson(json); - @override - final String name; - @override - final String fullName; - @override - final int decimals; - @override - final Address rootTokenContract; - - /// Create a copy of Symbol - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$SymbolCopyWith<_Symbol> get copyWith => - __$SymbolCopyWithImpl<_Symbol>(this, _$identity); - - @override - Map toJson() { - return _$SymbolToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _Symbol && - (identical(other.name, name) || other.name == name) && - (identical(other.fullName, fullName) || - other.fullName == fullName) && - (identical(other.decimals, decimals) || - other.decimals == decimals) && - (identical(other.rootTokenContract, rootTokenContract) || - other.rootTokenContract == rootTokenContract)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, name, fullName, decimals, rootTokenContract); - - @override - String toString() { - return 'Symbol(name: $name, fullName: $fullName, decimals: $decimals, rootTokenContract: $rootTokenContract)'; - } +@override final String name; +@override final String fullName; +@override final int decimals; +@override final Address rootTokenContract; + +/// Create a copy of Symbol +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$SymbolCopyWith<_Symbol> get copyWith => __$SymbolCopyWithImpl<_Symbol>(this, _$identity); + +@override +Map toJson() { + return _$SymbolToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Symbol&&(identical(other.name, name) || other.name == name)&&(identical(other.fullName, fullName) || other.fullName == fullName)&&(identical(other.decimals, decimals) || other.decimals == decimals)&&(identical(other.rootTokenContract, rootTokenContract) || other.rootTokenContract == rootTokenContract)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,fullName,decimals,rootTokenContract); + +@override +String toString() { + return 'Symbol(name: $name, fullName: $fullName, decimals: $decimals, rootTokenContract: $rootTokenContract)'; +} + + } /// @nodoc abstract mixin class _$SymbolCopyWith<$Res> implements $SymbolCopyWith<$Res> { - factory _$SymbolCopyWith(_Symbol value, $Res Function(_Symbol) _then) = - __$SymbolCopyWithImpl; - @override - @useResult - $Res call( - {String name, String fullName, int decimals, Address rootTokenContract}); + factory _$SymbolCopyWith(_Symbol value, $Res Function(_Symbol) _then) = __$SymbolCopyWithImpl; +@override @useResult +$Res call({ + String name, String fullName, int decimals, Address rootTokenContract +}); - @override - $AddressCopyWith<$Res> get rootTokenContract; -} +@override $AddressCopyWith<$Res> get rootTokenContract; + +} /// @nodoc -class __$SymbolCopyWithImpl<$Res> implements _$SymbolCopyWith<$Res> { +class __$SymbolCopyWithImpl<$Res> + implements _$SymbolCopyWith<$Res> { __$SymbolCopyWithImpl(this._self, this._then); final _Symbol _self; final $Res Function(_Symbol) _then; - /// Create a copy of Symbol - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? name = null, - Object? fullName = null, - Object? decimals = null, - Object? rootTokenContract = null, - }) { - return _then(_Symbol( - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - fullName: null == fullName - ? _self.fullName - : fullName // ignore: cast_nullable_to_non_nullable - as String, - decimals: null == decimals - ? _self.decimals - : decimals // ignore: cast_nullable_to_non_nullable - as int, - rootTokenContract: null == rootTokenContract - ? _self.rootTokenContract - : rootTokenContract // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of Symbol - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get rootTokenContract { - return $AddressCopyWith<$Res>(_self.rootTokenContract, (value) { - return _then(_self.copyWith(rootTokenContract: value)); - }); - } +/// Create a copy of Symbol +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? fullName = null,Object? decimals = null,Object? rootTokenContract = null,}) { + return _then(_Symbol( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,fullName: null == fullName ? _self.fullName : fullName // ignore: cast_nullable_to_non_nullable +as String,decimals: null == decimals ? _self.decimals : decimals // ignore: cast_nullable_to_non_nullable +as int,rootTokenContract: null == rootTokenContract ? _self.rootTokenContract : rootTokenContract // ignore: cast_nullable_to_non_nullable +as Address, + )); +} + +/// Create a copy of Symbol +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get rootTokenContract { + + return $AddressCopyWith<$Res>(_self.rootTokenContract, (value) { + return _then(_self.copyWith(rootTokenContract: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/symbol.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/symbol.g.dart index a6cb3d39..a56474fc 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/symbol.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/symbol.g.dart @@ -7,15 +7,15 @@ part of 'symbol.dart'; // ************************************************************************** _Symbol _$SymbolFromJson(Map json) => _Symbol( - name: json['name'] as String, - fullName: json['fullName'] as String, - decimals: (json['decimals'] as num).toInt(), - rootTokenContract: Address.fromJson(json['rootTokenContract'] as String), - ); + name: json['name'] as String, + fullName: json['fullName'] as String, + decimals: (json['decimals'] as num).toInt(), + rootTokenContract: Address.fromJson(json['rootTokenContract'] as String), +); Map _$SymbolToJson(_Symbol instance) => { - 'name': instance.name, - 'fullName': instance.fullName, - 'decimals': instance.decimals, - 'rootTokenContract': instance.rootTokenContract.toJson(), - }; + 'name': instance.name, + 'fullName': instance.fullName, + 'decimals': instance.decimals, + 'rootTokenContract': instance.rootTokenContract.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_incoming_transfer.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_incoming_transfer.freezed.dart index 4ea503f1..88a3a7d9 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_incoming_transfer.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_incoming_transfer.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,51 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TokenIncomingTransfer { - BigInt get tokens; - Address get senderAddress; - /// Create a copy of TokenIncomingTransfer - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TokenIncomingTransferCopyWith get copyWith => - _$TokenIncomingTransferCopyWithImpl( - this as TokenIncomingTransfer, _$identity); + BigInt get tokens; Address get senderAddress; +/// Create a copy of TokenIncomingTransfer +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TokenIncomingTransferCopyWith get copyWith => _$TokenIncomingTransferCopyWithImpl(this as TokenIncomingTransfer, _$identity); /// Serializes this TokenIncomingTransfer to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenIncomingTransfer && - (identical(other.tokens, tokens) || other.tokens == tokens) && - (identical(other.senderAddress, senderAddress) || - other.senderAddress == senderAddress)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, tokens, senderAddress); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenIncomingTransfer&&(identical(other.tokens, tokens) || other.tokens == tokens)&&(identical(other.senderAddress, senderAddress) || other.senderAddress == senderAddress)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,tokens,senderAddress); - @override - String toString() { - return 'TokenIncomingTransfer(tokens: $tokens, senderAddress: $senderAddress)'; - } +@override +String toString() { + return 'TokenIncomingTransfer(tokens: $tokens, senderAddress: $senderAddress)'; } -/// @nodoc -abstract mixin class $TokenIncomingTransferCopyWith<$Res> { - factory $TokenIncomingTransferCopyWith(TokenIncomingTransfer value, - $Res Function(TokenIncomingTransfer) _then) = - _$TokenIncomingTransferCopyWithImpl; - @useResult - $Res call({BigInt tokens, Address senderAddress}); - $AddressCopyWith<$Res> get senderAddress; } +/// @nodoc +abstract mixin class $TokenIncomingTransferCopyWith<$Res> { + factory $TokenIncomingTransferCopyWith(TokenIncomingTransfer value, $Res Function(TokenIncomingTransfer) _then) = _$TokenIncomingTransferCopyWithImpl; +@useResult +$Res call({ + BigInt tokens, Address senderAddress +}); + + +$AddressCopyWith<$Res> get senderAddress; + +} /// @nodoc class _$TokenIncomingTransferCopyWithImpl<$Res> implements $TokenIncomingTransferCopyWith<$Res> { @@ -68,100 +63,202 @@ class _$TokenIncomingTransferCopyWithImpl<$Res> final TokenIncomingTransfer _self; final $Res Function(TokenIncomingTransfer) _then; - /// Create a copy of TokenIncomingTransfer - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? tokens = null, - Object? senderAddress = null, - }) { - return _then(_self.copyWith( - tokens: null == tokens - ? _self.tokens - : tokens // ignore: cast_nullable_to_non_nullable - as BigInt, - senderAddress: null == senderAddress - ? _self.senderAddress - : senderAddress // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of TokenIncomingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get senderAddress { - return $AddressCopyWith<$Res>(_self.senderAddress, (value) { - return _then(_self.copyWith(senderAddress: value)); - }); - } +/// Create a copy of TokenIncomingTransfer +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? tokens = null,Object? senderAddress = null,}) { + return _then(_self.copyWith( +tokens: null == tokens ? _self.tokens : tokens // ignore: cast_nullable_to_non_nullable +as BigInt,senderAddress: null == senderAddress ? _self.senderAddress : senderAddress // ignore: cast_nullable_to_non_nullable +as Address, + )); +} +/// Create a copy of TokenIncomingTransfer +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get senderAddress { + + return $AddressCopyWith<$Res>(_self.senderAddress, (value) { + return _then(_self.copyWith(senderAddress: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [TokenIncomingTransfer]. +extension TokenIncomingTransferPatterns on TokenIncomingTransfer { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TokenIncomingTransfer value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TokenIncomingTransfer() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TokenIncomingTransfer value) $default,){ +final _that = this; +switch (_that) { +case _TokenIncomingTransfer(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TokenIncomingTransfer value)? $default,){ +final _that = this; +switch (_that) { +case _TokenIncomingTransfer() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( BigInt tokens, Address senderAddress)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TokenIncomingTransfer() when $default != null: +return $default(_that.tokens,_that.senderAddress);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( BigInt tokens, Address senderAddress) $default,) {final _that = this; +switch (_that) { +case _TokenIncomingTransfer(): +return $default(_that.tokens,_that.senderAddress);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( BigInt tokens, Address senderAddress)? $default,) {final _that = this; +switch (_that) { +case _TokenIncomingTransfer() when $default != null: +return $default(_that.tokens,_that.senderAddress);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _TokenIncomingTransfer implements TokenIncomingTransfer { - const _TokenIncomingTransfer( - {required this.tokens, required this.senderAddress}); - factory _TokenIncomingTransfer.fromJson(Map json) => - _$TokenIncomingTransferFromJson(json); - - @override - final BigInt tokens; - @override - final Address senderAddress; - - /// Create a copy of TokenIncomingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TokenIncomingTransferCopyWith<_TokenIncomingTransfer> get copyWith => - __$TokenIncomingTransferCopyWithImpl<_TokenIncomingTransfer>( - this, _$identity); - - @override - Map toJson() { - return _$TokenIncomingTransferToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TokenIncomingTransfer && - (identical(other.tokens, tokens) || other.tokens == tokens) && - (identical(other.senderAddress, senderAddress) || - other.senderAddress == senderAddress)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, tokens, senderAddress); - - @override - String toString() { - return 'TokenIncomingTransfer(tokens: $tokens, senderAddress: $senderAddress)'; - } + const _TokenIncomingTransfer({required this.tokens, required this.senderAddress}); + factory _TokenIncomingTransfer.fromJson(Map json) => _$TokenIncomingTransferFromJson(json); + +@override final BigInt tokens; +@override final Address senderAddress; + +/// Create a copy of TokenIncomingTransfer +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TokenIncomingTransferCopyWith<_TokenIncomingTransfer> get copyWith => __$TokenIncomingTransferCopyWithImpl<_TokenIncomingTransfer>(this, _$identity); + +@override +Map toJson() { + return _$TokenIncomingTransferToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TokenIncomingTransfer&&(identical(other.tokens, tokens) || other.tokens == tokens)&&(identical(other.senderAddress, senderAddress) || other.senderAddress == senderAddress)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,tokens,senderAddress); + +@override +String toString() { + return 'TokenIncomingTransfer(tokens: $tokens, senderAddress: $senderAddress)'; } -/// @nodoc -abstract mixin class _$TokenIncomingTransferCopyWith<$Res> - implements $TokenIncomingTransferCopyWith<$Res> { - factory _$TokenIncomingTransferCopyWith(_TokenIncomingTransfer value, - $Res Function(_TokenIncomingTransfer) _then) = - __$TokenIncomingTransferCopyWithImpl; - @override - @useResult - $Res call({BigInt tokens, Address senderAddress}); - @override - $AddressCopyWith<$Res> get senderAddress; } +/// @nodoc +abstract mixin class _$TokenIncomingTransferCopyWith<$Res> implements $TokenIncomingTransferCopyWith<$Res> { + factory _$TokenIncomingTransferCopyWith(_TokenIncomingTransfer value, $Res Function(_TokenIncomingTransfer) _then) = __$TokenIncomingTransferCopyWithImpl; +@override @useResult +$Res call({ + BigInt tokens, Address senderAddress +}); + + +@override $AddressCopyWith<$Res> get senderAddress; + +} /// @nodoc class __$TokenIncomingTransferCopyWithImpl<$Res> implements _$TokenIncomingTransferCopyWith<$Res> { @@ -170,35 +267,26 @@ class __$TokenIncomingTransferCopyWithImpl<$Res> final _TokenIncomingTransfer _self; final $Res Function(_TokenIncomingTransfer) _then; - /// Create a copy of TokenIncomingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? tokens = null, - Object? senderAddress = null, - }) { - return _then(_TokenIncomingTransfer( - tokens: null == tokens - ? _self.tokens - : tokens // ignore: cast_nullable_to_non_nullable - as BigInt, - senderAddress: null == senderAddress - ? _self.senderAddress - : senderAddress // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of TokenIncomingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get senderAddress { - return $AddressCopyWith<$Res>(_self.senderAddress, (value) { - return _then(_self.copyWith(senderAddress: value)); - }); - } +/// Create a copy of TokenIncomingTransfer +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? tokens = null,Object? senderAddress = null,}) { + return _then(_TokenIncomingTransfer( +tokens: null == tokens ? _self.tokens : tokens // ignore: cast_nullable_to_non_nullable +as BigInt,senderAddress: null == senderAddress ? _self.senderAddress : senderAddress // ignore: cast_nullable_to_non_nullable +as Address, + )); +} + +/// Create a copy of TokenIncomingTransfer +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get senderAddress { + + return $AddressCopyWith<$Res>(_self.senderAddress, (value) { + return _then(_self.copyWith(senderAddress: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_incoming_transfer.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_incoming_transfer.g.dart index 82a12e6e..720642e2 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_incoming_transfer.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_incoming_transfer.g.dart @@ -7,15 +7,15 @@ part of 'token_incoming_transfer.dart'; // ************************************************************************** _TokenIncomingTransfer _$TokenIncomingTransferFromJson( - Map json) => - _TokenIncomingTransfer( - tokens: BigInt.parse(json['tokens'] as String), - senderAddress: Address.fromJson(json['senderAddress'] as String), - ); + Map json, +) => _TokenIncomingTransfer( + tokens: BigInt.parse(json['tokens'] as String), + senderAddress: Address.fromJson(json['senderAddress'] as String), +); Map _$TokenIncomingTransferToJson( - _TokenIncomingTransfer instance) => - { - 'tokens': instance.tokens.toString(), - 'senderAddress': instance.senderAddress.toJson(), - }; + _TokenIncomingTransfer instance, +) => { + 'tokens': instance.tokens.toString(), + 'senderAddress': instance.senderAddress.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_outgoing_transfer.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_outgoing_transfer.freezed.dart index 663434bb..d0a0fb28 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_outgoing_transfer.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_outgoing_transfer.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,50 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TokenOutgoingTransfer { - TransferRecipient get to; - BigInt get tokens; - /// Create a copy of TokenOutgoingTransfer - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TokenOutgoingTransferCopyWith get copyWith => - _$TokenOutgoingTransferCopyWithImpl( - this as TokenOutgoingTransfer, _$identity); + TransferRecipient get to; BigInt get tokens; +/// Create a copy of TokenOutgoingTransfer +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TokenOutgoingTransferCopyWith get copyWith => _$TokenOutgoingTransferCopyWithImpl(this as TokenOutgoingTransfer, _$identity); /// Serializes this TokenOutgoingTransfer to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenOutgoingTransfer && - (identical(other.to, to) || other.to == to) && - (identical(other.tokens, tokens) || other.tokens == tokens)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, to, tokens); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenOutgoingTransfer&&(identical(other.to, to) || other.to == to)&&(identical(other.tokens, tokens) || other.tokens == tokens)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,to,tokens); - @override - String toString() { - return 'TokenOutgoingTransfer(to: $to, tokens: $tokens)'; - } +@override +String toString() { + return 'TokenOutgoingTransfer(to: $to, tokens: $tokens)'; } -/// @nodoc -abstract mixin class $TokenOutgoingTransferCopyWith<$Res> { - factory $TokenOutgoingTransferCopyWith(TokenOutgoingTransfer value, - $Res Function(TokenOutgoingTransfer) _then) = - _$TokenOutgoingTransferCopyWithImpl; - @useResult - $Res call({TransferRecipient to, BigInt tokens}); - $TransferRecipientCopyWith<$Res> get to; } +/// @nodoc +abstract mixin class $TokenOutgoingTransferCopyWith<$Res> { + factory $TokenOutgoingTransferCopyWith(TokenOutgoingTransfer value, $Res Function(TokenOutgoingTransfer) _then) = _$TokenOutgoingTransferCopyWithImpl; +@useResult +$Res call({ + TransferRecipient to, BigInt tokens +}); + + +$TransferRecipientCopyWith<$Res> get to; + +} /// @nodoc class _$TokenOutgoingTransferCopyWithImpl<$Res> implements $TokenOutgoingTransferCopyWith<$Res> { @@ -67,98 +63,202 @@ class _$TokenOutgoingTransferCopyWithImpl<$Res> final TokenOutgoingTransfer _self; final $Res Function(TokenOutgoingTransfer) _then; - /// Create a copy of TokenOutgoingTransfer - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? to = null, - Object? tokens = null, - }) { - return _then(_self.copyWith( - to: null == to - ? _self.to - : to // ignore: cast_nullable_to_non_nullable - as TransferRecipient, - tokens: null == tokens - ? _self.tokens - : tokens // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } - - /// Create a copy of TokenOutgoingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransferRecipientCopyWith<$Res> get to { - return $TransferRecipientCopyWith<$Res>(_self.to, (value) { - return _then(_self.copyWith(to: value)); - }); - } +/// Create a copy of TokenOutgoingTransfer +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? to = null,Object? tokens = null,}) { + return _then(_self.copyWith( +to: null == to ? _self.to : to // ignore: cast_nullable_to_non_nullable +as TransferRecipient,tokens: null == tokens ? _self.tokens : tokens // ignore: cast_nullable_to_non_nullable +as BigInt, + )); +} +/// Create a copy of TokenOutgoingTransfer +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransferRecipientCopyWith<$Res> get to { + + return $TransferRecipientCopyWith<$Res>(_self.to, (value) { + return _then(_self.copyWith(to: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [TokenOutgoingTransfer]. +extension TokenOutgoingTransferPatterns on TokenOutgoingTransfer { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TokenOutgoingTransfer value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TokenOutgoingTransfer() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TokenOutgoingTransfer value) $default,){ +final _that = this; +switch (_that) { +case _TokenOutgoingTransfer(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TokenOutgoingTransfer value)? $default,){ +final _that = this; +switch (_that) { +case _TokenOutgoingTransfer() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( TransferRecipient to, BigInt tokens)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TokenOutgoingTransfer() when $default != null: +return $default(_that.to,_that.tokens);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( TransferRecipient to, BigInt tokens) $default,) {final _that = this; +switch (_that) { +case _TokenOutgoingTransfer(): +return $default(_that.to,_that.tokens);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( TransferRecipient to, BigInt tokens)? $default,) {final _that = this; +switch (_that) { +case _TokenOutgoingTransfer() when $default != null: +return $default(_that.to,_that.tokens);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _TokenOutgoingTransfer implements TokenOutgoingTransfer { const _TokenOutgoingTransfer({required this.to, required this.tokens}); - factory _TokenOutgoingTransfer.fromJson(Map json) => - _$TokenOutgoingTransferFromJson(json); - - @override - final TransferRecipient to; - @override - final BigInt tokens; - - /// Create a copy of TokenOutgoingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TokenOutgoingTransferCopyWith<_TokenOutgoingTransfer> get copyWith => - __$TokenOutgoingTransferCopyWithImpl<_TokenOutgoingTransfer>( - this, _$identity); - - @override - Map toJson() { - return _$TokenOutgoingTransferToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TokenOutgoingTransfer && - (identical(other.to, to) || other.to == to) && - (identical(other.tokens, tokens) || other.tokens == tokens)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, to, tokens); - - @override - String toString() { - return 'TokenOutgoingTransfer(to: $to, tokens: $tokens)'; - } + factory _TokenOutgoingTransfer.fromJson(Map json) => _$TokenOutgoingTransferFromJson(json); + +@override final TransferRecipient to; +@override final BigInt tokens; + +/// Create a copy of TokenOutgoingTransfer +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TokenOutgoingTransferCopyWith<_TokenOutgoingTransfer> get copyWith => __$TokenOutgoingTransferCopyWithImpl<_TokenOutgoingTransfer>(this, _$identity); + +@override +Map toJson() { + return _$TokenOutgoingTransferToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TokenOutgoingTransfer&&(identical(other.to, to) || other.to == to)&&(identical(other.tokens, tokens) || other.tokens == tokens)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,to,tokens); + +@override +String toString() { + return 'TokenOutgoingTransfer(to: $to, tokens: $tokens)'; } -/// @nodoc -abstract mixin class _$TokenOutgoingTransferCopyWith<$Res> - implements $TokenOutgoingTransferCopyWith<$Res> { - factory _$TokenOutgoingTransferCopyWith(_TokenOutgoingTransfer value, - $Res Function(_TokenOutgoingTransfer) _then) = - __$TokenOutgoingTransferCopyWithImpl; - @override - @useResult - $Res call({TransferRecipient to, BigInt tokens}); - @override - $TransferRecipientCopyWith<$Res> get to; } +/// @nodoc +abstract mixin class _$TokenOutgoingTransferCopyWith<$Res> implements $TokenOutgoingTransferCopyWith<$Res> { + factory _$TokenOutgoingTransferCopyWith(_TokenOutgoingTransfer value, $Res Function(_TokenOutgoingTransfer) _then) = __$TokenOutgoingTransferCopyWithImpl; +@override @useResult +$Res call({ + TransferRecipient to, BigInt tokens +}); + + +@override $TransferRecipientCopyWith<$Res> get to; + +} /// @nodoc class __$TokenOutgoingTransferCopyWithImpl<$Res> implements _$TokenOutgoingTransferCopyWith<$Res> { @@ -167,35 +267,26 @@ class __$TokenOutgoingTransferCopyWithImpl<$Res> final _TokenOutgoingTransfer _self; final $Res Function(_TokenOutgoingTransfer) _then; - /// Create a copy of TokenOutgoingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? to = null, - Object? tokens = null, - }) { - return _then(_TokenOutgoingTransfer( - to: null == to - ? _self.to - : to // ignore: cast_nullable_to_non_nullable - as TransferRecipient, - tokens: null == tokens - ? _self.tokens - : tokens // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } - - /// Create a copy of TokenOutgoingTransfer - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransferRecipientCopyWith<$Res> get to { - return $TransferRecipientCopyWith<$Res>(_self.to, (value) { - return _then(_self.copyWith(to: value)); - }); - } +/// Create a copy of TokenOutgoingTransfer +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? to = null,Object? tokens = null,}) { + return _then(_TokenOutgoingTransfer( +to: null == to ? _self.to : to // ignore: cast_nullable_to_non_nullable +as TransferRecipient,tokens: null == tokens ? _self.tokens : tokens // ignore: cast_nullable_to_non_nullable +as BigInt, + )); +} + +/// Create a copy of TokenOutgoingTransfer +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransferRecipientCopyWith<$Res> get to { + + return $TransferRecipientCopyWith<$Res>(_self.to, (value) { + return _then(_self.copyWith(to: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_outgoing_transfer.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_outgoing_transfer.g.dart index d9198e43..e3f3725e 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_outgoing_transfer.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_outgoing_transfer.g.dart @@ -7,15 +7,15 @@ part of 'token_outgoing_transfer.dart'; // ************************************************************************** _TokenOutgoingTransfer _$TokenOutgoingTransferFromJson( - Map json) => - _TokenOutgoingTransfer( - to: TransferRecipient.fromJson(json['to'] as Map), - tokens: BigInt.parse(json['tokens'] as String), - ); + Map json, +) => _TokenOutgoingTransfer( + to: TransferRecipient.fromJson(json['to'] as Map), + tokens: BigInt.parse(json['tokens'] as String), +); Map _$TokenOutgoingTransferToJson( - _TokenOutgoingTransfer instance) => - { - 'to': instance.to.toJson(), - 'tokens': instance.tokens.toString(), - }; + _TokenOutgoingTransfer instance, +) => { + 'to': instance.to.toJson(), + 'tokens': instance.tokens.toString(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_swap_back.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_swap_back.freezed.dart index 94b696f3..63047002 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_swap_back.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_swap_back.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,55 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TokenSwapBack { - BigInt get tokens; - Address get callbackAddress; - String get callbackPayload; - - /// Create a copy of TokenSwapBack - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TokenSwapBackCopyWith get copyWith => - _$TokenSwapBackCopyWithImpl( - this as TokenSwapBack, _$identity); + + BigInt get tokens; Address get callbackAddress; String get callbackPayload; +/// Create a copy of TokenSwapBack +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TokenSwapBackCopyWith get copyWith => _$TokenSwapBackCopyWithImpl(this as TokenSwapBack, _$identity); /// Serializes this TokenSwapBack to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenSwapBack && - (identical(other.tokens, tokens) || other.tokens == tokens) && - (identical(other.callbackAddress, callbackAddress) || - other.callbackAddress == callbackAddress) && - (identical(other.callbackPayload, callbackPayload) || - other.callbackPayload == callbackPayload)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, tokens, callbackAddress, callbackPayload); - - @override - String toString() { - return 'TokenSwapBack(tokens: $tokens, callbackAddress: $callbackAddress, callbackPayload: $callbackPayload)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenSwapBack&&(identical(other.tokens, tokens) || other.tokens == tokens)&&(identical(other.callbackAddress, callbackAddress) || other.callbackAddress == callbackAddress)&&(identical(other.callbackPayload, callbackPayload) || other.callbackPayload == callbackPayload)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,tokens,callbackAddress,callbackPayload); + +@override +String toString() { + return 'TokenSwapBack(tokens: $tokens, callbackAddress: $callbackAddress, callbackPayload: $callbackPayload)'; } -/// @nodoc -abstract mixin class $TokenSwapBackCopyWith<$Res> { - factory $TokenSwapBackCopyWith( - TokenSwapBack value, $Res Function(TokenSwapBack) _then) = - _$TokenSwapBackCopyWithImpl; - @useResult - $Res call({BigInt tokens, Address callbackAddress, String callbackPayload}); - $AddressCopyWith<$Res> get callbackAddress; } +/// @nodoc +abstract mixin class $TokenSwapBackCopyWith<$Res> { + factory $TokenSwapBackCopyWith(TokenSwapBack value, $Res Function(TokenSwapBack) _then) = _$TokenSwapBackCopyWithImpl; +@useResult +$Res call({ + BigInt tokens, Address callbackAddress, String callbackPayload +}); + + +$AddressCopyWith<$Res> get callbackAddress; + +} /// @nodoc class _$TokenSwapBackCopyWithImpl<$Res> implements $TokenSwapBackCopyWith<$Res> { @@ -72,112 +63,204 @@ class _$TokenSwapBackCopyWithImpl<$Res> final TokenSwapBack _self; final $Res Function(TokenSwapBack) _then; - /// Create a copy of TokenSwapBack - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? tokens = null, - Object? callbackAddress = null, - Object? callbackPayload = null, - }) { - return _then(_self.copyWith( - tokens: null == tokens - ? _self.tokens - : tokens // ignore: cast_nullable_to_non_nullable - as BigInt, - callbackAddress: null == callbackAddress - ? _self.callbackAddress - : callbackAddress // ignore: cast_nullable_to_non_nullable - as Address, - callbackPayload: null == callbackPayload - ? _self.callbackPayload - : callbackPayload // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of TokenSwapBack - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get callbackAddress { - return $AddressCopyWith<$Res>(_self.callbackAddress, (value) { - return _then(_self.copyWith(callbackAddress: value)); - }); - } +/// Create a copy of TokenSwapBack +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? tokens = null,Object? callbackAddress = null,Object? callbackPayload = null,}) { + return _then(_self.copyWith( +tokens: null == tokens ? _self.tokens : tokens // ignore: cast_nullable_to_non_nullable +as BigInt,callbackAddress: null == callbackAddress ? _self.callbackAddress : callbackAddress // ignore: cast_nullable_to_non_nullable +as Address,callbackPayload: null == callbackPayload ? _self.callbackPayload : callbackPayload // ignore: cast_nullable_to_non_nullable +as String, + )); +} +/// Create a copy of TokenSwapBack +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get callbackAddress { + + return $AddressCopyWith<$Res>(_self.callbackAddress, (value) { + return _then(_self.copyWith(callbackAddress: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [TokenSwapBack]. +extension TokenSwapBackPatterns on TokenSwapBack { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TokenSwapBack value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TokenSwapBack() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TokenSwapBack value) $default,){ +final _that = this; +switch (_that) { +case _TokenSwapBack(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TokenSwapBack value)? $default,){ +final _that = this; +switch (_that) { +case _TokenSwapBack() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( BigInt tokens, Address callbackAddress, String callbackPayload)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TokenSwapBack() when $default != null: +return $default(_that.tokens,_that.callbackAddress,_that.callbackPayload);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( BigInt tokens, Address callbackAddress, String callbackPayload) $default,) {final _that = this; +switch (_that) { +case _TokenSwapBack(): +return $default(_that.tokens,_that.callbackAddress,_that.callbackPayload);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( BigInt tokens, Address callbackAddress, String callbackPayload)? $default,) {final _that = this; +switch (_that) { +case _TokenSwapBack() when $default != null: +return $default(_that.tokens,_that.callbackAddress,_that.callbackPayload);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _TokenSwapBack implements TokenSwapBack { - const _TokenSwapBack( - {required this.tokens, - required this.callbackAddress, - required this.callbackPayload}); - factory _TokenSwapBack.fromJson(Map json) => - _$TokenSwapBackFromJson(json); - - @override - final BigInt tokens; - @override - final Address callbackAddress; - @override - final String callbackPayload; - - /// Create a copy of TokenSwapBack - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TokenSwapBackCopyWith<_TokenSwapBack> get copyWith => - __$TokenSwapBackCopyWithImpl<_TokenSwapBack>(this, _$identity); - - @override - Map toJson() { - return _$TokenSwapBackToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TokenSwapBack && - (identical(other.tokens, tokens) || other.tokens == tokens) && - (identical(other.callbackAddress, callbackAddress) || - other.callbackAddress == callbackAddress) && - (identical(other.callbackPayload, callbackPayload) || - other.callbackPayload == callbackPayload)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, tokens, callbackAddress, callbackPayload); - - @override - String toString() { - return 'TokenSwapBack(tokens: $tokens, callbackAddress: $callbackAddress, callbackPayload: $callbackPayload)'; - } + const _TokenSwapBack({required this.tokens, required this.callbackAddress, required this.callbackPayload}); + factory _TokenSwapBack.fromJson(Map json) => _$TokenSwapBackFromJson(json); + +@override final BigInt tokens; +@override final Address callbackAddress; +@override final String callbackPayload; + +/// Create a copy of TokenSwapBack +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TokenSwapBackCopyWith<_TokenSwapBack> get copyWith => __$TokenSwapBackCopyWithImpl<_TokenSwapBack>(this, _$identity); + +@override +Map toJson() { + return _$TokenSwapBackToJson(this, ); } -/// @nodoc -abstract mixin class _$TokenSwapBackCopyWith<$Res> - implements $TokenSwapBackCopyWith<$Res> { - factory _$TokenSwapBackCopyWith( - _TokenSwapBack value, $Res Function(_TokenSwapBack) _then) = - __$TokenSwapBackCopyWithImpl; - @override - @useResult - $Res call({BigInt tokens, Address callbackAddress, String callbackPayload}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TokenSwapBack&&(identical(other.tokens, tokens) || other.tokens == tokens)&&(identical(other.callbackAddress, callbackAddress) || other.callbackAddress == callbackAddress)&&(identical(other.callbackPayload, callbackPayload) || other.callbackPayload == callbackPayload)); +} - @override - $AddressCopyWith<$Res> get callbackAddress; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,tokens,callbackAddress,callbackPayload); + +@override +String toString() { + return 'TokenSwapBack(tokens: $tokens, callbackAddress: $callbackAddress, callbackPayload: $callbackPayload)'; } + +} + +/// @nodoc +abstract mixin class _$TokenSwapBackCopyWith<$Res> implements $TokenSwapBackCopyWith<$Res> { + factory _$TokenSwapBackCopyWith(_TokenSwapBack value, $Res Function(_TokenSwapBack) _then) = __$TokenSwapBackCopyWithImpl; +@override @useResult +$Res call({ + BigInt tokens, Address callbackAddress, String callbackPayload +}); + + +@override $AddressCopyWith<$Res> get callbackAddress; + +} /// @nodoc class __$TokenSwapBackCopyWithImpl<$Res> implements _$TokenSwapBackCopyWith<$Res> { @@ -186,40 +269,27 @@ class __$TokenSwapBackCopyWithImpl<$Res> final _TokenSwapBack _self; final $Res Function(_TokenSwapBack) _then; - /// Create a copy of TokenSwapBack - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? tokens = null, - Object? callbackAddress = null, - Object? callbackPayload = null, - }) { - return _then(_TokenSwapBack( - tokens: null == tokens - ? _self.tokens - : tokens // ignore: cast_nullable_to_non_nullable - as BigInt, - callbackAddress: null == callbackAddress - ? _self.callbackAddress - : callbackAddress // ignore: cast_nullable_to_non_nullable - as Address, - callbackPayload: null == callbackPayload - ? _self.callbackPayload - : callbackPayload // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of TokenSwapBack - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get callbackAddress { - return $AddressCopyWith<$Res>(_self.callbackAddress, (value) { - return _then(_self.copyWith(callbackAddress: value)); - }); - } +/// Create a copy of TokenSwapBack +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? tokens = null,Object? callbackAddress = null,Object? callbackPayload = null,}) { + return _then(_TokenSwapBack( +tokens: null == tokens ? _self.tokens : tokens // ignore: cast_nullable_to_non_nullable +as BigInt,callbackAddress: null == callbackAddress ? _self.callbackAddress : callbackAddress // ignore: cast_nullable_to_non_nullable +as Address,callbackPayload: null == callbackPayload ? _self.callbackPayload : callbackPayload // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +/// Create a copy of TokenSwapBack +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get callbackAddress { + + return $AddressCopyWith<$Res>(_self.callbackAddress, (value) { + return _then(_self.copyWith(callbackAddress: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_wallet_details.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_wallet_details.freezed.dart index 275775a2..f5246db2 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_wallet_details.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_wallet_details.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,56 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TokenWalletDetails { - Address get rootAddress; - Address get ownerAddress; - BigInt get balance; - - /// Create a copy of TokenWalletDetails - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TokenWalletDetailsCopyWith get copyWith => - _$TokenWalletDetailsCopyWithImpl( - this as TokenWalletDetails, _$identity); + + Address get rootAddress; Address get ownerAddress; BigInt get balance; +/// Create a copy of TokenWalletDetails +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TokenWalletDetailsCopyWith get copyWith => _$TokenWalletDetailsCopyWithImpl(this as TokenWalletDetails, _$identity); /// Serializes this TokenWalletDetails to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenWalletDetails && - (identical(other.rootAddress, rootAddress) || - other.rootAddress == rootAddress) && - (identical(other.ownerAddress, ownerAddress) || - other.ownerAddress == ownerAddress) && - (identical(other.balance, balance) || other.balance == balance)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, rootAddress, ownerAddress, balance); - - @override - String toString() { - return 'TokenWalletDetails(rootAddress: $rootAddress, ownerAddress: $ownerAddress, balance: $balance)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenWalletDetails&&(identical(other.rootAddress, rootAddress) || other.rootAddress == rootAddress)&&(identical(other.ownerAddress, ownerAddress) || other.ownerAddress == ownerAddress)&&(identical(other.balance, balance) || other.balance == balance)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,rootAddress,ownerAddress,balance); + +@override +String toString() { + return 'TokenWalletDetails(rootAddress: $rootAddress, ownerAddress: $ownerAddress, balance: $balance)'; } -/// @nodoc -abstract mixin class $TokenWalletDetailsCopyWith<$Res> { - factory $TokenWalletDetailsCopyWith( - TokenWalletDetails value, $Res Function(TokenWalletDetails) _then) = - _$TokenWalletDetailsCopyWithImpl; - @useResult - $Res call({Address rootAddress, Address ownerAddress, BigInt balance}); - $AddressCopyWith<$Res> get rootAddress; - $AddressCopyWith<$Res> get ownerAddress; } +/// @nodoc +abstract mixin class $TokenWalletDetailsCopyWith<$Res> { + factory $TokenWalletDetailsCopyWith(TokenWalletDetails value, $Res Function(TokenWalletDetails) _then) = _$TokenWalletDetailsCopyWithImpl; +@useResult +$Res call({ + Address rootAddress, Address ownerAddress, BigInt balance +}); + + +$AddressCopyWith<$Res> get rootAddress;$AddressCopyWith<$Res> get ownerAddress; + +} /// @nodoc class _$TokenWalletDetailsCopyWithImpl<$Res> implements $TokenWalletDetailsCopyWith<$Res> { @@ -73,123 +63,213 @@ class _$TokenWalletDetailsCopyWithImpl<$Res> final TokenWalletDetails _self; final $Res Function(TokenWalletDetails) _then; - /// Create a copy of TokenWalletDetails - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? rootAddress = null, - Object? ownerAddress = null, - Object? balance = null, - }) { - return _then(_self.copyWith( - rootAddress: null == rootAddress - ? _self.rootAddress - : rootAddress // ignore: cast_nullable_to_non_nullable - as Address, - ownerAddress: null == ownerAddress - ? _self.ownerAddress - : ownerAddress // ignore: cast_nullable_to_non_nullable - as Address, - balance: null == balance - ? _self.balance - : balance // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } - - /// Create a copy of TokenWalletDetails - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get rootAddress { - return $AddressCopyWith<$Res>(_self.rootAddress, (value) { - return _then(_self.copyWith(rootAddress: value)); - }); - } - - /// Create a copy of TokenWalletDetails - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get ownerAddress { - return $AddressCopyWith<$Res>(_self.ownerAddress, (value) { - return _then(_self.copyWith(ownerAddress: value)); - }); - } +/// Create a copy of TokenWalletDetails +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? rootAddress = null,Object? ownerAddress = null,Object? balance = null,}) { + return _then(_self.copyWith( +rootAddress: null == rootAddress ? _self.rootAddress : rootAddress // ignore: cast_nullable_to_non_nullable +as Address,ownerAddress: null == ownerAddress ? _self.ownerAddress : ownerAddress // ignore: cast_nullable_to_non_nullable +as Address,balance: null == balance ? _self.balance : balance // ignore: cast_nullable_to_non_nullable +as BigInt, + )); +} +/// Create a copy of TokenWalletDetails +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get rootAddress { + + return $AddressCopyWith<$Res>(_self.rootAddress, (value) { + return _then(_self.copyWith(rootAddress: value)); + }); +}/// Create a copy of TokenWalletDetails +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get ownerAddress { + + return $AddressCopyWith<$Res>(_self.ownerAddress, (value) { + return _then(_self.copyWith(ownerAddress: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [TokenWalletDetails]. +extension TokenWalletDetailsPatterns on TokenWalletDetails { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TokenWalletDetails value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TokenWalletDetails() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TokenWalletDetails value) $default,){ +final _that = this; +switch (_that) { +case _TokenWalletDetails(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TokenWalletDetails value)? $default,){ +final _that = this; +switch (_that) { +case _TokenWalletDetails() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Address rootAddress, Address ownerAddress, BigInt balance)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TokenWalletDetails() when $default != null: +return $default(_that.rootAddress,_that.ownerAddress,_that.balance);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Address rootAddress, Address ownerAddress, BigInt balance) $default,) {final _that = this; +switch (_that) { +case _TokenWalletDetails(): +return $default(_that.rootAddress,_that.ownerAddress,_that.balance);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Address rootAddress, Address ownerAddress, BigInt balance)? $default,) {final _that = this; +switch (_that) { +case _TokenWalletDetails() when $default != null: +return $default(_that.rootAddress,_that.ownerAddress,_that.balance);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _TokenWalletDetails implements TokenWalletDetails { - const _TokenWalletDetails( - {required this.rootAddress, - required this.ownerAddress, - required this.balance}); - factory _TokenWalletDetails.fromJson(Map json) => - _$TokenWalletDetailsFromJson(json); - - @override - final Address rootAddress; - @override - final Address ownerAddress; - @override - final BigInt balance; - - /// Create a copy of TokenWalletDetails - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TokenWalletDetailsCopyWith<_TokenWalletDetails> get copyWith => - __$TokenWalletDetailsCopyWithImpl<_TokenWalletDetails>(this, _$identity); - - @override - Map toJson() { - return _$TokenWalletDetailsToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TokenWalletDetails && - (identical(other.rootAddress, rootAddress) || - other.rootAddress == rootAddress) && - (identical(other.ownerAddress, ownerAddress) || - other.ownerAddress == ownerAddress) && - (identical(other.balance, balance) || other.balance == balance)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, rootAddress, ownerAddress, balance); - - @override - String toString() { - return 'TokenWalletDetails(rootAddress: $rootAddress, ownerAddress: $ownerAddress, balance: $balance)'; - } + const _TokenWalletDetails({required this.rootAddress, required this.ownerAddress, required this.balance}); + factory _TokenWalletDetails.fromJson(Map json) => _$TokenWalletDetailsFromJson(json); + +@override final Address rootAddress; +@override final Address ownerAddress; +@override final BigInt balance; + +/// Create a copy of TokenWalletDetails +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TokenWalletDetailsCopyWith<_TokenWalletDetails> get copyWith => __$TokenWalletDetailsCopyWithImpl<_TokenWalletDetails>(this, _$identity); + +@override +Map toJson() { + return _$TokenWalletDetailsToJson(this, ); } -/// @nodoc -abstract mixin class _$TokenWalletDetailsCopyWith<$Res> - implements $TokenWalletDetailsCopyWith<$Res> { - factory _$TokenWalletDetailsCopyWith( - _TokenWalletDetails value, $Res Function(_TokenWalletDetails) _then) = - __$TokenWalletDetailsCopyWithImpl; - @override - @useResult - $Res call({Address rootAddress, Address ownerAddress, BigInt balance}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TokenWalletDetails&&(identical(other.rootAddress, rootAddress) || other.rootAddress == rootAddress)&&(identical(other.ownerAddress, ownerAddress) || other.ownerAddress == ownerAddress)&&(identical(other.balance, balance) || other.balance == balance)); +} - @override - $AddressCopyWith<$Res> get rootAddress; - @override - $AddressCopyWith<$Res> get ownerAddress; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,rootAddress,ownerAddress,balance); + +@override +String toString() { + return 'TokenWalletDetails(rootAddress: $rootAddress, ownerAddress: $ownerAddress, balance: $balance)'; } + +} + +/// @nodoc +abstract mixin class _$TokenWalletDetailsCopyWith<$Res> implements $TokenWalletDetailsCopyWith<$Res> { + factory _$TokenWalletDetailsCopyWith(_TokenWalletDetails value, $Res Function(_TokenWalletDetails) _then) = __$TokenWalletDetailsCopyWithImpl; +@override @useResult +$Res call({ + Address rootAddress, Address ownerAddress, BigInt balance +}); + + +@override $AddressCopyWith<$Res> get rootAddress;@override $AddressCopyWith<$Res> get ownerAddress; + +} /// @nodoc class __$TokenWalletDetailsCopyWithImpl<$Res> implements _$TokenWalletDetailsCopyWith<$Res> { @@ -198,50 +278,36 @@ class __$TokenWalletDetailsCopyWithImpl<$Res> final _TokenWalletDetails _self; final $Res Function(_TokenWalletDetails) _then; - /// Create a copy of TokenWalletDetails - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? rootAddress = null, - Object? ownerAddress = null, - Object? balance = null, - }) { - return _then(_TokenWalletDetails( - rootAddress: null == rootAddress - ? _self.rootAddress - : rootAddress // ignore: cast_nullable_to_non_nullable - as Address, - ownerAddress: null == ownerAddress - ? _self.ownerAddress - : ownerAddress // ignore: cast_nullable_to_non_nullable - as Address, - balance: null == balance - ? _self.balance - : balance // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } - - /// Create a copy of TokenWalletDetails - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get rootAddress { - return $AddressCopyWith<$Res>(_self.rootAddress, (value) { - return _then(_self.copyWith(rootAddress: value)); - }); - } - - /// Create a copy of TokenWalletDetails - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get ownerAddress { - return $AddressCopyWith<$Res>(_self.ownerAddress, (value) { - return _then(_self.copyWith(ownerAddress: value)); - }); - } +/// Create a copy of TokenWalletDetails +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? rootAddress = null,Object? ownerAddress = null,Object? balance = null,}) { + return _then(_TokenWalletDetails( +rootAddress: null == rootAddress ? _self.rootAddress : rootAddress // ignore: cast_nullable_to_non_nullable +as Address,ownerAddress: null == ownerAddress ? _self.ownerAddress : ownerAddress // ignore: cast_nullable_to_non_nullable +as Address,balance: null == balance ? _self.balance : balance // ignore: cast_nullable_to_non_nullable +as BigInt, + )); +} + +/// Create a copy of TokenWalletDetails +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get rootAddress { + + return $AddressCopyWith<$Res>(_self.rootAddress, (value) { + return _then(_self.copyWith(rootAddress: value)); + }); +}/// Create a copy of TokenWalletDetails +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get ownerAddress { + + return $AddressCopyWith<$Res>(_self.ownerAddress, (value) { + return _then(_self.copyWith(ownerAddress: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_wallet_version.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_wallet_version.dart index c475c097..eaae9585 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_wallet_version.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/token_wallet_version.dart @@ -2,10 +2,7 @@ import 'package:json_annotation/json_annotation.dart'; part 'token_wallet_version.g.dart'; -@JsonEnum( - alwaysCreate: true, - fieldRename: FieldRename.pascal, -) +@JsonEnum(alwaysCreate: true, fieldRename: FieldRename.pascal) enum TokenWalletVersion { oldTip3v4, tip3; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/transfer_recipient.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/transfer_recipient.freezed.dart index 594a1738..b6f765de 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/transfer_recipient.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/transfer_recipient.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,63 +11,73 @@ part of 'transfer_recipient.dart'; // dart format off T _$identity(T value) => value; -TransferRecipient _$TransferRecipientFromJson(Map json) { - switch (json['type']) { - case 'ownerWallet': - return TransferRecipientOwnerWallet.fromJson(json); - case 'tokenWallet': - return TransferRecipientTokenWallet.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'type', 'TransferRecipient', - 'Invalid union type "${json['type']}"!'); - } +TransferRecipient _$TransferRecipientFromJson( + Map json +) { + switch (json['type']) { + case 'ownerWallet': + return TransferRecipientOwnerWallet.fromJson( + json + ); + case 'tokenWallet': + return TransferRecipientTokenWallet.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'TransferRecipient', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$TransferRecipient { - Address get data; - /// Create a copy of TransferRecipient - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransferRecipientCopyWith get copyWith => - _$TransferRecipientCopyWithImpl( - this as TransferRecipient, _$identity); + Address get data; +/// Create a copy of TransferRecipient +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransferRecipientCopyWith get copyWith => _$TransferRecipientCopyWithImpl(this as TransferRecipient, _$identity); /// Serializes this TransferRecipient to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransferRecipient && - (identical(other.data, data) || other.data == data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransferRecipient&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); - @override - String toString() { - return 'TransferRecipient(data: $data)'; - } +@override +String toString() { + return 'TransferRecipient(data: $data)'; } -/// @nodoc -abstract mixin class $TransferRecipientCopyWith<$Res> { - factory $TransferRecipientCopyWith( - TransferRecipient value, $Res Function(TransferRecipient) _then) = - _$TransferRecipientCopyWithImpl; - @useResult - $Res call({Address data}); - $AddressCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $TransferRecipientCopyWith<$Res> { + factory $TransferRecipientCopyWith(TransferRecipient value, $Res Function(TransferRecipient) _then) = _$TransferRecipientCopyWithImpl; +@useResult +$Res call({ + Address data +}); + + +$AddressCopyWith<$Res> get data; + +} /// @nodoc class _$TransferRecipientCopyWithImpl<$Res> implements $TransferRecipientCopyWith<$Res> { @@ -77,95 +86,210 @@ class _$TransferRecipientCopyWithImpl<$Res> final TransferRecipient _self; final $Res Function(TransferRecipient) _then; - /// Create a copy of TransferRecipient - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_self.copyWith( - data: null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of TransferRecipient - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get data { - return $AddressCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of TransferRecipient +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? data = null,}) { + return _then(_self.copyWith( +data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as Address, + )); +} +/// Create a copy of TransferRecipient +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get data { + + return $AddressCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [TransferRecipient]. +extension TransferRecipientPatterns on TransferRecipient { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( TransferRecipientOwnerWallet value)? ownerWallet,TResult Function( TransferRecipientTokenWallet value)? tokenWallet,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case TransferRecipientOwnerWallet() when ownerWallet != null: +return ownerWallet(_that);case TransferRecipientTokenWallet() when tokenWallet != null: +return tokenWallet(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( TransferRecipientOwnerWallet value) ownerWallet,required TResult Function( TransferRecipientTokenWallet value) tokenWallet,}){ +final _that = this; +switch (_that) { +case TransferRecipientOwnerWallet(): +return ownerWallet(_that);case TransferRecipientTokenWallet(): +return tokenWallet(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( TransferRecipientOwnerWallet value)? ownerWallet,TResult? Function( TransferRecipientTokenWallet value)? tokenWallet,}){ +final _that = this; +switch (_that) { +case TransferRecipientOwnerWallet() when ownerWallet != null: +return ownerWallet(_that);case TransferRecipientTokenWallet() when tokenWallet != null: +return tokenWallet(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( Address data)? ownerWallet,TResult Function( Address data)? tokenWallet,required TResult orElse(),}) {final _that = this; +switch (_that) { +case TransferRecipientOwnerWallet() when ownerWallet != null: +return ownerWallet(_that.data);case TransferRecipientTokenWallet() when tokenWallet != null: +return tokenWallet(_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( Address data) ownerWallet,required TResult Function( Address data) tokenWallet,}) {final _that = this; +switch (_that) { +case TransferRecipientOwnerWallet(): +return ownerWallet(_that.data);case TransferRecipientTokenWallet(): +return tokenWallet(_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( Address data)? ownerWallet,TResult? Function( Address data)? tokenWallet,}) {final _that = this; +switch (_that) { +case TransferRecipientOwnerWallet() when ownerWallet != null: +return ownerWallet(_that.data);case TransferRecipientTokenWallet() when tokenWallet != null: +return tokenWallet(_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class TransferRecipientOwnerWallet implements TransferRecipient { - const TransferRecipientOwnerWallet(this.data, {final String? $type}) - : $type = $type ?? 'ownerWallet'; - factory TransferRecipientOwnerWallet.fromJson(Map json) => - _$TransferRecipientOwnerWalletFromJson(json); - - @override - final Address data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TransferRecipient - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransferRecipientOwnerWalletCopyWith - get copyWith => _$TransferRecipientOwnerWalletCopyWithImpl< - TransferRecipientOwnerWallet>(this, _$identity); - - @override - Map toJson() { - return _$TransferRecipientOwnerWalletToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransferRecipientOwnerWallet && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TransferRecipient.ownerWallet(data: $data)'; - } + const TransferRecipientOwnerWallet(this.data, {final String? $type}): $type = $type ?? 'ownerWallet'; + factory TransferRecipientOwnerWallet.fromJson(Map json) => _$TransferRecipientOwnerWalletFromJson(json); + +@override final Address data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TransferRecipient +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransferRecipientOwnerWalletCopyWith get copyWith => _$TransferRecipientOwnerWalletCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TransferRecipientOwnerWalletToJson(this, ); } -/// @nodoc -abstract mixin class $TransferRecipientOwnerWalletCopyWith<$Res> - implements $TransferRecipientCopyWith<$Res> { - factory $TransferRecipientOwnerWalletCopyWith( - TransferRecipientOwnerWallet value, - $Res Function(TransferRecipientOwnerWallet) _then) = - _$TransferRecipientOwnerWalletCopyWithImpl; - @override - @useResult - $Res call({Address data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransferRecipientOwnerWallet&&(identical(other.data, data) || other.data == data)); +} - @override - $AddressCopyWith<$Res> get data; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TransferRecipient.ownerWallet(data: $data)'; } + +} + +/// @nodoc +abstract mixin class $TransferRecipientOwnerWalletCopyWith<$Res> implements $TransferRecipientCopyWith<$Res> { + factory $TransferRecipientOwnerWalletCopyWith(TransferRecipientOwnerWallet value, $Res Function(TransferRecipientOwnerWallet) _then) = _$TransferRecipientOwnerWalletCopyWithImpl; +@override @useResult +$Res call({ + Address data +}); + + +@override $AddressCopyWith<$Res> get data; + +} /// @nodoc class _$TransferRecipientOwnerWalletCopyWithImpl<$Res> implements $TransferRecipientOwnerWalletCopyWith<$Res> { @@ -174,95 +298,80 @@ class _$TransferRecipientOwnerWalletCopyWithImpl<$Res> final TransferRecipientOwnerWallet _self; final $Res Function(TransferRecipientOwnerWallet) _then; - /// Create a copy of TransferRecipient - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TransferRecipientOwnerWallet( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of TransferRecipient - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get data { - return $AddressCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of TransferRecipient +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TransferRecipientOwnerWallet( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as Address, + )); +} + +/// Create a copy of TransferRecipient +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get data { + + return $AddressCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class TransferRecipientTokenWallet implements TransferRecipient { - const TransferRecipientTokenWallet(this.data, {final String? $type}) - : $type = $type ?? 'tokenWallet'; - factory TransferRecipientTokenWallet.fromJson(Map json) => - _$TransferRecipientTokenWalletFromJson(json); - - @override - final Address data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TransferRecipient - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransferRecipientTokenWalletCopyWith - get copyWith => _$TransferRecipientTokenWalletCopyWithImpl< - TransferRecipientTokenWallet>(this, _$identity); - - @override - Map toJson() { - return _$TransferRecipientTokenWalletToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransferRecipientTokenWallet && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TransferRecipient.tokenWallet(data: $data)'; - } + const TransferRecipientTokenWallet(this.data, {final String? $type}): $type = $type ?? 'tokenWallet'; + factory TransferRecipientTokenWallet.fromJson(Map json) => _$TransferRecipientTokenWalletFromJson(json); + +@override final Address data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TransferRecipient +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransferRecipientTokenWalletCopyWith get copyWith => _$TransferRecipientTokenWalletCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TransferRecipientTokenWalletToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransferRecipientTokenWallet&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TransferRecipient.tokenWallet(data: $data)'; } -/// @nodoc -abstract mixin class $TransferRecipientTokenWalletCopyWith<$Res> - implements $TransferRecipientCopyWith<$Res> { - factory $TransferRecipientTokenWalletCopyWith( - TransferRecipientTokenWallet value, - $Res Function(TransferRecipientTokenWallet) _then) = - _$TransferRecipientTokenWalletCopyWithImpl; - @override - @useResult - $Res call({Address data}); - @override - $AddressCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $TransferRecipientTokenWalletCopyWith<$Res> implements $TransferRecipientCopyWith<$Res> { + factory $TransferRecipientTokenWalletCopyWith(TransferRecipientTokenWallet value, $Res Function(TransferRecipientTokenWallet) _then) = _$TransferRecipientTokenWalletCopyWithImpl; +@override @useResult +$Res call({ + Address data +}); + + +@override $AddressCopyWith<$Res> get data; + +} /// @nodoc class _$TransferRecipientTokenWalletCopyWithImpl<$Res> implements $TransferRecipientTokenWalletCopyWith<$Res> { @@ -271,30 +380,25 @@ class _$TransferRecipientTokenWalletCopyWithImpl<$Res> final TransferRecipientTokenWallet _self; final $Res Function(TransferRecipientTokenWallet) _then; - /// Create a copy of TransferRecipient - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TransferRecipientTokenWallet( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of TransferRecipient - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get data { - return $AddressCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of TransferRecipient +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TransferRecipientTokenWallet( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as Address, + )); +} + +/// Create a copy of TransferRecipient +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get data { + + return $AddressCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/transfer_recipient.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/transfer_recipient.g.dart index 4dbdabcd..d5e88403 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/transfer_recipient.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/models/transfer_recipient.g.dart @@ -7,29 +7,23 @@ part of 'transfer_recipient.dart'; // ************************************************************************** TransferRecipientOwnerWallet _$TransferRecipientOwnerWalletFromJson( - Map json) => - TransferRecipientOwnerWallet( - Address.fromJson(json['data'] as String), - $type: json['type'] as String?, - ); + Map json, +) => TransferRecipientOwnerWallet( + Address.fromJson(json['data'] as String), + $type: json['type'] as String?, +); Map _$TransferRecipientOwnerWalletToJson( - TransferRecipientOwnerWallet instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + TransferRecipientOwnerWallet instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; TransferRecipientTokenWallet _$TransferRecipientTokenWalletFromJson( - Map json) => - TransferRecipientTokenWallet( - Address.fromJson(json['data'] as String), - $type: json['type'] as String?, - ); + Map json, +) => TransferRecipientTokenWallet( + Address.fromJson(json['data'] as String), + $type: json['type'] as String?, +); Map _$TransferRecipientTokenWalletToJson( - TransferRecipientTokenWallet instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + TransferRecipientTokenWallet instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/token_wallet.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/token_wallet.dart index 73d01a14..d13e0656 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/token_wallet.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/token_wallet.dart @@ -2,37 +2,33 @@ import 'dart:async'; import 'dart:convert'; import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart'; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart'; -import 'package:reflectable/mirrors.dart'; +import 'package:money2/money2.dart'; import 'package:rxdart/rxdart.dart'; -import 'token_wallet.reflectable.dart'; - /// Implementation of nekoton's TonWallet. /// /// If you need watch wallet changes, you can subscribe to [fieldUpdatesStream] /// and be ready if any suitable data changes, but this won't notify about external -/// events emitted through [onMessageSentStream], [onMessageExpiredStream], -/// or [onTransactionsFoundStream]. -/// [onStateChangedStream] changes internal state, so it will lead updating data. -@reflector -class TokenWallet extends RustToDartMirrorInterface - implements RefreshingInterface { +/// events emitted through [onTransactionsFoundStream]. +class TokenWallet implements RefreshingInterface { late TokenWalletDartWrapper wallet; final Transport transport; /// Flag that display [onStateChanged] that [wallet] was initialized. bool _isInitialized = false; bool _isTransactionsPreloaded = false; + bool _isDisposed = false; /// Controllers that contains data that emits from rust. final _onBalanceChangedController = BehaviorSubject(); final _onMoneyBalanceChangedController = BehaviorSubject(); - final _onTransactionsFoundController = BehaviorSubject< - ( - List>, - TransactionsBatchInfo - )>(); + final _onTransactionsFoundController = + BehaviorSubject< + ( + List>, + TransactionsBatchInfo, + ) + >(); /// Description information about wallet that could be changed and updated /// during [_updateData]. It means, that fields could be changed after any @@ -40,6 +36,8 @@ class TokenWallet extends RustToDartMirrorInterface late ContractState _contractState; late BigInt balance; + bool get isDisposed => _isDisposed; + Money get moneyBalance => Money.fromBigIntWithCurrency(balance, currency); /// Triggers subscribers when [_updateData] completes @@ -74,23 +72,23 @@ class TokenWallet extends RustToDartMirrorInterface required Address owner, required Address rootTokenContract, bool preloadTransactions = false, - }) => - transport.use(() async { - final instance = TokenWallet._(transport, rootTokenContract); - - instance.wallet = await TokenWalletDartWrapper.subscribe( - instanceHash: instance.instanceHash, - transport: transport.transportBox, - rootTokenContract: rootTokenContract.address, - owner: owner.address, - preloadTransactions: preloadTransactions, - ); - - await instance._initInstance(); - instance._isTransactionsPreloaded = preloadTransactions; - - return instance; - }); + }) => transport.use(() async { + final instance = TokenWallet._(transport, rootTokenContract); + + instance.wallet = await TokenWalletDartWrapper.subscribe( + transport: transport.transportBox, + rootTokenContract: rootTokenContract.address, + owner: owner.address, + preloadTransactions: preloadTransactions, + onBalanceChanged: instance.onBalanceChanged, + onTransactionsFound: instance.onTransactionsFound, + ); + + await instance._initInstance(); + instance._isTransactionsPreloaded = preloadTransactions; + + return instance; + }); /// If any error occurs during first initialization of wallet, it will dispose /// wallet and rethrow error; @@ -132,10 +130,9 @@ class TokenWallet extends RustToDartMirrorInterface /// /// To update data of this stream, wallet must be refreshed via [refresh]. Stream< - ( - List>, - TransactionsBatchInfo - )> get onTransactionsFoundStream => _onTransactionsFoundController.stream; + (List>, TransactionsBatchInfo) + > + get onTransactionsFoundStream => _onTransactionsFoundController.stream; /// Get address of owner of wallet. Future
_getOwner() async => Address(address: await wallet.owner()); @@ -228,7 +225,7 @@ class TokenWallet extends RustToDartMirrorInterface /// May throw error. @override Future refresh() async { - if (_isRefreshing || transport.disposed || avoidCall) return; + if (_isRefreshing || transport.disposed || isDisposed) return; try { _isRefreshing = true; @@ -249,7 +246,7 @@ class TokenWallet extends RustToDartMirrorInterface /// [fromLt] - offset for loading data, string representation of u64 /// May throw error. Future preloadTransactions([String? fromLt]) async { - if (avoidCall) return; + if (isDisposed) return; _isTransactionsPreloaded = true; await wallet.preloadTransactions( @@ -262,7 +259,7 @@ class TokenWallet extends RustToDartMirrorInterface /// [block] - base64-encoded Block that could be got from [GqlTransport.getBlock] /// May throw error. Future handleBlock({required String block}) async { - if (avoidCall) return; + if (isDisposed) return; await wallet.handleBlock(block: block); await _updateData(); @@ -274,7 +271,7 @@ class TokenWallet extends RustToDartMirrorInterface /// 1: RootTokenContractDetails /// or throw error static Future<(TokenWalletDetails, RootTokenContractDetails)> - getTokenWalletDetails({ + getTokenWalletDetails({ required Transport transport, required Address address, }) async { @@ -296,7 +293,7 @@ class TokenWallet extends RustToDartMirrorInterface /// 1: RootTokenContractDetails of root contract /// or throw error. static Future<(Address, RootTokenContractDetails)> - getTokenRootDetailsFromTokenWallet({ + getTokenRootDetailsFromTokenWallet({ required Transport transport, required Address address, }) async { @@ -332,7 +329,7 @@ class TokenWallet extends RustToDartMirrorInterface /// Calls from rust side when balance of wallet has been changed void onBalanceChanged(String balance) { - if (avoidCall) return; + if (isDisposed) return; _onBalanceChangedController.add(BigInt.parse(balance)); @@ -344,7 +341,7 @@ class TokenWallet extends RustToDartMirrorInterface /// Calls from rust side when transactions of wallet has been found void onTransactionsFound(String payload) { - if (avoidCall) return; + if (isDisposed) return; final json = jsonDecode(payload) as List; @@ -375,20 +372,21 @@ class TokenWallet extends RustToDartMirrorInterface Future _updateData() async { if (transport.disposed) return; - if (avoidCall) return; + if (isDisposed) return; _contractState = await getContractState(); - if (avoidCall) return; + if (isDisposed) return; balance = BigInt.parse(await _getBalance()); - if (avoidCall) return; + if (isDisposed) return; // Initialization is completed, so we have Currency already created _onMoneyBalanceChangedController.add(moneyBalance); _fieldsUpdateController.add(null); } Currency _getCurrency() { - final patternDigits = - symbol.decimals > 0 ? '0.${'#' * symbol.decimals}' : '0'; + final patternDigits = symbol.decimals > 0 + ? '0.${'#' * symbol.decimals}' + : '0'; final currency = Currency.create( symbol.name, symbol.decimals, @@ -400,21 +398,12 @@ class TokenWallet extends RustToDartMirrorInterface return currency; } - @override void dispose() { + _isDisposed = true; wallet.innerWallet.dispose(); _onBalanceChangedController.close(); _onMoneyBalanceChangedController.close(); _onTransactionsFoundController.close(); _fieldsUpdateController.close(); - super.dispose(); - } - - @override - InstanceMirror initializeMirror() { - initializeReflectable(); // auto-generated reflectable file - return reflector.reflect(this); } } - -void main() {} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/token_wallet.reflectable.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/token_wallet.reflectable.dart deleted file mode 100644 index df6fb39f..00000000 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/token_wallet.reflectable.dart +++ /dev/null @@ -1,808 +0,0 @@ -// This file has been generated by the reflectable package. -// https://github.com/dart-lang/reflectable. -import 'dart:core'; -import 'package:flutter_nekoton_bridge/nekoton/core/generic_contract/generic_contract.dart' - as prefix7; -import 'package:flutter_nekoton_bridge/nekoton/core/jetton_wallet/jetton_wallet.dart' - as prefix8; -import 'package:flutter_nekoton_bridge/nekoton/core/ton_wallet/ton_wallet.dart' - as prefix9; -import 'package:flutter_nekoton_bridge/nekoton/external/gql_connection.dart' - as prefix2; -import 'package:flutter_nekoton_bridge/nekoton/external/jrpc_connection.dart' - as prefix4; -import 'package:flutter_nekoton_bridge/nekoton/external/ledger_connection.dart' - as prefix5; -import 'package:flutter_nekoton_bridge/nekoton/external/proto_connection.dart' - as prefix3; -import 'package:flutter_nekoton_bridge/nekoton/external/storage.dart' - as prefix6; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart' as prefix0; -import 'token_wallet.dart' as prefix1; - -// ignore_for_file: camel_case_types -// ignore_for_file: implementation_imports -// ignore_for_file: prefer_adjacent_string_concatenation -// ignore_for_file: prefer_collection_literals -// ignore_for_file: unnecessary_const -// ignore_for_file: unused_import -// ignore_for_file: sdk_version_since - -import 'package:reflectable/mirrors.dart' as m; -import 'package:reflectable/src/reflectable_builder_based.dart' as r; -import 'package:reflectable/reflectable.dart' as r show Reflectable; - -final _data = { - const prefix0.Reflector(): r.ReflectorData( - [ - r.NonGenericClassMirrorImpl( - r'TokenWallet', - r'.TokenWallet', - 134217735, - 0, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix1.TokenWallet.subscribe, - r'getTokenWalletDetails': () => - prefix1.TokenWallet.getTokenWalletDetails, - r'getTokenRootDetailsFromTokenWallet': () => - prefix1.TokenWallet.getTokenRootDetailsFromTokenWallet, - r'getTokenRootDetails': () => prefix1.TokenWallet.getTokenRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 1, - r'prepareTransfer': 2, - r'refresh': 0, - r'preloadTransactions': 3, - r'handleBlock': 4, - r'onBalanceChanged': 7, - r'onTransactionsFound': 7, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 7, - r'transport': 0, - r'balance': 0, - r'balance=': 7, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 7, - r'owner': 0, - r'owner=': 7, - r'symbol': 0, - r'symbol=': 7, - r'currency': 0, - r'currency=': 7, - r'version': 0, - r'version=': 7, - r'moneyBalance': 0, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onMoneyBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 0, - r'getTokenWalletDetails': 5, - r'getTokenRootDetailsFromTokenWallet': 5, - r'getTokenRootDetails': 6, - }, - ), - r.NonGenericClassMirrorImpl( - r'GqlConnection', - r'.GqlConnection', - 134217735, - 1, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix2.GqlConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 7, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 7, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 8, - }, - ), - r.NonGenericClassMirrorImpl( - r'ProtoConnection', - r'.ProtoConnection', - 134217735, - 2, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix3.ProtoConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 7, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 7, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 8, - }, - ), - r.NonGenericClassMirrorImpl( - r'JrpcConnection', - r'.JrpcConnection', - 134217735, - 3, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix4.JrpcConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 7, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 7, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 8, - }, - ), - r.NonGenericClassMirrorImpl( - r'LedgerConnection', - r'.LedgerConnection', - 134217735, - 4, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix5.LedgerConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getPublicKey': 7, - r'sign': 9, - r'signTransaction': 10, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 7, - r'create': 7, - }, - ), - r.NonGenericClassMirrorImpl( - r'Storage', - r'.Storage', - 134217735, - 5, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix6.Storage.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'get': 7, - r'set': 12, - r'setUnchecked': 12, - r'remove': 12, - r'removeUnchecked': 12, - r'initializeMirror': 0, - r'storage': 0, - r'storage=': 7, - r'create': 11, - }, - ), - r.NonGenericClassMirrorImpl( - r'GenericContract', - r'.GenericContract', - 134217735, - 6, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'subscribe': () => prefix7.GenericContract.subscribe}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'executeTransactionLocally': 14, - r'estimateFees': 14, - r'send': 14, - r'refresh': 0, - r'preloadTransactions': 15, - r'handleBlock': 4, - r'onMessageSent': 7, - r'onMessageExpired': 7, - r'onStateChanged': 7, - r'onTransactionsFound': 7, - r'initializeMirror': 0, - r'contract': 0, - r'contract=': 7, - r'transport': 0, - r'address': 0, - r'address=': 7, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 13, - }, - ), - r.NonGenericClassMirrorImpl( - r'JettonWallet', - r'.JettonWallet', - 134217735, - 7, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix8.JettonWallet.subscribe, - r'getJettonWalletDetails': () => - prefix8.JettonWallet.getJettonWalletDetails, - r'getJettonRootDetailsFromJettonWallet': () => - prefix8.JettonWallet.getJettonRootDetailsFromJettonWallet, - r'getJettonRootDetails': () => - prefix8.JettonWallet.getJettonRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 1, - r'prepareTransfer': 16, - r'refresh': 0, - r'preloadTransactions': 3, - r'handleBlock': 4, - r'onBalanceChanged': 7, - r'onTransactionsFound': 7, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 7, - r'transport': 0, - r'balance': 0, - r'balance=': 7, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 7, - r'owner': 0, - r'owner=': 7, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 0, - r'getJettonWalletDetails': 5, - r'getJettonRootDetailsFromJettonWallet': 5, - r'getJettonRootDetails': 6, - }, - ), - r.NonGenericClassMirrorImpl( - r'TonWallet', - r'.TonWallet', - 134217735, - 8, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix9.TonWallet.subscribe, - r'subscribeByAddress': () => prefix9.TonWallet.subscribeByAddress, - r'subscribeByExistingWallet': () => - prefix9.TonWallet.subscribeByExistingWallet, - r'appendSignatureToWalletV5R1Payload': () => - prefix9.TonWallet.appendSignatureToWalletV5R1Payload, - r'findExistingWallets': () => prefix9.TonWallet.findExistingWallets, - r'getExistingWalletInfo': () => - prefix9.TonWallet.getExistingWalletInfo, - r'getWalletCustodians': () => prefix9.TonWallet.getWalletCustodians, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 7, - r'toString': 0, - r'noSuchMethod': 7, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'getUnconfirmedTransactions': 0, - r'getCustodians': 0, - r'prepareDeploy': 20, - r'prepareDeployWithMultipleOwners': 21, - r'prepareTransfer': 22, - r'prepareWalletV5R1MessageBody': 23, - r'prepareNonexistWalletV5R1MessageBody': 23, - r'prepareConfirmTransaction': 24, - r'estimateFees': 25, - r'send': 14, - r'refresh': 0, - r'preloadTransactions': 15, - r'handleBlock': 4, - r'makeStateInit': 0, - r'getWalletV5R1Seqno': 22, - r'onMessageSent': 7, - r'onMessageExpired': 7, - r'onStateChanged': 7, - r'onTransactionsFound': 7, - r'onDetailsChanged': 7, - r'onCustodiansChanged': 7, - r'onUnconfirmedTransactionsChanged': 7, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 7, - r'transport': 0, - r'publicKey': 0, - r'publicKey=': 7, - r'address': 0, - r'address=': 7, - r'walletType': 0, - r'walletType=': 7, - r'workchain': 0, - r'workchain=': 7, - r'custodians': 0, - r'details': 0, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'unconfirmedTransactions': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 17, - r'subscribeByAddress': 5, - r'subscribeByExistingWallet': 18, - r'appendSignatureToWalletV5R1Payload': 19, - r'findExistingWallets': 26, - r'getExistingWalletInfo': 5, - r'getWalletCustodians': 5, - }, - ), - ], - null, - null, - [ - prefix1.TokenWallet, - prefix2.GqlConnection, - prefix3.ProtoConnection, - prefix4.JrpcConnection, - prefix5.LedgerConnection, - prefix6.Storage, - prefix7.GenericContract, - prefix8.JettonWallet, - prefix9.TonWallet, - ], - 9, - { - r'==': (dynamic instance) => (x) => instance == x, - r'toString': (dynamic instance) => instance.toString, - r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, - r'hashCode': (dynamic instance) => instance.hashCode, - r'runtimeType': (dynamic instance) => instance.runtimeType, - r'init': (dynamic instance) => instance.init, - r'dispose': (dynamic instance) => instance.dispose, - r'instanceHash': (dynamic instance) => instance.instanceHash, - r'avoidCall': (dynamic instance) => instance.avoidCall, - r'getContractState': (dynamic instance) => instance.getContractState, - r'estimateMinAttachedAmount': (dynamic instance) => - instance.estimateMinAttachedAmount, - r'prepareTransfer': (dynamic instance) => instance.prepareTransfer, - r'refresh': (dynamic instance) => instance.refresh, - r'preloadTransactions': (dynamic instance) => - instance.preloadTransactions, - r'handleBlock': (dynamic instance) => instance.handleBlock, - r'onBalanceChanged': (dynamic instance) => instance.onBalanceChanged, - r'onTransactionsFound': (dynamic instance) => - instance.onTransactionsFound, - r'initializeMirror': (dynamic instance) => instance.initializeMirror, - r'wallet': (dynamic instance) => instance.wallet, - r'transport': (dynamic instance) => instance.transport, - r'balance': (dynamic instance) => instance.balance, - r'rootTokenContract': (dynamic instance) => instance.rootTokenContract, - r'tokenAddress': (dynamic instance) => instance.tokenAddress, - r'owner': (dynamic instance) => instance.owner, - r'symbol': (dynamic instance) => instance.symbol, - r'currency': (dynamic instance) => instance.currency, - r'version': (dynamic instance) => instance.version, - r'moneyBalance': (dynamic instance) => instance.moneyBalance, - r'isTransactionsPreloaded': (dynamic instance) => - instance.isTransactionsPreloaded, - r'contractState': (dynamic instance) => instance.contractState, - r'fieldUpdatesStream': (dynamic instance) => instance.fieldUpdatesStream, - r'onBalanceChangedStream': (dynamic instance) => - instance.onBalanceChangedStream, - r'onMoneyBalanceChangedStream': (dynamic instance) => - instance.onMoneyBalanceChangedStream, - r'onTransactionsFoundStream': (dynamic instance) => - instance.onTransactionsFoundStream, - r'refreshDescription': (dynamic instance) => instance.refreshDescription, - r'post': (dynamic instance) => instance.post, - r'connection': (dynamic instance) => instance.connection, - r'settings': (dynamic instance) => instance.settings, - r'type': (dynamic instance) => instance.type, - r'name': (dynamic instance) => instance.name, - r'group': (dynamic instance) => instance.group, - r'getPublicKey': (dynamic instance) => instance.getPublicKey, - r'sign': (dynamic instance) => instance.sign, - r'signTransaction': (dynamic instance) => instance.signTransaction, - r'get': (dynamic instance) => instance.get, - r'set': (dynamic instance) => instance.set, - r'setUnchecked': (dynamic instance) => instance.setUnchecked, - r'remove': (dynamic instance) => instance.remove, - r'removeUnchecked': (dynamic instance) => instance.removeUnchecked, - r'storage': (dynamic instance) => instance.storage, - r'getPendingTransactions': (dynamic instance) => - instance.getPendingTransactions, - r'getPollingMethod': (dynamic instance) => instance.getPollingMethod, - r'executeTransactionLocally': (dynamic instance) => - instance.executeTransactionLocally, - r'estimateFees': (dynamic instance) => instance.estimateFees, - r'send': (dynamic instance) => instance.send, - r'onMessageSent': (dynamic instance) => instance.onMessageSent, - r'onMessageExpired': (dynamic instance) => instance.onMessageExpired, - r'onStateChanged': (dynamic instance) => instance.onStateChanged, - r'contract': (dynamic instance) => instance.contract, - r'address': (dynamic instance) => instance.address, - r'pendingTransactions': (dynamic instance) => - instance.pendingTransactions, - r'pollingMethod': (dynamic instance) => instance.pollingMethod, - r'onMessageSentStream': (dynamic instance) => - instance.onMessageSentStream, - r'onMessageExpiredStream': (dynamic instance) => - instance.onMessageExpiredStream, - r'onStateChangedStream': (dynamic instance) => - instance.onStateChangedStream, - r'getUnconfirmedTransactions': (dynamic instance) => - instance.getUnconfirmedTransactions, - r'getCustodians': (dynamic instance) => instance.getCustodians, - r'prepareDeploy': (dynamic instance) => instance.prepareDeploy, - r'prepareDeployWithMultipleOwners': (dynamic instance) => - instance.prepareDeployWithMultipleOwners, - r'prepareWalletV5R1MessageBody': (dynamic instance) => - instance.prepareWalletV5R1MessageBody, - r'prepareNonexistWalletV5R1MessageBody': (dynamic instance) => - instance.prepareNonexistWalletV5R1MessageBody, - r'prepareConfirmTransaction': (dynamic instance) => - instance.prepareConfirmTransaction, - r'makeStateInit': (dynamic instance) => instance.makeStateInit, - r'getWalletV5R1Seqno': (dynamic instance) => instance.getWalletV5R1Seqno, - r'onDetailsChanged': (dynamic instance) => instance.onDetailsChanged, - r'onCustodiansChanged': (dynamic instance) => - instance.onCustodiansChanged, - r'onUnconfirmedTransactionsChanged': (dynamic instance) => - instance.onUnconfirmedTransactionsChanged, - r'publicKey': (dynamic instance) => instance.publicKey, - r'walletType': (dynamic instance) => instance.walletType, - r'workchain': (dynamic instance) => instance.workchain, - r'custodians': (dynamic instance) => instance.custodians, - r'details': (dynamic instance) => instance.details, - r'unconfirmedTransactions': (dynamic instance) => - instance.unconfirmedTransactions, - }, - { - r'wallet=': (dynamic instance, value) => instance.wallet = value, - r'balance=': (dynamic instance, value) => instance.balance = value, - r'tokenAddress=': (dynamic instance, value) => - instance.tokenAddress = value, - r'owner=': (dynamic instance, value) => instance.owner = value, - r'symbol=': (dynamic instance, value) => instance.symbol = value, - r'currency=': (dynamic instance, value) => instance.currency = value, - r'version=': (dynamic instance, value) => instance.version = value, - r'connection=': (dynamic instance, value) => instance.connection = value, - r'storage=': (dynamic instance, value) => instance.storage = value, - r'contract=': (dynamic instance, value) => instance.contract = value, - r'address=': (dynamic instance, value) => instance.address = value, - r'publicKey=': (dynamic instance, value) => instance.publicKey = value, - r'walletType=': (dynamic instance, value) => instance.walletType = value, - r'workchain=': (dynamic instance, value) => instance.workchain = value, - }, - null, - [ - const [ - 0, - 0, - const [#transport, #owner, #rootTokenContract, #preloadTransactions], - ], - const [ - 0, - 0, - const [#destination, #amount, #notifyReceiver, #payload], - ], - const [ - 0, - 0, - const [ - #destination, - #amount, - #notifyReceiver, - #attachedAmount, - #payload, - #remainingGasTo, - ], - ], - const [1, 1, null], - const [ - 0, - 0, - const [#block], - ], - const [ - 0, - 0, - const [#transport, #address], - ], - const [ - 0, - 0, - const [#transport, #tokenRoot], - ], - const [1, 0, null], - const [ - 0, - 0, - const [#client, #settings, #name, #group], - ], - const [3, 0, null], - const [5, 0, null], - const [ - 0, - 0, - const [#get, #set, #setUnchecked, #remove, #removeUnchecked], - ], - const [ - 0, - 0, - const [#key, #value], - ], - const [ - 0, - 0, - const [#transport, #address, #preloadTransactions], - ], - const [ - 0, - 0, - const [#signedMessage, #options], - ], - const [ - 0, - 0, - const [#fromLt], - ], - const [ - 0, - 0, - const [ - #amount, - #destination, - #remainingGasTo, - #callbackValue, - #customPayload, - #callbackPayload, - #attachedAmount, - ], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletType], - ], - const [ - 0, - 0, - const [#transport, #existingWallet], - ], - const [ - 0, - 0, - const [#payload, #base64Signature], - ], - const [ - 0, - 0, - const [#expiration], - ], - const [ - 0, - 0, - const [#expiration, #custodians, #reqConfirms, #expirationTime], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #expiration, #params], - ], - const [ - 0, - 0, - const [ - #contractState, - #publicKey, - #expiration, - #params, - #isInternalFlow, - ], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #transactionId, #expiration], - ], - const [ - 0, - 0, - const [#signedMessage, #executionOptions], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletTypes], - ], - ], - ), -}; - -final _memberSymbolMap = null; - -void initializeReflectable() { - r.data = _data; - r.memberSymbolMap = _memberSymbolMap; -} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/token_wallet_lib.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/token_wallet_lib.dart index 230fa586..a5fcd4dd 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/token_wallet_lib.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/token_wallet/token_wallet_lib.dart @@ -1,4 +1,4 @@ -export 'token_wallet.dart' hide main; +export 'token_wallet.dart'; export 'models/on_balance_changed_payload.dart'; export 'models/root_token_contract_details.dart'; export 'models/symbol.dart'; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_on_round_complete_notification.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_on_round_complete_notification.dart index 0ad65cc6..bd150032 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_on_round_complete_notification.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_on_round_complete_notification.dart @@ -17,6 +17,6 @@ sealed class DePoolOnRoundCompleteNotification }) = _DePoolOnRoundCompleteNotification; factory DePoolOnRoundCompleteNotification.fromJson( - Map json) => - _$DePoolOnRoundCompleteNotificationFromJson(json); + Map json, + ) => _$DePoolOnRoundCompleteNotificationFromJson(json); } diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_on_round_complete_notification.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_on_round_complete_notification.freezed.dart index 4f70d112..3a795dca 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_on_round_complete_notification.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_on_round_complete_notification.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,72 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$DePoolOnRoundCompleteNotification { - String get roundId; - BigInt get reward; - BigInt get ordinaryStake; - BigInt get vestingStake; - BigInt get lockStake; - bool get reinvest; - int get reason; - - /// Create a copy of DePoolOnRoundCompleteNotification - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DePoolOnRoundCompleteNotificationCopyWith - get copyWith => _$DePoolOnRoundCompleteNotificationCopyWithImpl< - DePoolOnRoundCompleteNotification>( - this as DePoolOnRoundCompleteNotification, _$identity); + + String get roundId; BigInt get reward; BigInt get ordinaryStake; BigInt get vestingStake; BigInt get lockStake; bool get reinvest; int get reason; +/// Create a copy of DePoolOnRoundCompleteNotification +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DePoolOnRoundCompleteNotificationCopyWith get copyWith => _$DePoolOnRoundCompleteNotificationCopyWithImpl(this as DePoolOnRoundCompleteNotification, _$identity); /// Serializes this DePoolOnRoundCompleteNotification to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DePoolOnRoundCompleteNotification && - (identical(other.roundId, roundId) || other.roundId == roundId) && - (identical(other.reward, reward) || other.reward == reward) && - (identical(other.ordinaryStake, ordinaryStake) || - other.ordinaryStake == ordinaryStake) && - (identical(other.vestingStake, vestingStake) || - other.vestingStake == vestingStake) && - (identical(other.lockStake, lockStake) || - other.lockStake == lockStake) && - (identical(other.reinvest, reinvest) || - other.reinvest == reinvest) && - (identical(other.reason, reason) || other.reason == reason)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, roundId, reward, ordinaryStake, - vestingStake, lockStake, reinvest, reason); - - @override - String toString() { - return 'DePoolOnRoundCompleteNotification(roundId: $roundId, reward: $reward, ordinaryStake: $ordinaryStake, vestingStake: $vestingStake, lockStake: $lockStake, reinvest: $reinvest, reason: $reason)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DePoolOnRoundCompleteNotification&&(identical(other.roundId, roundId) || other.roundId == roundId)&&(identical(other.reward, reward) || other.reward == reward)&&(identical(other.ordinaryStake, ordinaryStake) || other.ordinaryStake == ordinaryStake)&&(identical(other.vestingStake, vestingStake) || other.vestingStake == vestingStake)&&(identical(other.lockStake, lockStake) || other.lockStake == lockStake)&&(identical(other.reinvest, reinvest) || other.reinvest == reinvest)&&(identical(other.reason, reason) || other.reason == reason)); } -/// @nodoc -abstract mixin class $DePoolOnRoundCompleteNotificationCopyWith<$Res> { - factory $DePoolOnRoundCompleteNotificationCopyWith( - DePoolOnRoundCompleteNotification value, - $Res Function(DePoolOnRoundCompleteNotification) _then) = - _$DePoolOnRoundCompleteNotificationCopyWithImpl; - @useResult - $Res call( - {String roundId, - BigInt reward, - BigInt ordinaryStake, - BigInt vestingStake, - BigInt lockStake, - bool reinvest, - int reason}); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,roundId,reward,ordinaryStake,vestingStake,lockStake,reinvest,reason); + +@override +String toString() { + return 'DePoolOnRoundCompleteNotification(roundId: $roundId, reward: $reward, ordinaryStake: $ordinaryStake, vestingStake: $vestingStake, lockStake: $lockStake, reinvest: $reinvest, reason: $reason)'; +} + + } +/// @nodoc +abstract mixin class $DePoolOnRoundCompleteNotificationCopyWith<$Res> { + factory $DePoolOnRoundCompleteNotificationCopyWith(DePoolOnRoundCompleteNotification value, $Res Function(DePoolOnRoundCompleteNotification) _then) = _$DePoolOnRoundCompleteNotificationCopyWithImpl; +@useResult +$Res call({ + String roundId, BigInt reward, BigInt ordinaryStake, BigInt vestingStake, BigInt lockStake, bool reinvest, int reason +}); + + + + +} /// @nodoc class _$DePoolOnRoundCompleteNotificationCopyWithImpl<$Res> implements $DePoolOnRoundCompleteNotificationCopyWith<$Res> { @@ -89,148 +63,203 @@ class _$DePoolOnRoundCompleteNotificationCopyWithImpl<$Res> final DePoolOnRoundCompleteNotification _self; final $Res Function(DePoolOnRoundCompleteNotification) _then; - /// Create a copy of DePoolOnRoundCompleteNotification - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? roundId = null, - Object? reward = null, - Object? ordinaryStake = null, - Object? vestingStake = null, - Object? lockStake = null, - Object? reinvest = null, - Object? reason = null, - }) { - return _then(_self.copyWith( - roundId: null == roundId - ? _self.roundId - : roundId // ignore: cast_nullable_to_non_nullable - as String, - reward: null == reward - ? _self.reward - : reward // ignore: cast_nullable_to_non_nullable - as BigInt, - ordinaryStake: null == ordinaryStake - ? _self.ordinaryStake - : ordinaryStake // ignore: cast_nullable_to_non_nullable - as BigInt, - vestingStake: null == vestingStake - ? _self.vestingStake - : vestingStake // ignore: cast_nullable_to_non_nullable - as BigInt, - lockStake: null == lockStake - ? _self.lockStake - : lockStake // ignore: cast_nullable_to_non_nullable - as BigInt, - reinvest: null == reinvest - ? _self.reinvest - : reinvest // ignore: cast_nullable_to_non_nullable - as bool, - reason: null == reason - ? _self.reason - : reason // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of DePoolOnRoundCompleteNotification +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? roundId = null,Object? reward = null,Object? ordinaryStake = null,Object? vestingStake = null,Object? lockStake = null,Object? reinvest = null,Object? reason = null,}) { + return _then(_self.copyWith( +roundId: null == roundId ? _self.roundId : roundId // ignore: cast_nullable_to_non_nullable +as String,reward: null == reward ? _self.reward : reward // ignore: cast_nullable_to_non_nullable +as BigInt,ordinaryStake: null == ordinaryStake ? _self.ordinaryStake : ordinaryStake // ignore: cast_nullable_to_non_nullable +as BigInt,vestingStake: null == vestingStake ? _self.vestingStake : vestingStake // ignore: cast_nullable_to_non_nullable +as BigInt,lockStake: null == lockStake ? _self.lockStake : lockStake // ignore: cast_nullable_to_non_nullable +as BigInt,reinvest: null == reinvest ? _self.reinvest : reinvest // ignore: cast_nullable_to_non_nullable +as bool,reason: null == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [DePoolOnRoundCompleteNotification]. +extension DePoolOnRoundCompleteNotificationPatterns on DePoolOnRoundCompleteNotification { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DePoolOnRoundCompleteNotification value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DePoolOnRoundCompleteNotification() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DePoolOnRoundCompleteNotification value) $default,){ +final _that = this; +switch (_that) { +case _DePoolOnRoundCompleteNotification(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DePoolOnRoundCompleteNotification value)? $default,){ +final _that = this; +switch (_that) { +case _DePoolOnRoundCompleteNotification() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String roundId, BigInt reward, BigInt ordinaryStake, BigInt vestingStake, BigInt lockStake, bool reinvest, int reason)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DePoolOnRoundCompleteNotification() when $default != null: +return $default(_that.roundId,_that.reward,_that.ordinaryStake,_that.vestingStake,_that.lockStake,_that.reinvest,_that.reason);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String roundId, BigInt reward, BigInt ordinaryStake, BigInt vestingStake, BigInt lockStake, bool reinvest, int reason) $default,) {final _that = this; +switch (_that) { +case _DePoolOnRoundCompleteNotification(): +return $default(_that.roundId,_that.reward,_that.ordinaryStake,_that.vestingStake,_that.lockStake,_that.reinvest,_that.reason);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String roundId, BigInt reward, BigInt ordinaryStake, BigInt vestingStake, BigInt lockStake, bool reinvest, int reason)? $default,) {final _that = this; +switch (_that) { +case _DePoolOnRoundCompleteNotification() when $default != null: +return $default(_that.roundId,_that.reward,_that.ordinaryStake,_that.vestingStake,_that.lockStake,_that.reinvest,_that.reason);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _DePoolOnRoundCompleteNotification - implements DePoolOnRoundCompleteNotification { - const _DePoolOnRoundCompleteNotification( - {required this.roundId, - required this.reward, - required this.ordinaryStake, - required this.vestingStake, - required this.lockStake, - required this.reinvest, - required this.reason}); - factory _DePoolOnRoundCompleteNotification.fromJson( - Map json) => - _$DePoolOnRoundCompleteNotificationFromJson(json); - - @override - final String roundId; - @override - final BigInt reward; - @override - final BigInt ordinaryStake; - @override - final BigInt vestingStake; - @override - final BigInt lockStake; - @override - final bool reinvest; - @override - final int reason; - - /// Create a copy of DePoolOnRoundCompleteNotification - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DePoolOnRoundCompleteNotificationCopyWith< - _DePoolOnRoundCompleteNotification> - get copyWith => __$DePoolOnRoundCompleteNotificationCopyWithImpl< - _DePoolOnRoundCompleteNotification>(this, _$identity); - - @override - Map toJson() { - return _$DePoolOnRoundCompleteNotificationToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DePoolOnRoundCompleteNotification && - (identical(other.roundId, roundId) || other.roundId == roundId) && - (identical(other.reward, reward) || other.reward == reward) && - (identical(other.ordinaryStake, ordinaryStake) || - other.ordinaryStake == ordinaryStake) && - (identical(other.vestingStake, vestingStake) || - other.vestingStake == vestingStake) && - (identical(other.lockStake, lockStake) || - other.lockStake == lockStake) && - (identical(other.reinvest, reinvest) || - other.reinvest == reinvest) && - (identical(other.reason, reason) || other.reason == reason)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, roundId, reward, ordinaryStake, - vestingStake, lockStake, reinvest, reason); - - @override - String toString() { - return 'DePoolOnRoundCompleteNotification(roundId: $roundId, reward: $reward, ordinaryStake: $ordinaryStake, vestingStake: $vestingStake, lockStake: $lockStake, reinvest: $reinvest, reason: $reason)'; - } + +class _DePoolOnRoundCompleteNotification implements DePoolOnRoundCompleteNotification { + const _DePoolOnRoundCompleteNotification({required this.roundId, required this.reward, required this.ordinaryStake, required this.vestingStake, required this.lockStake, required this.reinvest, required this.reason}); + factory _DePoolOnRoundCompleteNotification.fromJson(Map json) => _$DePoolOnRoundCompleteNotificationFromJson(json); + +@override final String roundId; +@override final BigInt reward; +@override final BigInt ordinaryStake; +@override final BigInt vestingStake; +@override final BigInt lockStake; +@override final bool reinvest; +@override final int reason; + +/// Create a copy of DePoolOnRoundCompleteNotification +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DePoolOnRoundCompleteNotificationCopyWith<_DePoolOnRoundCompleteNotification> get copyWith => __$DePoolOnRoundCompleteNotificationCopyWithImpl<_DePoolOnRoundCompleteNotification>(this, _$identity); + +@override +Map toJson() { + return _$DePoolOnRoundCompleteNotificationToJson(this, ); } -/// @nodoc -abstract mixin class _$DePoolOnRoundCompleteNotificationCopyWith<$Res> - implements $DePoolOnRoundCompleteNotificationCopyWith<$Res> { - factory _$DePoolOnRoundCompleteNotificationCopyWith( - _DePoolOnRoundCompleteNotification value, - $Res Function(_DePoolOnRoundCompleteNotification) _then) = - __$DePoolOnRoundCompleteNotificationCopyWithImpl; - @override - @useResult - $Res call( - {String roundId, - BigInt reward, - BigInt ordinaryStake, - BigInt vestingStake, - BigInt lockStake, - bool reinvest, - int reason}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DePoolOnRoundCompleteNotification&&(identical(other.roundId, roundId) || other.roundId == roundId)&&(identical(other.reward, reward) || other.reward == reward)&&(identical(other.ordinaryStake, ordinaryStake) || other.ordinaryStake == ordinaryStake)&&(identical(other.vestingStake, vestingStake) || other.vestingStake == vestingStake)&&(identical(other.lockStake, lockStake) || other.lockStake == lockStake)&&(identical(other.reinvest, reinvest) || other.reinvest == reinvest)&&(identical(other.reason, reason) || other.reason == reason)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,roundId,reward,ordinaryStake,vestingStake,lockStake,reinvest,reason); + +@override +String toString() { + return 'DePoolOnRoundCompleteNotification(roundId: $roundId, reward: $reward, ordinaryStake: $ordinaryStake, vestingStake: $vestingStake, lockStake: $lockStake, reinvest: $reinvest, reason: $reason)'; +} + + } +/// @nodoc +abstract mixin class _$DePoolOnRoundCompleteNotificationCopyWith<$Res> implements $DePoolOnRoundCompleteNotificationCopyWith<$Res> { + factory _$DePoolOnRoundCompleteNotificationCopyWith(_DePoolOnRoundCompleteNotification value, $Res Function(_DePoolOnRoundCompleteNotification) _then) = __$DePoolOnRoundCompleteNotificationCopyWithImpl; +@override @useResult +$Res call({ + String roundId, BigInt reward, BigInt ordinaryStake, BigInt vestingStake, BigInt lockStake, bool reinvest, int reason +}); + + + + +} /// @nodoc class __$DePoolOnRoundCompleteNotificationCopyWithImpl<$Res> implements _$DePoolOnRoundCompleteNotificationCopyWith<$Res> { @@ -239,50 +268,22 @@ class __$DePoolOnRoundCompleteNotificationCopyWithImpl<$Res> final _DePoolOnRoundCompleteNotification _self; final $Res Function(_DePoolOnRoundCompleteNotification) _then; - /// Create a copy of DePoolOnRoundCompleteNotification - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? roundId = null, - Object? reward = null, - Object? ordinaryStake = null, - Object? vestingStake = null, - Object? lockStake = null, - Object? reinvest = null, - Object? reason = null, - }) { - return _then(_DePoolOnRoundCompleteNotification( - roundId: null == roundId - ? _self.roundId - : roundId // ignore: cast_nullable_to_non_nullable - as String, - reward: null == reward - ? _self.reward - : reward // ignore: cast_nullable_to_non_nullable - as BigInt, - ordinaryStake: null == ordinaryStake - ? _self.ordinaryStake - : ordinaryStake // ignore: cast_nullable_to_non_nullable - as BigInt, - vestingStake: null == vestingStake - ? _self.vestingStake - : vestingStake // ignore: cast_nullable_to_non_nullable - as BigInt, - lockStake: null == lockStake - ? _self.lockStake - : lockStake // ignore: cast_nullable_to_non_nullable - as BigInt, - reinvest: null == reinvest - ? _self.reinvest - : reinvest // ignore: cast_nullable_to_non_nullable - as bool, - reason: null == reason - ? _self.reason - : reason // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of DePoolOnRoundCompleteNotification +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? roundId = null,Object? reward = null,Object? ordinaryStake = null,Object? vestingStake = null,Object? lockStake = null,Object? reinvest = null,Object? reason = null,}) { + return _then(_DePoolOnRoundCompleteNotification( +roundId: null == roundId ? _self.roundId : roundId // ignore: cast_nullable_to_non_nullable +as String,reward: null == reward ? _self.reward : reward // ignore: cast_nullable_to_non_nullable +as BigInt,ordinaryStake: null == ordinaryStake ? _self.ordinaryStake : ordinaryStake // ignore: cast_nullable_to_non_nullable +as BigInt,vestingStake: null == vestingStake ? _self.vestingStake : vestingStake // ignore: cast_nullable_to_non_nullable +as BigInt,lockStake: null == lockStake ? _self.lockStake : lockStake // ignore: cast_nullable_to_non_nullable +as BigInt,reinvest: null == reinvest ? _self.reinvest : reinvest // ignore: cast_nullable_to_non_nullable +as bool,reason: null == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_on_round_complete_notification.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_on_round_complete_notification.g.dart index e8873905..a8e334db 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_on_round_complete_notification.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_on_round_complete_notification.g.dart @@ -7,25 +7,25 @@ part of 'de_pool_on_round_complete_notification.dart'; // ************************************************************************** _DePoolOnRoundCompleteNotification _$DePoolOnRoundCompleteNotificationFromJson( - Map json) => - _DePoolOnRoundCompleteNotification( - roundId: json['roundId'] as String, - reward: BigInt.parse(json['reward'] as String), - ordinaryStake: BigInt.parse(json['ordinaryStake'] as String), - vestingStake: BigInt.parse(json['vestingStake'] as String), - lockStake: BigInt.parse(json['lockStake'] as String), - reinvest: json['reinvest'] as bool, - reason: (json['reason'] as num).toInt(), - ); + Map json, +) => _DePoolOnRoundCompleteNotification( + roundId: json['roundId'] as String, + reward: BigInt.parse(json['reward'] as String), + ordinaryStake: BigInt.parse(json['ordinaryStake'] as String), + vestingStake: BigInt.parse(json['vestingStake'] as String), + lockStake: BigInt.parse(json['lockStake'] as String), + reinvest: json['reinvest'] as bool, + reason: (json['reason'] as num).toInt(), +); Map _$DePoolOnRoundCompleteNotificationToJson( - _DePoolOnRoundCompleteNotification instance) => - { - 'roundId': instance.roundId, - 'reward': instance.reward.toString(), - 'ordinaryStake': instance.ordinaryStake.toString(), - 'vestingStake': instance.vestingStake.toString(), - 'lockStake': instance.lockStake.toString(), - 'reinvest': instance.reinvest, - 'reason': instance.reason, - }; + _DePoolOnRoundCompleteNotification instance, +) => { + 'roundId': instance.roundId, + 'reward': instance.reward.toString(), + 'ordinaryStake': instance.ordinaryStake.toString(), + 'vestingStake': instance.vestingStake.toString(), + 'lockStake': instance.lockStake.toString(), + 'reinvest': instance.reinvest, + 'reason': instance.reason, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_receive_answer_notification.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_receive_answer_notification.freezed.dart index d6e6bd48..9105148d 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_receive_answer_notification.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_receive_answer_notification.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,51 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$DePoolReceiveAnswerNotification { - int get errorCode; - String get comment; - - /// Create a copy of DePoolReceiveAnswerNotification - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DePoolReceiveAnswerNotificationCopyWith - get copyWith => _$DePoolReceiveAnswerNotificationCopyWithImpl< - DePoolReceiveAnswerNotification>( - this as DePoolReceiveAnswerNotification, _$identity); + + int get errorCode; String get comment; +/// Create a copy of DePoolReceiveAnswerNotification +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DePoolReceiveAnswerNotificationCopyWith get copyWith => _$DePoolReceiveAnswerNotificationCopyWithImpl(this as DePoolReceiveAnswerNotification, _$identity); /// Serializes this DePoolReceiveAnswerNotification to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DePoolReceiveAnswerNotification && - (identical(other.errorCode, errorCode) || - other.errorCode == errorCode) && - (identical(other.comment, comment) || other.comment == comment)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, errorCode, comment); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DePoolReceiveAnswerNotification&&(identical(other.errorCode, errorCode) || other.errorCode == errorCode)&&(identical(other.comment, comment) || other.comment == comment)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,errorCode,comment); - @override - String toString() { - return 'DePoolReceiveAnswerNotification(errorCode: $errorCode, comment: $comment)'; - } +@override +String toString() { + return 'DePoolReceiveAnswerNotification(errorCode: $errorCode, comment: $comment)'; } -/// @nodoc -abstract mixin class $DePoolReceiveAnswerNotificationCopyWith<$Res> { - factory $DePoolReceiveAnswerNotificationCopyWith( - DePoolReceiveAnswerNotification value, - $Res Function(DePoolReceiveAnswerNotification) _then) = - _$DePoolReceiveAnswerNotificationCopyWithImpl; - @useResult - $Res call({int errorCode, String comment}); + } +/// @nodoc +abstract mixin class $DePoolReceiveAnswerNotificationCopyWith<$Res> { + factory $DePoolReceiveAnswerNotificationCopyWith(DePoolReceiveAnswerNotification value, $Res Function(DePoolReceiveAnswerNotification) _then) = _$DePoolReceiveAnswerNotificationCopyWithImpl; +@useResult +$Res call({ + int errorCode, String comment +}); + + + + +} /// @nodoc class _$DePoolReceiveAnswerNotificationCopyWithImpl<$Res> implements $DePoolReceiveAnswerNotificationCopyWith<$Res> { @@ -68,90 +63,193 @@ class _$DePoolReceiveAnswerNotificationCopyWithImpl<$Res> final DePoolReceiveAnswerNotification _self; final $Res Function(DePoolReceiveAnswerNotification) _then; - /// Create a copy of DePoolReceiveAnswerNotification - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? errorCode = null, - Object? comment = null, - }) { - return _then(_self.copyWith( - errorCode: null == errorCode - ? _self.errorCode - : errorCode // ignore: cast_nullable_to_non_nullable - as int, - comment: null == comment - ? _self.comment - : comment // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of DePoolReceiveAnswerNotification +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? errorCode = null,Object? comment = null,}) { + return _then(_self.copyWith( +errorCode: null == errorCode ? _self.errorCode : errorCode // ignore: cast_nullable_to_non_nullable +as int,comment: null == comment ? _self.comment : comment // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [DePoolReceiveAnswerNotification]. +extension DePoolReceiveAnswerNotificationPatterns on DePoolReceiveAnswerNotification { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DePoolReceiveAnswerNotification value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DePoolReceiveAnswerNotification() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DePoolReceiveAnswerNotification value) $default,){ +final _that = this; +switch (_that) { +case _DePoolReceiveAnswerNotification(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DePoolReceiveAnswerNotification value)? $default,){ +final _that = this; +switch (_that) { +case _DePoolReceiveAnswerNotification() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int errorCode, String comment)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DePoolReceiveAnswerNotification() when $default != null: +return $default(_that.errorCode,_that.comment);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int errorCode, String comment) $default,) {final _that = this; +switch (_that) { +case _DePoolReceiveAnswerNotification(): +return $default(_that.errorCode,_that.comment);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int errorCode, String comment)? $default,) {final _that = this; +switch (_that) { +case _DePoolReceiveAnswerNotification() when $default != null: +return $default(_that.errorCode,_that.comment);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _DePoolReceiveAnswerNotification - implements DePoolReceiveAnswerNotification { - const _DePoolReceiveAnswerNotification( - {required this.errorCode, required this.comment}); - factory _DePoolReceiveAnswerNotification.fromJson( - Map json) => - _$DePoolReceiveAnswerNotificationFromJson(json); - - @override - final int errorCode; - @override - final String comment; - - /// Create a copy of DePoolReceiveAnswerNotification - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DePoolReceiveAnswerNotificationCopyWith<_DePoolReceiveAnswerNotification> - get copyWith => __$DePoolReceiveAnswerNotificationCopyWithImpl< - _DePoolReceiveAnswerNotification>(this, _$identity); - - @override - Map toJson() { - return _$DePoolReceiveAnswerNotificationToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DePoolReceiveAnswerNotification && - (identical(other.errorCode, errorCode) || - other.errorCode == errorCode) && - (identical(other.comment, comment) || other.comment == comment)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, errorCode, comment); - - @override - String toString() { - return 'DePoolReceiveAnswerNotification(errorCode: $errorCode, comment: $comment)'; - } + +class _DePoolReceiveAnswerNotification implements DePoolReceiveAnswerNotification { + const _DePoolReceiveAnswerNotification({required this.errorCode, required this.comment}); + factory _DePoolReceiveAnswerNotification.fromJson(Map json) => _$DePoolReceiveAnswerNotificationFromJson(json); + +@override final int errorCode; +@override final String comment; + +/// Create a copy of DePoolReceiveAnswerNotification +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DePoolReceiveAnswerNotificationCopyWith<_DePoolReceiveAnswerNotification> get copyWith => __$DePoolReceiveAnswerNotificationCopyWithImpl<_DePoolReceiveAnswerNotification>(this, _$identity); + +@override +Map toJson() { + return _$DePoolReceiveAnswerNotificationToJson(this, ); } -/// @nodoc -abstract mixin class _$DePoolReceiveAnswerNotificationCopyWith<$Res> - implements $DePoolReceiveAnswerNotificationCopyWith<$Res> { - factory _$DePoolReceiveAnswerNotificationCopyWith( - _DePoolReceiveAnswerNotification value, - $Res Function(_DePoolReceiveAnswerNotification) _then) = - __$DePoolReceiveAnswerNotificationCopyWithImpl; - @override - @useResult - $Res call({int errorCode, String comment}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DePoolReceiveAnswerNotification&&(identical(other.errorCode, errorCode) || other.errorCode == errorCode)&&(identical(other.comment, comment) || other.comment == comment)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,errorCode,comment); + +@override +String toString() { + return 'DePoolReceiveAnswerNotification(errorCode: $errorCode, comment: $comment)'; +} + + } +/// @nodoc +abstract mixin class _$DePoolReceiveAnswerNotificationCopyWith<$Res> implements $DePoolReceiveAnswerNotificationCopyWith<$Res> { + factory _$DePoolReceiveAnswerNotificationCopyWith(_DePoolReceiveAnswerNotification value, $Res Function(_DePoolReceiveAnswerNotification) _then) = __$DePoolReceiveAnswerNotificationCopyWithImpl; +@override @useResult +$Res call({ + int errorCode, String comment +}); + + + + +} /// @nodoc class __$DePoolReceiveAnswerNotificationCopyWithImpl<$Res> implements _$DePoolReceiveAnswerNotificationCopyWith<$Res> { @@ -160,25 +258,17 @@ class __$DePoolReceiveAnswerNotificationCopyWithImpl<$Res> final _DePoolReceiveAnswerNotification _self; final $Res Function(_DePoolReceiveAnswerNotification) _then; - /// Create a copy of DePoolReceiveAnswerNotification - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? errorCode = null, - Object? comment = null, - }) { - return _then(_DePoolReceiveAnswerNotification( - errorCode: null == errorCode - ? _self.errorCode - : errorCode // ignore: cast_nullable_to_non_nullable - as int, - comment: null == comment - ? _self.comment - : comment // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of DePoolReceiveAnswerNotification +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? errorCode = null,Object? comment = null,}) { + return _then(_DePoolReceiveAnswerNotification( +errorCode: null == errorCode ? _self.errorCode : errorCode // ignore: cast_nullable_to_non_nullable +as int,comment: null == comment ? _self.comment : comment // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_receive_answer_notification.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_receive_answer_notification.g.dart index 09312adb..bb7fed3f 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_receive_answer_notification.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/de_pool_receive_answer_notification.g.dart @@ -7,15 +7,15 @@ part of 'de_pool_receive_answer_notification.dart'; // ************************************************************************** _DePoolReceiveAnswerNotification _$DePoolReceiveAnswerNotificationFromJson( - Map json) => - _DePoolReceiveAnswerNotification( - errorCode: (json['errorCode'] as num).toInt(), - comment: json['comment'] as String, - ); + Map json, +) => _DePoolReceiveAnswerNotification( + errorCode: (json['errorCode'] as num).toInt(), + comment: json['comment'] as String, +); Map _$DePoolReceiveAnswerNotificationToJson( - _DePoolReceiveAnswerNotification instance) => - { - 'errorCode': instance.errorCode, - 'comment': instance.comment, - }; + _DePoolReceiveAnswerNotification instance, +) => { + 'errorCode': instance.errorCode, + 'comment': instance.comment, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/existing_wallet_info.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/existing_wallet_info.freezed.dart index 7017bb9e..6ce4f35a 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/existing_wallet_info.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/existing_wallet_info.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,65 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$ExistingWalletInfo { - Address get address; - PublicKey get publicKey; - WalletType get walletType; - ContractState get contractState; - - /// Create a copy of ExistingWalletInfo - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $ExistingWalletInfoCopyWith get copyWith => - _$ExistingWalletInfoCopyWithImpl( - this as ExistingWalletInfo, _$identity); + + Address get address; PublicKey get publicKey; WalletType get walletType; ContractState get contractState; +/// Create a copy of ExistingWalletInfo +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$ExistingWalletInfoCopyWith get copyWith => _$ExistingWalletInfoCopyWithImpl(this as ExistingWalletInfo, _$identity); /// Serializes this ExistingWalletInfo to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is ExistingWalletInfo && - (identical(other.address, address) || other.address == address) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.walletType, walletType) || - other.walletType == walletType) && - (identical(other.contractState, contractState) || - other.contractState == contractState)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, address, publicKey, walletType, contractState); - - @override - String toString() { - return 'ExistingWalletInfo(address: $address, publicKey: $publicKey, walletType: $walletType, contractState: $contractState)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is ExistingWalletInfo&&(identical(other.address, address) || other.address == address)&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.walletType, walletType) || other.walletType == walletType)&&(identical(other.contractState, contractState) || other.contractState == contractState)); } -/// @nodoc -abstract mixin class $ExistingWalletInfoCopyWith<$Res> { - factory $ExistingWalletInfoCopyWith( - ExistingWalletInfo value, $Res Function(ExistingWalletInfo) _then) = - _$ExistingWalletInfoCopyWithImpl; - @useResult - $Res call( - {Address address, - PublicKey publicKey, - WalletType walletType, - ContractState contractState}); - - $AddressCopyWith<$Res> get address; - $PublicKeyCopyWith<$Res> get publicKey; - $WalletTypeCopyWith<$Res> get walletType; - $ContractStateCopyWith<$Res> get contractState; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,address,publicKey,walletType,contractState); + +@override +String toString() { + return 'ExistingWalletInfo(address: $address, publicKey: $publicKey, walletType: $walletType, contractState: $contractState)'; } + +} + +/// @nodoc +abstract mixin class $ExistingWalletInfoCopyWith<$Res> { + factory $ExistingWalletInfoCopyWith(ExistingWalletInfo value, $Res Function(ExistingWalletInfo) _then) = _$ExistingWalletInfoCopyWithImpl; +@useResult +$Res call({ + Address address, PublicKey publicKey, WalletType walletType, ContractState contractState +}); + + +$AddressCopyWith<$Res> get address;$PublicKeyCopyWith<$Res> get publicKey;$WalletTypeCopyWith<$Res> get walletType;$ContractStateCopyWith<$Res> get contractState; + +} /// @nodoc class _$ExistingWalletInfoCopyWithImpl<$Res> implements $ExistingWalletInfoCopyWith<$Res> { @@ -82,161 +63,233 @@ class _$ExistingWalletInfoCopyWithImpl<$Res> final ExistingWalletInfo _self; final $Res Function(ExistingWalletInfo) _then; - /// Create a copy of ExistingWalletInfo - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? address = null, - Object? publicKey = null, - Object? walletType = null, - Object? contractState = null, - }) { - return _then(_self.copyWith( - address: null == address - ? _self.address - : address // ignore: cast_nullable_to_non_nullable - as Address, - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - walletType: null == walletType - ? _self.walletType - : walletType // ignore: cast_nullable_to_non_nullable - as WalletType, - contractState: null == contractState - ? _self.contractState - : contractState // ignore: cast_nullable_to_non_nullable - as ContractState, - )); - } - - /// Create a copy of ExistingWalletInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get address { - return $AddressCopyWith<$Res>(_self.address, (value) { - return _then(_self.copyWith(address: value)); - }); - } - - /// Create a copy of ExistingWalletInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } - - /// Create a copy of ExistingWalletInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $WalletTypeCopyWith<$Res> get walletType { - return $WalletTypeCopyWith<$Res>(_self.walletType, (value) { - return _then(_self.copyWith(walletType: value)); - }); - } - - /// Create a copy of ExistingWalletInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $ContractStateCopyWith<$Res> get contractState { - return $ContractStateCopyWith<$Res>(_self.contractState, (value) { - return _then(_self.copyWith(contractState: value)); - }); - } +/// Create a copy of ExistingWalletInfo +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? address = null,Object? publicKey = null,Object? walletType = null,Object? contractState = null,}) { + return _then(_self.copyWith( +address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as Address,publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,walletType: null == walletType ? _self.walletType : walletType // ignore: cast_nullable_to_non_nullable +as WalletType,contractState: null == contractState ? _self.contractState : contractState // ignore: cast_nullable_to_non_nullable +as ContractState, + )); +} +/// Create a copy of ExistingWalletInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get address { + + return $AddressCopyWith<$Res>(_self.address, (value) { + return _then(_self.copyWith(address: value)); + }); +}/// Create a copy of ExistingWalletInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of ExistingWalletInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$WalletTypeCopyWith<$Res> get walletType { + + return $WalletTypeCopyWith<$Res>(_self.walletType, (value) { + return _then(_self.copyWith(walletType: value)); + }); +}/// Create a copy of ExistingWalletInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$ContractStateCopyWith<$Res> get contractState { + + return $ContractStateCopyWith<$Res>(_self.contractState, (value) { + return _then(_self.copyWith(contractState: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [ExistingWalletInfo]. +extension ExistingWalletInfoPatterns on ExistingWalletInfo { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _ExistingWalletInfo value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _ExistingWalletInfo() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _ExistingWalletInfo value) $default,){ +final _that = this; +switch (_that) { +case _ExistingWalletInfo(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _ExistingWalletInfo value)? $default,){ +final _that = this; +switch (_that) { +case _ExistingWalletInfo() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Address address, PublicKey publicKey, WalletType walletType, ContractState contractState)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _ExistingWalletInfo() when $default != null: +return $default(_that.address,_that.publicKey,_that.walletType,_that.contractState);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Address address, PublicKey publicKey, WalletType walletType, ContractState contractState) $default,) {final _that = this; +switch (_that) { +case _ExistingWalletInfo(): +return $default(_that.address,_that.publicKey,_that.walletType,_that.contractState);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Address address, PublicKey publicKey, WalletType walletType, ContractState contractState)? $default,) {final _that = this; +switch (_that) { +case _ExistingWalletInfo() when $default != null: +return $default(_that.address,_that.publicKey,_that.walletType,_that.contractState);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _ExistingWalletInfo implements ExistingWalletInfo { - const _ExistingWalletInfo( - {required this.address, - required this.publicKey, - required this.walletType, - required this.contractState}); - factory _ExistingWalletInfo.fromJson(Map json) => - _$ExistingWalletInfoFromJson(json); - - @override - final Address address; - @override - final PublicKey publicKey; - @override - final WalletType walletType; - @override - final ContractState contractState; - - /// Create a copy of ExistingWalletInfo - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$ExistingWalletInfoCopyWith<_ExistingWalletInfo> get copyWith => - __$ExistingWalletInfoCopyWithImpl<_ExistingWalletInfo>(this, _$identity); - - @override - Map toJson() { - return _$ExistingWalletInfoToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _ExistingWalletInfo && - (identical(other.address, address) || other.address == address) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.walletType, walletType) || - other.walletType == walletType) && - (identical(other.contractState, contractState) || - other.contractState == contractState)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, address, publicKey, walletType, contractState); - - @override - String toString() { - return 'ExistingWalletInfo(address: $address, publicKey: $publicKey, walletType: $walletType, contractState: $contractState)'; - } + const _ExistingWalletInfo({required this.address, required this.publicKey, required this.walletType, required this.contractState}); + factory _ExistingWalletInfo.fromJson(Map json) => _$ExistingWalletInfoFromJson(json); + +@override final Address address; +@override final PublicKey publicKey; +@override final WalletType walletType; +@override final ContractState contractState; + +/// Create a copy of ExistingWalletInfo +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$ExistingWalletInfoCopyWith<_ExistingWalletInfo> get copyWith => __$ExistingWalletInfoCopyWithImpl<_ExistingWalletInfo>(this, _$identity); + +@override +Map toJson() { + return _$ExistingWalletInfoToJson(this, ); } -/// @nodoc -abstract mixin class _$ExistingWalletInfoCopyWith<$Res> - implements $ExistingWalletInfoCopyWith<$Res> { - factory _$ExistingWalletInfoCopyWith( - _ExistingWalletInfo value, $Res Function(_ExistingWalletInfo) _then) = - __$ExistingWalletInfoCopyWithImpl; - @override - @useResult - $Res call( - {Address address, - PublicKey publicKey, - WalletType walletType, - ContractState contractState}); - - @override - $AddressCopyWith<$Res> get address; - @override - $PublicKeyCopyWith<$Res> get publicKey; - @override - $WalletTypeCopyWith<$Res> get walletType; - @override - $ContractStateCopyWith<$Res> get contractState; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _ExistingWalletInfo&&(identical(other.address, address) || other.address == address)&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.walletType, walletType) || other.walletType == walletType)&&(identical(other.contractState, contractState) || other.contractState == contractState)); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,address,publicKey,walletType,contractState); + +@override +String toString() { + return 'ExistingWalletInfo(address: $address, publicKey: $publicKey, walletType: $walletType, contractState: $contractState)'; +} + + +} + +/// @nodoc +abstract mixin class _$ExistingWalletInfoCopyWith<$Res> implements $ExistingWalletInfoCopyWith<$Res> { + factory _$ExistingWalletInfoCopyWith(_ExistingWalletInfo value, $Res Function(_ExistingWalletInfo) _then) = __$ExistingWalletInfoCopyWithImpl; +@override @useResult +$Res call({ + Address address, PublicKey publicKey, WalletType walletType, ContractState contractState +}); + + +@override $AddressCopyWith<$Res> get address;@override $PublicKeyCopyWith<$Res> get publicKey;@override $WalletTypeCopyWith<$Res> get walletType;@override $ContractStateCopyWith<$Res> get contractState; + +} /// @nodoc class __$ExistingWalletInfoCopyWithImpl<$Res> implements _$ExistingWalletInfoCopyWith<$Res> { @@ -245,75 +298,55 @@ class __$ExistingWalletInfoCopyWithImpl<$Res> final _ExistingWalletInfo _self; final $Res Function(_ExistingWalletInfo) _then; - /// Create a copy of ExistingWalletInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? address = null, - Object? publicKey = null, - Object? walletType = null, - Object? contractState = null, - }) { - return _then(_ExistingWalletInfo( - address: null == address - ? _self.address - : address // ignore: cast_nullable_to_non_nullable - as Address, - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - walletType: null == walletType - ? _self.walletType - : walletType // ignore: cast_nullable_to_non_nullable - as WalletType, - contractState: null == contractState - ? _self.contractState - : contractState // ignore: cast_nullable_to_non_nullable - as ContractState, - )); - } - - /// Create a copy of ExistingWalletInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get address { - return $AddressCopyWith<$Res>(_self.address, (value) { - return _then(_self.copyWith(address: value)); - }); - } - - /// Create a copy of ExistingWalletInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } - - /// Create a copy of ExistingWalletInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $WalletTypeCopyWith<$Res> get walletType { - return $WalletTypeCopyWith<$Res>(_self.walletType, (value) { - return _then(_self.copyWith(walletType: value)); - }); - } - - /// Create a copy of ExistingWalletInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $ContractStateCopyWith<$Res> get contractState { - return $ContractStateCopyWith<$Res>(_self.contractState, (value) { - return _then(_self.copyWith(contractState: value)); - }); - } +/// Create a copy of ExistingWalletInfo +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? address = null,Object? publicKey = null,Object? walletType = null,Object? contractState = null,}) { + return _then(_ExistingWalletInfo( +address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as Address,publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,walletType: null == walletType ? _self.walletType : walletType // ignore: cast_nullable_to_non_nullable +as WalletType,contractState: null == contractState ? _self.contractState : contractState // ignore: cast_nullable_to_non_nullable +as ContractState, + )); +} + +/// Create a copy of ExistingWalletInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get address { + + return $AddressCopyWith<$Res>(_self.address, (value) { + return _then(_self.copyWith(address: value)); + }); +}/// Create a copy of ExistingWalletInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of ExistingWalletInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$WalletTypeCopyWith<$Res> get walletType { + + return $WalletTypeCopyWith<$Res>(_self.walletType, (value) { + return _then(_self.copyWith(walletType: value)); + }); +}/// Create a copy of ExistingWalletInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$ContractStateCopyWith<$Res> get contractState { + + return $ContractStateCopyWith<$Res>(_self.contractState, (value) { + return _then(_self.copyWith(contractState: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/existing_wallet_info.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/existing_wallet_info.g.dart index 3eae11f1..7dea06ae 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/existing_wallet_info.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/existing_wallet_info.g.dart @@ -10,10 +10,12 @@ _ExistingWalletInfo _$ExistingWalletInfoFromJson(Map json) => _ExistingWalletInfo( address: Address.fromJson(json['address'] as String), publicKey: PublicKey.fromJson(json['publicKey'] as String), - walletType: - WalletType.fromJson(json['walletType'] as Map), - contractState: - ContractState.fromJson(json['contractState'] as Map), + walletType: WalletType.fromJson( + json['walletType'] as Map, + ), + contractState: ContractState.fromJson( + json['contractState'] as Map, + ), ); Map _$ExistingWalletInfoToJson(_ExistingWalletInfo instance) => diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/known_payload.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/known_payload.dart index e440a7c8..92f3985f 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/known_payload.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/known_payload.dart @@ -11,10 +11,12 @@ sealed class KnownPayload with _$KnownPayload { const factory KnownPayload.comment(final String data) = KnownPayloadComment; const factory KnownPayload.tokenOutgoingTransfer( - final TokenOutgoingTransfer data) = KnownPayloadTokenOutgoingTransfer; + final TokenOutgoingTransfer data, + ) = KnownPayloadTokenOutgoingTransfer; const factory KnownPayload.jettonOutgoingTransfer( - final JettonOutgoingTransfer data) = KnownPayloadJettonOutgoingTransfer; + final JettonOutgoingTransfer data, + ) = KnownPayloadJettonOutgoingTransfer; const factory KnownPayload.tokenSwapBack(final TokenSwapBack data) = KnownPayloadTokenSwapBack; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/known_payload.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/known_payload.freezed.dart index bca9e8c1..f1755e22 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/known_payload.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/known_payload.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,110 +11,265 @@ part of 'known_payload.dart'; // dart format off T _$identity(T value) => value; -KnownPayload _$KnownPayloadFromJson(Map json) { - switch (json['type']) { - case 'comment': - return KnownPayloadComment.fromJson(json); - case 'token_outgoing_transfer': - return KnownPayloadTokenOutgoingTransfer.fromJson(json); - case 'jetton_outgoing_transfer': - return KnownPayloadJettonOutgoingTransfer.fromJson(json); - case 'token_swap_back': - return KnownPayloadTokenSwapBack.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'type', 'KnownPayload', - 'Invalid union type "${json['type']}"!'); - } +KnownPayload _$KnownPayloadFromJson( + Map json +) { + switch (json['type']) { + case 'comment': + return KnownPayloadComment.fromJson( + json + ); + case 'token_outgoing_transfer': + return KnownPayloadTokenOutgoingTransfer.fromJson( + json + ); + case 'jetton_outgoing_transfer': + return KnownPayloadJettonOutgoingTransfer.fromJson( + json + ); + case 'token_swap_back': + return KnownPayloadTokenSwapBack.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'KnownPayload', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$KnownPayload { - Object get data; + + Object get data; /// Serializes this KnownPayload to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is KnownPayload && - const DeepCollectionEquality().equals(other.data, data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(data)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is KnownPayload&&const DeepCollectionEquality().equals(other.data, data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(data)); + +@override +String toString() { + return 'KnownPayload(data: $data)'; +} + - @override - String toString() { - return 'KnownPayload(data: $data)'; - } } /// @nodoc -class $KnownPayloadCopyWith<$Res> { - $KnownPayloadCopyWith(KnownPayload _, $Res Function(KnownPayload) __); +class $KnownPayloadCopyWith<$Res> { +$KnownPayloadCopyWith(KnownPayload _, $Res Function(KnownPayload) __); +} + + +/// Adds pattern-matching-related methods to [KnownPayload]. +extension KnownPayloadPatterns on KnownPayload { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( KnownPayloadComment value)? comment,TResult Function( KnownPayloadTokenOutgoingTransfer value)? tokenOutgoingTransfer,TResult Function( KnownPayloadJettonOutgoingTransfer value)? jettonOutgoingTransfer,TResult Function( KnownPayloadTokenSwapBack value)? tokenSwapBack,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case KnownPayloadComment() when comment != null: +return comment(_that);case KnownPayloadTokenOutgoingTransfer() when tokenOutgoingTransfer != null: +return tokenOutgoingTransfer(_that);case KnownPayloadJettonOutgoingTransfer() when jettonOutgoingTransfer != null: +return jettonOutgoingTransfer(_that);case KnownPayloadTokenSwapBack() when tokenSwapBack != null: +return tokenSwapBack(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( KnownPayloadComment value) comment,required TResult Function( KnownPayloadTokenOutgoingTransfer value) tokenOutgoingTransfer,required TResult Function( KnownPayloadJettonOutgoingTransfer value) jettonOutgoingTransfer,required TResult Function( KnownPayloadTokenSwapBack value) tokenSwapBack,}){ +final _that = this; +switch (_that) { +case KnownPayloadComment(): +return comment(_that);case KnownPayloadTokenOutgoingTransfer(): +return tokenOutgoingTransfer(_that);case KnownPayloadJettonOutgoingTransfer(): +return jettonOutgoingTransfer(_that);case KnownPayloadTokenSwapBack(): +return tokenSwapBack(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( KnownPayloadComment value)? comment,TResult? Function( KnownPayloadTokenOutgoingTransfer value)? tokenOutgoingTransfer,TResult? Function( KnownPayloadJettonOutgoingTransfer value)? jettonOutgoingTransfer,TResult? Function( KnownPayloadTokenSwapBack value)? tokenSwapBack,}){ +final _that = this; +switch (_that) { +case KnownPayloadComment() when comment != null: +return comment(_that);case KnownPayloadTokenOutgoingTransfer() when tokenOutgoingTransfer != null: +return tokenOutgoingTransfer(_that);case KnownPayloadJettonOutgoingTransfer() when jettonOutgoingTransfer != null: +return jettonOutgoingTransfer(_that);case KnownPayloadTokenSwapBack() when tokenSwapBack != null: +return tokenSwapBack(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( String data)? comment,TResult Function( TokenOutgoingTransfer data)? tokenOutgoingTransfer,TResult Function( JettonOutgoingTransfer data)? jettonOutgoingTransfer,TResult Function( TokenSwapBack data)? tokenSwapBack,required TResult orElse(),}) {final _that = this; +switch (_that) { +case KnownPayloadComment() when comment != null: +return comment(_that.data);case KnownPayloadTokenOutgoingTransfer() when tokenOutgoingTransfer != null: +return tokenOutgoingTransfer(_that.data);case KnownPayloadJettonOutgoingTransfer() when jettonOutgoingTransfer != null: +return jettonOutgoingTransfer(_that.data);case KnownPayloadTokenSwapBack() when tokenSwapBack != null: +return tokenSwapBack(_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( String data) comment,required TResult Function( TokenOutgoingTransfer data) tokenOutgoingTransfer,required TResult Function( JettonOutgoingTransfer data) jettonOutgoingTransfer,required TResult Function( TokenSwapBack data) tokenSwapBack,}) {final _that = this; +switch (_that) { +case KnownPayloadComment(): +return comment(_that.data);case KnownPayloadTokenOutgoingTransfer(): +return tokenOutgoingTransfer(_that.data);case KnownPayloadJettonOutgoingTransfer(): +return jettonOutgoingTransfer(_that.data);case KnownPayloadTokenSwapBack(): +return tokenSwapBack(_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( String data)? comment,TResult? Function( TokenOutgoingTransfer data)? tokenOutgoingTransfer,TResult? Function( JettonOutgoingTransfer data)? jettonOutgoingTransfer,TResult? Function( TokenSwapBack data)? tokenSwapBack,}) {final _that = this; +switch (_that) { +case KnownPayloadComment() when comment != null: +return comment(_that.data);case KnownPayloadTokenOutgoingTransfer() when tokenOutgoingTransfer != null: +return tokenOutgoingTransfer(_that.data);case KnownPayloadJettonOutgoingTransfer() when jettonOutgoingTransfer != null: +return jettonOutgoingTransfer(_that.data);case KnownPayloadTokenSwapBack() when tokenSwapBack != null: +return tokenSwapBack(_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class KnownPayloadComment implements KnownPayload { - const KnownPayloadComment(this.data, {final String? $type}) - : $type = $type ?? 'comment'; - factory KnownPayloadComment.fromJson(Map json) => - _$KnownPayloadCommentFromJson(json); - - @override - final String data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of KnownPayload - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $KnownPayloadCommentCopyWith get copyWith => - _$KnownPayloadCommentCopyWithImpl(this, _$identity); - - @override - Map toJson() { - return _$KnownPayloadCommentToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is KnownPayloadComment && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'KnownPayload.comment(data: $data)'; - } + const KnownPayloadComment(this.data, {final String? $type}): $type = $type ?? 'comment'; + factory KnownPayloadComment.fromJson(Map json) => _$KnownPayloadCommentFromJson(json); + +@override final String data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of KnownPayload +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$KnownPayloadCommentCopyWith get copyWith => _$KnownPayloadCommentCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$KnownPayloadCommentToJson(this, ); } -/// @nodoc -abstract mixin class $KnownPayloadCommentCopyWith<$Res> - implements $KnownPayloadCopyWith<$Res> { - factory $KnownPayloadCommentCopyWith( - KnownPayloadComment value, $Res Function(KnownPayloadComment) _then) = - _$KnownPayloadCommentCopyWithImpl; - @useResult - $Res call({String data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is KnownPayloadComment&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'KnownPayload.comment(data: $data)'; +} + + } +/// @nodoc +abstract mixin class $KnownPayloadCommentCopyWith<$Res> implements $KnownPayloadCopyWith<$Res> { + factory $KnownPayloadCommentCopyWith(KnownPayloadComment value, $Res Function(KnownPayloadComment) _then) = _$KnownPayloadCommentCopyWithImpl; +@useResult +$Res call({ + String data +}); + + + + +} /// @nodoc class _$KnownPayloadCommentCopyWithImpl<$Res> implements $KnownPayloadCommentCopyWith<$Res> { @@ -124,82 +278,71 @@ class _$KnownPayloadCommentCopyWithImpl<$Res> final KnownPayloadComment _self; final $Res Function(KnownPayloadComment) _then; - /// Create a copy of KnownPayload - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(KnownPayloadComment( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of KnownPayload +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(KnownPayloadComment( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } /// @nodoc @JsonSerializable() + class KnownPayloadTokenOutgoingTransfer implements KnownPayload { - const KnownPayloadTokenOutgoingTransfer(this.data, {final String? $type}) - : $type = $type ?? 'token_outgoing_transfer'; - factory KnownPayloadTokenOutgoingTransfer.fromJson( - Map json) => - _$KnownPayloadTokenOutgoingTransferFromJson(json); - - @override - final TokenOutgoingTransfer data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of KnownPayload - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $KnownPayloadTokenOutgoingTransferCopyWith - get copyWith => _$KnownPayloadTokenOutgoingTransferCopyWithImpl< - KnownPayloadTokenOutgoingTransfer>(this, _$identity); - - @override - Map toJson() { - return _$KnownPayloadTokenOutgoingTransferToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is KnownPayloadTokenOutgoingTransfer && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'KnownPayload.tokenOutgoingTransfer(data: $data)'; - } + const KnownPayloadTokenOutgoingTransfer(this.data, {final String? $type}): $type = $type ?? 'token_outgoing_transfer'; + factory KnownPayloadTokenOutgoingTransfer.fromJson(Map json) => _$KnownPayloadTokenOutgoingTransferFromJson(json); + +@override final TokenOutgoingTransfer data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of KnownPayload +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$KnownPayloadTokenOutgoingTransferCopyWith get copyWith => _$KnownPayloadTokenOutgoingTransferCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$KnownPayloadTokenOutgoingTransferToJson(this, ); } -/// @nodoc -abstract mixin class $KnownPayloadTokenOutgoingTransferCopyWith<$Res> - implements $KnownPayloadCopyWith<$Res> { - factory $KnownPayloadTokenOutgoingTransferCopyWith( - KnownPayloadTokenOutgoingTransfer value, - $Res Function(KnownPayloadTokenOutgoingTransfer) _then) = - _$KnownPayloadTokenOutgoingTransferCopyWithImpl; - @useResult - $Res call({TokenOutgoingTransfer data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is KnownPayloadTokenOutgoingTransfer&&(identical(other.data, data) || other.data == data)); +} - $TokenOutgoingTransferCopyWith<$Res> get data; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'KnownPayload.tokenOutgoingTransfer(data: $data)'; } + +} + +/// @nodoc +abstract mixin class $KnownPayloadTokenOutgoingTransferCopyWith<$Res> implements $KnownPayloadCopyWith<$Res> { + factory $KnownPayloadTokenOutgoingTransferCopyWith(KnownPayloadTokenOutgoingTransfer value, $Res Function(KnownPayloadTokenOutgoingTransfer) _then) = _$KnownPayloadTokenOutgoingTransferCopyWithImpl; +@useResult +$Res call({ + TokenOutgoingTransfer data +}); + + +$TokenOutgoingTransferCopyWith<$Res> get data; + +} /// @nodoc class _$KnownPayloadTokenOutgoingTransferCopyWithImpl<$Res> implements $KnownPayloadTokenOutgoingTransferCopyWith<$Res> { @@ -208,93 +351,80 @@ class _$KnownPayloadTokenOutgoingTransferCopyWithImpl<$Res> final KnownPayloadTokenOutgoingTransfer _self; final $Res Function(KnownPayloadTokenOutgoingTransfer) _then; - /// Create a copy of KnownPayload - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(KnownPayloadTokenOutgoingTransfer( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as TokenOutgoingTransfer, - )); - } - - /// Create a copy of KnownPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TokenOutgoingTransferCopyWith<$Res> get data { - return $TokenOutgoingTransferCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of KnownPayload +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(KnownPayloadTokenOutgoingTransfer( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as TokenOutgoingTransfer, + )); +} + +/// Create a copy of KnownPayload +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TokenOutgoingTransferCopyWith<$Res> get data { + + return $TokenOutgoingTransferCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class KnownPayloadJettonOutgoingTransfer implements KnownPayload { - const KnownPayloadJettonOutgoingTransfer(this.data, {final String? $type}) - : $type = $type ?? 'jetton_outgoing_transfer'; - factory KnownPayloadJettonOutgoingTransfer.fromJson( - Map json) => - _$KnownPayloadJettonOutgoingTransferFromJson(json); - - @override - final JettonOutgoingTransfer data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of KnownPayload - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $KnownPayloadJettonOutgoingTransferCopyWith< - KnownPayloadJettonOutgoingTransfer> - get copyWith => _$KnownPayloadJettonOutgoingTransferCopyWithImpl< - KnownPayloadJettonOutgoingTransfer>(this, _$identity); - - @override - Map toJson() { - return _$KnownPayloadJettonOutgoingTransferToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is KnownPayloadJettonOutgoingTransfer && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'KnownPayload.jettonOutgoingTransfer(data: $data)'; - } + const KnownPayloadJettonOutgoingTransfer(this.data, {final String? $type}): $type = $type ?? 'jetton_outgoing_transfer'; + factory KnownPayloadJettonOutgoingTransfer.fromJson(Map json) => _$KnownPayloadJettonOutgoingTransferFromJson(json); + +@override final JettonOutgoingTransfer data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of KnownPayload +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$KnownPayloadJettonOutgoingTransferCopyWith get copyWith => _$KnownPayloadJettonOutgoingTransferCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$KnownPayloadJettonOutgoingTransferToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is KnownPayloadJettonOutgoingTransfer&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'KnownPayload.jettonOutgoingTransfer(data: $data)'; } -/// @nodoc -abstract mixin class $KnownPayloadJettonOutgoingTransferCopyWith<$Res> - implements $KnownPayloadCopyWith<$Res> { - factory $KnownPayloadJettonOutgoingTransferCopyWith( - KnownPayloadJettonOutgoingTransfer value, - $Res Function(KnownPayloadJettonOutgoingTransfer) _then) = - _$KnownPayloadJettonOutgoingTransferCopyWithImpl; - @useResult - $Res call({JettonOutgoingTransfer data}); - $JettonOutgoingTransferCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $KnownPayloadJettonOutgoingTransferCopyWith<$Res> implements $KnownPayloadCopyWith<$Res> { + factory $KnownPayloadJettonOutgoingTransferCopyWith(KnownPayloadJettonOutgoingTransfer value, $Res Function(KnownPayloadJettonOutgoingTransfer) _then) = _$KnownPayloadJettonOutgoingTransferCopyWithImpl; +@useResult +$Res call({ + JettonOutgoingTransfer data +}); + + +$JettonOutgoingTransferCopyWith<$Res> get data; + +} /// @nodoc class _$KnownPayloadJettonOutgoingTransferCopyWithImpl<$Res> implements $KnownPayloadJettonOutgoingTransferCopyWith<$Res> { @@ -303,90 +433,80 @@ class _$KnownPayloadJettonOutgoingTransferCopyWithImpl<$Res> final KnownPayloadJettonOutgoingTransfer _self; final $Res Function(KnownPayloadJettonOutgoingTransfer) _then; - /// Create a copy of KnownPayload - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(KnownPayloadJettonOutgoingTransfer( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as JettonOutgoingTransfer, - )); - } - - /// Create a copy of KnownPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $JettonOutgoingTransferCopyWith<$Res> get data { - return $JettonOutgoingTransferCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of KnownPayload +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(KnownPayloadJettonOutgoingTransfer( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as JettonOutgoingTransfer, + )); +} + +/// Create a copy of KnownPayload +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$JettonOutgoingTransferCopyWith<$Res> get data { + + return $JettonOutgoingTransferCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class KnownPayloadTokenSwapBack implements KnownPayload { - const KnownPayloadTokenSwapBack(this.data, {final String? $type}) - : $type = $type ?? 'token_swap_back'; - factory KnownPayloadTokenSwapBack.fromJson(Map json) => - _$KnownPayloadTokenSwapBackFromJson(json); - - @override - final TokenSwapBack data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of KnownPayload - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $KnownPayloadTokenSwapBackCopyWith get copyWith => - _$KnownPayloadTokenSwapBackCopyWithImpl( - this, _$identity); - - @override - Map toJson() { - return _$KnownPayloadTokenSwapBackToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is KnownPayloadTokenSwapBack && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'KnownPayload.tokenSwapBack(data: $data)'; - } + const KnownPayloadTokenSwapBack(this.data, {final String? $type}): $type = $type ?? 'token_swap_back'; + factory KnownPayloadTokenSwapBack.fromJson(Map json) => _$KnownPayloadTokenSwapBackFromJson(json); + +@override final TokenSwapBack data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of KnownPayload +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$KnownPayloadTokenSwapBackCopyWith get copyWith => _$KnownPayloadTokenSwapBackCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$KnownPayloadTokenSwapBackToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is KnownPayloadTokenSwapBack&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'KnownPayload.tokenSwapBack(data: $data)'; } -/// @nodoc -abstract mixin class $KnownPayloadTokenSwapBackCopyWith<$Res> - implements $KnownPayloadCopyWith<$Res> { - factory $KnownPayloadTokenSwapBackCopyWith(KnownPayloadTokenSwapBack value, - $Res Function(KnownPayloadTokenSwapBack) _then) = - _$KnownPayloadTokenSwapBackCopyWithImpl; - @useResult - $Res call({TokenSwapBack data}); - $TokenSwapBackCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $KnownPayloadTokenSwapBackCopyWith<$Res> implements $KnownPayloadCopyWith<$Res> { + factory $KnownPayloadTokenSwapBackCopyWith(KnownPayloadTokenSwapBack value, $Res Function(KnownPayloadTokenSwapBack) _then) = _$KnownPayloadTokenSwapBackCopyWithImpl; +@useResult +$Res call({ + TokenSwapBack data +}); + + +$TokenSwapBackCopyWith<$Res> get data; + +} /// @nodoc class _$KnownPayloadTokenSwapBackCopyWithImpl<$Res> implements $KnownPayloadTokenSwapBackCopyWith<$Res> { @@ -395,29 +515,25 @@ class _$KnownPayloadTokenSwapBackCopyWithImpl<$Res> final KnownPayloadTokenSwapBack _self; final $Res Function(KnownPayloadTokenSwapBack) _then; - /// Create a copy of KnownPayload - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(KnownPayloadTokenSwapBack( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as TokenSwapBack, - )); - } - - /// Create a copy of KnownPayload - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TokenSwapBackCopyWith<$Res> get data { - return $TokenSwapBackCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of KnownPayload +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(KnownPayloadTokenSwapBack( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as TokenSwapBack, + )); +} + +/// Create a copy of KnownPayload +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TokenSwapBackCopyWith<$Res> get data { + + return $TokenSwapBackCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/known_payload.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/known_payload.g.dart index e3848790..cbe26ebb 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/known_payload.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/known_payload.g.dart @@ -7,56 +7,41 @@ part of 'known_payload.dart'; // ************************************************************************** KnownPayloadComment _$KnownPayloadCommentFromJson(Map json) => - KnownPayloadComment( - json['data'] as String, - $type: json['type'] as String?, - ); + KnownPayloadComment(json['data'] as String, $type: json['type'] as String?); Map _$KnownPayloadCommentToJson( - KnownPayloadComment instance) => - { - 'data': instance.data, - 'type': instance.$type, - }; + KnownPayloadComment instance, +) => {'data': instance.data, 'type': instance.$type}; KnownPayloadTokenOutgoingTransfer _$KnownPayloadTokenOutgoingTransferFromJson( - Map json) => - KnownPayloadTokenOutgoingTransfer( - TokenOutgoingTransfer.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => KnownPayloadTokenOutgoingTransfer( + TokenOutgoingTransfer.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$KnownPayloadTokenOutgoingTransferToJson( - KnownPayloadTokenOutgoingTransfer instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + KnownPayloadTokenOutgoingTransfer instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; KnownPayloadJettonOutgoingTransfer _$KnownPayloadJettonOutgoingTransferFromJson( - Map json) => - KnownPayloadJettonOutgoingTransfer( - JettonOutgoingTransfer.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => KnownPayloadJettonOutgoingTransfer( + JettonOutgoingTransfer.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$KnownPayloadJettonOutgoingTransferToJson( - KnownPayloadJettonOutgoingTransfer instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + KnownPayloadJettonOutgoingTransfer instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; KnownPayloadTokenSwapBack _$KnownPayloadTokenSwapBackFromJson( - Map json) => - KnownPayloadTokenSwapBack( - TokenSwapBack.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => KnownPayloadTokenSwapBack( + TokenSwapBack.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$KnownPayloadTokenSwapBackToJson( - KnownPayloadTokenSwapBack instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + KnownPayloadTokenSwapBack instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_confirm_transaction.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_confirm_transaction.freezed.dart index 6b34042f..fbeb0734 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_confirm_transaction.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_confirm_transaction.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,53 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$MultisigConfirmTransaction { - PublicKey get custodian; - String get transactionId; - - /// Create a copy of MultisigConfirmTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $MultisigConfirmTransactionCopyWith - get copyWith => - _$MultisigConfirmTransactionCopyWithImpl( - this as MultisigConfirmTransaction, _$identity); + + PublicKey get custodian; String get transactionId; +/// Create a copy of MultisigConfirmTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$MultisigConfirmTransactionCopyWith get copyWith => _$MultisigConfirmTransactionCopyWithImpl(this as MultisigConfirmTransaction, _$identity); /// Serializes this MultisigConfirmTransaction to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is MultisigConfirmTransaction && - (identical(other.custodian, custodian) || - other.custodian == custodian) && - (identical(other.transactionId, transactionId) || - other.transactionId == transactionId)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, custodian, transactionId); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MultisigConfirmTransaction&&(identical(other.custodian, custodian) || other.custodian == custodian)&&(identical(other.transactionId, transactionId) || other.transactionId == transactionId)); +} - @override - String toString() { - return 'MultisigConfirmTransaction(custodian: $custodian, transactionId: $transactionId)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,custodian,transactionId); + +@override +String toString() { + return 'MultisigConfirmTransaction(custodian: $custodian, transactionId: $transactionId)'; } -/// @nodoc -abstract mixin class $MultisigConfirmTransactionCopyWith<$Res> { - factory $MultisigConfirmTransactionCopyWith(MultisigConfirmTransaction value, - $Res Function(MultisigConfirmTransaction) _then) = - _$MultisigConfirmTransactionCopyWithImpl; - @useResult - $Res call({PublicKey custodian, String transactionId}); - $PublicKeyCopyWith<$Res> get custodian; } +/// @nodoc +abstract mixin class $MultisigConfirmTransactionCopyWith<$Res> { + factory $MultisigConfirmTransactionCopyWith(MultisigConfirmTransaction value, $Res Function(MultisigConfirmTransaction) _then) = _$MultisigConfirmTransactionCopyWithImpl; +@useResult +$Res call({ + PublicKey custodian, String transactionId +}); + + +$PublicKeyCopyWith<$Res> get custodian; + +} /// @nodoc class _$MultisigConfirmTransactionCopyWithImpl<$Res> implements $MultisigConfirmTransactionCopyWith<$Res> { @@ -70,102 +63,202 @@ class _$MultisigConfirmTransactionCopyWithImpl<$Res> final MultisigConfirmTransaction _self; final $Res Function(MultisigConfirmTransaction) _then; - /// Create a copy of MultisigConfirmTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? custodian = null, - Object? transactionId = null, - }) { - return _then(_self.copyWith( - custodian: null == custodian - ? _self.custodian - : custodian // ignore: cast_nullable_to_non_nullable - as PublicKey, - transactionId: null == transactionId - ? _self.transactionId - : transactionId // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of MultisigConfirmTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get custodian { - return $PublicKeyCopyWith<$Res>(_self.custodian, (value) { - return _then(_self.copyWith(custodian: value)); - }); - } +/// Create a copy of MultisigConfirmTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? custodian = null,Object? transactionId = null,}) { + return _then(_self.copyWith( +custodian: null == custodian ? _self.custodian : custodian // ignore: cast_nullable_to_non_nullable +as PublicKey,transactionId: null == transactionId ? _self.transactionId : transactionId // ignore: cast_nullable_to_non_nullable +as String, + )); +} +/// Create a copy of MultisigConfirmTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get custodian { + + return $PublicKeyCopyWith<$Res>(_self.custodian, (value) { + return _then(_self.copyWith(custodian: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [MultisigConfirmTransaction]. +extension MultisigConfirmTransactionPatterns on MultisigConfirmTransaction { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _MultisigConfirmTransaction value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _MultisigConfirmTransaction() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _MultisigConfirmTransaction value) $default,){ +final _that = this; +switch (_that) { +case _MultisigConfirmTransaction(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _MultisigConfirmTransaction value)? $default,){ +final _that = this; +switch (_that) { +case _MultisigConfirmTransaction() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PublicKey custodian, String transactionId)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _MultisigConfirmTransaction() when $default != null: +return $default(_that.custodian,_that.transactionId);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PublicKey custodian, String transactionId) $default,) {final _that = this; +switch (_that) { +case _MultisigConfirmTransaction(): +return $default(_that.custodian,_that.transactionId);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PublicKey custodian, String transactionId)? $default,) {final _that = this; +switch (_that) { +case _MultisigConfirmTransaction() when $default != null: +return $default(_that.custodian,_that.transactionId);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _MultisigConfirmTransaction implements MultisigConfirmTransaction { - const _MultisigConfirmTransaction( - {required this.custodian, required this.transactionId}); - factory _MultisigConfirmTransaction.fromJson(Map json) => - _$MultisigConfirmTransactionFromJson(json); - - @override - final PublicKey custodian; - @override - final String transactionId; - - /// Create a copy of MultisigConfirmTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$MultisigConfirmTransactionCopyWith<_MultisigConfirmTransaction> - get copyWith => __$MultisigConfirmTransactionCopyWithImpl< - _MultisigConfirmTransaction>(this, _$identity); - - @override - Map toJson() { - return _$MultisigConfirmTransactionToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _MultisigConfirmTransaction && - (identical(other.custodian, custodian) || - other.custodian == custodian) && - (identical(other.transactionId, transactionId) || - other.transactionId == transactionId)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, custodian, transactionId); - - @override - String toString() { - return 'MultisigConfirmTransaction(custodian: $custodian, transactionId: $transactionId)'; - } + const _MultisigConfirmTransaction({required this.custodian, required this.transactionId}); + factory _MultisigConfirmTransaction.fromJson(Map json) => _$MultisigConfirmTransactionFromJson(json); + +@override final PublicKey custodian; +@override final String transactionId; + +/// Create a copy of MultisigConfirmTransaction +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$MultisigConfirmTransactionCopyWith<_MultisigConfirmTransaction> get copyWith => __$MultisigConfirmTransactionCopyWithImpl<_MultisigConfirmTransaction>(this, _$identity); + +@override +Map toJson() { + return _$MultisigConfirmTransactionToJson(this, ); } -/// @nodoc -abstract mixin class _$MultisigConfirmTransactionCopyWith<$Res> - implements $MultisigConfirmTransactionCopyWith<$Res> { - factory _$MultisigConfirmTransactionCopyWith( - _MultisigConfirmTransaction value, - $Res Function(_MultisigConfirmTransaction) _then) = - __$MultisigConfirmTransactionCopyWithImpl; - @override - @useResult - $Res call({PublicKey custodian, String transactionId}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _MultisigConfirmTransaction&&(identical(other.custodian, custodian) || other.custodian == custodian)&&(identical(other.transactionId, transactionId) || other.transactionId == transactionId)); +} - @override - $PublicKeyCopyWith<$Res> get custodian; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,custodian,transactionId); + +@override +String toString() { + return 'MultisigConfirmTransaction(custodian: $custodian, transactionId: $transactionId)'; } + +} + +/// @nodoc +abstract mixin class _$MultisigConfirmTransactionCopyWith<$Res> implements $MultisigConfirmTransactionCopyWith<$Res> { + factory _$MultisigConfirmTransactionCopyWith(_MultisigConfirmTransaction value, $Res Function(_MultisigConfirmTransaction) _then) = __$MultisigConfirmTransactionCopyWithImpl; +@override @useResult +$Res call({ + PublicKey custodian, String transactionId +}); + + +@override $PublicKeyCopyWith<$Res> get custodian; + +} /// @nodoc class __$MultisigConfirmTransactionCopyWithImpl<$Res> implements _$MultisigConfirmTransactionCopyWith<$Res> { @@ -174,35 +267,26 @@ class __$MultisigConfirmTransactionCopyWithImpl<$Res> final _MultisigConfirmTransaction _self; final $Res Function(_MultisigConfirmTransaction) _then; - /// Create a copy of MultisigConfirmTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? custodian = null, - Object? transactionId = null, - }) { - return _then(_MultisigConfirmTransaction( - custodian: null == custodian - ? _self.custodian - : custodian // ignore: cast_nullable_to_non_nullable - as PublicKey, - transactionId: null == transactionId - ? _self.transactionId - : transactionId // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of MultisigConfirmTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get custodian { - return $PublicKeyCopyWith<$Res>(_self.custodian, (value) { - return _then(_self.copyWith(custodian: value)); - }); - } +/// Create a copy of MultisigConfirmTransaction +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? custodian = null,Object? transactionId = null,}) { + return _then(_MultisigConfirmTransaction( +custodian: null == custodian ? _self.custodian : custodian // ignore: cast_nullable_to_non_nullable +as PublicKey,transactionId: null == transactionId ? _self.transactionId : transactionId // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +/// Create a copy of MultisigConfirmTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get custodian { + + return $PublicKeyCopyWith<$Res>(_self.custodian, (value) { + return _then(_self.copyWith(custodian: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_confirm_transaction.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_confirm_transaction.g.dart index 6ed5675c..36630fd5 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_confirm_transaction.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_confirm_transaction.g.dart @@ -7,15 +7,15 @@ part of 'multisig_confirm_transaction.dart'; // ************************************************************************** _MultisigConfirmTransaction _$MultisigConfirmTransactionFromJson( - Map json) => - _MultisigConfirmTransaction( - custodian: PublicKey.fromJson(json['custodian'] as String), - transactionId: json['transactionId'] as String, - ); + Map json, +) => _MultisigConfirmTransaction( + custodian: PublicKey.fromJson(json['custodian'] as String), + transactionId: json['transactionId'] as String, +); Map _$MultisigConfirmTransactionToJson( - _MultisigConfirmTransaction instance) => - { - 'custodian': instance.custodian.toJson(), - 'transactionId': instance.transactionId, - }; + _MultisigConfirmTransaction instance, +) => { + 'custodian': instance.custodian.toJson(), + 'transactionId': instance.transactionId, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_pending_transaction.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_pending_transaction.freezed.dart index b2e00e68..5b640950 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_pending_transaction.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_pending_transaction.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,97 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$MultisigPendingTransaction { - String get id; - List get confirmations; - int get signsRequired; - int get signsReceived; - PublicKey get creator; - int get index; - Address get dest; - BigInt get value; - int get sendFlags; - String get payload; - bool get bounce; - - /// Create a copy of MultisigPendingTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $MultisigPendingTransactionCopyWith - get copyWith => - _$MultisigPendingTransactionCopyWithImpl( - this as MultisigPendingTransaction, _$identity); + + String get id; List get confirmations; int get signsRequired; int get signsReceived; PublicKey get creator; int get index; Address get dest; BigInt get value; int get sendFlags; String get payload; bool get bounce; +/// Create a copy of MultisigPendingTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$MultisigPendingTransactionCopyWith get copyWith => _$MultisigPendingTransactionCopyWithImpl(this as MultisigPendingTransaction, _$identity); /// Serializes this MultisigPendingTransaction to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is MultisigPendingTransaction && - (identical(other.id, id) || other.id == id) && - const DeepCollectionEquality() - .equals(other.confirmations, confirmations) && - (identical(other.signsRequired, signsRequired) || - other.signsRequired == signsRequired) && - (identical(other.signsReceived, signsReceived) || - other.signsReceived == signsReceived) && - (identical(other.creator, creator) || other.creator == creator) && - (identical(other.index, index) || other.index == index) && - (identical(other.dest, dest) || other.dest == dest) && - (identical(other.value, value) || other.value == value) && - (identical(other.sendFlags, sendFlags) || - other.sendFlags == sendFlags) && - (identical(other.payload, payload) || other.payload == payload) && - (identical(other.bounce, bounce) || other.bounce == bounce)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - id, - const DeepCollectionEquality().hash(confirmations), - signsRequired, - signsReceived, - creator, - index, - dest, - value, - sendFlags, - payload, - bounce); - - @override - String toString() { - return 'MultisigPendingTransaction(id: $id, confirmations: $confirmations, signsRequired: $signsRequired, signsReceived: $signsReceived, creator: $creator, index: $index, dest: $dest, value: $value, sendFlags: $sendFlags, payload: $payload, bounce: $bounce)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MultisigPendingTransaction&&(identical(other.id, id) || other.id == id)&&const DeepCollectionEquality().equals(other.confirmations, confirmations)&&(identical(other.signsRequired, signsRequired) || other.signsRequired == signsRequired)&&(identical(other.signsReceived, signsReceived) || other.signsReceived == signsReceived)&&(identical(other.creator, creator) || other.creator == creator)&&(identical(other.index, index) || other.index == index)&&(identical(other.dest, dest) || other.dest == dest)&&(identical(other.value, value) || other.value == value)&&(identical(other.sendFlags, sendFlags) || other.sendFlags == sendFlags)&&(identical(other.payload, payload) || other.payload == payload)&&(identical(other.bounce, bounce) || other.bounce == bounce)); } -/// @nodoc -abstract mixin class $MultisigPendingTransactionCopyWith<$Res> { - factory $MultisigPendingTransactionCopyWith(MultisigPendingTransaction value, - $Res Function(MultisigPendingTransaction) _then) = - _$MultisigPendingTransactionCopyWithImpl; - @useResult - $Res call( - {String id, - List confirmations, - int signsRequired, - int signsReceived, - PublicKey creator, - int index, - Address dest, - BigInt value, - int sendFlags, - String payload, - bool bounce}); - - $PublicKeyCopyWith<$Res> get creator; - $AddressCopyWith<$Res> get dest; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,const DeepCollectionEquality().hash(confirmations),signsRequired,signsReceived,creator,index,dest,value,sendFlags,payload,bounce); + +@override +String toString() { + return 'MultisigPendingTransaction(id: $id, confirmations: $confirmations, signsRequired: $signsRequired, signsReceived: $signsReceived, creator: $creator, index: $index, dest: $dest, value: $value, sendFlags: $sendFlags, payload: $payload, bounce: $bounce)'; } + +} + +/// @nodoc +abstract mixin class $MultisigPendingTransactionCopyWith<$Res> { + factory $MultisigPendingTransactionCopyWith(MultisigPendingTransaction value, $Res Function(MultisigPendingTransaction) _then) = _$MultisigPendingTransactionCopyWithImpl; +@useResult +$Res call({ + String id, List confirmations, int signsRequired, int signsReceived, PublicKey creator, int index, Address dest, BigInt value, int sendFlags, String payload, bool bounce +}); + + +$PublicKeyCopyWith<$Res> get creator;$AddressCopyWith<$Res> get dest; + +} /// @nodoc class _$MultisigPendingTransactionCopyWithImpl<$Res> implements $MultisigPendingTransactionCopyWith<$Res> { @@ -114,229 +63,235 @@ class _$MultisigPendingTransactionCopyWithImpl<$Res> final MultisigPendingTransaction _self; final $Res Function(MultisigPendingTransaction) _then; - /// Create a copy of MultisigPendingTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? confirmations = null, - Object? signsRequired = null, - Object? signsReceived = null, - Object? creator = null, - Object? index = null, - Object? dest = null, - Object? value = null, - Object? sendFlags = null, - Object? payload = null, - Object? bounce = null, - }) { - return _then(_self.copyWith( - id: null == id - ? _self.id - : id // ignore: cast_nullable_to_non_nullable - as String, - confirmations: null == confirmations - ? _self.confirmations - : confirmations // ignore: cast_nullable_to_non_nullable - as List, - signsRequired: null == signsRequired - ? _self.signsRequired - : signsRequired // ignore: cast_nullable_to_non_nullable - as int, - signsReceived: null == signsReceived - ? _self.signsReceived - : signsReceived // ignore: cast_nullable_to_non_nullable - as int, - creator: null == creator - ? _self.creator - : creator // ignore: cast_nullable_to_non_nullable - as PublicKey, - index: null == index - ? _self.index - : index // ignore: cast_nullable_to_non_nullable - as int, - dest: null == dest - ? _self.dest - : dest // ignore: cast_nullable_to_non_nullable - as Address, - value: null == value - ? _self.value - : value // ignore: cast_nullable_to_non_nullable - as BigInt, - sendFlags: null == sendFlags - ? _self.sendFlags - : sendFlags // ignore: cast_nullable_to_non_nullable - as int, - payload: null == payload - ? _self.payload - : payload // ignore: cast_nullable_to_non_nullable - as String, - bounce: null == bounce - ? _self.bounce - : bounce // ignore: cast_nullable_to_non_nullable - as bool, - )); - } - - /// Create a copy of MultisigPendingTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get creator { - return $PublicKeyCopyWith<$Res>(_self.creator, (value) { - return _then(_self.copyWith(creator: value)); - }); - } - - /// Create a copy of MultisigPendingTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get dest { - return $AddressCopyWith<$Res>(_self.dest, (value) { - return _then(_self.copyWith(dest: value)); - }); - } +/// Create a copy of MultisigPendingTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? confirmations = null,Object? signsRequired = null,Object? signsReceived = null,Object? creator = null,Object? index = null,Object? dest = null,Object? value = null,Object? sendFlags = null,Object? payload = null,Object? bounce = null,}) { + return _then(_self.copyWith( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,confirmations: null == confirmations ? _self.confirmations : confirmations // ignore: cast_nullable_to_non_nullable +as List,signsRequired: null == signsRequired ? _self.signsRequired : signsRequired // ignore: cast_nullable_to_non_nullable +as int,signsReceived: null == signsReceived ? _self.signsReceived : signsReceived // ignore: cast_nullable_to_non_nullable +as int,creator: null == creator ? _self.creator : creator // ignore: cast_nullable_to_non_nullable +as PublicKey,index: null == index ? _self.index : index // ignore: cast_nullable_to_non_nullable +as int,dest: null == dest ? _self.dest : dest // ignore: cast_nullable_to_non_nullable +as Address,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable +as BigInt,sendFlags: null == sendFlags ? _self.sendFlags : sendFlags // ignore: cast_nullable_to_non_nullable +as int,payload: null == payload ? _self.payload : payload // ignore: cast_nullable_to_non_nullable +as String,bounce: null == bounce ? _self.bounce : bounce // ignore: cast_nullable_to_non_nullable +as bool, + )); +} +/// Create a copy of MultisigPendingTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get creator { + + return $PublicKeyCopyWith<$Res>(_self.creator, (value) { + return _then(_self.copyWith(creator: value)); + }); +}/// Create a copy of MultisigPendingTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get dest { + + return $AddressCopyWith<$Res>(_self.dest, (value) { + return _then(_self.copyWith(dest: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [MultisigPendingTransaction]. +extension MultisigPendingTransactionPatterns on MultisigPendingTransaction { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _MultisigPendingTransaction value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _MultisigPendingTransaction() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _MultisigPendingTransaction value) $default,){ +final _that = this; +switch (_that) { +case _MultisigPendingTransaction(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _MultisigPendingTransaction value)? $default,){ +final _that = this; +switch (_that) { +case _MultisigPendingTransaction() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String id, List confirmations, int signsRequired, int signsReceived, PublicKey creator, int index, Address dest, BigInt value, int sendFlags, String payload, bool bounce)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _MultisigPendingTransaction() when $default != null: +return $default(_that.id,_that.confirmations,_that.signsRequired,_that.signsReceived,_that.creator,_that.index,_that.dest,_that.value,_that.sendFlags,_that.payload,_that.bounce);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String id, List confirmations, int signsRequired, int signsReceived, PublicKey creator, int index, Address dest, BigInt value, int sendFlags, String payload, bool bounce) $default,) {final _that = this; +switch (_that) { +case _MultisigPendingTransaction(): +return $default(_that.id,_that.confirmations,_that.signsRequired,_that.signsReceived,_that.creator,_that.index,_that.dest,_that.value,_that.sendFlags,_that.payload,_that.bounce);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, List confirmations, int signsRequired, int signsReceived, PublicKey creator, int index, Address dest, BigInt value, int sendFlags, String payload, bool bounce)? $default,) {final _that = this; +switch (_that) { +case _MultisigPendingTransaction() when $default != null: +return $default(_that.id,_that.confirmations,_that.signsRequired,_that.signsReceived,_that.creator,_that.index,_that.dest,_that.value,_that.sendFlags,_that.payload,_that.bounce);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _MultisigPendingTransaction implements MultisigPendingTransaction { - const _MultisigPendingTransaction( - {required this.id, - required final List confirmations, - required this.signsRequired, - required this.signsReceived, - required this.creator, - required this.index, - required this.dest, - required this.value, - required this.sendFlags, - required this.payload, - required this.bounce}) - : _confirmations = confirmations; - factory _MultisigPendingTransaction.fromJson(Map json) => - _$MultisigPendingTransactionFromJson(json); - - @override - final String id; - final List _confirmations; - @override - List get confirmations { - if (_confirmations is EqualUnmodifiableListView) return _confirmations; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_confirmations); - } - - @override - final int signsRequired; - @override - final int signsReceived; - @override - final PublicKey creator; - @override - final int index; - @override - final Address dest; - @override - final BigInt value; - @override - final int sendFlags; - @override - final String payload; - @override - final bool bounce; - - /// Create a copy of MultisigPendingTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$MultisigPendingTransactionCopyWith<_MultisigPendingTransaction> - get copyWith => __$MultisigPendingTransactionCopyWithImpl< - _MultisigPendingTransaction>(this, _$identity); - - @override - Map toJson() { - return _$MultisigPendingTransactionToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _MultisigPendingTransaction && - (identical(other.id, id) || other.id == id) && - const DeepCollectionEquality() - .equals(other._confirmations, _confirmations) && - (identical(other.signsRequired, signsRequired) || - other.signsRequired == signsRequired) && - (identical(other.signsReceived, signsReceived) || - other.signsReceived == signsReceived) && - (identical(other.creator, creator) || other.creator == creator) && - (identical(other.index, index) || other.index == index) && - (identical(other.dest, dest) || other.dest == dest) && - (identical(other.value, value) || other.value == value) && - (identical(other.sendFlags, sendFlags) || - other.sendFlags == sendFlags) && - (identical(other.payload, payload) || other.payload == payload) && - (identical(other.bounce, bounce) || other.bounce == bounce)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - id, - const DeepCollectionEquality().hash(_confirmations), - signsRequired, - signsReceived, - creator, - index, - dest, - value, - sendFlags, - payload, - bounce); - - @override - String toString() { - return 'MultisigPendingTransaction(id: $id, confirmations: $confirmations, signsRequired: $signsRequired, signsReceived: $signsReceived, creator: $creator, index: $index, dest: $dest, value: $value, sendFlags: $sendFlags, payload: $payload, bounce: $bounce)'; - } + const _MultisigPendingTransaction({required this.id, required final List confirmations, required this.signsRequired, required this.signsReceived, required this.creator, required this.index, required this.dest, required this.value, required this.sendFlags, required this.payload, required this.bounce}): _confirmations = confirmations; + factory _MultisigPendingTransaction.fromJson(Map json) => _$MultisigPendingTransactionFromJson(json); + +@override final String id; + final List _confirmations; +@override List get confirmations { + if (_confirmations is EqualUnmodifiableListView) return _confirmations; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_confirmations); } -/// @nodoc -abstract mixin class _$MultisigPendingTransactionCopyWith<$Res> - implements $MultisigPendingTransactionCopyWith<$Res> { - factory _$MultisigPendingTransactionCopyWith( - _MultisigPendingTransaction value, - $Res Function(_MultisigPendingTransaction) _then) = - __$MultisigPendingTransactionCopyWithImpl; - @override - @useResult - $Res call( - {String id, - List confirmations, - int signsRequired, - int signsReceived, - PublicKey creator, - int index, - Address dest, - BigInt value, - int sendFlags, - String payload, - bool bounce}); - - @override - $PublicKeyCopyWith<$Res> get creator; - @override - $AddressCopyWith<$Res> get dest; +@override final int signsRequired; +@override final int signsReceived; +@override final PublicKey creator; +@override final int index; +@override final Address dest; +@override final BigInt value; +@override final int sendFlags; +@override final String payload; +@override final bool bounce; + +/// Create a copy of MultisigPendingTransaction +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$MultisigPendingTransactionCopyWith<_MultisigPendingTransaction> get copyWith => __$MultisigPendingTransactionCopyWithImpl<_MultisigPendingTransaction>(this, _$identity); + +@override +Map toJson() { + return _$MultisigPendingTransactionToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _MultisigPendingTransaction&&(identical(other.id, id) || other.id == id)&&const DeepCollectionEquality().equals(other._confirmations, _confirmations)&&(identical(other.signsRequired, signsRequired) || other.signsRequired == signsRequired)&&(identical(other.signsReceived, signsReceived) || other.signsReceived == signsReceived)&&(identical(other.creator, creator) || other.creator == creator)&&(identical(other.index, index) || other.index == index)&&(identical(other.dest, dest) || other.dest == dest)&&(identical(other.value, value) || other.value == value)&&(identical(other.sendFlags, sendFlags) || other.sendFlags == sendFlags)&&(identical(other.payload, payload) || other.payload == payload)&&(identical(other.bounce, bounce) || other.bounce == bounce)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,const DeepCollectionEquality().hash(_confirmations),signsRequired,signsReceived,creator,index,dest,value,sendFlags,payload,bounce); + +@override +String toString() { + return 'MultisigPendingTransaction(id: $id, confirmations: $confirmations, signsRequired: $signsRequired, signsReceived: $signsReceived, creator: $creator, index: $index, dest: $dest, value: $value, sendFlags: $sendFlags, payload: $payload, bounce: $bounce)'; +} + + } +/// @nodoc +abstract mixin class _$MultisigPendingTransactionCopyWith<$Res> implements $MultisigPendingTransactionCopyWith<$Res> { + factory _$MultisigPendingTransactionCopyWith(_MultisigPendingTransaction value, $Res Function(_MultisigPendingTransaction) _then) = __$MultisigPendingTransactionCopyWithImpl; +@override @useResult +$Res call({ + String id, List confirmations, int signsRequired, int signsReceived, PublicKey creator, int index, Address dest, BigInt value, int sendFlags, String payload, bool bounce +}); + + +@override $PublicKeyCopyWith<$Res> get creator;@override $AddressCopyWith<$Res> get dest; + +} /// @nodoc class __$MultisigPendingTransactionCopyWithImpl<$Res> implements _$MultisigPendingTransactionCopyWith<$Res> { @@ -345,90 +300,44 @@ class __$MultisigPendingTransactionCopyWithImpl<$Res> final _MultisigPendingTransaction _self; final $Res Function(_MultisigPendingTransaction) _then; - /// Create a copy of MultisigPendingTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? id = null, - Object? confirmations = null, - Object? signsRequired = null, - Object? signsReceived = null, - Object? creator = null, - Object? index = null, - Object? dest = null, - Object? value = null, - Object? sendFlags = null, - Object? payload = null, - Object? bounce = null, - }) { - return _then(_MultisigPendingTransaction( - id: null == id - ? _self.id - : id // ignore: cast_nullable_to_non_nullable - as String, - confirmations: null == confirmations - ? _self._confirmations - : confirmations // ignore: cast_nullable_to_non_nullable - as List, - signsRequired: null == signsRequired - ? _self.signsRequired - : signsRequired // ignore: cast_nullable_to_non_nullable - as int, - signsReceived: null == signsReceived - ? _self.signsReceived - : signsReceived // ignore: cast_nullable_to_non_nullable - as int, - creator: null == creator - ? _self.creator - : creator // ignore: cast_nullable_to_non_nullable - as PublicKey, - index: null == index - ? _self.index - : index // ignore: cast_nullable_to_non_nullable - as int, - dest: null == dest - ? _self.dest - : dest // ignore: cast_nullable_to_non_nullable - as Address, - value: null == value - ? _self.value - : value // ignore: cast_nullable_to_non_nullable - as BigInt, - sendFlags: null == sendFlags - ? _self.sendFlags - : sendFlags // ignore: cast_nullable_to_non_nullable - as int, - payload: null == payload - ? _self.payload - : payload // ignore: cast_nullable_to_non_nullable - as String, - bounce: null == bounce - ? _self.bounce - : bounce // ignore: cast_nullable_to_non_nullable - as bool, - )); - } - - /// Create a copy of MultisigPendingTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get creator { - return $PublicKeyCopyWith<$Res>(_self.creator, (value) { - return _then(_self.copyWith(creator: value)); - }); - } - - /// Create a copy of MultisigPendingTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get dest { - return $AddressCopyWith<$Res>(_self.dest, (value) { - return _then(_self.copyWith(dest: value)); - }); - } +/// Create a copy of MultisigPendingTransaction +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? confirmations = null,Object? signsRequired = null,Object? signsReceived = null,Object? creator = null,Object? index = null,Object? dest = null,Object? value = null,Object? sendFlags = null,Object? payload = null,Object? bounce = null,}) { + return _then(_MultisigPendingTransaction( +id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as String,confirmations: null == confirmations ? _self._confirmations : confirmations // ignore: cast_nullable_to_non_nullable +as List,signsRequired: null == signsRequired ? _self.signsRequired : signsRequired // ignore: cast_nullable_to_non_nullable +as int,signsReceived: null == signsReceived ? _self.signsReceived : signsReceived // ignore: cast_nullable_to_non_nullable +as int,creator: null == creator ? _self.creator : creator // ignore: cast_nullable_to_non_nullable +as PublicKey,index: null == index ? _self.index : index // ignore: cast_nullable_to_non_nullable +as int,dest: null == dest ? _self.dest : dest // ignore: cast_nullable_to_non_nullable +as Address,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable +as BigInt,sendFlags: null == sendFlags ? _self.sendFlags : sendFlags // ignore: cast_nullable_to_non_nullable +as int,payload: null == payload ? _self.payload : payload // ignore: cast_nullable_to_non_nullable +as String,bounce: null == bounce ? _self.bounce : bounce // ignore: cast_nullable_to_non_nullable +as bool, + )); +} + +/// Create a copy of MultisigPendingTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get creator { + + return $PublicKeyCopyWith<$Res>(_self.creator, (value) { + return _then(_self.copyWith(creator: value)); + }); +}/// Create a copy of MultisigPendingTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get dest { + + return $AddressCopyWith<$Res>(_self.dest, (value) { + return _then(_self.copyWith(dest: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_pending_transaction.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_pending_transaction.g.dart index 079bb356..dc6e4c08 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_pending_transaction.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_pending_transaction.g.dart @@ -7,35 +7,35 @@ part of 'multisig_pending_transaction.dart'; // ************************************************************************** _MultisigPendingTransaction _$MultisigPendingTransactionFromJson( - Map json) => - _MultisigPendingTransaction( - id: json['id'] as String, - confirmations: (json['confirmations'] as List) - .map((e) => PublicKey.fromJson(e as String)) - .toList(), - signsRequired: (json['signs_required'] as num).toInt(), - signsReceived: (json['signs_received'] as num).toInt(), - creator: PublicKey.fromJson(json['creator'] as String), - index: (json['index'] as num).toInt(), - dest: Address.fromJson(json['dest'] as String), - value: BigInt.parse(json['value'] as String), - sendFlags: (json['send_flags'] as num).toInt(), - payload: json['payload'] as String, - bounce: json['bounce'] as bool, - ); + Map json, +) => _MultisigPendingTransaction( + id: json['id'] as String, + confirmations: (json['confirmations'] as List) + .map((e) => PublicKey.fromJson(e as String)) + .toList(), + signsRequired: (json['signs_required'] as num).toInt(), + signsReceived: (json['signs_received'] as num).toInt(), + creator: PublicKey.fromJson(json['creator'] as String), + index: (json['index'] as num).toInt(), + dest: Address.fromJson(json['dest'] as String), + value: BigInt.parse(json['value'] as String), + sendFlags: (json['send_flags'] as num).toInt(), + payload: json['payload'] as String, + bounce: json['bounce'] as bool, +); Map _$MultisigPendingTransactionToJson( - _MultisigPendingTransaction instance) => - { - 'id': instance.id, - 'confirmations': instance.confirmations.map((e) => e.toJson()).toList(), - 'signs_required': instance.signsRequired, - 'signs_received': instance.signsReceived, - 'creator': instance.creator.toJson(), - 'index': instance.index, - 'dest': instance.dest.toJson(), - 'value': instance.value.toString(), - 'send_flags': instance.sendFlags, - 'payload': instance.payload, - 'bounce': instance.bounce, - }; + _MultisigPendingTransaction instance, +) => { + 'id': instance.id, + 'confirmations': instance.confirmations.map((e) => e.toJson()).toList(), + 'signs_required': instance.signsRequired, + 'signs_received': instance.signsReceived, + 'creator': instance.creator.toJson(), + 'index': instance.index, + 'dest': instance.dest.toJson(), + 'value': instance.value.toString(), + 'send_flags': instance.sendFlags, + 'payload': instance.payload, + 'bounce': instance.bounce, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_send_transaction.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_send_transaction.freezed.dart index 3d560053..d95d5415 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_send_transaction.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_send_transaction.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,58 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$MultisigSendTransaction { - Address get dest; - BigInt get value; - bool get bounce; - int get flags; - String get payload; - - /// Create a copy of MultisigSendTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $MultisigSendTransactionCopyWith get copyWith => - _$MultisigSendTransactionCopyWithImpl( - this as MultisigSendTransaction, _$identity); + + Address get dest; BigInt get value; bool get bounce; int get flags; String get payload; +/// Create a copy of MultisigSendTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$MultisigSendTransactionCopyWith get copyWith => _$MultisigSendTransactionCopyWithImpl(this as MultisigSendTransaction, _$identity); /// Serializes this MultisigSendTransaction to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is MultisigSendTransaction && - (identical(other.dest, dest) || other.dest == dest) && - (identical(other.value, value) || other.value == value) && - (identical(other.bounce, bounce) || other.bounce == bounce) && - (identical(other.flags, flags) || other.flags == flags) && - (identical(other.payload, payload) || other.payload == payload)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, dest, value, bounce, flags, payload); - - @override - String toString() { - return 'MultisigSendTransaction(dest: $dest, value: $value, bounce: $bounce, flags: $flags, payload: $payload)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MultisigSendTransaction&&(identical(other.dest, dest) || other.dest == dest)&&(identical(other.value, value) || other.value == value)&&(identical(other.bounce, bounce) || other.bounce == bounce)&&(identical(other.flags, flags) || other.flags == flags)&&(identical(other.payload, payload) || other.payload == payload)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,dest,value,bounce,flags,payload); + +@override +String toString() { + return 'MultisigSendTransaction(dest: $dest, value: $value, bounce: $bounce, flags: $flags, payload: $payload)'; } -/// @nodoc -abstract mixin class $MultisigSendTransactionCopyWith<$Res> { - factory $MultisigSendTransactionCopyWith(MultisigSendTransaction value, - $Res Function(MultisigSendTransaction) _then) = - _$MultisigSendTransactionCopyWithImpl; - @useResult - $Res call( - {Address dest, BigInt value, bool bounce, int flags, String payload}); - $AddressCopyWith<$Res> get dest; } +/// @nodoc +abstract mixin class $MultisigSendTransactionCopyWith<$Res> { + factory $MultisigSendTransactionCopyWith(MultisigSendTransaction value, $Res Function(MultisigSendTransaction) _then) = _$MultisigSendTransactionCopyWithImpl; +@useResult +$Res call({ + Address dest, BigInt value, bool bounce, int flags, String payload +}); + + +$AddressCopyWith<$Res> get dest; + +} /// @nodoc class _$MultisigSendTransactionCopyWithImpl<$Res> implements $MultisigSendTransactionCopyWith<$Res> { @@ -75,129 +63,208 @@ class _$MultisigSendTransactionCopyWithImpl<$Res> final MultisigSendTransaction _self; final $Res Function(MultisigSendTransaction) _then; - /// Create a copy of MultisigSendTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? dest = null, - Object? value = null, - Object? bounce = null, - Object? flags = null, - Object? payload = null, - }) { - return _then(_self.copyWith( - dest: null == dest - ? _self.dest - : dest // ignore: cast_nullable_to_non_nullable - as Address, - value: null == value - ? _self.value - : value // ignore: cast_nullable_to_non_nullable - as BigInt, - bounce: null == bounce - ? _self.bounce - : bounce // ignore: cast_nullable_to_non_nullable - as bool, - flags: null == flags - ? _self.flags - : flags // ignore: cast_nullable_to_non_nullable - as int, - payload: null == payload - ? _self.payload - : payload // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of MultisigSendTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get dest { - return $AddressCopyWith<$Res>(_self.dest, (value) { - return _then(_self.copyWith(dest: value)); - }); - } +/// Create a copy of MultisigSendTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? dest = null,Object? value = null,Object? bounce = null,Object? flags = null,Object? payload = null,}) { + return _then(_self.copyWith( +dest: null == dest ? _self.dest : dest // ignore: cast_nullable_to_non_nullable +as Address,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable +as BigInt,bounce: null == bounce ? _self.bounce : bounce // ignore: cast_nullable_to_non_nullable +as bool,flags: null == flags ? _self.flags : flags // ignore: cast_nullable_to_non_nullable +as int,payload: null == payload ? _self.payload : payload // ignore: cast_nullable_to_non_nullable +as String, + )); +} +/// Create a copy of MultisigSendTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get dest { + + return $AddressCopyWith<$Res>(_self.dest, (value) { + return _then(_self.copyWith(dest: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [MultisigSendTransaction]. +extension MultisigSendTransactionPatterns on MultisigSendTransaction { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _MultisigSendTransaction value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _MultisigSendTransaction() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _MultisigSendTransaction value) $default,){ +final _that = this; +switch (_that) { +case _MultisigSendTransaction(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _MultisigSendTransaction value)? $default,){ +final _that = this; +switch (_that) { +case _MultisigSendTransaction() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Address dest, BigInt value, bool bounce, int flags, String payload)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _MultisigSendTransaction() when $default != null: +return $default(_that.dest,_that.value,_that.bounce,_that.flags,_that.payload);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Address dest, BigInt value, bool bounce, int flags, String payload) $default,) {final _that = this; +switch (_that) { +case _MultisigSendTransaction(): +return $default(_that.dest,_that.value,_that.bounce,_that.flags,_that.payload);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Address dest, BigInt value, bool bounce, int flags, String payload)? $default,) {final _that = this; +switch (_that) { +case _MultisigSendTransaction() when $default != null: +return $default(_that.dest,_that.value,_that.bounce,_that.flags,_that.payload);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _MultisigSendTransaction implements MultisigSendTransaction { - const _MultisigSendTransaction( - {required this.dest, - required this.value, - required this.bounce, - required this.flags, - required this.payload}); - factory _MultisigSendTransaction.fromJson(Map json) => - _$MultisigSendTransactionFromJson(json); - - @override - final Address dest; - @override - final BigInt value; - @override - final bool bounce; - @override - final int flags; - @override - final String payload; - - /// Create a copy of MultisigSendTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$MultisigSendTransactionCopyWith<_MultisigSendTransaction> get copyWith => - __$MultisigSendTransactionCopyWithImpl<_MultisigSendTransaction>( - this, _$identity); - - @override - Map toJson() { - return _$MultisigSendTransactionToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _MultisigSendTransaction && - (identical(other.dest, dest) || other.dest == dest) && - (identical(other.value, value) || other.value == value) && - (identical(other.bounce, bounce) || other.bounce == bounce) && - (identical(other.flags, flags) || other.flags == flags) && - (identical(other.payload, payload) || other.payload == payload)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, dest, value, bounce, flags, payload); - - @override - String toString() { - return 'MultisigSendTransaction(dest: $dest, value: $value, bounce: $bounce, flags: $flags, payload: $payload)'; - } + const _MultisigSendTransaction({required this.dest, required this.value, required this.bounce, required this.flags, required this.payload}); + factory _MultisigSendTransaction.fromJson(Map json) => _$MultisigSendTransactionFromJson(json); + +@override final Address dest; +@override final BigInt value; +@override final bool bounce; +@override final int flags; +@override final String payload; + +/// Create a copy of MultisigSendTransaction +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$MultisigSendTransactionCopyWith<_MultisigSendTransaction> get copyWith => __$MultisigSendTransactionCopyWithImpl<_MultisigSendTransaction>(this, _$identity); + +@override +Map toJson() { + return _$MultisigSendTransactionToJson(this, ); } -/// @nodoc -abstract mixin class _$MultisigSendTransactionCopyWith<$Res> - implements $MultisigSendTransactionCopyWith<$Res> { - factory _$MultisigSendTransactionCopyWith(_MultisigSendTransaction value, - $Res Function(_MultisigSendTransaction) _then) = - __$MultisigSendTransactionCopyWithImpl; - @override - @useResult - $Res call( - {Address dest, BigInt value, bool bounce, int flags, String payload}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _MultisigSendTransaction&&(identical(other.dest, dest) || other.dest == dest)&&(identical(other.value, value) || other.value == value)&&(identical(other.bounce, bounce) || other.bounce == bounce)&&(identical(other.flags, flags) || other.flags == flags)&&(identical(other.payload, payload) || other.payload == payload)); +} - @override - $AddressCopyWith<$Res> get dest; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,dest,value,bounce,flags,payload); + +@override +String toString() { + return 'MultisigSendTransaction(dest: $dest, value: $value, bounce: $bounce, flags: $flags, payload: $payload)'; } + +} + +/// @nodoc +abstract mixin class _$MultisigSendTransactionCopyWith<$Res> implements $MultisigSendTransactionCopyWith<$Res> { + factory _$MultisigSendTransactionCopyWith(_MultisigSendTransaction value, $Res Function(_MultisigSendTransaction) _then) = __$MultisigSendTransactionCopyWithImpl; +@override @useResult +$Res call({ + Address dest, BigInt value, bool bounce, int flags, String payload +}); + + +@override $AddressCopyWith<$Res> get dest; + +} /// @nodoc class __$MultisigSendTransactionCopyWithImpl<$Res> implements _$MultisigSendTransactionCopyWith<$Res> { @@ -206,50 +273,29 @@ class __$MultisigSendTransactionCopyWithImpl<$Res> final _MultisigSendTransaction _self; final $Res Function(_MultisigSendTransaction) _then; - /// Create a copy of MultisigSendTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? dest = null, - Object? value = null, - Object? bounce = null, - Object? flags = null, - Object? payload = null, - }) { - return _then(_MultisigSendTransaction( - dest: null == dest - ? _self.dest - : dest // ignore: cast_nullable_to_non_nullable - as Address, - value: null == value - ? _self.value - : value // ignore: cast_nullable_to_non_nullable - as BigInt, - bounce: null == bounce - ? _self.bounce - : bounce // ignore: cast_nullable_to_non_nullable - as bool, - flags: null == flags - ? _self.flags - : flags // ignore: cast_nullable_to_non_nullable - as int, - payload: null == payload - ? _self.payload - : payload // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of MultisigSendTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get dest { - return $AddressCopyWith<$Res>(_self.dest, (value) { - return _then(_self.copyWith(dest: value)); - }); - } +/// Create a copy of MultisigSendTransaction +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? dest = null,Object? value = null,Object? bounce = null,Object? flags = null,Object? payload = null,}) { + return _then(_MultisigSendTransaction( +dest: null == dest ? _self.dest : dest // ignore: cast_nullable_to_non_nullable +as Address,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable +as BigInt,bounce: null == bounce ? _self.bounce : bounce // ignore: cast_nullable_to_non_nullable +as bool,flags: null == flags ? _self.flags : flags // ignore: cast_nullable_to_non_nullable +as int,payload: null == payload ? _self.payload : payload // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +/// Create a copy of MultisigSendTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get dest { + + return $AddressCopyWith<$Res>(_self.dest, (value) { + return _then(_self.copyWith(dest: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_send_transaction.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_send_transaction.g.dart index 64a141b5..a12f6c93 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_send_transaction.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_send_transaction.g.dart @@ -7,21 +7,21 @@ part of 'multisig_send_transaction.dart'; // ************************************************************************** _MultisigSendTransaction _$MultisigSendTransactionFromJson( - Map json) => - _MultisigSendTransaction( - dest: Address.fromJson(json['dest'] as String), - value: BigInt.parse(json['value'] as String), - bounce: json['bounce'] as bool, - flags: (json['flags'] as num).toInt(), - payload: json['payload'] as String, - ); + Map json, +) => _MultisigSendTransaction( + dest: Address.fromJson(json['dest'] as String), + value: BigInt.parse(json['value'] as String), + bounce: json['bounce'] as bool, + flags: (json['flags'] as num).toInt(), + payload: json['payload'] as String, +); Map _$MultisigSendTransactionToJson( - _MultisigSendTransaction instance) => - { - 'dest': instance.dest.toJson(), - 'value': instance.value.toString(), - 'bounce': instance.bounce, - 'flags': instance.flags, - 'payload': instance.payload, - }; + _MultisigSendTransaction instance, +) => { + 'dest': instance.dest.toJson(), + 'value': instance.value.toString(), + 'bounce': instance.bounce, + 'flags': instance.flags, + 'payload': instance.payload, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_submit_transaction.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_submit_transaction.freezed.dart index b6da825e..781a1bc8 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_submit_transaction.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_submit_transaction.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,71 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$MultisigSubmitTransaction { - PublicKey get custodian; - Address get dest; - BigInt get value; - bool get bounce; - bool get allBalance; - String get payload; - String get transId; - - /// Create a copy of MultisigSubmitTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $MultisigSubmitTransactionCopyWith get copyWith => - _$MultisigSubmitTransactionCopyWithImpl( - this as MultisigSubmitTransaction, _$identity); + + PublicKey get custodian; Address get dest; BigInt get value; bool get bounce; bool get allBalance; String get payload; String get transId; +/// Create a copy of MultisigSubmitTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$MultisigSubmitTransactionCopyWith get copyWith => _$MultisigSubmitTransactionCopyWithImpl(this as MultisigSubmitTransaction, _$identity); /// Serializes this MultisigSubmitTransaction to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is MultisigSubmitTransaction && - (identical(other.custodian, custodian) || - other.custodian == custodian) && - (identical(other.dest, dest) || other.dest == dest) && - (identical(other.value, value) || other.value == value) && - (identical(other.bounce, bounce) || other.bounce == bounce) && - (identical(other.allBalance, allBalance) || - other.allBalance == allBalance) && - (identical(other.payload, payload) || other.payload == payload) && - (identical(other.transId, transId) || other.transId == transId)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, custodian, dest, value, bounce, - allBalance, payload, transId); - - @override - String toString() { - return 'MultisigSubmitTransaction(custodian: $custodian, dest: $dest, value: $value, bounce: $bounce, allBalance: $allBalance, payload: $payload, transId: $transId)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MultisigSubmitTransaction&&(identical(other.custodian, custodian) || other.custodian == custodian)&&(identical(other.dest, dest) || other.dest == dest)&&(identical(other.value, value) || other.value == value)&&(identical(other.bounce, bounce) || other.bounce == bounce)&&(identical(other.allBalance, allBalance) || other.allBalance == allBalance)&&(identical(other.payload, payload) || other.payload == payload)&&(identical(other.transId, transId) || other.transId == transId)); } -/// @nodoc -abstract mixin class $MultisigSubmitTransactionCopyWith<$Res> { - factory $MultisigSubmitTransactionCopyWith(MultisigSubmitTransaction value, - $Res Function(MultisigSubmitTransaction) _then) = - _$MultisigSubmitTransactionCopyWithImpl; - @useResult - $Res call( - {PublicKey custodian, - Address dest, - BigInt value, - bool bounce, - bool allBalance, - String payload, - String transId}); - - $PublicKeyCopyWith<$Res> get custodian; - $AddressCopyWith<$Res> get dest; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,custodian,dest,value,bounce,allBalance,payload,transId); + +@override +String toString() { + return 'MultisigSubmitTransaction(custodian: $custodian, dest: $dest, value: $value, bounce: $bounce, allBalance: $allBalance, payload: $payload, transId: $transId)'; +} + + } +/// @nodoc +abstract mixin class $MultisigSubmitTransactionCopyWith<$Res> { + factory $MultisigSubmitTransactionCopyWith(MultisigSubmitTransaction value, $Res Function(MultisigSubmitTransaction) _then) = _$MultisigSubmitTransactionCopyWithImpl; +@useResult +$Res call({ + PublicKey custodian, Address dest, BigInt value, bool bounce, bool allBalance, String payload, String transId +}); + + +$PublicKeyCopyWith<$Res> get custodian;$AddressCopyWith<$Res> get dest; + +} /// @nodoc class _$MultisigSubmitTransactionCopyWithImpl<$Res> implements $MultisigSubmitTransactionCopyWith<$Res> { @@ -88,168 +63,221 @@ class _$MultisigSubmitTransactionCopyWithImpl<$Res> final MultisigSubmitTransaction _self; final $Res Function(MultisigSubmitTransaction) _then; - /// Create a copy of MultisigSubmitTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? custodian = null, - Object? dest = null, - Object? value = null, - Object? bounce = null, - Object? allBalance = null, - Object? payload = null, - Object? transId = null, - }) { - return _then(_self.copyWith( - custodian: null == custodian - ? _self.custodian - : custodian // ignore: cast_nullable_to_non_nullable - as PublicKey, - dest: null == dest - ? _self.dest - : dest // ignore: cast_nullable_to_non_nullable - as Address, - value: null == value - ? _self.value - : value // ignore: cast_nullable_to_non_nullable - as BigInt, - bounce: null == bounce - ? _self.bounce - : bounce // ignore: cast_nullable_to_non_nullable - as bool, - allBalance: null == allBalance - ? _self.allBalance - : allBalance // ignore: cast_nullable_to_non_nullable - as bool, - payload: null == payload - ? _self.payload - : payload // ignore: cast_nullable_to_non_nullable - as String, - transId: null == transId - ? _self.transId - : transId // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of MultisigSubmitTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get custodian { - return $PublicKeyCopyWith<$Res>(_self.custodian, (value) { - return _then(_self.copyWith(custodian: value)); - }); - } - - /// Create a copy of MultisigSubmitTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get dest { - return $AddressCopyWith<$Res>(_self.dest, (value) { - return _then(_self.copyWith(dest: value)); - }); - } +/// Create a copy of MultisigSubmitTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? custodian = null,Object? dest = null,Object? value = null,Object? bounce = null,Object? allBalance = null,Object? payload = null,Object? transId = null,}) { + return _then(_self.copyWith( +custodian: null == custodian ? _self.custodian : custodian // ignore: cast_nullable_to_non_nullable +as PublicKey,dest: null == dest ? _self.dest : dest // ignore: cast_nullable_to_non_nullable +as Address,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable +as BigInt,bounce: null == bounce ? _self.bounce : bounce // ignore: cast_nullable_to_non_nullable +as bool,allBalance: null == allBalance ? _self.allBalance : allBalance // ignore: cast_nullable_to_non_nullable +as bool,payload: null == payload ? _self.payload : payload // ignore: cast_nullable_to_non_nullable +as String,transId: null == transId ? _self.transId : transId // ignore: cast_nullable_to_non_nullable +as String, + )); +} +/// Create a copy of MultisigSubmitTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get custodian { + + return $PublicKeyCopyWith<$Res>(_self.custodian, (value) { + return _then(_self.copyWith(custodian: value)); + }); +}/// Create a copy of MultisigSubmitTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get dest { + + return $AddressCopyWith<$Res>(_self.dest, (value) { + return _then(_self.copyWith(dest: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [MultisigSubmitTransaction]. +extension MultisigSubmitTransactionPatterns on MultisigSubmitTransaction { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _MultisigSubmitTransaction value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _MultisigSubmitTransaction() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _MultisigSubmitTransaction value) $default,){ +final _that = this; +switch (_that) { +case _MultisigSubmitTransaction(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _MultisigSubmitTransaction value)? $default,){ +final _that = this; +switch (_that) { +case _MultisigSubmitTransaction() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PublicKey custodian, Address dest, BigInt value, bool bounce, bool allBalance, String payload, String transId)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _MultisigSubmitTransaction() when $default != null: +return $default(_that.custodian,_that.dest,_that.value,_that.bounce,_that.allBalance,_that.payload,_that.transId);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PublicKey custodian, Address dest, BigInt value, bool bounce, bool allBalance, String payload, String transId) $default,) {final _that = this; +switch (_that) { +case _MultisigSubmitTransaction(): +return $default(_that.custodian,_that.dest,_that.value,_that.bounce,_that.allBalance,_that.payload,_that.transId);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PublicKey custodian, Address dest, BigInt value, bool bounce, bool allBalance, String payload, String transId)? $default,) {final _that = this; +switch (_that) { +case _MultisigSubmitTransaction() when $default != null: +return $default(_that.custodian,_that.dest,_that.value,_that.bounce,_that.allBalance,_that.payload,_that.transId);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _MultisigSubmitTransaction implements MultisigSubmitTransaction { - const _MultisigSubmitTransaction( - {required this.custodian, - required this.dest, - required this.value, - required this.bounce, - required this.allBalance, - required this.payload, - required this.transId}); - factory _MultisigSubmitTransaction.fromJson(Map json) => - _$MultisigSubmitTransactionFromJson(json); - - @override - final PublicKey custodian; - @override - final Address dest; - @override - final BigInt value; - @override - final bool bounce; - @override - final bool allBalance; - @override - final String payload; - @override - final String transId; - - /// Create a copy of MultisigSubmitTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$MultisigSubmitTransactionCopyWith<_MultisigSubmitTransaction> - get copyWith => - __$MultisigSubmitTransactionCopyWithImpl<_MultisigSubmitTransaction>( - this, _$identity); - - @override - Map toJson() { - return _$MultisigSubmitTransactionToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _MultisigSubmitTransaction && - (identical(other.custodian, custodian) || - other.custodian == custodian) && - (identical(other.dest, dest) || other.dest == dest) && - (identical(other.value, value) || other.value == value) && - (identical(other.bounce, bounce) || other.bounce == bounce) && - (identical(other.allBalance, allBalance) || - other.allBalance == allBalance) && - (identical(other.payload, payload) || other.payload == payload) && - (identical(other.transId, transId) || other.transId == transId)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, custodian, dest, value, bounce, - allBalance, payload, transId); - - @override - String toString() { - return 'MultisigSubmitTransaction(custodian: $custodian, dest: $dest, value: $value, bounce: $bounce, allBalance: $allBalance, payload: $payload, transId: $transId)'; - } + const _MultisigSubmitTransaction({required this.custodian, required this.dest, required this.value, required this.bounce, required this.allBalance, required this.payload, required this.transId}); + factory _MultisigSubmitTransaction.fromJson(Map json) => _$MultisigSubmitTransactionFromJson(json); + +@override final PublicKey custodian; +@override final Address dest; +@override final BigInt value; +@override final bool bounce; +@override final bool allBalance; +@override final String payload; +@override final String transId; + +/// Create a copy of MultisigSubmitTransaction +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$MultisigSubmitTransactionCopyWith<_MultisigSubmitTransaction> get copyWith => __$MultisigSubmitTransactionCopyWithImpl<_MultisigSubmitTransaction>(this, _$identity); + +@override +Map toJson() { + return _$MultisigSubmitTransactionToJson(this, ); } -/// @nodoc -abstract mixin class _$MultisigSubmitTransactionCopyWith<$Res> - implements $MultisigSubmitTransactionCopyWith<$Res> { - factory _$MultisigSubmitTransactionCopyWith(_MultisigSubmitTransaction value, - $Res Function(_MultisigSubmitTransaction) _then) = - __$MultisigSubmitTransactionCopyWithImpl; - @override - @useResult - $Res call( - {PublicKey custodian, - Address dest, - BigInt value, - bool bounce, - bool allBalance, - String payload, - String transId}); - - @override - $PublicKeyCopyWith<$Res> get custodian; - @override - $AddressCopyWith<$Res> get dest; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _MultisigSubmitTransaction&&(identical(other.custodian, custodian) || other.custodian == custodian)&&(identical(other.dest, dest) || other.dest == dest)&&(identical(other.value, value) || other.value == value)&&(identical(other.bounce, bounce) || other.bounce == bounce)&&(identical(other.allBalance, allBalance) || other.allBalance == allBalance)&&(identical(other.payload, payload) || other.payload == payload)&&(identical(other.transId, transId) || other.transId == transId)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,custodian,dest,value,bounce,allBalance,payload,transId); + +@override +String toString() { + return 'MultisigSubmitTransaction(custodian: $custodian, dest: $dest, value: $value, bounce: $bounce, allBalance: $allBalance, payload: $payload, transId: $transId)'; +} + + } +/// @nodoc +abstract mixin class _$MultisigSubmitTransactionCopyWith<$Res> implements $MultisigSubmitTransactionCopyWith<$Res> { + factory _$MultisigSubmitTransactionCopyWith(_MultisigSubmitTransaction value, $Res Function(_MultisigSubmitTransaction) _then) = __$MultisigSubmitTransactionCopyWithImpl; +@override @useResult +$Res call({ + PublicKey custodian, Address dest, BigInt value, bool bounce, bool allBalance, String payload, String transId +}); + + +@override $PublicKeyCopyWith<$Res> get custodian;@override $AddressCopyWith<$Res> get dest; + +} /// @nodoc class __$MultisigSubmitTransactionCopyWithImpl<$Res> implements _$MultisigSubmitTransactionCopyWith<$Res> { @@ -258,70 +286,40 @@ class __$MultisigSubmitTransactionCopyWithImpl<$Res> final _MultisigSubmitTransaction _self; final $Res Function(_MultisigSubmitTransaction) _then; - /// Create a copy of MultisigSubmitTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? custodian = null, - Object? dest = null, - Object? value = null, - Object? bounce = null, - Object? allBalance = null, - Object? payload = null, - Object? transId = null, - }) { - return _then(_MultisigSubmitTransaction( - custodian: null == custodian - ? _self.custodian - : custodian // ignore: cast_nullable_to_non_nullable - as PublicKey, - dest: null == dest - ? _self.dest - : dest // ignore: cast_nullable_to_non_nullable - as Address, - value: null == value - ? _self.value - : value // ignore: cast_nullable_to_non_nullable - as BigInt, - bounce: null == bounce - ? _self.bounce - : bounce // ignore: cast_nullable_to_non_nullable - as bool, - allBalance: null == allBalance - ? _self.allBalance - : allBalance // ignore: cast_nullable_to_non_nullable - as bool, - payload: null == payload - ? _self.payload - : payload // ignore: cast_nullable_to_non_nullable - as String, - transId: null == transId - ? _self.transId - : transId // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of MultisigSubmitTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get custodian { - return $PublicKeyCopyWith<$Res>(_self.custodian, (value) { - return _then(_self.copyWith(custodian: value)); - }); - } - - /// Create a copy of MultisigSubmitTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get dest { - return $AddressCopyWith<$Res>(_self.dest, (value) { - return _then(_self.copyWith(dest: value)); - }); - } +/// Create a copy of MultisigSubmitTransaction +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? custodian = null,Object? dest = null,Object? value = null,Object? bounce = null,Object? allBalance = null,Object? payload = null,Object? transId = null,}) { + return _then(_MultisigSubmitTransaction( +custodian: null == custodian ? _self.custodian : custodian // ignore: cast_nullable_to_non_nullable +as PublicKey,dest: null == dest ? _self.dest : dest // ignore: cast_nullable_to_non_nullable +as Address,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable +as BigInt,bounce: null == bounce ? _self.bounce : bounce // ignore: cast_nullable_to_non_nullable +as bool,allBalance: null == allBalance ? _self.allBalance : allBalance // ignore: cast_nullable_to_non_nullable +as bool,payload: null == payload ? _self.payload : payload // ignore: cast_nullable_to_non_nullable +as String,transId: null == transId ? _self.transId : transId // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +/// Create a copy of MultisigSubmitTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get custodian { + + return $PublicKeyCopyWith<$Res>(_self.custodian, (value) { + return _then(_self.copyWith(custodian: value)); + }); +}/// Create a copy of MultisigSubmitTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get dest { + + return $AddressCopyWith<$Res>(_self.dest, (value) { + return _then(_self.copyWith(dest: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_submit_transaction.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_submit_transaction.g.dart index edf02baf..da4136c8 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_submit_transaction.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_submit_transaction.g.dart @@ -7,25 +7,25 @@ part of 'multisig_submit_transaction.dart'; // ************************************************************************** _MultisigSubmitTransaction _$MultisigSubmitTransactionFromJson( - Map json) => - _MultisigSubmitTransaction( - custodian: PublicKey.fromJson(json['custodian'] as String), - dest: Address.fromJson(json['dest'] as String), - value: BigInt.parse(json['value'] as String), - bounce: json['bounce'] as bool, - allBalance: json['allBalance'] as bool, - payload: json['payload'] as String, - transId: json['transId'] as String, - ); + Map json, +) => _MultisigSubmitTransaction( + custodian: PublicKey.fromJson(json['custodian'] as String), + dest: Address.fromJson(json['dest'] as String), + value: BigInt.parse(json['value'] as String), + bounce: json['bounce'] as bool, + allBalance: json['allBalance'] as bool, + payload: json['payload'] as String, + transId: json['transId'] as String, +); Map _$MultisigSubmitTransactionToJson( - _MultisigSubmitTransaction instance) => - { - 'custodian': instance.custodian.toJson(), - 'dest': instance.dest.toJson(), - 'value': instance.value.toString(), - 'bounce': instance.bounce, - 'allBalance': instance.allBalance, - 'payload': instance.payload, - 'transId': instance.transId, - }; + _MultisigSubmitTransaction instance, +) => { + 'custodian': instance.custodian.toJson(), + 'dest': instance.dest.toJson(), + 'value': instance.value.toString(), + 'bounce': instance.bounce, + 'allBalance': instance.allBalance, + 'payload': instance.payload, + 'transId': instance.transId, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_transaction.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_transaction.freezed.dart index f7fd5530..3be73acc 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_transaction.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_transaction.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,112 +11,255 @@ part of 'multisig_transaction.dart'; // dart format off T _$identity(T value) => value; -MultisigTransaction _$MultisigTransactionFromJson(Map json) { - switch (json['type']) { - case 'send': - return MultisigTransactionSend.fromJson(json); - case 'submit': - return MultisigTransactionSubmit.fromJson(json); - case 'confirm': - return MultisigTransactionConfirm.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'type', 'MultisigTransaction', - 'Invalid union type "${json['type']}"!'); - } +MultisigTransaction _$MultisigTransactionFromJson( + Map json +) { + switch (json['type']) { + case 'send': + return MultisigTransactionSend.fromJson( + json + ); + case 'submit': + return MultisigTransactionSubmit.fromJson( + json + ); + case 'confirm': + return MultisigTransactionConfirm.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'MultisigTransaction', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$MultisigTransaction { - Object get data; + + Object get data; /// Serializes this MultisigTransaction to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is MultisigTransaction && - const DeepCollectionEquality().equals(other.data, data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(data)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MultisigTransaction&&const DeepCollectionEquality().equals(other.data, data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(data)); + +@override +String toString() { + return 'MultisigTransaction(data: $data)'; +} + - @override - String toString() { - return 'MultisigTransaction(data: $data)'; - } } /// @nodoc -class $MultisigTransactionCopyWith<$Res> { - $MultisigTransactionCopyWith( - MultisigTransaction _, $Res Function(MultisigTransaction) __); +class $MultisigTransactionCopyWith<$Res> { +$MultisigTransactionCopyWith(MultisigTransaction _, $Res Function(MultisigTransaction) __); +} + + +/// Adds pattern-matching-related methods to [MultisigTransaction]. +extension MultisigTransactionPatterns on MultisigTransaction { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( MultisigTransactionSend value)? send,TResult Function( MultisigTransactionSubmit value)? submit,TResult Function( MultisigTransactionConfirm value)? confirm,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case MultisigTransactionSend() when send != null: +return send(_that);case MultisigTransactionSubmit() when submit != null: +return submit(_that);case MultisigTransactionConfirm() when confirm != null: +return confirm(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( MultisigTransactionSend value) send,required TResult Function( MultisigTransactionSubmit value) submit,required TResult Function( MultisigTransactionConfirm value) confirm,}){ +final _that = this; +switch (_that) { +case MultisigTransactionSend(): +return send(_that);case MultisigTransactionSubmit(): +return submit(_that);case MultisigTransactionConfirm(): +return confirm(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( MultisigTransactionSend value)? send,TResult? Function( MultisigTransactionSubmit value)? submit,TResult? Function( MultisigTransactionConfirm value)? confirm,}){ +final _that = this; +switch (_that) { +case MultisigTransactionSend() when send != null: +return send(_that);case MultisigTransactionSubmit() when submit != null: +return submit(_that);case MultisigTransactionConfirm() when confirm != null: +return confirm(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( MultisigSendTransaction data)? send,TResult Function( MultisigSubmitTransaction data)? submit,TResult Function( MultisigConfirmTransaction data)? confirm,required TResult orElse(),}) {final _that = this; +switch (_that) { +case MultisigTransactionSend() when send != null: +return send(_that.data);case MultisigTransactionSubmit() when submit != null: +return submit(_that.data);case MultisigTransactionConfirm() when confirm != null: +return confirm(_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( MultisigSendTransaction data) send,required TResult Function( MultisigSubmitTransaction data) submit,required TResult Function( MultisigConfirmTransaction data) confirm,}) {final _that = this; +switch (_that) { +case MultisigTransactionSend(): +return send(_that.data);case MultisigTransactionSubmit(): +return submit(_that.data);case MultisigTransactionConfirm(): +return confirm(_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( MultisigSendTransaction data)? send,TResult? Function( MultisigSubmitTransaction data)? submit,TResult? Function( MultisigConfirmTransaction data)? confirm,}) {final _that = this; +switch (_that) { +case MultisigTransactionSend() when send != null: +return send(_that.data);case MultisigTransactionSubmit() when submit != null: +return submit(_that.data);case MultisigTransactionConfirm() when confirm != null: +return confirm(_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class MultisigTransactionSend implements MultisigTransaction { - const MultisigTransactionSend(this.data, {final String? $type}) - : $type = $type ?? 'send'; - factory MultisigTransactionSend.fromJson(Map json) => - _$MultisigTransactionSendFromJson(json); - - @override - final MultisigSendTransaction data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of MultisigTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $MultisigTransactionSendCopyWith get copyWith => - _$MultisigTransactionSendCopyWithImpl( - this, _$identity); - - @override - Map toJson() { - return _$MultisigTransactionSendToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is MultisigTransactionSend && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'MultisigTransaction.send(data: $data)'; - } + const MultisigTransactionSend(this.data, {final String? $type}): $type = $type ?? 'send'; + factory MultisigTransactionSend.fromJson(Map json) => _$MultisigTransactionSendFromJson(json); + +@override final MultisigSendTransaction data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of MultisigTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$MultisigTransactionSendCopyWith get copyWith => _$MultisigTransactionSendCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$MultisigTransactionSendToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MultisigTransactionSend&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'MultisigTransaction.send(data: $data)'; } -/// @nodoc -abstract mixin class $MultisigTransactionSendCopyWith<$Res> - implements $MultisigTransactionCopyWith<$Res> { - factory $MultisigTransactionSendCopyWith(MultisigTransactionSend value, - $Res Function(MultisigTransactionSend) _then) = - _$MultisigTransactionSendCopyWithImpl; - @useResult - $Res call({MultisigSendTransaction data}); - $MultisigSendTransactionCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $MultisigTransactionSendCopyWith<$Res> implements $MultisigTransactionCopyWith<$Res> { + factory $MultisigTransactionSendCopyWith(MultisigTransactionSend value, $Res Function(MultisigTransactionSend) _then) = _$MultisigTransactionSendCopyWithImpl; +@useResult +$Res call({ + MultisigSendTransaction data +}); + + +$MultisigSendTransactionCopyWith<$Res> get data; + +} /// @nodoc class _$MultisigTransactionSendCopyWithImpl<$Res> implements $MultisigTransactionSendCopyWith<$Res> { @@ -126,90 +268,80 @@ class _$MultisigTransactionSendCopyWithImpl<$Res> final MultisigTransactionSend _self; final $Res Function(MultisigTransactionSend) _then; - /// Create a copy of MultisigTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(MultisigTransactionSend( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as MultisigSendTransaction, - )); - } - - /// Create a copy of MultisigTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $MultisigSendTransactionCopyWith<$Res> get data { - return $MultisigSendTransactionCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of MultisigTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(MultisigTransactionSend( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as MultisigSendTransaction, + )); +} + +/// Create a copy of MultisigTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$MultisigSendTransactionCopyWith<$Res> get data { + + return $MultisigSendTransactionCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class MultisigTransactionSubmit implements MultisigTransaction { - const MultisigTransactionSubmit(this.data, {final String? $type}) - : $type = $type ?? 'submit'; - factory MultisigTransactionSubmit.fromJson(Map json) => - _$MultisigTransactionSubmitFromJson(json); - - @override - final MultisigSubmitTransaction data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of MultisigTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $MultisigTransactionSubmitCopyWith get copyWith => - _$MultisigTransactionSubmitCopyWithImpl( - this, _$identity); - - @override - Map toJson() { - return _$MultisigTransactionSubmitToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is MultisigTransactionSubmit && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'MultisigTransaction.submit(data: $data)'; - } + const MultisigTransactionSubmit(this.data, {final String? $type}): $type = $type ?? 'submit'; + factory MultisigTransactionSubmit.fromJson(Map json) => _$MultisigTransactionSubmitFromJson(json); + +@override final MultisigSubmitTransaction data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of MultisigTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$MultisigTransactionSubmitCopyWith get copyWith => _$MultisigTransactionSubmitCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$MultisigTransactionSubmitToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MultisigTransactionSubmit&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'MultisigTransaction.submit(data: $data)'; } -/// @nodoc -abstract mixin class $MultisigTransactionSubmitCopyWith<$Res> - implements $MultisigTransactionCopyWith<$Res> { - factory $MultisigTransactionSubmitCopyWith(MultisigTransactionSubmit value, - $Res Function(MultisigTransactionSubmit) _then) = - _$MultisigTransactionSubmitCopyWithImpl; - @useResult - $Res call({MultisigSubmitTransaction data}); - $MultisigSubmitTransactionCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $MultisigTransactionSubmitCopyWith<$Res> implements $MultisigTransactionCopyWith<$Res> { + factory $MultisigTransactionSubmitCopyWith(MultisigTransactionSubmit value, $Res Function(MultisigTransactionSubmit) _then) = _$MultisigTransactionSubmitCopyWithImpl; +@useResult +$Res call({ + MultisigSubmitTransaction data +}); + + +$MultisigSubmitTransactionCopyWith<$Res> get data; + +} /// @nodoc class _$MultisigTransactionSubmitCopyWithImpl<$Res> implements $MultisigTransactionSubmitCopyWith<$Res> { @@ -218,91 +350,80 @@ class _$MultisigTransactionSubmitCopyWithImpl<$Res> final MultisigTransactionSubmit _self; final $Res Function(MultisigTransactionSubmit) _then; - /// Create a copy of MultisigTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(MultisigTransactionSubmit( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as MultisigSubmitTransaction, - )); - } - - /// Create a copy of MultisigTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $MultisigSubmitTransactionCopyWith<$Res> get data { - return $MultisigSubmitTransactionCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of MultisigTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(MultisigTransactionSubmit( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as MultisigSubmitTransaction, + )); +} + +/// Create a copy of MultisigTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$MultisigSubmitTransactionCopyWith<$Res> get data { + + return $MultisigSubmitTransactionCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class MultisigTransactionConfirm implements MultisigTransaction { - const MultisigTransactionConfirm(this.data, {final String? $type}) - : $type = $type ?? 'confirm'; - factory MultisigTransactionConfirm.fromJson(Map json) => - _$MultisigTransactionConfirmFromJson(json); - - @override - final MultisigConfirmTransaction data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of MultisigTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $MultisigTransactionConfirmCopyWith - get copyWith => - _$MultisigTransactionConfirmCopyWithImpl( - this, _$identity); - - @override - Map toJson() { - return _$MultisigTransactionConfirmToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is MultisigTransactionConfirm && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'MultisigTransaction.confirm(data: $data)'; - } + const MultisigTransactionConfirm(this.data, {final String? $type}): $type = $type ?? 'confirm'; + factory MultisigTransactionConfirm.fromJson(Map json) => _$MultisigTransactionConfirmFromJson(json); + +@override final MultisigConfirmTransaction data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of MultisigTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$MultisigTransactionConfirmCopyWith get copyWith => _$MultisigTransactionConfirmCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$MultisigTransactionConfirmToJson(this, ); } -/// @nodoc -abstract mixin class $MultisigTransactionConfirmCopyWith<$Res> - implements $MultisigTransactionCopyWith<$Res> { - factory $MultisigTransactionConfirmCopyWith(MultisigTransactionConfirm value, - $Res Function(MultisigTransactionConfirm) _then) = - _$MultisigTransactionConfirmCopyWithImpl; - @useResult - $Res call({MultisigConfirmTransaction data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MultisigTransactionConfirm&&(identical(other.data, data) || other.data == data)); +} - $MultisigConfirmTransactionCopyWith<$Res> get data; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'MultisigTransaction.confirm(data: $data)'; } + +} + +/// @nodoc +abstract mixin class $MultisigTransactionConfirmCopyWith<$Res> implements $MultisigTransactionCopyWith<$Res> { + factory $MultisigTransactionConfirmCopyWith(MultisigTransactionConfirm value, $Res Function(MultisigTransactionConfirm) _then) = _$MultisigTransactionConfirmCopyWithImpl; +@useResult +$Res call({ + MultisigConfirmTransaction data +}); + + +$MultisigConfirmTransactionCopyWith<$Res> get data; + +} /// @nodoc class _$MultisigTransactionConfirmCopyWithImpl<$Res> implements $MultisigTransactionConfirmCopyWith<$Res> { @@ -311,29 +432,25 @@ class _$MultisigTransactionConfirmCopyWithImpl<$Res> final MultisigTransactionConfirm _self; final $Res Function(MultisigTransactionConfirm) _then; - /// Create a copy of MultisigTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(MultisigTransactionConfirm( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as MultisigConfirmTransaction, - )); - } - - /// Create a copy of MultisigTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $MultisigConfirmTransactionCopyWith<$Res> get data { - return $MultisigConfirmTransactionCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of MultisigTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(MultisigTransactionConfirm( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as MultisigConfirmTransaction, + )); +} + +/// Create a copy of MultisigTransaction +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$MultisigConfirmTransactionCopyWith<$Res> get data { + + return $MultisigConfirmTransactionCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_transaction.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_transaction.g.dart index 6edb38fc..16a8fe8e 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_transaction.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/multisig_transaction.g.dart @@ -7,43 +7,34 @@ part of 'multisig_transaction.dart'; // ************************************************************************** MultisigTransactionSend _$MultisigTransactionSendFromJson( - Map json) => - MultisigTransactionSend( - MultisigSendTransaction.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => MultisigTransactionSend( + MultisigSendTransaction.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$MultisigTransactionSendToJson( - MultisigTransactionSend instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + MultisigTransactionSend instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; MultisigTransactionSubmit _$MultisigTransactionSubmitFromJson( - Map json) => - MultisigTransactionSubmit( - MultisigSubmitTransaction.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => MultisigTransactionSubmit( + MultisigSubmitTransaction.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$MultisigTransactionSubmitToJson( - MultisigTransactionSubmit instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + MultisigTransactionSubmit instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; MultisigTransactionConfirm _$MultisigTransactionConfirmFromJson( - Map json) => - MultisigTransactionConfirm( - MultisigConfirmTransaction.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => MultisigTransactionConfirm( + MultisigConfirmTransaction.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$MultisigTransactionConfirmToJson( - MultisigTransactionConfirm instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + MultisigTransactionConfirm instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/token_wallet_deployed_notification.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/token_wallet_deployed_notification.freezed.dart index 194339f9..2673f81c 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/token_wallet_deployed_notification.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/token_wallet_deployed_notification.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,51 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TokenWalletDeployedNotification { - Address get rootTokenContract; - /// Create a copy of TokenWalletDeployedNotification - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TokenWalletDeployedNotificationCopyWith - get copyWith => _$TokenWalletDeployedNotificationCopyWithImpl< - TokenWalletDeployedNotification>( - this as TokenWalletDeployedNotification, _$identity); + Address get rootTokenContract; +/// Create a copy of TokenWalletDeployedNotification +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TokenWalletDeployedNotificationCopyWith get copyWith => _$TokenWalletDeployedNotificationCopyWithImpl(this as TokenWalletDeployedNotification, _$identity); /// Serializes this TokenWalletDeployedNotification to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TokenWalletDeployedNotification && - (identical(other.rootTokenContract, rootTokenContract) || - other.rootTokenContract == rootTokenContract)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, rootTokenContract); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TokenWalletDeployedNotification&&(identical(other.rootTokenContract, rootTokenContract) || other.rootTokenContract == rootTokenContract)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,rootTokenContract); - @override - String toString() { - return 'TokenWalletDeployedNotification(rootTokenContract: $rootTokenContract)'; - } +@override +String toString() { + return 'TokenWalletDeployedNotification(rootTokenContract: $rootTokenContract)'; } -/// @nodoc -abstract mixin class $TokenWalletDeployedNotificationCopyWith<$Res> { - factory $TokenWalletDeployedNotificationCopyWith( - TokenWalletDeployedNotification value, - $Res Function(TokenWalletDeployedNotification) _then) = - _$TokenWalletDeployedNotificationCopyWithImpl; - @useResult - $Res call({Address rootTokenContract}); - $AddressCopyWith<$Res> get rootTokenContract; } +/// @nodoc +abstract mixin class $TokenWalletDeployedNotificationCopyWith<$Res> { + factory $TokenWalletDeployedNotificationCopyWith(TokenWalletDeployedNotification value, $Res Function(TokenWalletDeployedNotification) _then) = _$TokenWalletDeployedNotificationCopyWithImpl; +@useResult +$Res call({ + Address rootTokenContract +}); + + +$AddressCopyWith<$Res> get rootTokenContract; + +} /// @nodoc class _$TokenWalletDeployedNotificationCopyWithImpl<$Res> implements $TokenWalletDeployedNotificationCopyWith<$Res> { @@ -68,94 +63,200 @@ class _$TokenWalletDeployedNotificationCopyWithImpl<$Res> final TokenWalletDeployedNotification _self; final $Res Function(TokenWalletDeployedNotification) _then; - /// Create a copy of TokenWalletDeployedNotification - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? rootTokenContract = null, - }) { - return _then(_self.copyWith( - rootTokenContract: null == rootTokenContract - ? _self.rootTokenContract - : rootTokenContract // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of TokenWalletDeployedNotification - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get rootTokenContract { - return $AddressCopyWith<$Res>(_self.rootTokenContract, (value) { - return _then(_self.copyWith(rootTokenContract: value)); - }); - } +/// Create a copy of TokenWalletDeployedNotification +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? rootTokenContract = null,}) { + return _then(_self.copyWith( +rootTokenContract: null == rootTokenContract ? _self.rootTokenContract : rootTokenContract // ignore: cast_nullable_to_non_nullable +as Address, + )); +} +/// Create a copy of TokenWalletDeployedNotification +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get rootTokenContract { + + return $AddressCopyWith<$Res>(_self.rootTokenContract, (value) { + return _then(_self.copyWith(rootTokenContract: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [TokenWalletDeployedNotification]. +extension TokenWalletDeployedNotificationPatterns on TokenWalletDeployedNotification { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TokenWalletDeployedNotification value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TokenWalletDeployedNotification() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TokenWalletDeployedNotification value) $default,){ +final _that = this; +switch (_that) { +case _TokenWalletDeployedNotification(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TokenWalletDeployedNotification value)? $default,){ +final _that = this; +switch (_that) { +case _TokenWalletDeployedNotification() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Address rootTokenContract)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TokenWalletDeployedNotification() when $default != null: +return $default(_that.rootTokenContract);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Address rootTokenContract) $default,) {final _that = this; +switch (_that) { +case _TokenWalletDeployedNotification(): +return $default(_that.rootTokenContract);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Address rootTokenContract)? $default,) {final _that = this; +switch (_that) { +case _TokenWalletDeployedNotification() when $default != null: +return $default(_that.rootTokenContract);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _TokenWalletDeployedNotification - implements TokenWalletDeployedNotification { + +class _TokenWalletDeployedNotification implements TokenWalletDeployedNotification { const _TokenWalletDeployedNotification({required this.rootTokenContract}); - factory _TokenWalletDeployedNotification.fromJson( - Map json) => - _$TokenWalletDeployedNotificationFromJson(json); - - @override - final Address rootTokenContract; - - /// Create a copy of TokenWalletDeployedNotification - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TokenWalletDeployedNotificationCopyWith<_TokenWalletDeployedNotification> - get copyWith => __$TokenWalletDeployedNotificationCopyWithImpl< - _TokenWalletDeployedNotification>(this, _$identity); - - @override - Map toJson() { - return _$TokenWalletDeployedNotificationToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TokenWalletDeployedNotification && - (identical(other.rootTokenContract, rootTokenContract) || - other.rootTokenContract == rootTokenContract)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, rootTokenContract); - - @override - String toString() { - return 'TokenWalletDeployedNotification(rootTokenContract: $rootTokenContract)'; - } + factory _TokenWalletDeployedNotification.fromJson(Map json) => _$TokenWalletDeployedNotificationFromJson(json); + +@override final Address rootTokenContract; + +/// Create a copy of TokenWalletDeployedNotification +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TokenWalletDeployedNotificationCopyWith<_TokenWalletDeployedNotification> get copyWith => __$TokenWalletDeployedNotificationCopyWithImpl<_TokenWalletDeployedNotification>(this, _$identity); + +@override +Map toJson() { + return _$TokenWalletDeployedNotificationToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TokenWalletDeployedNotification&&(identical(other.rootTokenContract, rootTokenContract) || other.rootTokenContract == rootTokenContract)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,rootTokenContract); + +@override +String toString() { + return 'TokenWalletDeployedNotification(rootTokenContract: $rootTokenContract)'; } -/// @nodoc -abstract mixin class _$TokenWalletDeployedNotificationCopyWith<$Res> - implements $TokenWalletDeployedNotificationCopyWith<$Res> { - factory _$TokenWalletDeployedNotificationCopyWith( - _TokenWalletDeployedNotification value, - $Res Function(_TokenWalletDeployedNotification) _then) = - __$TokenWalletDeployedNotificationCopyWithImpl; - @override - @useResult - $Res call({Address rootTokenContract}); - @override - $AddressCopyWith<$Res> get rootTokenContract; } +/// @nodoc +abstract mixin class _$TokenWalletDeployedNotificationCopyWith<$Res> implements $TokenWalletDeployedNotificationCopyWith<$Res> { + factory _$TokenWalletDeployedNotificationCopyWith(_TokenWalletDeployedNotification value, $Res Function(_TokenWalletDeployedNotification) _then) = __$TokenWalletDeployedNotificationCopyWithImpl; +@override @useResult +$Res call({ + Address rootTokenContract +}); + + +@override $AddressCopyWith<$Res> get rootTokenContract; + +} /// @nodoc class __$TokenWalletDeployedNotificationCopyWithImpl<$Res> implements _$TokenWalletDeployedNotificationCopyWith<$Res> { @@ -164,30 +265,25 @@ class __$TokenWalletDeployedNotificationCopyWithImpl<$Res> final _TokenWalletDeployedNotification _self; final $Res Function(_TokenWalletDeployedNotification) _then; - /// Create a copy of TokenWalletDeployedNotification - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? rootTokenContract = null, - }) { - return _then(_TokenWalletDeployedNotification( - rootTokenContract: null == rootTokenContract - ? _self.rootTokenContract - : rootTokenContract // ignore: cast_nullable_to_non_nullable - as Address, - )); - } - - /// Create a copy of TokenWalletDeployedNotification - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get rootTokenContract { - return $AddressCopyWith<$Res>(_self.rootTokenContract, (value) { - return _then(_self.copyWith(rootTokenContract: value)); - }); - } +/// Create a copy of TokenWalletDeployedNotification +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? rootTokenContract = null,}) { + return _then(_TokenWalletDeployedNotification( +rootTokenContract: null == rootTokenContract ? _self.rootTokenContract : rootTokenContract // ignore: cast_nullable_to_non_nullable +as Address, + )); +} + +/// Create a copy of TokenWalletDeployedNotification +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get rootTokenContract { + + return $AddressCopyWith<$Res>(_self.rootTokenContract, (value) { + return _then(_self.copyWith(rootTokenContract: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/token_wallet_deployed_notification.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/token_wallet_deployed_notification.g.dart index b7373ebd..2c5924d9 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/token_wallet_deployed_notification.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/token_wallet_deployed_notification.g.dart @@ -7,13 +7,13 @@ part of 'token_wallet_deployed_notification.dart'; // ************************************************************************** _TokenWalletDeployedNotification _$TokenWalletDeployedNotificationFromJson( - Map json) => - _TokenWalletDeployedNotification( - rootTokenContract: Address.fromJson(json['rootTokenContract'] as String), - ); + Map json, +) => _TokenWalletDeployedNotification( + rootTokenContract: Address.fromJson(json['rootTokenContract'] as String), +); Map _$TokenWalletDeployedNotificationToJson( - _TokenWalletDeployedNotification instance) => - { - 'rootTokenContract': instance.rootTokenContract.toJson(), - }; + _TokenWalletDeployedNotification instance, +) => { + 'rootTokenContract': instance.rootTokenContract.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_details.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_details.freezed.dart index 84e8d227..e9f97d97 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_details.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_details.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,75 +14,48 @@ T _$identity(T value) => value; /// @nodoc mixin _$TonWalletDetails { - bool get requiresSeparateDeploy; - BigInt get minAmount; - bool get supportsPayload; - bool get supportsMultipleOwners; // expirationTime in seconds - int get expirationTime; - int? get requiredConfirmations; - - /// Create a copy of TonWalletDetails - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TonWalletDetailsCopyWith get copyWith => - _$TonWalletDetailsCopyWithImpl( - this as TonWalletDetails, _$identity); + + bool get requiresSeparateDeploy; BigInt get minAmount; bool get supportsPayload; bool get supportsMultipleOwners;// expirationTime in seconds + int get expirationTime; int? get requiredConfirmations; +/// Create a copy of TonWalletDetails +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TonWalletDetailsCopyWith get copyWith => _$TonWalletDetailsCopyWithImpl(this as TonWalletDetails, _$identity); /// Serializes this TonWalletDetails to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TonWalletDetails && - (identical(other.requiresSeparateDeploy, requiresSeparateDeploy) || - other.requiresSeparateDeploy == requiresSeparateDeploy) && - (identical(other.minAmount, minAmount) || - other.minAmount == minAmount) && - (identical(other.supportsPayload, supportsPayload) || - other.supportsPayload == supportsPayload) && - (identical(other.supportsMultipleOwners, supportsMultipleOwners) || - other.supportsMultipleOwners == supportsMultipleOwners) && - (identical(other.expirationTime, expirationTime) || - other.expirationTime == expirationTime) && - (identical(other.requiredConfirmations, requiredConfirmations) || - other.requiredConfirmations == requiredConfirmations)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - requiresSeparateDeploy, - minAmount, - supportsPayload, - supportsMultipleOwners, - expirationTime, - requiredConfirmations); - - @override - String toString() { - return 'TonWalletDetails(requiresSeparateDeploy: $requiresSeparateDeploy, minAmount: $minAmount, supportsPayload: $supportsPayload, supportsMultipleOwners: $supportsMultipleOwners, expirationTime: $expirationTime, requiredConfirmations: $requiredConfirmations)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TonWalletDetails&&(identical(other.requiresSeparateDeploy, requiresSeparateDeploy) || other.requiresSeparateDeploy == requiresSeparateDeploy)&&(identical(other.minAmount, minAmount) || other.minAmount == minAmount)&&(identical(other.supportsPayload, supportsPayload) || other.supportsPayload == supportsPayload)&&(identical(other.supportsMultipleOwners, supportsMultipleOwners) || other.supportsMultipleOwners == supportsMultipleOwners)&&(identical(other.expirationTime, expirationTime) || other.expirationTime == expirationTime)&&(identical(other.requiredConfirmations, requiredConfirmations) || other.requiredConfirmations == requiredConfirmations)); } -/// @nodoc -abstract mixin class $TonWalletDetailsCopyWith<$Res> { - factory $TonWalletDetailsCopyWith( - TonWalletDetails value, $Res Function(TonWalletDetails) _then) = - _$TonWalletDetailsCopyWithImpl; - @useResult - $Res call( - {bool requiresSeparateDeploy, - BigInt minAmount, - bool supportsPayload, - bool supportsMultipleOwners, - int expirationTime, - int? requiredConfirmations}); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,requiresSeparateDeploy,minAmount,supportsPayload,supportsMultipleOwners,expirationTime,requiredConfirmations); + +@override +String toString() { + return 'TonWalletDetails(requiresSeparateDeploy: $requiresSeparateDeploy, minAmount: $minAmount, supportsPayload: $supportsPayload, supportsMultipleOwners: $supportsMultipleOwners, expirationTime: $expirationTime, requiredConfirmations: $requiredConfirmations)'; +} + + } +/// @nodoc +abstract mixin class $TonWalletDetailsCopyWith<$Res> { + factory $TonWalletDetailsCopyWith(TonWalletDetails value, $Res Function(TonWalletDetails) _then) = _$TonWalletDetailsCopyWithImpl; +@useResult +$Res call({ + bool requiresSeparateDeploy, BigInt minAmount, bool supportsPayload, bool supportsMultipleOwners, int expirationTime, int? requiredConfirmations +}); + + + + +} /// @nodoc class _$TonWalletDetailsCopyWithImpl<$Res> implements $TonWalletDetailsCopyWith<$Res> { @@ -92,143 +64,202 @@ class _$TonWalletDetailsCopyWithImpl<$Res> final TonWalletDetails _self; final $Res Function(TonWalletDetails) _then; - /// Create a copy of TonWalletDetails - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? requiresSeparateDeploy = null, - Object? minAmount = null, - Object? supportsPayload = null, - Object? supportsMultipleOwners = null, - Object? expirationTime = null, - Object? requiredConfirmations = freezed, - }) { - return _then(_self.copyWith( - requiresSeparateDeploy: null == requiresSeparateDeploy - ? _self.requiresSeparateDeploy - : requiresSeparateDeploy // ignore: cast_nullable_to_non_nullable - as bool, - minAmount: null == minAmount - ? _self.minAmount - : minAmount // ignore: cast_nullable_to_non_nullable - as BigInt, - supportsPayload: null == supportsPayload - ? _self.supportsPayload - : supportsPayload // ignore: cast_nullable_to_non_nullable - as bool, - supportsMultipleOwners: null == supportsMultipleOwners - ? _self.supportsMultipleOwners - : supportsMultipleOwners // ignore: cast_nullable_to_non_nullable - as bool, - expirationTime: null == expirationTime - ? _self.expirationTime - : expirationTime // ignore: cast_nullable_to_non_nullable - as int, - requiredConfirmations: freezed == requiredConfirmations - ? _self.requiredConfirmations - : requiredConfirmations // ignore: cast_nullable_to_non_nullable - as int?, - )); - } +/// Create a copy of TonWalletDetails +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? requiresSeparateDeploy = null,Object? minAmount = null,Object? supportsPayload = null,Object? supportsMultipleOwners = null,Object? expirationTime = null,Object? requiredConfirmations = freezed,}) { + return _then(_self.copyWith( +requiresSeparateDeploy: null == requiresSeparateDeploy ? _self.requiresSeparateDeploy : requiresSeparateDeploy // ignore: cast_nullable_to_non_nullable +as bool,minAmount: null == minAmount ? _self.minAmount : minAmount // ignore: cast_nullable_to_non_nullable +as BigInt,supportsPayload: null == supportsPayload ? _self.supportsPayload : supportsPayload // ignore: cast_nullable_to_non_nullable +as bool,supportsMultipleOwners: null == supportsMultipleOwners ? _self.supportsMultipleOwners : supportsMultipleOwners // ignore: cast_nullable_to_non_nullable +as bool,expirationTime: null == expirationTime ? _self.expirationTime : expirationTime // ignore: cast_nullable_to_non_nullable +as int,requiredConfirmations: freezed == requiredConfirmations ? _self.requiredConfirmations : requiredConfirmations // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [TonWalletDetails]. +extension TonWalletDetailsPatterns on TonWalletDetails { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TonWalletDetails value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TonWalletDetails() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TonWalletDetails value) $default,){ +final _that = this; +switch (_that) { +case _TonWalletDetails(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TonWalletDetails value)? $default,){ +final _that = this; +switch (_that) { +case _TonWalletDetails() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool requiresSeparateDeploy, BigInt minAmount, bool supportsPayload, bool supportsMultipleOwners, int expirationTime, int? requiredConfirmations)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TonWalletDetails() when $default != null: +return $default(_that.requiresSeparateDeploy,_that.minAmount,_that.supportsPayload,_that.supportsMultipleOwners,_that.expirationTime,_that.requiredConfirmations);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool requiresSeparateDeploy, BigInt minAmount, bool supportsPayload, bool supportsMultipleOwners, int expirationTime, int? requiredConfirmations) $default,) {final _that = this; +switch (_that) { +case _TonWalletDetails(): +return $default(_that.requiresSeparateDeploy,_that.minAmount,_that.supportsPayload,_that.supportsMultipleOwners,_that.expirationTime,_that.requiredConfirmations);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool requiresSeparateDeploy, BigInt minAmount, bool supportsPayload, bool supportsMultipleOwners, int expirationTime, int? requiredConfirmations)? $default,) {final _that = this; +switch (_that) { +case _TonWalletDetails() when $default != null: +return $default(_that.requiresSeparateDeploy,_that.minAmount,_that.supportsPayload,_that.supportsMultipleOwners,_that.expirationTime,_that.requiredConfirmations);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _TonWalletDetails implements TonWalletDetails { - const _TonWalletDetails( - {required this.requiresSeparateDeploy, - required this.minAmount, - required this.supportsPayload, - required this.supportsMultipleOwners, - required this.expirationTime, - required this.requiredConfirmations}); - factory _TonWalletDetails.fromJson(Map json) => - _$TonWalletDetailsFromJson(json); - - @override - final bool requiresSeparateDeploy; - @override - final BigInt minAmount; - @override - final bool supportsPayload; - @override - final bool supportsMultipleOwners; + const _TonWalletDetails({required this.requiresSeparateDeploy, required this.minAmount, required this.supportsPayload, required this.supportsMultipleOwners, required this.expirationTime, required this.requiredConfirmations}); + factory _TonWalletDetails.fromJson(Map json) => _$TonWalletDetailsFromJson(json); + +@override final bool requiresSeparateDeploy; +@override final BigInt minAmount; +@override final bool supportsPayload; +@override final bool supportsMultipleOwners; // expirationTime in seconds - @override - final int expirationTime; - @override - final int? requiredConfirmations; - - /// Create a copy of TonWalletDetails - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TonWalletDetailsCopyWith<_TonWalletDetails> get copyWith => - __$TonWalletDetailsCopyWithImpl<_TonWalletDetails>(this, _$identity); - - @override - Map toJson() { - return _$TonWalletDetailsToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TonWalletDetails && - (identical(other.requiresSeparateDeploy, requiresSeparateDeploy) || - other.requiresSeparateDeploy == requiresSeparateDeploy) && - (identical(other.minAmount, minAmount) || - other.minAmount == minAmount) && - (identical(other.supportsPayload, supportsPayload) || - other.supportsPayload == supportsPayload) && - (identical(other.supportsMultipleOwners, supportsMultipleOwners) || - other.supportsMultipleOwners == supportsMultipleOwners) && - (identical(other.expirationTime, expirationTime) || - other.expirationTime == expirationTime) && - (identical(other.requiredConfirmations, requiredConfirmations) || - other.requiredConfirmations == requiredConfirmations)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - requiresSeparateDeploy, - minAmount, - supportsPayload, - supportsMultipleOwners, - expirationTime, - requiredConfirmations); - - @override - String toString() { - return 'TonWalletDetails(requiresSeparateDeploy: $requiresSeparateDeploy, minAmount: $minAmount, supportsPayload: $supportsPayload, supportsMultipleOwners: $supportsMultipleOwners, expirationTime: $expirationTime, requiredConfirmations: $requiredConfirmations)'; - } +@override final int expirationTime; +@override final int? requiredConfirmations; + +/// Create a copy of TonWalletDetails +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TonWalletDetailsCopyWith<_TonWalletDetails> get copyWith => __$TonWalletDetailsCopyWithImpl<_TonWalletDetails>(this, _$identity); + +@override +Map toJson() { + return _$TonWalletDetailsToJson(this, ); } -/// @nodoc -abstract mixin class _$TonWalletDetailsCopyWith<$Res> - implements $TonWalletDetailsCopyWith<$Res> { - factory _$TonWalletDetailsCopyWith( - _TonWalletDetails value, $Res Function(_TonWalletDetails) _then) = - __$TonWalletDetailsCopyWithImpl; - @override - @useResult - $Res call( - {bool requiresSeparateDeploy, - BigInt minAmount, - bool supportsPayload, - bool supportsMultipleOwners, - int expirationTime, - int? requiredConfirmations}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TonWalletDetails&&(identical(other.requiresSeparateDeploy, requiresSeparateDeploy) || other.requiresSeparateDeploy == requiresSeparateDeploy)&&(identical(other.minAmount, minAmount) || other.minAmount == minAmount)&&(identical(other.supportsPayload, supportsPayload) || other.supportsPayload == supportsPayload)&&(identical(other.supportsMultipleOwners, supportsMultipleOwners) || other.supportsMultipleOwners == supportsMultipleOwners)&&(identical(other.expirationTime, expirationTime) || other.expirationTime == expirationTime)&&(identical(other.requiredConfirmations, requiredConfirmations) || other.requiredConfirmations == requiredConfirmations)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,requiresSeparateDeploy,minAmount,supportsPayload,supportsMultipleOwners,expirationTime,requiredConfirmations); + +@override +String toString() { + return 'TonWalletDetails(requiresSeparateDeploy: $requiresSeparateDeploy, minAmount: $minAmount, supportsPayload: $supportsPayload, supportsMultipleOwners: $supportsMultipleOwners, expirationTime: $expirationTime, requiredConfirmations: $requiredConfirmations)'; +} + + } +/// @nodoc +abstract mixin class _$TonWalletDetailsCopyWith<$Res> implements $TonWalletDetailsCopyWith<$Res> { + factory _$TonWalletDetailsCopyWith(_TonWalletDetails value, $Res Function(_TonWalletDetails) _then) = __$TonWalletDetailsCopyWithImpl; +@override @useResult +$Res call({ + bool requiresSeparateDeploy, BigInt minAmount, bool supportsPayload, bool supportsMultipleOwners, int expirationTime, int? requiredConfirmations +}); + + + + +} /// @nodoc class __$TonWalletDetailsCopyWithImpl<$Res> implements _$TonWalletDetailsCopyWith<$Res> { @@ -237,45 +268,21 @@ class __$TonWalletDetailsCopyWithImpl<$Res> final _TonWalletDetails _self; final $Res Function(_TonWalletDetails) _then; - /// Create a copy of TonWalletDetails - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? requiresSeparateDeploy = null, - Object? minAmount = null, - Object? supportsPayload = null, - Object? supportsMultipleOwners = null, - Object? expirationTime = null, - Object? requiredConfirmations = freezed, - }) { - return _then(_TonWalletDetails( - requiresSeparateDeploy: null == requiresSeparateDeploy - ? _self.requiresSeparateDeploy - : requiresSeparateDeploy // ignore: cast_nullable_to_non_nullable - as bool, - minAmount: null == minAmount - ? _self.minAmount - : minAmount // ignore: cast_nullable_to_non_nullable - as BigInt, - supportsPayload: null == supportsPayload - ? _self.supportsPayload - : supportsPayload // ignore: cast_nullable_to_non_nullable - as bool, - supportsMultipleOwners: null == supportsMultipleOwners - ? _self.supportsMultipleOwners - : supportsMultipleOwners // ignore: cast_nullable_to_non_nullable - as bool, - expirationTime: null == expirationTime - ? _self.expirationTime - : expirationTime // ignore: cast_nullable_to_non_nullable - as int, - requiredConfirmations: freezed == requiredConfirmations - ? _self.requiredConfirmations - : requiredConfirmations // ignore: cast_nullable_to_non_nullable - as int?, - )); - } +/// Create a copy of TonWalletDetails +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? requiresSeparateDeploy = null,Object? minAmount = null,Object? supportsPayload = null,Object? supportsMultipleOwners = null,Object? expirationTime = null,Object? requiredConfirmations = freezed,}) { + return _then(_TonWalletDetails( +requiresSeparateDeploy: null == requiresSeparateDeploy ? _self.requiresSeparateDeploy : requiresSeparateDeploy // ignore: cast_nullable_to_non_nullable +as bool,minAmount: null == minAmount ? _self.minAmount : minAmount // ignore: cast_nullable_to_non_nullable +as BigInt,supportsPayload: null == supportsPayload ? _self.supportsPayload : supportsPayload // ignore: cast_nullable_to_non_nullable +as bool,supportsMultipleOwners: null == supportsMultipleOwners ? _self.supportsMultipleOwners : supportsMultipleOwners // ignore: cast_nullable_to_non_nullable +as bool,expirationTime: null == expirationTime ? _self.expirationTime : expirationTime // ignore: cast_nullable_to_non_nullable +as int,requiredConfirmations: freezed == requiredConfirmations ? _self.requiredConfirmations : requiredConfirmations // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transaction_with_data.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transaction_with_data.freezed.dart index 959d2050..85bd538e 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transaction_with_data.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transaction_with_data.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,54 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TonWalletTransactionWithData { - Transaction get transaction; - TransactionAdditionalInfo? get data; - - /// Create a copy of TonWalletTransactionWithData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TonWalletTransactionWithDataCopyWith - get copyWith => _$TonWalletTransactionWithDataCopyWithImpl< - TonWalletTransactionWithData>( - this as TonWalletTransactionWithData, _$identity); + + Transaction get transaction; TransactionAdditionalInfo? get data; +/// Create a copy of TonWalletTransactionWithData +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TonWalletTransactionWithDataCopyWith get copyWith => _$TonWalletTransactionWithDataCopyWithImpl(this as TonWalletTransactionWithData, _$identity); /// Serializes this TonWalletTransactionWithData to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TonWalletTransactionWithData && - (identical(other.transaction, transaction) || - other.transaction == transaction) && - (identical(other.data, data) || other.data == data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, transaction, data); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TonWalletTransactionWithData&&(identical(other.transaction, transaction) || other.transaction == transaction)&&(identical(other.data, data) || other.data == data)); +} - @override - String toString() { - return 'TonWalletTransactionWithData(transaction: $transaction, data: $data)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,transaction,data); + +@override +String toString() { + return 'TonWalletTransactionWithData(transaction: $transaction, data: $data)'; } -/// @nodoc -abstract mixin class $TonWalletTransactionWithDataCopyWith<$Res> { - factory $TonWalletTransactionWithDataCopyWith( - TonWalletTransactionWithData value, - $Res Function(TonWalletTransactionWithData) _then) = - _$TonWalletTransactionWithDataCopyWithImpl; - @useResult - $Res call({Transaction transaction, TransactionAdditionalInfo? data}); - $TransactionCopyWith<$Res> get transaction; - $TransactionAdditionalInfoCopyWith<$Res>? get data; } +/// @nodoc +abstract mixin class $TonWalletTransactionWithDataCopyWith<$Res> { + factory $TonWalletTransactionWithDataCopyWith(TonWalletTransactionWithData value, $Res Function(TonWalletTransactionWithData) _then) = _$TonWalletTransactionWithDataCopyWithImpl; +@useResult +$Res call({ + Transaction transaction, TransactionAdditionalInfo? data +}); + + +$TransactionCopyWith<$Res> get transaction;$TransactionAdditionalInfoCopyWith<$Res>? get data; + +} /// @nodoc class _$TonWalletTransactionWithDataCopyWithImpl<$Res> implements $TonWalletTransactionWithDataCopyWith<$Res> { @@ -71,117 +63,214 @@ class _$TonWalletTransactionWithDataCopyWithImpl<$Res> final TonWalletTransactionWithData _self; final $Res Function(TonWalletTransactionWithData) _then; - /// Create a copy of TonWalletTransactionWithData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? transaction = null, - Object? data = freezed, - }) { - return _then(_self.copyWith( - transaction: null == transaction - ? _self.transaction - : transaction // ignore: cast_nullable_to_non_nullable - as Transaction, - data: freezed == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as TransactionAdditionalInfo?, - )); +/// Create a copy of TonWalletTransactionWithData +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? transaction = null,Object? data = freezed,}) { + return _then(_self.copyWith( +transaction: null == transaction ? _self.transaction : transaction // ignore: cast_nullable_to_non_nullable +as Transaction,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as TransactionAdditionalInfo?, + )); +} +/// Create a copy of TonWalletTransactionWithData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionCopyWith<$Res> get transaction { + + return $TransactionCopyWith<$Res>(_self.transaction, (value) { + return _then(_self.copyWith(transaction: value)); + }); +}/// Create a copy of TonWalletTransactionWithData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionAdditionalInfoCopyWith<$Res>? get data { + if (_self.data == null) { + return null; } - /// Create a copy of TonWalletTransactionWithData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionCopyWith<$Res> get transaction { - return $TransactionCopyWith<$Res>(_self.transaction, (value) { - return _then(_self.copyWith(transaction: value)); - }); - } + return $TransactionAdditionalInfoCopyWith<$Res>(_self.data!, (value) { + return _then(_self.copyWith(data: value)); + }); +} +} - /// Create a copy of TonWalletTransactionWithData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionAdditionalInfoCopyWith<$Res>? get data { - if (_self.data == null) { - return null; - } - return $TransactionAdditionalInfoCopyWith<$Res>(_self.data!, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Adds pattern-matching-related methods to [TonWalletTransactionWithData]. +extension TonWalletTransactionWithDataPatterns on TonWalletTransactionWithData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TonWalletTransactionWithData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TonWalletTransactionWithData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TonWalletTransactionWithData value) $default,){ +final _that = this; +switch (_that) { +case _TonWalletTransactionWithData(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TonWalletTransactionWithData value)? $default,){ +final _that = this; +switch (_that) { +case _TonWalletTransactionWithData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Transaction transaction, TransactionAdditionalInfo? data)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TonWalletTransactionWithData() when $default != null: +return $default(_that.transaction,_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Transaction transaction, TransactionAdditionalInfo? data) $default,) {final _that = this; +switch (_that) { +case _TonWalletTransactionWithData(): +return $default(_that.transaction,_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Transaction transaction, TransactionAdditionalInfo? data)? $default,) {final _that = this; +switch (_that) { +case _TonWalletTransactionWithData() when $default != null: +return $default(_that.transaction,_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _TonWalletTransactionWithData extends TonWalletTransactionWithData { - const _TonWalletTransactionWithData({required this.transaction, this.data}) - : super._(); - factory _TonWalletTransactionWithData.fromJson(Map json) => - _$TonWalletTransactionWithDataFromJson(json); - - @override - final Transaction transaction; - @override - final TransactionAdditionalInfo? data; - - /// Create a copy of TonWalletTransactionWithData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TonWalletTransactionWithDataCopyWith<_TonWalletTransactionWithData> - get copyWith => __$TonWalletTransactionWithDataCopyWithImpl< - _TonWalletTransactionWithData>(this, _$identity); - - @override - Map toJson() { - return _$TonWalletTransactionWithDataToJson( - this, - ); - } + const _TonWalletTransactionWithData({required this.transaction, this.data}): super._(); + factory _TonWalletTransactionWithData.fromJson(Map json) => _$TonWalletTransactionWithDataFromJson(json); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TonWalletTransactionWithData && - (identical(other.transaction, transaction) || - other.transaction == transaction) && - (identical(other.data, data) || other.data == data)); - } +@override final Transaction transaction; +@override final TransactionAdditionalInfo? data; - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, transaction, data); +/// Create a copy of TonWalletTransactionWithData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TonWalletTransactionWithDataCopyWith<_TonWalletTransactionWithData> get copyWith => __$TonWalletTransactionWithDataCopyWithImpl<_TonWalletTransactionWithData>(this, _$identity); - @override - String toString() { - return 'TonWalletTransactionWithData(transaction: $transaction, data: $data)'; - } +@override +Map toJson() { + return _$TonWalletTransactionWithDataToJson(this, ); } -/// @nodoc -abstract mixin class _$TonWalletTransactionWithDataCopyWith<$Res> - implements $TonWalletTransactionWithDataCopyWith<$Res> { - factory _$TonWalletTransactionWithDataCopyWith( - _TonWalletTransactionWithData value, - $Res Function(_TonWalletTransactionWithData) _then) = - __$TonWalletTransactionWithDataCopyWithImpl; - @override - @useResult - $Res call({Transaction transaction, TransactionAdditionalInfo? data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TonWalletTransactionWithData&&(identical(other.transaction, transaction) || other.transaction == transaction)&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,transaction,data); - @override - $TransactionCopyWith<$Res> get transaction; - @override - $TransactionAdditionalInfoCopyWith<$Res>? get data; +@override +String toString() { + return 'TonWalletTransactionWithData(transaction: $transaction, data: $data)'; } + +} + +/// @nodoc +abstract mixin class _$TonWalletTransactionWithDataCopyWith<$Res> implements $TonWalletTransactionWithDataCopyWith<$Res> { + factory _$TonWalletTransactionWithDataCopyWith(_TonWalletTransactionWithData value, $Res Function(_TonWalletTransactionWithData) _then) = __$TonWalletTransactionWithDataCopyWithImpl; +@override @useResult +$Res call({ + Transaction transaction, TransactionAdditionalInfo? data +}); + + +@override $TransactionCopyWith<$Res> get transaction;@override $TransactionAdditionalInfoCopyWith<$Res>? get data; + +} /// @nodoc class __$TonWalletTransactionWithDataCopyWithImpl<$Res> implements _$TonWalletTransactionWithDataCopyWith<$Res> { @@ -190,49 +279,38 @@ class __$TonWalletTransactionWithDataCopyWithImpl<$Res> final _TonWalletTransactionWithData _self; final $Res Function(_TonWalletTransactionWithData) _then; - /// Create a copy of TonWalletTransactionWithData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? transaction = null, - Object? data = freezed, - }) { - return _then(_TonWalletTransactionWithData( - transaction: null == transaction - ? _self.transaction - : transaction // ignore: cast_nullable_to_non_nullable - as Transaction, - data: freezed == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as TransactionAdditionalInfo?, - )); - } - - /// Create a copy of TonWalletTransactionWithData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionCopyWith<$Res> get transaction { - return $TransactionCopyWith<$Res>(_self.transaction, (value) { - return _then(_self.copyWith(transaction: value)); - }); - } +/// Create a copy of TonWalletTransactionWithData +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? transaction = null,Object? data = freezed,}) { + return _then(_TonWalletTransactionWithData( +transaction: null == transaction ? _self.transaction : transaction // ignore: cast_nullable_to_non_nullable +as Transaction,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as TransactionAdditionalInfo?, + )); +} - /// Create a copy of TonWalletTransactionWithData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransactionAdditionalInfoCopyWith<$Res>? get data { +/// Create a copy of TonWalletTransactionWithData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionCopyWith<$Res> get transaction { + + return $TransactionCopyWith<$Res>(_self.transaction, (value) { + return _then(_self.copyWith(transaction: value)); + }); +}/// Create a copy of TonWalletTransactionWithData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransactionAdditionalInfoCopyWith<$Res>? get data { if (_self.data == null) { - return null; - } - - return $TransactionAdditionalInfoCopyWith<$Res>(_self.data!, (value) { - return _then(_self.copyWith(data: value)); - }); + return null; } + + return $TransactionAdditionalInfoCopyWith<$Res>(_self.data!, (value) { + return _then(_self.copyWith(data: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transaction_with_data.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transaction_with_data.g.dart index 5426172b..72f51377 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transaction_with_data.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transaction_with_data.g.dart @@ -7,19 +7,21 @@ part of 'ton_wallet_transaction_with_data.dart'; // ************************************************************************** _TonWalletTransactionWithData _$TonWalletTransactionWithDataFromJson( - Map json) => - _TonWalletTransactionWithData( - transaction: - Transaction.fromJson(json['transaction'] as Map), - data: json['data'] == null - ? null - : TransactionAdditionalInfo.fromJson( - json['data'] as Map), - ); + Map json, +) => _TonWalletTransactionWithData( + transaction: Transaction.fromJson( + json['transaction'] as Map, + ), + data: json['data'] == null + ? null + : TransactionAdditionalInfo.fromJson( + json['data'] as Map, + ), +); Map _$TonWalletTransactionWithDataToJson( - _TonWalletTransactionWithData instance) => - { - 'transaction': instance.transaction.toJson(), - 'data': instance.data?.toJson(), - }; + _TonWalletTransactionWithData instance, +) => { + 'transaction': instance.transaction.toJson(), + 'data': instance.data?.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transfer_params.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transfer_params.freezed.dart index c01c212b..197d00b5 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transfer_params.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transfer_params.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,64 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TonWalletTransferParams { - Address get destination; - BigInt get amount; - bool get bounce; - String? get body; - String? get stateInit; - - /// Create a copy of TonWalletTransferParams - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TonWalletTransferParamsCopyWith get copyWith => - _$TonWalletTransferParamsCopyWithImpl( - this as TonWalletTransferParams, _$identity); + + Address get destination; BigInt get amount; bool get bounce; String? get body; String? get stateInit; +/// Create a copy of TonWalletTransferParams +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TonWalletTransferParamsCopyWith get copyWith => _$TonWalletTransferParamsCopyWithImpl(this as TonWalletTransferParams, _$identity); /// Serializes this TonWalletTransferParams to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TonWalletTransferParams && - (identical(other.destination, destination) || - other.destination == destination) && - (identical(other.amount, amount) || other.amount == amount) && - (identical(other.bounce, bounce) || other.bounce == bounce) && - (identical(other.body, body) || other.body == body) && - (identical(other.stateInit, stateInit) || - other.stateInit == stateInit)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, destination, amount, bounce, body, stateInit); - - @override - String toString() { - return 'TonWalletTransferParams(destination: $destination, amount: $amount, bounce: $bounce, body: $body, stateInit: $stateInit)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TonWalletTransferParams&&(identical(other.destination, destination) || other.destination == destination)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.bounce, bounce) || other.bounce == bounce)&&(identical(other.body, body) || other.body == body)&&(identical(other.stateInit, stateInit) || other.stateInit == stateInit)); } -/// @nodoc -abstract mixin class $TonWalletTransferParamsCopyWith<$Res> { - factory $TonWalletTransferParamsCopyWith(TonWalletTransferParams value, - $Res Function(TonWalletTransferParams) _then) = - _$TonWalletTransferParamsCopyWithImpl; - @useResult - $Res call( - {Address destination, - BigInt amount, - bool bounce, - String? body, - String? stateInit}); - - $AddressCopyWith<$Res> get destination; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,destination,amount,bounce,body,stateInit); + +@override +String toString() { + return 'TonWalletTransferParams(destination: $destination, amount: $amount, bounce: $bounce, body: $body, stateInit: $stateInit)'; +} + + } +/// @nodoc +abstract mixin class $TonWalletTransferParamsCopyWith<$Res> { + factory $TonWalletTransferParamsCopyWith(TonWalletTransferParams value, $Res Function(TonWalletTransferParams) _then) = _$TonWalletTransferParamsCopyWithImpl; +@useResult +$Res call({ + Address destination, BigInt amount, bool bounce, String? body, String? stateInit +}); + + +$AddressCopyWith<$Res> get destination; + +} /// @nodoc class _$TonWalletTransferParamsCopyWithImpl<$Res> implements $TonWalletTransferParamsCopyWith<$Res> { @@ -81,135 +63,208 @@ class _$TonWalletTransferParamsCopyWithImpl<$Res> final TonWalletTransferParams _self; final $Res Function(TonWalletTransferParams) _then; - /// Create a copy of TonWalletTransferParams - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? destination = null, - Object? amount = null, - Object? bounce = null, - Object? body = freezed, - Object? stateInit = freezed, - }) { - return _then(_self.copyWith( - destination: null == destination - ? _self.destination - : destination // ignore: cast_nullable_to_non_nullable - as Address, - amount: null == amount - ? _self.amount - : amount // ignore: cast_nullable_to_non_nullable - as BigInt, - bounce: null == bounce - ? _self.bounce - : bounce // ignore: cast_nullable_to_non_nullable - as bool, - body: freezed == body - ? _self.body - : body // ignore: cast_nullable_to_non_nullable - as String?, - stateInit: freezed == stateInit - ? _self.stateInit - : stateInit // ignore: cast_nullable_to_non_nullable - as String?, - )); - } - - /// Create a copy of TonWalletTransferParams - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get destination { - return $AddressCopyWith<$Res>(_self.destination, (value) { - return _then(_self.copyWith(destination: value)); - }); - } +/// Create a copy of TonWalletTransferParams +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? destination = null,Object? amount = null,Object? bounce = null,Object? body = freezed,Object? stateInit = freezed,}) { + return _then(_self.copyWith( +destination: null == destination ? _self.destination : destination // ignore: cast_nullable_to_non_nullable +as Address,amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable +as BigInt,bounce: null == bounce ? _self.bounce : bounce // ignore: cast_nullable_to_non_nullable +as bool,body: freezed == body ? _self.body : body // ignore: cast_nullable_to_non_nullable +as String?,stateInit: freezed == stateInit ? _self.stateInit : stateInit // ignore: cast_nullable_to_non_nullable +as String?, + )); +} +/// Create a copy of TonWalletTransferParams +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get destination { + + return $AddressCopyWith<$Res>(_self.destination, (value) { + return _then(_self.copyWith(destination: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [TonWalletTransferParams]. +extension TonWalletTransferParamsPatterns on TonWalletTransferParams { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TonWalletTransferParams value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TonWalletTransferParams() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TonWalletTransferParams value) $default,){ +final _that = this; +switch (_that) { +case _TonWalletTransferParams(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TonWalletTransferParams value)? $default,){ +final _that = this; +switch (_that) { +case _TonWalletTransferParams() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Address destination, BigInt amount, bool bounce, String? body, String? stateInit)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TonWalletTransferParams() when $default != null: +return $default(_that.destination,_that.amount,_that.bounce,_that.body,_that.stateInit);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Address destination, BigInt amount, bool bounce, String? body, String? stateInit) $default,) {final _that = this; +switch (_that) { +case _TonWalletTransferParams(): +return $default(_that.destination,_that.amount,_that.bounce,_that.body,_that.stateInit);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Address destination, BigInt amount, bool bounce, String? body, String? stateInit)? $default,) {final _that = this; +switch (_that) { +case _TonWalletTransferParams() when $default != null: +return $default(_that.destination,_that.amount,_that.bounce,_that.body,_that.stateInit);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _TonWalletTransferParams implements TonWalletTransferParams { - _TonWalletTransferParams( - {required this.destination, - required this.amount, - required this.bounce, - this.body, - this.stateInit}); - factory _TonWalletTransferParams.fromJson(Map json) => - _$TonWalletTransferParamsFromJson(json); - - @override - final Address destination; - @override - final BigInt amount; - @override - final bool bounce; - @override - final String? body; - @override - final String? stateInit; - - /// Create a copy of TonWalletTransferParams - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TonWalletTransferParamsCopyWith<_TonWalletTransferParams> get copyWith => - __$TonWalletTransferParamsCopyWithImpl<_TonWalletTransferParams>( - this, _$identity); - - @override - Map toJson() { - return _$TonWalletTransferParamsToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TonWalletTransferParams && - (identical(other.destination, destination) || - other.destination == destination) && - (identical(other.amount, amount) || other.amount == amount) && - (identical(other.bounce, bounce) || other.bounce == bounce) && - (identical(other.body, body) || other.body == body) && - (identical(other.stateInit, stateInit) || - other.stateInit == stateInit)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, destination, amount, bounce, body, stateInit); - - @override - String toString() { - return 'TonWalletTransferParams(destination: $destination, amount: $amount, bounce: $bounce, body: $body, stateInit: $stateInit)'; - } + _TonWalletTransferParams({required this.destination, required this.amount, required this.bounce, this.body, this.stateInit}); + factory _TonWalletTransferParams.fromJson(Map json) => _$TonWalletTransferParamsFromJson(json); + +@override final Address destination; +@override final BigInt amount; +@override final bool bounce; +@override final String? body; +@override final String? stateInit; + +/// Create a copy of TonWalletTransferParams +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TonWalletTransferParamsCopyWith<_TonWalletTransferParams> get copyWith => __$TonWalletTransferParamsCopyWithImpl<_TonWalletTransferParams>(this, _$identity); + +@override +Map toJson() { + return _$TonWalletTransferParamsToJson(this, ); } -/// @nodoc -abstract mixin class _$TonWalletTransferParamsCopyWith<$Res> - implements $TonWalletTransferParamsCopyWith<$Res> { - factory _$TonWalletTransferParamsCopyWith(_TonWalletTransferParams value, - $Res Function(_TonWalletTransferParams) _then) = - __$TonWalletTransferParamsCopyWithImpl; - @override - @useResult - $Res call( - {Address destination, - BigInt amount, - bool bounce, - String? body, - String? stateInit}); - - @override - $AddressCopyWith<$Res> get destination; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TonWalletTransferParams&&(identical(other.destination, destination) || other.destination == destination)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.bounce, bounce) || other.bounce == bounce)&&(identical(other.body, body) || other.body == body)&&(identical(other.stateInit, stateInit) || other.stateInit == stateInit)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,destination,amount,bounce,body,stateInit); + +@override +String toString() { + return 'TonWalletTransferParams(destination: $destination, amount: $amount, bounce: $bounce, body: $body, stateInit: $stateInit)'; +} + + } +/// @nodoc +abstract mixin class _$TonWalletTransferParamsCopyWith<$Res> implements $TonWalletTransferParamsCopyWith<$Res> { + factory _$TonWalletTransferParamsCopyWith(_TonWalletTransferParams value, $Res Function(_TonWalletTransferParams) _then) = __$TonWalletTransferParamsCopyWithImpl; +@override @useResult +$Res call({ + Address destination, BigInt amount, bool bounce, String? body, String? stateInit +}); + + +@override $AddressCopyWith<$Res> get destination; + +} /// @nodoc class __$TonWalletTransferParamsCopyWithImpl<$Res> implements _$TonWalletTransferParamsCopyWith<$Res> { @@ -218,50 +273,29 @@ class __$TonWalletTransferParamsCopyWithImpl<$Res> final _TonWalletTransferParams _self; final $Res Function(_TonWalletTransferParams) _then; - /// Create a copy of TonWalletTransferParams - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? destination = null, - Object? amount = null, - Object? bounce = null, - Object? body = freezed, - Object? stateInit = freezed, - }) { - return _then(_TonWalletTransferParams( - destination: null == destination - ? _self.destination - : destination // ignore: cast_nullable_to_non_nullable - as Address, - amount: null == amount - ? _self.amount - : amount // ignore: cast_nullable_to_non_nullable - as BigInt, - bounce: null == bounce - ? _self.bounce - : bounce // ignore: cast_nullable_to_non_nullable - as bool, - body: freezed == body - ? _self.body - : body // ignore: cast_nullable_to_non_nullable - as String?, - stateInit: freezed == stateInit - ? _self.stateInit - : stateInit // ignore: cast_nullable_to_non_nullable - as String?, - )); - } - - /// Create a copy of TonWalletTransferParams - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get destination { - return $AddressCopyWith<$Res>(_self.destination, (value) { - return _then(_self.copyWith(destination: value)); - }); - } +/// Create a copy of TonWalletTransferParams +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? destination = null,Object? amount = null,Object? bounce = null,Object? body = freezed,Object? stateInit = freezed,}) { + return _then(_TonWalletTransferParams( +destination: null == destination ? _self.destination : destination // ignore: cast_nullable_to_non_nullable +as Address,amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable +as BigInt,bounce: null == bounce ? _self.bounce : bounce // ignore: cast_nullable_to_non_nullable +as bool,body: freezed == body ? _self.body : body // ignore: cast_nullable_to_non_nullable +as String?,stateInit: freezed == stateInit ? _self.stateInit : stateInit // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +/// Create a copy of TonWalletTransferParams +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get destination { + + return $AddressCopyWith<$Res>(_self.destination, (value) { + return _then(_self.copyWith(destination: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transfer_params.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transfer_params.g.dart index 84bf5451..5b79cf4a 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transfer_params.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/ton_wallet_transfer_params.g.dart @@ -7,21 +7,21 @@ part of 'ton_wallet_transfer_params.dart'; // ************************************************************************** _TonWalletTransferParams _$TonWalletTransferParamsFromJson( - Map json) => - _TonWalletTransferParams( - destination: Address.fromJson(json['destination'] as String), - amount: BigInt.parse(json['amount'] as String), - bounce: json['bounce'] as bool, - body: json['body'] as String?, - stateInit: json['stateInit'] as String?, - ); + Map json, +) => _TonWalletTransferParams( + destination: Address.fromJson(json['destination'] as String), + amount: BigInt.parse(json['amount'] as String), + bounce: json['bounce'] as bool, + body: json['body'] as String?, + stateInit: json['stateInit'] as String?, +); Map _$TonWalletTransferParamsToJson( - _TonWalletTransferParams instance) => - { - 'destination': instance.destination.toJson(), - 'amount': instance.amount.toString(), - 'bounce': instance.bounce, - 'body': instance.body, - 'stateInit': instance.stateInit, - }; + _TonWalletTransferParams instance, +) => { + 'destination': instance.destination.toJson(), + 'amount': instance.amount.toString(), + 'bounce': instance.bounce, + 'body': instance.body, + 'stateInit': instance.stateInit, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_additional_info.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_additional_info.dart index 2ae586ab..f0bb207d 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_additional_info.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_additional_info.dart @@ -26,12 +26,12 @@ sealed class TransactionAdditionalInfo with _$TransactionAdditionalInfo { ) = TransactionAdditionalInfoTokenWalletDeployed; const factory TransactionAdditionalInfo.walletInteraction( - final WalletInteractionInfo data) = - TransactionAdditionalInfoWalletInteraction; + final WalletInteractionInfo data, + ) = TransactionAdditionalInfoWalletInteraction; const factory TransactionAdditionalInfo.jettonNotify( - final JettonIncomingTransfer data) = - TransactionAdditionalInfoJettonNotify; + final JettonIncomingTransfer data, + ) = TransactionAdditionalInfoJettonNotify; factory TransactionAdditionalInfo.fromJson(Map json) => _$TransactionAdditionalInfoFromJson(json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_additional_info.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_additional_info.freezed.dart index dbab4bfd..4fa9edb3 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_additional_info.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_additional_info.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -13,118 +12,284 @@ part of 'transaction_additional_info.dart'; // dart format off T _$identity(T value) => value; TransactionAdditionalInfo _$TransactionAdditionalInfoFromJson( - Map json) { - switch (json['type']) { - case 'comment': - return TransactionAdditionalInfoComment.fromJson(json); - case 'de_pool_on_round_complete': - return TransactionAdditionalInfoDePoolOnRoundComplete.fromJson(json); - case 'de_pool_receive_answer': - return TransactionAdditionalInfoDePoolReceiveAnswer.fromJson(json); - case 'token_wallet_deployed': - return TransactionAdditionalInfoTokenWalletDeployed.fromJson(json); - case 'wallet_interaction': - return TransactionAdditionalInfoWalletInteraction.fromJson(json); - case 'jetton_notify': - return TransactionAdditionalInfoJettonNotify.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'type', 'TransactionAdditionalInfo', - 'Invalid union type "${json['type']}"!'); - } + Map json +) { + switch (json['type']) { + case 'comment': + return TransactionAdditionalInfoComment.fromJson( + json + ); + case 'de_pool_on_round_complete': + return TransactionAdditionalInfoDePoolOnRoundComplete.fromJson( + json + ); + case 'de_pool_receive_answer': + return TransactionAdditionalInfoDePoolReceiveAnswer.fromJson( + json + ); + case 'token_wallet_deployed': + return TransactionAdditionalInfoTokenWalletDeployed.fromJson( + json + ); + case 'wallet_interaction': + return TransactionAdditionalInfoWalletInteraction.fromJson( + json + ); + case 'jetton_notify': + return TransactionAdditionalInfoJettonNotify.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'TransactionAdditionalInfo', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$TransactionAdditionalInfo { - Object get data; + + Object get data; /// Serializes this TransactionAdditionalInfo to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransactionAdditionalInfo && - const DeepCollectionEquality().equals(other.data, data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(data)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransactionAdditionalInfo&&const DeepCollectionEquality().equals(other.data, data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(data)); + +@override +String toString() { + return 'TransactionAdditionalInfo(data: $data)'; +} + - @override - String toString() { - return 'TransactionAdditionalInfo(data: $data)'; - } } /// @nodoc -class $TransactionAdditionalInfoCopyWith<$Res> { - $TransactionAdditionalInfoCopyWith( - TransactionAdditionalInfo _, $Res Function(TransactionAdditionalInfo) __); +class $TransactionAdditionalInfoCopyWith<$Res> { +$TransactionAdditionalInfoCopyWith(TransactionAdditionalInfo _, $Res Function(TransactionAdditionalInfo) __); +} + + +/// Adds pattern-matching-related methods to [TransactionAdditionalInfo]. +extension TransactionAdditionalInfoPatterns on TransactionAdditionalInfo { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( TransactionAdditionalInfoComment value)? comment,TResult Function( TransactionAdditionalInfoDePoolOnRoundComplete value)? dePoolOnRoundComplete,TResult Function( TransactionAdditionalInfoDePoolReceiveAnswer value)? dePoolReceiveAnswer,TResult Function( TransactionAdditionalInfoTokenWalletDeployed value)? tokenWalletDeployed,TResult Function( TransactionAdditionalInfoWalletInteraction value)? walletInteraction,TResult Function( TransactionAdditionalInfoJettonNotify value)? jettonNotify,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case TransactionAdditionalInfoComment() when comment != null: +return comment(_that);case TransactionAdditionalInfoDePoolOnRoundComplete() when dePoolOnRoundComplete != null: +return dePoolOnRoundComplete(_that);case TransactionAdditionalInfoDePoolReceiveAnswer() when dePoolReceiveAnswer != null: +return dePoolReceiveAnswer(_that);case TransactionAdditionalInfoTokenWalletDeployed() when tokenWalletDeployed != null: +return tokenWalletDeployed(_that);case TransactionAdditionalInfoWalletInteraction() when walletInteraction != null: +return walletInteraction(_that);case TransactionAdditionalInfoJettonNotify() when jettonNotify != null: +return jettonNotify(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( TransactionAdditionalInfoComment value) comment,required TResult Function( TransactionAdditionalInfoDePoolOnRoundComplete value) dePoolOnRoundComplete,required TResult Function( TransactionAdditionalInfoDePoolReceiveAnswer value) dePoolReceiveAnswer,required TResult Function( TransactionAdditionalInfoTokenWalletDeployed value) tokenWalletDeployed,required TResult Function( TransactionAdditionalInfoWalletInteraction value) walletInteraction,required TResult Function( TransactionAdditionalInfoJettonNotify value) jettonNotify,}){ +final _that = this; +switch (_that) { +case TransactionAdditionalInfoComment(): +return comment(_that);case TransactionAdditionalInfoDePoolOnRoundComplete(): +return dePoolOnRoundComplete(_that);case TransactionAdditionalInfoDePoolReceiveAnswer(): +return dePoolReceiveAnswer(_that);case TransactionAdditionalInfoTokenWalletDeployed(): +return tokenWalletDeployed(_that);case TransactionAdditionalInfoWalletInteraction(): +return walletInteraction(_that);case TransactionAdditionalInfoJettonNotify(): +return jettonNotify(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( TransactionAdditionalInfoComment value)? comment,TResult? Function( TransactionAdditionalInfoDePoolOnRoundComplete value)? dePoolOnRoundComplete,TResult? Function( TransactionAdditionalInfoDePoolReceiveAnswer value)? dePoolReceiveAnswer,TResult? Function( TransactionAdditionalInfoTokenWalletDeployed value)? tokenWalletDeployed,TResult? Function( TransactionAdditionalInfoWalletInteraction value)? walletInteraction,TResult? Function( TransactionAdditionalInfoJettonNotify value)? jettonNotify,}){ +final _that = this; +switch (_that) { +case TransactionAdditionalInfoComment() when comment != null: +return comment(_that);case TransactionAdditionalInfoDePoolOnRoundComplete() when dePoolOnRoundComplete != null: +return dePoolOnRoundComplete(_that);case TransactionAdditionalInfoDePoolReceiveAnswer() when dePoolReceiveAnswer != null: +return dePoolReceiveAnswer(_that);case TransactionAdditionalInfoTokenWalletDeployed() when tokenWalletDeployed != null: +return tokenWalletDeployed(_that);case TransactionAdditionalInfoWalletInteraction() when walletInteraction != null: +return walletInteraction(_that);case TransactionAdditionalInfoJettonNotify() when jettonNotify != null: +return jettonNotify(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( String data)? comment,TResult Function( DePoolOnRoundCompleteNotification data)? dePoolOnRoundComplete,TResult Function( DePoolReceiveAnswerNotification data)? dePoolReceiveAnswer,TResult Function( TokenWalletDeployedNotification data)? tokenWalletDeployed,TResult Function( WalletInteractionInfo data)? walletInteraction,TResult Function( JettonIncomingTransfer data)? jettonNotify,required TResult orElse(),}) {final _that = this; +switch (_that) { +case TransactionAdditionalInfoComment() when comment != null: +return comment(_that.data);case TransactionAdditionalInfoDePoolOnRoundComplete() when dePoolOnRoundComplete != null: +return dePoolOnRoundComplete(_that.data);case TransactionAdditionalInfoDePoolReceiveAnswer() when dePoolReceiveAnswer != null: +return dePoolReceiveAnswer(_that.data);case TransactionAdditionalInfoTokenWalletDeployed() when tokenWalletDeployed != null: +return tokenWalletDeployed(_that.data);case TransactionAdditionalInfoWalletInteraction() when walletInteraction != null: +return walletInteraction(_that.data);case TransactionAdditionalInfoJettonNotify() when jettonNotify != null: +return jettonNotify(_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( String data) comment,required TResult Function( DePoolOnRoundCompleteNotification data) dePoolOnRoundComplete,required TResult Function( DePoolReceiveAnswerNotification data) dePoolReceiveAnswer,required TResult Function( TokenWalletDeployedNotification data) tokenWalletDeployed,required TResult Function( WalletInteractionInfo data) walletInteraction,required TResult Function( JettonIncomingTransfer data) jettonNotify,}) {final _that = this; +switch (_that) { +case TransactionAdditionalInfoComment(): +return comment(_that.data);case TransactionAdditionalInfoDePoolOnRoundComplete(): +return dePoolOnRoundComplete(_that.data);case TransactionAdditionalInfoDePoolReceiveAnswer(): +return dePoolReceiveAnswer(_that.data);case TransactionAdditionalInfoTokenWalletDeployed(): +return tokenWalletDeployed(_that.data);case TransactionAdditionalInfoWalletInteraction(): +return walletInteraction(_that.data);case TransactionAdditionalInfoJettonNotify(): +return jettonNotify(_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( String data)? comment,TResult? Function( DePoolOnRoundCompleteNotification data)? dePoolOnRoundComplete,TResult? Function( DePoolReceiveAnswerNotification data)? dePoolReceiveAnswer,TResult? Function( TokenWalletDeployedNotification data)? tokenWalletDeployed,TResult? Function( WalletInteractionInfo data)? walletInteraction,TResult? Function( JettonIncomingTransfer data)? jettonNotify,}) {final _that = this; +switch (_that) { +case TransactionAdditionalInfoComment() when comment != null: +return comment(_that.data);case TransactionAdditionalInfoDePoolOnRoundComplete() when dePoolOnRoundComplete != null: +return dePoolOnRoundComplete(_that.data);case TransactionAdditionalInfoDePoolReceiveAnswer() when dePoolReceiveAnswer != null: +return dePoolReceiveAnswer(_that.data);case TransactionAdditionalInfoTokenWalletDeployed() when tokenWalletDeployed != null: +return tokenWalletDeployed(_that.data);case TransactionAdditionalInfoWalletInteraction() when walletInteraction != null: +return walletInteraction(_that.data);case TransactionAdditionalInfoJettonNotify() when jettonNotify != null: +return jettonNotify(_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class TransactionAdditionalInfoComment implements TransactionAdditionalInfo { - const TransactionAdditionalInfoComment(this.data, {final String? $type}) - : $type = $type ?? 'comment'; - factory TransactionAdditionalInfoComment.fromJson( - Map json) => - _$TransactionAdditionalInfoCommentFromJson(json); - - @override - final String data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransactionAdditionalInfoCommentCopyWith - get copyWith => _$TransactionAdditionalInfoCommentCopyWithImpl< - TransactionAdditionalInfoComment>(this, _$identity); - - @override - Map toJson() { - return _$TransactionAdditionalInfoCommentToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransactionAdditionalInfoComment && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TransactionAdditionalInfo.comment(data: $data)'; - } + const TransactionAdditionalInfoComment(this.data, {final String? $type}): $type = $type ?? 'comment'; + factory TransactionAdditionalInfoComment.fromJson(Map json) => _$TransactionAdditionalInfoCommentFromJson(json); + +@override final String data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransactionAdditionalInfoCommentCopyWith get copyWith => _$TransactionAdditionalInfoCommentCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TransactionAdditionalInfoCommentToJson(this, ); } -/// @nodoc -abstract mixin class $TransactionAdditionalInfoCommentCopyWith<$Res> - implements $TransactionAdditionalInfoCopyWith<$Res> { - factory $TransactionAdditionalInfoCommentCopyWith( - TransactionAdditionalInfoComment value, - $Res Function(TransactionAdditionalInfoComment) _then) = - _$TransactionAdditionalInfoCommentCopyWithImpl; - @useResult - $Res call({String data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransactionAdditionalInfoComment&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TransactionAdditionalInfo.comment(data: $data)'; +} + + } +/// @nodoc +abstract mixin class $TransactionAdditionalInfoCommentCopyWith<$Res> implements $TransactionAdditionalInfoCopyWith<$Res> { + factory $TransactionAdditionalInfoCommentCopyWith(TransactionAdditionalInfoComment value, $Res Function(TransactionAdditionalInfoComment) _then) = _$TransactionAdditionalInfoCommentCopyWithImpl; +@useResult +$Res call({ + String data +}); + + + + +} /// @nodoc class _$TransactionAdditionalInfoCommentCopyWithImpl<$Res> implements $TransactionAdditionalInfoCommentCopyWith<$Res> { @@ -133,480 +298,399 @@ class _$TransactionAdditionalInfoCommentCopyWithImpl<$Res> final TransactionAdditionalInfoComment _self; final $Res Function(TransactionAdditionalInfoComment) _then; - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TransactionAdditionalInfoComment( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TransactionAdditionalInfoComment( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } /// @nodoc @JsonSerializable() -class TransactionAdditionalInfoDePoolOnRoundComplete - implements TransactionAdditionalInfo { - const TransactionAdditionalInfoDePoolOnRoundComplete(this.data, - {final String? $type}) - : $type = $type ?? 'de_pool_on_round_complete'; - factory TransactionAdditionalInfoDePoolOnRoundComplete.fromJson( - Map json) => - _$TransactionAdditionalInfoDePoolOnRoundCompleteFromJson(json); - - @override - final DePoolOnRoundCompleteNotification data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransactionAdditionalInfoDePoolOnRoundCompleteCopyWith< - TransactionAdditionalInfoDePoolOnRoundComplete> - get copyWith => - _$TransactionAdditionalInfoDePoolOnRoundCompleteCopyWithImpl< - TransactionAdditionalInfoDePoolOnRoundComplete>(this, _$identity); - - @override - Map toJson() { - return _$TransactionAdditionalInfoDePoolOnRoundCompleteToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransactionAdditionalInfoDePoolOnRoundComplete && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TransactionAdditionalInfo.dePoolOnRoundComplete(data: $data)'; - } + +class TransactionAdditionalInfoDePoolOnRoundComplete implements TransactionAdditionalInfo { + const TransactionAdditionalInfoDePoolOnRoundComplete(this.data, {final String? $type}): $type = $type ?? 'de_pool_on_round_complete'; + factory TransactionAdditionalInfoDePoolOnRoundComplete.fromJson(Map json) => _$TransactionAdditionalInfoDePoolOnRoundCompleteFromJson(json); + +@override final DePoolOnRoundCompleteNotification data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransactionAdditionalInfoDePoolOnRoundCompleteCopyWith get copyWith => _$TransactionAdditionalInfoDePoolOnRoundCompleteCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TransactionAdditionalInfoDePoolOnRoundCompleteToJson(this, ); } -/// @nodoc -abstract mixin class $TransactionAdditionalInfoDePoolOnRoundCompleteCopyWith< - $Res> implements $TransactionAdditionalInfoCopyWith<$Res> { - factory $TransactionAdditionalInfoDePoolOnRoundCompleteCopyWith( - TransactionAdditionalInfoDePoolOnRoundComplete value, - $Res Function(TransactionAdditionalInfoDePoolOnRoundComplete) _then) = - _$TransactionAdditionalInfoDePoolOnRoundCompleteCopyWithImpl; - @useResult - $Res call({DePoolOnRoundCompleteNotification data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransactionAdditionalInfoDePoolOnRoundComplete&&(identical(other.data, data) || other.data == data)); +} - $DePoolOnRoundCompleteNotificationCopyWith<$Res> get data; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TransactionAdditionalInfo.dePoolOnRoundComplete(data: $data)'; } + +} + +/// @nodoc +abstract mixin class $TransactionAdditionalInfoDePoolOnRoundCompleteCopyWith<$Res> implements $TransactionAdditionalInfoCopyWith<$Res> { + factory $TransactionAdditionalInfoDePoolOnRoundCompleteCopyWith(TransactionAdditionalInfoDePoolOnRoundComplete value, $Res Function(TransactionAdditionalInfoDePoolOnRoundComplete) _then) = _$TransactionAdditionalInfoDePoolOnRoundCompleteCopyWithImpl; +@useResult +$Res call({ + DePoolOnRoundCompleteNotification data +}); + + +$DePoolOnRoundCompleteNotificationCopyWith<$Res> get data; + +} /// @nodoc class _$TransactionAdditionalInfoDePoolOnRoundCompleteCopyWithImpl<$Res> implements $TransactionAdditionalInfoDePoolOnRoundCompleteCopyWith<$Res> { - _$TransactionAdditionalInfoDePoolOnRoundCompleteCopyWithImpl( - this._self, this._then); + _$TransactionAdditionalInfoDePoolOnRoundCompleteCopyWithImpl(this._self, this._then); final TransactionAdditionalInfoDePoolOnRoundComplete _self; final $Res Function(TransactionAdditionalInfoDePoolOnRoundComplete) _then; - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TransactionAdditionalInfoDePoolOnRoundComplete( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as DePoolOnRoundCompleteNotification, - )); - } - - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $DePoolOnRoundCompleteNotificationCopyWith<$Res> get data { - return $DePoolOnRoundCompleteNotificationCopyWith<$Res>(_self.data, - (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TransactionAdditionalInfoDePoolOnRoundComplete( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as DePoolOnRoundCompleteNotification, + )); +} + +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$DePoolOnRoundCompleteNotificationCopyWith<$Res> get data { + + return $DePoolOnRoundCompleteNotificationCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() -class TransactionAdditionalInfoDePoolReceiveAnswer - implements TransactionAdditionalInfo { - const TransactionAdditionalInfoDePoolReceiveAnswer(this.data, - {final String? $type}) - : $type = $type ?? 'de_pool_receive_answer'; - factory TransactionAdditionalInfoDePoolReceiveAnswer.fromJson( - Map json) => - _$TransactionAdditionalInfoDePoolReceiveAnswerFromJson(json); - - @override - final DePoolReceiveAnswerNotification data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransactionAdditionalInfoDePoolReceiveAnswerCopyWith< - TransactionAdditionalInfoDePoolReceiveAnswer> - get copyWith => - _$TransactionAdditionalInfoDePoolReceiveAnswerCopyWithImpl< - TransactionAdditionalInfoDePoolReceiveAnswer>(this, _$identity); - - @override - Map toJson() { - return _$TransactionAdditionalInfoDePoolReceiveAnswerToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransactionAdditionalInfoDePoolReceiveAnswer && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TransactionAdditionalInfo.dePoolReceiveAnswer(data: $data)'; - } + +class TransactionAdditionalInfoDePoolReceiveAnswer implements TransactionAdditionalInfo { + const TransactionAdditionalInfoDePoolReceiveAnswer(this.data, {final String? $type}): $type = $type ?? 'de_pool_receive_answer'; + factory TransactionAdditionalInfoDePoolReceiveAnswer.fromJson(Map json) => _$TransactionAdditionalInfoDePoolReceiveAnswerFromJson(json); + +@override final DePoolReceiveAnswerNotification data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransactionAdditionalInfoDePoolReceiveAnswerCopyWith get copyWith => _$TransactionAdditionalInfoDePoolReceiveAnswerCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TransactionAdditionalInfoDePoolReceiveAnswerToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransactionAdditionalInfoDePoolReceiveAnswer&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TransactionAdditionalInfo.dePoolReceiveAnswer(data: $data)'; } -/// @nodoc -abstract mixin class $TransactionAdditionalInfoDePoolReceiveAnswerCopyWith<$Res> - implements $TransactionAdditionalInfoCopyWith<$Res> { - factory $TransactionAdditionalInfoDePoolReceiveAnswerCopyWith( - TransactionAdditionalInfoDePoolReceiveAnswer value, - $Res Function(TransactionAdditionalInfoDePoolReceiveAnswer) _then) = - _$TransactionAdditionalInfoDePoolReceiveAnswerCopyWithImpl; - @useResult - $Res call({DePoolReceiveAnswerNotification data}); - $DePoolReceiveAnswerNotificationCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $TransactionAdditionalInfoDePoolReceiveAnswerCopyWith<$Res> implements $TransactionAdditionalInfoCopyWith<$Res> { + factory $TransactionAdditionalInfoDePoolReceiveAnswerCopyWith(TransactionAdditionalInfoDePoolReceiveAnswer value, $Res Function(TransactionAdditionalInfoDePoolReceiveAnswer) _then) = _$TransactionAdditionalInfoDePoolReceiveAnswerCopyWithImpl; +@useResult +$Res call({ + DePoolReceiveAnswerNotification data +}); + + +$DePoolReceiveAnswerNotificationCopyWith<$Res> get data; + +} /// @nodoc class _$TransactionAdditionalInfoDePoolReceiveAnswerCopyWithImpl<$Res> implements $TransactionAdditionalInfoDePoolReceiveAnswerCopyWith<$Res> { - _$TransactionAdditionalInfoDePoolReceiveAnswerCopyWithImpl( - this._self, this._then); + _$TransactionAdditionalInfoDePoolReceiveAnswerCopyWithImpl(this._self, this._then); final TransactionAdditionalInfoDePoolReceiveAnswer _self; final $Res Function(TransactionAdditionalInfoDePoolReceiveAnswer) _then; - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TransactionAdditionalInfoDePoolReceiveAnswer( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as DePoolReceiveAnswerNotification, - )); - } - - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $DePoolReceiveAnswerNotificationCopyWith<$Res> get data { - return $DePoolReceiveAnswerNotificationCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TransactionAdditionalInfoDePoolReceiveAnswer( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as DePoolReceiveAnswerNotification, + )); +} + +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$DePoolReceiveAnswerNotificationCopyWith<$Res> get data { + + return $DePoolReceiveAnswerNotificationCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() -class TransactionAdditionalInfoTokenWalletDeployed - implements TransactionAdditionalInfo { - const TransactionAdditionalInfoTokenWalletDeployed(this.data, - {final String? $type}) - : $type = $type ?? 'token_wallet_deployed'; - factory TransactionAdditionalInfoTokenWalletDeployed.fromJson( - Map json) => - _$TransactionAdditionalInfoTokenWalletDeployedFromJson(json); - - @override - final TokenWalletDeployedNotification data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransactionAdditionalInfoTokenWalletDeployedCopyWith< - TransactionAdditionalInfoTokenWalletDeployed> - get copyWith => - _$TransactionAdditionalInfoTokenWalletDeployedCopyWithImpl< - TransactionAdditionalInfoTokenWalletDeployed>(this, _$identity); - - @override - Map toJson() { - return _$TransactionAdditionalInfoTokenWalletDeployedToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransactionAdditionalInfoTokenWalletDeployed && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TransactionAdditionalInfo.tokenWalletDeployed(data: $data)'; - } + +class TransactionAdditionalInfoTokenWalletDeployed implements TransactionAdditionalInfo { + const TransactionAdditionalInfoTokenWalletDeployed(this.data, {final String? $type}): $type = $type ?? 'token_wallet_deployed'; + factory TransactionAdditionalInfoTokenWalletDeployed.fromJson(Map json) => _$TransactionAdditionalInfoTokenWalletDeployedFromJson(json); + +@override final TokenWalletDeployedNotification data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransactionAdditionalInfoTokenWalletDeployedCopyWith get copyWith => _$TransactionAdditionalInfoTokenWalletDeployedCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TransactionAdditionalInfoTokenWalletDeployedToJson(this, ); } -/// @nodoc -abstract mixin class $TransactionAdditionalInfoTokenWalletDeployedCopyWith<$Res> - implements $TransactionAdditionalInfoCopyWith<$Res> { - factory $TransactionAdditionalInfoTokenWalletDeployedCopyWith( - TransactionAdditionalInfoTokenWalletDeployed value, - $Res Function(TransactionAdditionalInfoTokenWalletDeployed) _then) = - _$TransactionAdditionalInfoTokenWalletDeployedCopyWithImpl; - @useResult - $Res call({TokenWalletDeployedNotification data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransactionAdditionalInfoTokenWalletDeployed&&(identical(other.data, data) || other.data == data)); +} - $TokenWalletDeployedNotificationCopyWith<$Res> get data; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TransactionAdditionalInfo.tokenWalletDeployed(data: $data)'; } + +} + +/// @nodoc +abstract mixin class $TransactionAdditionalInfoTokenWalletDeployedCopyWith<$Res> implements $TransactionAdditionalInfoCopyWith<$Res> { + factory $TransactionAdditionalInfoTokenWalletDeployedCopyWith(TransactionAdditionalInfoTokenWalletDeployed value, $Res Function(TransactionAdditionalInfoTokenWalletDeployed) _then) = _$TransactionAdditionalInfoTokenWalletDeployedCopyWithImpl; +@useResult +$Res call({ + TokenWalletDeployedNotification data +}); + + +$TokenWalletDeployedNotificationCopyWith<$Res> get data; + +} /// @nodoc class _$TransactionAdditionalInfoTokenWalletDeployedCopyWithImpl<$Res> implements $TransactionAdditionalInfoTokenWalletDeployedCopyWith<$Res> { - _$TransactionAdditionalInfoTokenWalletDeployedCopyWithImpl( - this._self, this._then); + _$TransactionAdditionalInfoTokenWalletDeployedCopyWithImpl(this._self, this._then); final TransactionAdditionalInfoTokenWalletDeployed _self; final $Res Function(TransactionAdditionalInfoTokenWalletDeployed) _then; - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TransactionAdditionalInfoTokenWalletDeployed( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as TokenWalletDeployedNotification, - )); - } - - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TokenWalletDeployedNotificationCopyWith<$Res> get data { - return $TokenWalletDeployedNotificationCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TransactionAdditionalInfoTokenWalletDeployed( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as TokenWalletDeployedNotification, + )); +} + +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TokenWalletDeployedNotificationCopyWith<$Res> get data { + + return $TokenWalletDeployedNotificationCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() -class TransactionAdditionalInfoWalletInteraction - implements TransactionAdditionalInfo { - const TransactionAdditionalInfoWalletInteraction(this.data, - {final String? $type}) - : $type = $type ?? 'wallet_interaction'; - factory TransactionAdditionalInfoWalletInteraction.fromJson( - Map json) => - _$TransactionAdditionalInfoWalletInteractionFromJson(json); - - @override - final WalletInteractionInfo data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransactionAdditionalInfoWalletInteractionCopyWith< - TransactionAdditionalInfoWalletInteraction> - get copyWith => _$TransactionAdditionalInfoWalletInteractionCopyWithImpl< - TransactionAdditionalInfoWalletInteraction>(this, _$identity); - - @override - Map toJson() { - return _$TransactionAdditionalInfoWalletInteractionToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransactionAdditionalInfoWalletInteraction && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TransactionAdditionalInfo.walletInteraction(data: $data)'; - } + +class TransactionAdditionalInfoWalletInteraction implements TransactionAdditionalInfo { + const TransactionAdditionalInfoWalletInteraction(this.data, {final String? $type}): $type = $type ?? 'wallet_interaction'; + factory TransactionAdditionalInfoWalletInteraction.fromJson(Map json) => _$TransactionAdditionalInfoWalletInteractionFromJson(json); + +@override final WalletInteractionInfo data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransactionAdditionalInfoWalletInteractionCopyWith get copyWith => _$TransactionAdditionalInfoWalletInteractionCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TransactionAdditionalInfoWalletInteractionToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransactionAdditionalInfoWalletInteraction&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TransactionAdditionalInfo.walletInteraction(data: $data)'; } -/// @nodoc -abstract mixin class $TransactionAdditionalInfoWalletInteractionCopyWith<$Res> - implements $TransactionAdditionalInfoCopyWith<$Res> { - factory $TransactionAdditionalInfoWalletInteractionCopyWith( - TransactionAdditionalInfoWalletInteraction value, - $Res Function(TransactionAdditionalInfoWalletInteraction) _then) = - _$TransactionAdditionalInfoWalletInteractionCopyWithImpl; - @useResult - $Res call({WalletInteractionInfo data}); - $WalletInteractionInfoCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $TransactionAdditionalInfoWalletInteractionCopyWith<$Res> implements $TransactionAdditionalInfoCopyWith<$Res> { + factory $TransactionAdditionalInfoWalletInteractionCopyWith(TransactionAdditionalInfoWalletInteraction value, $Res Function(TransactionAdditionalInfoWalletInteraction) _then) = _$TransactionAdditionalInfoWalletInteractionCopyWithImpl; +@useResult +$Res call({ + WalletInteractionInfo data +}); + + +$WalletInteractionInfoCopyWith<$Res> get data; + +} /// @nodoc class _$TransactionAdditionalInfoWalletInteractionCopyWithImpl<$Res> implements $TransactionAdditionalInfoWalletInteractionCopyWith<$Res> { - _$TransactionAdditionalInfoWalletInteractionCopyWithImpl( - this._self, this._then); + _$TransactionAdditionalInfoWalletInteractionCopyWithImpl(this._self, this._then); final TransactionAdditionalInfoWalletInteraction _self; final $Res Function(TransactionAdditionalInfoWalletInteraction) _then; - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TransactionAdditionalInfoWalletInteraction( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as WalletInteractionInfo, - )); - } - - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $WalletInteractionInfoCopyWith<$Res> get data { - return $WalletInteractionInfoCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TransactionAdditionalInfoWalletInteraction( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as WalletInteractionInfo, + )); +} + +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$WalletInteractionInfoCopyWith<$Res> get data { + + return $WalletInteractionInfoCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() -class TransactionAdditionalInfoJettonNotify - implements TransactionAdditionalInfo { - const TransactionAdditionalInfoJettonNotify(this.data, {final String? $type}) - : $type = $type ?? 'jetton_notify'; - factory TransactionAdditionalInfoJettonNotify.fromJson( - Map json) => - _$TransactionAdditionalInfoJettonNotifyFromJson(json); - - @override - final JettonIncomingTransfer data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransactionAdditionalInfoJettonNotifyCopyWith< - TransactionAdditionalInfoJettonNotify> - get copyWith => _$TransactionAdditionalInfoJettonNotifyCopyWithImpl< - TransactionAdditionalInfoJettonNotify>(this, _$identity); - - @override - Map toJson() { - return _$TransactionAdditionalInfoJettonNotifyToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransactionAdditionalInfoJettonNotify && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'TransactionAdditionalInfo.jettonNotify(data: $data)'; - } + +class TransactionAdditionalInfoJettonNotify implements TransactionAdditionalInfo { + const TransactionAdditionalInfoJettonNotify(this.data, {final String? $type}): $type = $type ?? 'jetton_notify'; + factory TransactionAdditionalInfoJettonNotify.fromJson(Map json) => _$TransactionAdditionalInfoJettonNotifyFromJson(json); + +@override final JettonIncomingTransfer data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransactionAdditionalInfoJettonNotifyCopyWith get copyWith => _$TransactionAdditionalInfoJettonNotifyCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$TransactionAdditionalInfoJettonNotifyToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransactionAdditionalInfoJettonNotify&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'TransactionAdditionalInfo.jettonNotify(data: $data)'; } -/// @nodoc -abstract mixin class $TransactionAdditionalInfoJettonNotifyCopyWith<$Res> - implements $TransactionAdditionalInfoCopyWith<$Res> { - factory $TransactionAdditionalInfoJettonNotifyCopyWith( - TransactionAdditionalInfoJettonNotify value, - $Res Function(TransactionAdditionalInfoJettonNotify) _then) = - _$TransactionAdditionalInfoJettonNotifyCopyWithImpl; - @useResult - $Res call({JettonIncomingTransfer data}); - $JettonIncomingTransferCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class $TransactionAdditionalInfoJettonNotifyCopyWith<$Res> implements $TransactionAdditionalInfoCopyWith<$Res> { + factory $TransactionAdditionalInfoJettonNotifyCopyWith(TransactionAdditionalInfoJettonNotify value, $Res Function(TransactionAdditionalInfoJettonNotify) _then) = _$TransactionAdditionalInfoJettonNotifyCopyWithImpl; +@useResult +$Res call({ + JettonIncomingTransfer data +}); + + +$JettonIncomingTransferCopyWith<$Res> get data; + +} /// @nodoc class _$TransactionAdditionalInfoJettonNotifyCopyWithImpl<$Res> implements $TransactionAdditionalInfoJettonNotifyCopyWith<$Res> { @@ -615,29 +699,25 @@ class _$TransactionAdditionalInfoJettonNotifyCopyWithImpl<$Res> final TransactionAdditionalInfoJettonNotify _self; final $Res Function(TransactionAdditionalInfoJettonNotify) _then; - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(TransactionAdditionalInfoJettonNotify( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as JettonIncomingTransfer, - )); - } - - /// Create a copy of TransactionAdditionalInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $JettonIncomingTransferCopyWith<$Res> get data { - return $JettonIncomingTransferCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(TransactionAdditionalInfoJettonNotify( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as JettonIncomingTransfer, + )); +} + +/// Create a copy of TransactionAdditionalInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$JettonIncomingTransferCopyWith<$Res> get data { + + return $JettonIncomingTransferCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_additional_info.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_additional_info.g.dart index c8fe1563..0927299b 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_additional_info.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_additional_info.g.dart @@ -7,93 +7,77 @@ part of 'transaction_additional_info.dart'; // ************************************************************************** TransactionAdditionalInfoComment _$TransactionAdditionalInfoCommentFromJson( - Map json) => - TransactionAdditionalInfoComment( - json['data'] as String, - $type: json['type'] as String?, - ); + Map json, +) => TransactionAdditionalInfoComment( + json['data'] as String, + $type: json['type'] as String?, +); Map _$TransactionAdditionalInfoCommentToJson( - TransactionAdditionalInfoComment instance) => - { - 'data': instance.data, - 'type': instance.$type, - }; + TransactionAdditionalInfoComment instance, +) => {'data': instance.data, 'type': instance.$type}; TransactionAdditionalInfoDePoolOnRoundComplete - _$TransactionAdditionalInfoDePoolOnRoundCompleteFromJson( - Map json) => - TransactionAdditionalInfoDePoolOnRoundComplete( - DePoolOnRoundCompleteNotification.fromJson( - json['data'] as Map), - $type: json['type'] as String?, - ); +_$TransactionAdditionalInfoDePoolOnRoundCompleteFromJson( + Map json, +) => TransactionAdditionalInfoDePoolOnRoundComplete( + DePoolOnRoundCompleteNotification.fromJson( + json['data'] as Map, + ), + $type: json['type'] as String?, +); Map _$TransactionAdditionalInfoDePoolOnRoundCompleteToJson( - TransactionAdditionalInfoDePoolOnRoundComplete instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + TransactionAdditionalInfoDePoolOnRoundComplete instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; TransactionAdditionalInfoDePoolReceiveAnswer - _$TransactionAdditionalInfoDePoolReceiveAnswerFromJson( - Map json) => - TransactionAdditionalInfoDePoolReceiveAnswer( - DePoolReceiveAnswerNotification.fromJson( - json['data'] as Map), - $type: json['type'] as String?, - ); +_$TransactionAdditionalInfoDePoolReceiveAnswerFromJson( + Map json, +) => TransactionAdditionalInfoDePoolReceiveAnswer( + DePoolReceiveAnswerNotification.fromJson( + json['data'] as Map, + ), + $type: json['type'] as String?, +); Map _$TransactionAdditionalInfoDePoolReceiveAnswerToJson( - TransactionAdditionalInfoDePoolReceiveAnswer instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + TransactionAdditionalInfoDePoolReceiveAnswer instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; TransactionAdditionalInfoTokenWalletDeployed - _$TransactionAdditionalInfoTokenWalletDeployedFromJson( - Map json) => - TransactionAdditionalInfoTokenWalletDeployed( - TokenWalletDeployedNotification.fromJson( - json['data'] as Map), - $type: json['type'] as String?, - ); +_$TransactionAdditionalInfoTokenWalletDeployedFromJson( + Map json, +) => TransactionAdditionalInfoTokenWalletDeployed( + TokenWalletDeployedNotification.fromJson( + json['data'] as Map, + ), + $type: json['type'] as String?, +); Map _$TransactionAdditionalInfoTokenWalletDeployedToJson( - TransactionAdditionalInfoTokenWalletDeployed instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + TransactionAdditionalInfoTokenWalletDeployed instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; TransactionAdditionalInfoWalletInteraction - _$TransactionAdditionalInfoWalletInteractionFromJson( - Map json) => - TransactionAdditionalInfoWalletInteraction( - WalletInteractionInfo.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); +_$TransactionAdditionalInfoWalletInteractionFromJson( + Map json, +) => TransactionAdditionalInfoWalletInteraction( + WalletInteractionInfo.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$TransactionAdditionalInfoWalletInteractionToJson( - TransactionAdditionalInfoWalletInteraction instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + TransactionAdditionalInfoWalletInteraction instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; TransactionAdditionalInfoJettonNotify - _$TransactionAdditionalInfoJettonNotifyFromJson( - Map json) => - TransactionAdditionalInfoJettonNotify( - JettonIncomingTransfer.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); +_$TransactionAdditionalInfoJettonNotifyFromJson(Map json) => + TransactionAdditionalInfoJettonNotify( + JettonIncomingTransfer.fromJson(json['data'] as Map), + $type: json['type'] as String?, + ); Map _$TransactionAdditionalInfoJettonNotifyToJson( - TransactionAdditionalInfoJettonNotify instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + TransactionAdditionalInfoJettonNotify instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_execution_options.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_execution_options.freezed.dart index a30df403..90cc9277 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_execution_options.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_execution_options.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,53 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TransactionExecutionOptions { - bool get disableSignatureCheck; - BigInt? get overrideBalance; - - /// Create a copy of TransactionExecutionOptions - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransactionExecutionOptionsCopyWith - get copyWith => _$TransactionExecutionOptionsCopyWithImpl< - TransactionExecutionOptions>( - this as TransactionExecutionOptions, _$identity); + + bool get disableSignatureCheck; BigInt? get overrideBalance; +/// Create a copy of TransactionExecutionOptions +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransactionExecutionOptionsCopyWith get copyWith => _$TransactionExecutionOptionsCopyWithImpl(this as TransactionExecutionOptions, _$identity); /// Serializes this TransactionExecutionOptions to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransactionExecutionOptions && - (identical(other.disableSignatureCheck, disableSignatureCheck) || - other.disableSignatureCheck == disableSignatureCheck) && - (identical(other.overrideBalance, overrideBalance) || - other.overrideBalance == overrideBalance)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, disableSignatureCheck, overrideBalance); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransactionExecutionOptions&&(identical(other.disableSignatureCheck, disableSignatureCheck) || other.disableSignatureCheck == disableSignatureCheck)&&(identical(other.overrideBalance, overrideBalance) || other.overrideBalance == overrideBalance)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,disableSignatureCheck,overrideBalance); - @override - String toString() { - return 'TransactionExecutionOptions(disableSignatureCheck: $disableSignatureCheck, overrideBalance: $overrideBalance)'; - } +@override +String toString() { + return 'TransactionExecutionOptions(disableSignatureCheck: $disableSignatureCheck, overrideBalance: $overrideBalance)'; } -/// @nodoc -abstract mixin class $TransactionExecutionOptionsCopyWith<$Res> { - factory $TransactionExecutionOptionsCopyWith( - TransactionExecutionOptions value, - $Res Function(TransactionExecutionOptions) _then) = - _$TransactionExecutionOptionsCopyWithImpl; - @useResult - $Res call({bool disableSignatureCheck, BigInt? overrideBalance}); + } +/// @nodoc +abstract mixin class $TransactionExecutionOptionsCopyWith<$Res> { + factory $TransactionExecutionOptionsCopyWith(TransactionExecutionOptions value, $Res Function(TransactionExecutionOptions) _then) = _$TransactionExecutionOptionsCopyWithImpl; +@useResult +$Res call({ + bool disableSignatureCheck, BigInt? overrideBalance +}); + + + + +} /// @nodoc class _$TransactionExecutionOptionsCopyWithImpl<$Res> implements $TransactionExecutionOptionsCopyWith<$Res> { @@ -70,90 +63,193 @@ class _$TransactionExecutionOptionsCopyWithImpl<$Res> final TransactionExecutionOptions _self; final $Res Function(TransactionExecutionOptions) _then; - /// Create a copy of TransactionExecutionOptions - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? disableSignatureCheck = null, - Object? overrideBalance = freezed, - }) { - return _then(_self.copyWith( - disableSignatureCheck: null == disableSignatureCheck - ? _self.disableSignatureCheck - : disableSignatureCheck // ignore: cast_nullable_to_non_nullable - as bool, - overrideBalance: freezed == overrideBalance - ? _self.overrideBalance - : overrideBalance // ignore: cast_nullable_to_non_nullable - as BigInt?, - )); - } +/// Create a copy of TransactionExecutionOptions +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? disableSignatureCheck = null,Object? overrideBalance = freezed,}) { + return _then(_self.copyWith( +disableSignatureCheck: null == disableSignatureCheck ? _self.disableSignatureCheck : disableSignatureCheck // ignore: cast_nullable_to_non_nullable +as bool,overrideBalance: freezed == overrideBalance ? _self.overrideBalance : overrideBalance // ignore: cast_nullable_to_non_nullable +as BigInt?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [TransactionExecutionOptions]. +extension TransactionExecutionOptionsPatterns on TransactionExecutionOptions { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TransactionExecutionOptions value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TransactionExecutionOptions() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TransactionExecutionOptions value) $default,){ +final _that = this; +switch (_that) { +case _TransactionExecutionOptions(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TransactionExecutionOptions value)? $default,){ +final _that = this; +switch (_that) { +case _TransactionExecutionOptions() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool disableSignatureCheck, BigInt? overrideBalance)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TransactionExecutionOptions() when $default != null: +return $default(_that.disableSignatureCheck,_that.overrideBalance);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool disableSignatureCheck, BigInt? overrideBalance) $default,) {final _that = this; +switch (_that) { +case _TransactionExecutionOptions(): +return $default(_that.disableSignatureCheck,_that.overrideBalance);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool disableSignatureCheck, BigInt? overrideBalance)? $default,) {final _that = this; +switch (_that) { +case _TransactionExecutionOptions() when $default != null: +return $default(_that.disableSignatureCheck,_that.overrideBalance);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _TransactionExecutionOptions implements TransactionExecutionOptions { - const _TransactionExecutionOptions( - {required this.disableSignatureCheck, this.overrideBalance}); - factory _TransactionExecutionOptions.fromJson(Map json) => - _$TransactionExecutionOptionsFromJson(json); - - @override - final bool disableSignatureCheck; - @override - final BigInt? overrideBalance; - - /// Create a copy of TransactionExecutionOptions - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TransactionExecutionOptionsCopyWith<_TransactionExecutionOptions> - get copyWith => __$TransactionExecutionOptionsCopyWithImpl< - _TransactionExecutionOptions>(this, _$identity); - - @override - Map toJson() { - return _$TransactionExecutionOptionsToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TransactionExecutionOptions && - (identical(other.disableSignatureCheck, disableSignatureCheck) || - other.disableSignatureCheck == disableSignatureCheck) && - (identical(other.overrideBalance, overrideBalance) || - other.overrideBalance == overrideBalance)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, disableSignatureCheck, overrideBalance); - - @override - String toString() { - return 'TransactionExecutionOptions(disableSignatureCheck: $disableSignatureCheck, overrideBalance: $overrideBalance)'; - } + const _TransactionExecutionOptions({required this.disableSignatureCheck, this.overrideBalance}); + factory _TransactionExecutionOptions.fromJson(Map json) => _$TransactionExecutionOptionsFromJson(json); + +@override final bool disableSignatureCheck; +@override final BigInt? overrideBalance; + +/// Create a copy of TransactionExecutionOptions +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TransactionExecutionOptionsCopyWith<_TransactionExecutionOptions> get copyWith => __$TransactionExecutionOptionsCopyWithImpl<_TransactionExecutionOptions>(this, _$identity); + +@override +Map toJson() { + return _$TransactionExecutionOptionsToJson(this, ); } -/// @nodoc -abstract mixin class _$TransactionExecutionOptionsCopyWith<$Res> - implements $TransactionExecutionOptionsCopyWith<$Res> { - factory _$TransactionExecutionOptionsCopyWith( - _TransactionExecutionOptions value, - $Res Function(_TransactionExecutionOptions) _then) = - __$TransactionExecutionOptionsCopyWithImpl; - @override - @useResult - $Res call({bool disableSignatureCheck, BigInt? overrideBalance}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TransactionExecutionOptions&&(identical(other.disableSignatureCheck, disableSignatureCheck) || other.disableSignatureCheck == disableSignatureCheck)&&(identical(other.overrideBalance, overrideBalance) || other.overrideBalance == overrideBalance)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,disableSignatureCheck,overrideBalance); + +@override +String toString() { + return 'TransactionExecutionOptions(disableSignatureCheck: $disableSignatureCheck, overrideBalance: $overrideBalance)'; +} + + } +/// @nodoc +abstract mixin class _$TransactionExecutionOptionsCopyWith<$Res> implements $TransactionExecutionOptionsCopyWith<$Res> { + factory _$TransactionExecutionOptionsCopyWith(_TransactionExecutionOptions value, $Res Function(_TransactionExecutionOptions) _then) = __$TransactionExecutionOptionsCopyWithImpl; +@override @useResult +$Res call({ + bool disableSignatureCheck, BigInt? overrideBalance +}); + + + + +} /// @nodoc class __$TransactionExecutionOptionsCopyWithImpl<$Res> implements _$TransactionExecutionOptionsCopyWith<$Res> { @@ -162,25 +258,17 @@ class __$TransactionExecutionOptionsCopyWithImpl<$Res> final _TransactionExecutionOptions _self; final $Res Function(_TransactionExecutionOptions) _then; - /// Create a copy of TransactionExecutionOptions - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? disableSignatureCheck = null, - Object? overrideBalance = freezed, - }) { - return _then(_TransactionExecutionOptions( - disableSignatureCheck: null == disableSignatureCheck - ? _self.disableSignatureCheck - : disableSignatureCheck // ignore: cast_nullable_to_non_nullable - as bool, - overrideBalance: freezed == overrideBalance - ? _self.overrideBalance - : overrideBalance // ignore: cast_nullable_to_non_nullable - as BigInt?, - )); - } +/// Create a copy of TransactionExecutionOptions +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? disableSignatureCheck = null,Object? overrideBalance = freezed,}) { + return _then(_TransactionExecutionOptions( +disableSignatureCheck: null == disableSignatureCheck ? _self.disableSignatureCheck : disableSignatureCheck // ignore: cast_nullable_to_non_nullable +as bool,overrideBalance: freezed == overrideBalance ? _self.overrideBalance : overrideBalance // ignore: cast_nullable_to_non_nullable +as BigInt?, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_execution_options.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_execution_options.g.dart index 7d9b10ed..e388fc7c 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_execution_options.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/transaction_execution_options.g.dart @@ -7,17 +7,17 @@ part of 'transaction_execution_options.dart'; // ************************************************************************** _TransactionExecutionOptions _$TransactionExecutionOptionsFromJson( - Map json) => - _TransactionExecutionOptions( - disableSignatureCheck: json['disableSignatureCheck'] as bool, - overrideBalance: json['overrideBalance'] == null - ? null - : BigInt.parse(json['overrideBalance'] as String), - ); + Map json, +) => _TransactionExecutionOptions( + disableSignatureCheck: json['disableSignatureCheck'] as bool, + overrideBalance: json['overrideBalance'] == null + ? null + : BigInt.parse(json['overrideBalance'] as String), +); Map _$TransactionExecutionOptionsToJson( - _TransactionExecutionOptions instance) => - { - 'disableSignatureCheck': instance.disableSignatureCheck, - 'overrideBalance': instance.overrideBalance?.toString(), - }; + _TransactionExecutionOptions instance, +) => { + 'disableSignatureCheck': instance.disableSignatureCheck, + 'overrideBalance': instance.overrideBalance?.toString(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_info.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_info.freezed.dart index 393fea28..9280a057 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_info.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_info.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,61 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$WalletInteractionInfo { - @JsonKey(includeIfNull: false) - Address? get recipient; - @JsonKey(includeIfNull: false) - KnownPayload? get knownPayload; - WalletInteractionMethod get method; - - /// Create a copy of WalletInteractionInfo - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $WalletInteractionInfoCopyWith get copyWith => - _$WalletInteractionInfoCopyWithImpl( - this as WalletInteractionInfo, _$identity); + +@JsonKey(includeIfNull: false) Address? get recipient;@JsonKey(includeIfNull: false) KnownPayload? get knownPayload; WalletInteractionMethod get method; +/// Create a copy of WalletInteractionInfo +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$WalletInteractionInfoCopyWith get copyWith => _$WalletInteractionInfoCopyWithImpl(this as WalletInteractionInfo, _$identity); /// Serializes this WalletInteractionInfo to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is WalletInteractionInfo && - (identical(other.recipient, recipient) || - other.recipient == recipient) && - (identical(other.knownPayload, knownPayload) || - other.knownPayload == knownPayload) && - (identical(other.method, method) || other.method == method)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, recipient, knownPayload, method); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletInteractionInfo&&(identical(other.recipient, recipient) || other.recipient == recipient)&&(identical(other.knownPayload, knownPayload) || other.knownPayload == knownPayload)&&(identical(other.method, method) || other.method == method)); +} - @override - String toString() { - return 'WalletInteractionInfo(recipient: $recipient, knownPayload: $knownPayload, method: $method)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,recipient,knownPayload,method); + +@override +String toString() { + return 'WalletInteractionInfo(recipient: $recipient, knownPayload: $knownPayload, method: $method)'; } -/// @nodoc -abstract mixin class $WalletInteractionInfoCopyWith<$Res> { - factory $WalletInteractionInfoCopyWith(WalletInteractionInfo value, - $Res Function(WalletInteractionInfo) _then) = - _$WalletInteractionInfoCopyWithImpl; - @useResult - $Res call( - {@JsonKey(includeIfNull: false) Address? recipient, - @JsonKey(includeIfNull: false) KnownPayload? knownPayload, - WalletInteractionMethod method}); - - $AddressCopyWith<$Res>? get recipient; - $KnownPayloadCopyWith<$Res>? get knownPayload; - $WalletInteractionMethodCopyWith<$Res> get method; + } +/// @nodoc +abstract mixin class $WalletInteractionInfoCopyWith<$Res> { + factory $WalletInteractionInfoCopyWith(WalletInteractionInfo value, $Res Function(WalletInteractionInfo) _then) = _$WalletInteractionInfoCopyWithImpl; +@useResult +$Res call({ +@JsonKey(includeIfNull: false) Address? recipient,@JsonKey(includeIfNull: false) KnownPayload? knownPayload, WalletInteractionMethod method +}); + + +$AddressCopyWith<$Res>? get recipient;$KnownPayloadCopyWith<$Res>? get knownPayload;$WalletInteractionMethodCopyWith<$Res> get method; + +} /// @nodoc class _$WalletInteractionInfoCopyWithImpl<$Res> implements $WalletInteractionInfoCopyWith<$Res> { @@ -78,148 +63,228 @@ class _$WalletInteractionInfoCopyWithImpl<$Res> final WalletInteractionInfo _self; final $Res Function(WalletInteractionInfo) _then; - /// Create a copy of WalletInteractionInfo - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? recipient = freezed, - Object? knownPayload = freezed, - Object? method = null, - }) { - return _then(_self.copyWith( - recipient: freezed == recipient - ? _self.recipient - : recipient // ignore: cast_nullable_to_non_nullable - as Address?, - knownPayload: freezed == knownPayload - ? _self.knownPayload - : knownPayload // ignore: cast_nullable_to_non_nullable - as KnownPayload?, - method: null == method - ? _self.method - : method // ignore: cast_nullable_to_non_nullable - as WalletInteractionMethod, - )); - } - - /// Create a copy of WalletInteractionInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res>? get recipient { +/// Create a copy of WalletInteractionInfo +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? recipient = freezed,Object? knownPayload = freezed,Object? method = null,}) { + return _then(_self.copyWith( +recipient: freezed == recipient ? _self.recipient : recipient // ignore: cast_nullable_to_non_nullable +as Address?,knownPayload: freezed == knownPayload ? _self.knownPayload : knownPayload // ignore: cast_nullable_to_non_nullable +as KnownPayload?,method: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable +as WalletInteractionMethod, + )); +} +/// Create a copy of WalletInteractionInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res>? get recipient { if (_self.recipient == null) { - return null; - } - - return $AddressCopyWith<$Res>(_self.recipient!, (value) { - return _then(_self.copyWith(recipient: value)); - }); + return null; } - /// Create a copy of WalletInteractionInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $KnownPayloadCopyWith<$Res>? get knownPayload { + return $AddressCopyWith<$Res>(_self.recipient!, (value) { + return _then(_self.copyWith(recipient: value)); + }); +}/// Create a copy of WalletInteractionInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$KnownPayloadCopyWith<$Res>? get knownPayload { if (_self.knownPayload == null) { - return null; - } - - return $KnownPayloadCopyWith<$Res>(_self.knownPayload!, (value) { - return _then(_self.copyWith(knownPayload: value)); - }); + return null; } - /// Create a copy of WalletInteractionInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $WalletInteractionMethodCopyWith<$Res> get method { - return $WalletInteractionMethodCopyWith<$Res>(_self.method, (value) { - return _then(_self.copyWith(method: value)); - }); - } + return $KnownPayloadCopyWith<$Res>(_self.knownPayload!, (value) { + return _then(_self.copyWith(knownPayload: value)); + }); +}/// Create a copy of WalletInteractionInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$WalletInteractionMethodCopyWith<$Res> get method { + + return $WalletInteractionMethodCopyWith<$Res>(_self.method, (value) { + return _then(_self.copyWith(method: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [WalletInteractionInfo]. +extension WalletInteractionInfoPatterns on WalletInteractionInfo { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _WalletInteractionInfo value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _WalletInteractionInfo() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _WalletInteractionInfo value) $default,){ +final _that = this; +switch (_that) { +case _WalletInteractionInfo(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _WalletInteractionInfo value)? $default,){ +final _that = this; +switch (_that) { +case _WalletInteractionInfo() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function(@JsonKey(includeIfNull: false) Address? recipient, @JsonKey(includeIfNull: false) KnownPayload? knownPayload, WalletInteractionMethod method)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _WalletInteractionInfo() when $default != null: +return $default(_that.recipient,_that.knownPayload,_that.method);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function(@JsonKey(includeIfNull: false) Address? recipient, @JsonKey(includeIfNull: false) KnownPayload? knownPayload, WalletInteractionMethod method) $default,) {final _that = this; +switch (_that) { +case _WalletInteractionInfo(): +return $default(_that.recipient,_that.knownPayload,_that.method);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function(@JsonKey(includeIfNull: false) Address? recipient, @JsonKey(includeIfNull: false) KnownPayload? knownPayload, WalletInteractionMethod method)? $default,) {final _that = this; +switch (_that) { +case _WalletInteractionInfo() when $default != null: +return $default(_that.recipient,_that.knownPayload,_that.method);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _WalletInteractionInfo implements WalletInteractionInfo { - const _WalletInteractionInfo( - {@JsonKey(includeIfNull: false) this.recipient, - @JsonKey(includeIfNull: false) this.knownPayload, - required this.method}); - factory _WalletInteractionInfo.fromJson(Map json) => - _$WalletInteractionInfoFromJson(json); - - @override - @JsonKey(includeIfNull: false) - final Address? recipient; - @override - @JsonKey(includeIfNull: false) - final KnownPayload? knownPayload; - @override - final WalletInteractionMethod method; - - /// Create a copy of WalletInteractionInfo - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$WalletInteractionInfoCopyWith<_WalletInteractionInfo> get copyWith => - __$WalletInteractionInfoCopyWithImpl<_WalletInteractionInfo>( - this, _$identity); - - @override - Map toJson() { - return _$WalletInteractionInfoToJson( - this, - ); - } + const _WalletInteractionInfo({@JsonKey(includeIfNull: false) this.recipient, @JsonKey(includeIfNull: false) this.knownPayload, required this.method}); + factory _WalletInteractionInfo.fromJson(Map json) => _$WalletInteractionInfoFromJson(json); + +@override@JsonKey(includeIfNull: false) final Address? recipient; +@override@JsonKey(includeIfNull: false) final KnownPayload? knownPayload; +@override final WalletInteractionMethod method; + +/// Create a copy of WalletInteractionInfo +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$WalletInteractionInfoCopyWith<_WalletInteractionInfo> get copyWith => __$WalletInteractionInfoCopyWithImpl<_WalletInteractionInfo>(this, _$identity); + +@override +Map toJson() { + return _$WalletInteractionInfoToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _WalletInteractionInfo && - (identical(other.recipient, recipient) || - other.recipient == recipient) && - (identical(other.knownPayload, knownPayload) || - other.knownPayload == knownPayload) && - (identical(other.method, method) || other.method == method)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _WalletInteractionInfo&&(identical(other.recipient, recipient) || other.recipient == recipient)&&(identical(other.knownPayload, knownPayload) || other.knownPayload == knownPayload)&&(identical(other.method, method) || other.method == method)); +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, recipient, knownPayload, method); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,recipient,knownPayload,method); - @override - String toString() { - return 'WalletInteractionInfo(recipient: $recipient, knownPayload: $knownPayload, method: $method)'; - } +@override +String toString() { + return 'WalletInteractionInfo(recipient: $recipient, knownPayload: $knownPayload, method: $method)'; } -/// @nodoc -abstract mixin class _$WalletInteractionInfoCopyWith<$Res> - implements $WalletInteractionInfoCopyWith<$Res> { - factory _$WalletInteractionInfoCopyWith(_WalletInteractionInfo value, - $Res Function(_WalletInteractionInfo) _then) = - __$WalletInteractionInfoCopyWithImpl; - @override - @useResult - $Res call( - {@JsonKey(includeIfNull: false) Address? recipient, - @JsonKey(includeIfNull: false) KnownPayload? knownPayload, - WalletInteractionMethod method}); - - @override - $AddressCopyWith<$Res>? get recipient; - @override - $KnownPayloadCopyWith<$Res>? get knownPayload; - @override - $WalletInteractionMethodCopyWith<$Res> get method; + } +/// @nodoc +abstract mixin class _$WalletInteractionInfoCopyWith<$Res> implements $WalletInteractionInfoCopyWith<$Res> { + factory _$WalletInteractionInfoCopyWith(_WalletInteractionInfo value, $Res Function(_WalletInteractionInfo) _then) = __$WalletInteractionInfoCopyWithImpl; +@override @useResult +$Res call({ +@JsonKey(includeIfNull: false) Address? recipient,@JsonKey(includeIfNull: false) KnownPayload? knownPayload, WalletInteractionMethod method +}); + + +@override $AddressCopyWith<$Res>? get recipient;@override $KnownPayloadCopyWith<$Res>? get knownPayload;@override $WalletInteractionMethodCopyWith<$Res> get method; + +} /// @nodoc class __$WalletInteractionInfoCopyWithImpl<$Res> implements _$WalletInteractionInfoCopyWith<$Res> { @@ -228,68 +293,51 @@ class __$WalletInteractionInfoCopyWithImpl<$Res> final _WalletInteractionInfo _self; final $Res Function(_WalletInteractionInfo) _then; - /// Create a copy of WalletInteractionInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? recipient = freezed, - Object? knownPayload = freezed, - Object? method = null, - }) { - return _then(_WalletInteractionInfo( - recipient: freezed == recipient - ? _self.recipient - : recipient // ignore: cast_nullable_to_non_nullable - as Address?, - knownPayload: freezed == knownPayload - ? _self.knownPayload - : knownPayload // ignore: cast_nullable_to_non_nullable - as KnownPayload?, - method: null == method - ? _self.method - : method // ignore: cast_nullable_to_non_nullable - as WalletInteractionMethod, - )); - } +/// Create a copy of WalletInteractionInfo +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? recipient = freezed,Object? knownPayload = freezed,Object? method = null,}) { + return _then(_WalletInteractionInfo( +recipient: freezed == recipient ? _self.recipient : recipient // ignore: cast_nullable_to_non_nullable +as Address?,knownPayload: freezed == knownPayload ? _self.knownPayload : knownPayload // ignore: cast_nullable_to_non_nullable +as KnownPayload?,method: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable +as WalletInteractionMethod, + )); +} - /// Create a copy of WalletInteractionInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res>? get recipient { +/// Create a copy of WalletInteractionInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res>? get recipient { if (_self.recipient == null) { - return null; - } - - return $AddressCopyWith<$Res>(_self.recipient!, (value) { - return _then(_self.copyWith(recipient: value)); - }); + return null; } - /// Create a copy of WalletInteractionInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $KnownPayloadCopyWith<$Res>? get knownPayload { + return $AddressCopyWith<$Res>(_self.recipient!, (value) { + return _then(_self.copyWith(recipient: value)); + }); +}/// Create a copy of WalletInteractionInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$KnownPayloadCopyWith<$Res>? get knownPayload { if (_self.knownPayload == null) { - return null; - } - - return $KnownPayloadCopyWith<$Res>(_self.knownPayload!, (value) { - return _then(_self.copyWith(knownPayload: value)); - }); + return null; } - /// Create a copy of WalletInteractionInfo - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $WalletInteractionMethodCopyWith<$Res> get method { - return $WalletInteractionMethodCopyWith<$Res>(_self.method, (value) { - return _then(_self.copyWith(method: value)); - }); - } + return $KnownPayloadCopyWith<$Res>(_self.knownPayload!, (value) { + return _then(_self.copyWith(knownPayload: value)); + }); +}/// Create a copy of WalletInteractionInfo +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$WalletInteractionMethodCopyWith<$Res> get method { + + return $WalletInteractionMethodCopyWith<$Res>(_self.method, (value) { + return _then(_self.copyWith(method: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_info.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_info.g.dart index 34a79016..e15b5e64 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_info.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_info.g.dart @@ -7,23 +7,23 @@ part of 'wallet_interaction_info.dart'; // ************************************************************************** _WalletInteractionInfo _$WalletInteractionInfoFromJson( - Map json) => - _WalletInteractionInfo( - recipient: json['recipient'] == null - ? null - : Address.fromJson(json['recipient'] as String), - knownPayload: json['knownPayload'] == null - ? null - : KnownPayload.fromJson(json['knownPayload'] as Map), - method: WalletInteractionMethod.fromJson( - json['method'] as Map), - ); + Map json, +) => _WalletInteractionInfo( + recipient: json['recipient'] == null + ? null + : Address.fromJson(json['recipient'] as String), + knownPayload: json['knownPayload'] == null + ? null + : KnownPayload.fromJson(json['knownPayload'] as Map), + method: WalletInteractionMethod.fromJson( + json['method'] as Map, + ), +); Map _$WalletInteractionInfoToJson( - _WalletInteractionInfo instance) => - { - if (instance.recipient?.toJson() case final value?) 'recipient': value, - if (instance.knownPayload?.toJson() case final value?) - 'knownPayload': value, - 'method': instance.method.toJson(), - }; + _WalletInteractionInfo instance, +) => { + 'recipient': ?instance.recipient?.toJson(), + 'knownPayload': ?instance.knownPayload?.toJson(), + 'method': instance.method.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_method.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_method.freezed.dart index 77326d49..444cf55e 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_method.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_method.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -13,181 +12,332 @@ part of 'wallet_interaction_method.dart'; // dart format off T _$identity(T value) => value; WalletInteractionMethod _$WalletInteractionMethodFromJson( - Map json) { - switch (json['type']) { - case 'wallet_v3_transfer': - return WalletInteractionMethodWalletV3Transfer.fromJson(json); - case 'ton_wallet_transfer': - return WalletInteractionMethodTonWalletTransfer.fromJson(json); - case 'multisig': - return WalletInteractionMethodMultisig.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'type', 'WalletInteractionMethod', - 'Invalid union type "${json['type']}"!'); - } + Map json +) { + switch (json['type']) { + case 'wallet_v3_transfer': + return WalletInteractionMethodWalletV3Transfer.fromJson( + json + ); + case 'ton_wallet_transfer': + return WalletInteractionMethodTonWalletTransfer.fromJson( + json + ); + case 'multisig': + return WalletInteractionMethodMultisig.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'WalletInteractionMethod', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$WalletInteractionMethod { + + + /// Serializes this WalletInteractionMethod to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is WalletInteractionMethod); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletInteractionMethod); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'WalletInteractionMethod()'; +} + - @override - String toString() { - return 'WalletInteractionMethod()'; - } } /// @nodoc -class $WalletInteractionMethodCopyWith<$Res> { - $WalletInteractionMethodCopyWith( - WalletInteractionMethod _, $Res Function(WalletInteractionMethod) __); +class $WalletInteractionMethodCopyWith<$Res> { +$WalletInteractionMethodCopyWith(WalletInteractionMethod _, $Res Function(WalletInteractionMethod) __); +} + + +/// Adds pattern-matching-related methods to [WalletInteractionMethod]. +extension WalletInteractionMethodPatterns on WalletInteractionMethod { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( WalletInteractionMethodWalletV3Transfer value)? walletV3Transfer,TResult Function( WalletInteractionMethodTonWalletTransfer value)? tonWalletTransfer,TResult Function( WalletInteractionMethodMultisig value)? multisig,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case WalletInteractionMethodWalletV3Transfer() when walletV3Transfer != null: +return walletV3Transfer(_that);case WalletInteractionMethodTonWalletTransfer() when tonWalletTransfer != null: +return tonWalletTransfer(_that);case WalletInteractionMethodMultisig() when multisig != null: +return multisig(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( WalletInteractionMethodWalletV3Transfer value) walletV3Transfer,required TResult Function( WalletInteractionMethodTonWalletTransfer value) tonWalletTransfer,required TResult Function( WalletInteractionMethodMultisig value) multisig,}){ +final _that = this; +switch (_that) { +case WalletInteractionMethodWalletV3Transfer(): +return walletV3Transfer(_that);case WalletInteractionMethodTonWalletTransfer(): +return tonWalletTransfer(_that);case WalletInteractionMethodMultisig(): +return multisig(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( WalletInteractionMethodWalletV3Transfer value)? walletV3Transfer,TResult? Function( WalletInteractionMethodTonWalletTransfer value)? tonWalletTransfer,TResult? Function( WalletInteractionMethodMultisig value)? multisig,}){ +final _that = this; +switch (_that) { +case WalletInteractionMethodWalletV3Transfer() when walletV3Transfer != null: +return walletV3Transfer(_that);case WalletInteractionMethodTonWalletTransfer() when tonWalletTransfer != null: +return tonWalletTransfer(_that);case WalletInteractionMethodMultisig() when multisig != null: +return multisig(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function()? walletV3Transfer,TResult Function()? tonWalletTransfer,TResult Function( MultisigTransaction data)? multisig,required TResult orElse(),}) {final _that = this; +switch (_that) { +case WalletInteractionMethodWalletV3Transfer() when walletV3Transfer != null: +return walletV3Transfer();case WalletInteractionMethodTonWalletTransfer() when tonWalletTransfer != null: +return tonWalletTransfer();case WalletInteractionMethodMultisig() when multisig != null: +return multisig(_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function() walletV3Transfer,required TResult Function() tonWalletTransfer,required TResult Function( MultisigTransaction data) multisig,}) {final _that = this; +switch (_that) { +case WalletInteractionMethodWalletV3Transfer(): +return walletV3Transfer();case WalletInteractionMethodTonWalletTransfer(): +return tonWalletTransfer();case WalletInteractionMethodMultisig(): +return multisig(_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function()? walletV3Transfer,TResult? Function()? tonWalletTransfer,TResult? Function( MultisigTransaction data)? multisig,}) {final _that = this; +switch (_that) { +case WalletInteractionMethodWalletV3Transfer() when walletV3Transfer != null: +return walletV3Transfer();case WalletInteractionMethodTonWalletTransfer() when tonWalletTransfer != null: +return tonWalletTransfer();case WalletInteractionMethodMultisig() when multisig != null: +return multisig(_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class WalletInteractionMethodWalletV3Transfer - implements WalletInteractionMethod { - const WalletInteractionMethodWalletV3Transfer({final String? $type}) - : $type = $type ?? 'wallet_v3_transfer'; - factory WalletInteractionMethodWalletV3Transfer.fromJson( - Map json) => - _$WalletInteractionMethodWalletV3TransferFromJson(json); - - @JsonKey(name: 'type') - final String $type; - - @override - Map toJson() { - return _$WalletInteractionMethodWalletV3TransferToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is WalletInteractionMethodWalletV3Transfer); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; - - @override - String toString() { - return 'WalletInteractionMethod.walletV3Transfer()'; - } + +class WalletInteractionMethodWalletV3Transfer implements WalletInteractionMethod { + const WalletInteractionMethodWalletV3Transfer({final String? $type}): $type = $type ?? 'wallet_v3_transfer'; + factory WalletInteractionMethodWalletV3Transfer.fromJson(Map json) => _$WalletInteractionMethodWalletV3TransferFromJson(json); + + + +@JsonKey(name: 'type') +final String $type; + + + +@override +Map toJson() { + return _$WalletInteractionMethodWalletV3TransferToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletInteractionMethodWalletV3Transfer); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'WalletInteractionMethod.walletV3Transfer()'; +} + + +} + + + + /// @nodoc @JsonSerializable() -class WalletInteractionMethodTonWalletTransfer - implements WalletInteractionMethod { - const WalletInteractionMethodTonWalletTransfer({final String? $type}) - : $type = $type ?? 'ton_wallet_transfer'; - factory WalletInteractionMethodTonWalletTransfer.fromJson( - Map json) => - _$WalletInteractionMethodTonWalletTransferFromJson(json); - - @JsonKey(name: 'type') - final String $type; - - @override - Map toJson() { - return _$WalletInteractionMethodTonWalletTransferToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is WalletInteractionMethodTonWalletTransfer); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; - - @override - String toString() { - return 'WalletInteractionMethod.tonWalletTransfer()'; - } + +class WalletInteractionMethodTonWalletTransfer implements WalletInteractionMethod { + const WalletInteractionMethodTonWalletTransfer({final String? $type}): $type = $type ?? 'ton_wallet_transfer'; + factory WalletInteractionMethodTonWalletTransfer.fromJson(Map json) => _$WalletInteractionMethodTonWalletTransferFromJson(json); + + + +@JsonKey(name: 'type') +final String $type; + + + +@override +Map toJson() { + return _$WalletInteractionMethodTonWalletTransferToJson(this, ); } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletInteractionMethodTonWalletTransfer); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'WalletInteractionMethod.tonWalletTransfer()'; +} + + +} + + + + /// @nodoc @JsonSerializable() + class WalletInteractionMethodMultisig implements WalletInteractionMethod { - const WalletInteractionMethodMultisig(this.data, {final String? $type}) - : $type = $type ?? 'multisig'; - factory WalletInteractionMethodMultisig.fromJson(Map json) => - _$WalletInteractionMethodMultisigFromJson(json); - - final MultisigTransaction data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of WalletInteractionMethod - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $WalletInteractionMethodMultisigCopyWith - get copyWith => _$WalletInteractionMethodMultisigCopyWithImpl< - WalletInteractionMethodMultisig>(this, _$identity); - - @override - Map toJson() { - return _$WalletInteractionMethodMultisigToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is WalletInteractionMethodMultisig && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'WalletInteractionMethod.multisig(data: $data)'; - } + const WalletInteractionMethodMultisig(this.data, {final String? $type}): $type = $type ?? 'multisig'; + factory WalletInteractionMethodMultisig.fromJson(Map json) => _$WalletInteractionMethodMultisigFromJson(json); + + final MultisigTransaction data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of WalletInteractionMethod +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$WalletInteractionMethodMultisigCopyWith get copyWith => _$WalletInteractionMethodMultisigCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$WalletInteractionMethodMultisigToJson(this, ); } -/// @nodoc -abstract mixin class $WalletInteractionMethodMultisigCopyWith<$Res> - implements $WalletInteractionMethodCopyWith<$Res> { - factory $WalletInteractionMethodMultisigCopyWith( - WalletInteractionMethodMultisig value, - $Res Function(WalletInteractionMethodMultisig) _then) = - _$WalletInteractionMethodMultisigCopyWithImpl; - @useResult - $Res call({MultisigTransaction data}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletInteractionMethodMultisig&&(identical(other.data, data) || other.data == data)); +} - $MultisigTransactionCopyWith<$Res> get data; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'WalletInteractionMethod.multisig(data: $data)'; } + +} + +/// @nodoc +abstract mixin class $WalletInteractionMethodMultisigCopyWith<$Res> implements $WalletInteractionMethodCopyWith<$Res> { + factory $WalletInteractionMethodMultisigCopyWith(WalletInteractionMethodMultisig value, $Res Function(WalletInteractionMethodMultisig) _then) = _$WalletInteractionMethodMultisigCopyWithImpl; +@useResult +$Res call({ + MultisigTransaction data +}); + + +$MultisigTransactionCopyWith<$Res> get data; + +} /// @nodoc class _$WalletInteractionMethodMultisigCopyWithImpl<$Res> implements $WalletInteractionMethodMultisigCopyWith<$Res> { @@ -196,29 +346,25 @@ class _$WalletInteractionMethodMultisigCopyWithImpl<$Res> final WalletInteractionMethodMultisig _self; final $Res Function(WalletInteractionMethodMultisig) _then; - /// Create a copy of WalletInteractionMethod - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(WalletInteractionMethodMultisig( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as MultisigTransaction, - )); - } - - /// Create a copy of WalletInteractionMethod - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $MultisigTransactionCopyWith<$Res> get data { - return $MultisigTransactionCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of WalletInteractionMethod +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(WalletInteractionMethodMultisig( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as MultisigTransaction, + )); +} + +/// Create a copy of WalletInteractionMethod +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$MultisigTransactionCopyWith<$Res> get data { + + return $MultisigTransactionCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_method.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_method.g.dart index a0bf4b43..7f2f6f32 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_method.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/models/wallet_interaction_method.g.dart @@ -7,41 +7,28 @@ part of 'wallet_interaction_method.dart'; // ************************************************************************** WalletInteractionMethodWalletV3Transfer - _$WalletInteractionMethodWalletV3TransferFromJson( - Map json) => - WalletInteractionMethodWalletV3Transfer( - $type: json['type'] as String?, - ); +_$WalletInteractionMethodWalletV3TransferFromJson(Map json) => + WalletInteractionMethodWalletV3Transfer($type: json['type'] as String?); Map _$WalletInteractionMethodWalletV3TransferToJson( - WalletInteractionMethodWalletV3Transfer instance) => - { - 'type': instance.$type, - }; + WalletInteractionMethodWalletV3Transfer instance, +) => {'type': instance.$type}; WalletInteractionMethodTonWalletTransfer - _$WalletInteractionMethodTonWalletTransferFromJson( - Map json) => - WalletInteractionMethodTonWalletTransfer( - $type: json['type'] as String?, - ); +_$WalletInteractionMethodTonWalletTransferFromJson(Map json) => + WalletInteractionMethodTonWalletTransfer($type: json['type'] as String?); Map _$WalletInteractionMethodTonWalletTransferToJson( - WalletInteractionMethodTonWalletTransfer instance) => - { - 'type': instance.$type, - }; + WalletInteractionMethodTonWalletTransfer instance, +) => {'type': instance.$type}; WalletInteractionMethodMultisig _$WalletInteractionMethodMultisigFromJson( - Map json) => - WalletInteractionMethodMultisig( - MultisigTransaction.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => WalletInteractionMethodMultisig( + MultisigTransaction.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$WalletInteractionMethodMultisigToJson( - WalletInteractionMethodMultisig instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + WalletInteractionMethodMultisig instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/ton_wallet.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/ton_wallet.dart index e0c8841b..d76eca04 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/ton_wallet.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/ton_wallet.dart @@ -2,12 +2,8 @@ import 'dart:async'; import 'dart:convert'; import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart'; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart'; -import 'package:reflectable/mirrors.dart'; import 'package:rxdart/rxdart.dart'; -import 'ton_wallet.reflectable.dart'; - /// Implementation of nekoton's TonWallet. /// /// If you need watch wallet changes, you can subscribe to [fieldUpdatesStream] @@ -15,25 +11,28 @@ import 'ton_wallet.reflectable.dart'; /// events emitted through [onMessageSentStream], [onMessageExpiredStream], /// or [onTransactionsFoundStream]. /// [onStateChangedStream] changes internal state, so it will lead updating data. -@reflector -class TonWallet extends RustToDartMirrorInterface - implements RefreshingInterface { +class TonWallet implements RefreshingInterface { + TonWallet._(this.transport); + late TonWalletDartWrapper wallet; final Transport transport; /// Flag that display [onStateChanged] that [wallet] was initialized. bool _isInitialized = false; + bool _isDisposed = false; /// Controllers that contains data that emits from rust. final _onMessageSentController = BehaviorSubject<(PendingTransaction, Transaction?)>(); final _onMessageExpiredController = BehaviorSubject(); final _onStateChangedController = BehaviorSubject(); - final _onTransactionsFoundController = BehaviorSubject< - ( - List>, - TransactionsBatchInfo - )>(); + final _onTransactionsFoundController = + BehaviorSubject< + ( + List>, + TransactionsBatchInfo, + ) + >(); /// Description information about wallet that could be changed and updated /// during [_updateData]. It means, that fields could be changed after any @@ -54,7 +53,7 @@ class TonWallet extends RustToDartMirrorInterface late final WalletType walletType; late final int workchain; - TonWallet._(this.transport); + bool get isDisposed => _isDisposed; /// Create TonWallet by subscribing to its instance by public_key. /// publicKey - is string representation of key @@ -63,69 +62,86 @@ class TonWallet extends RustToDartMirrorInterface required int workchainId, required PublicKey publicKey, required WalletType walletType, - }) => - transport.use(() async { - final instance = TonWallet._(transport); + }) => transport.use(() async { + final instance = TonWallet._(transport); - instance.wallet = await TonWalletDartWrapper.subscribe( - instanceHash: instance.instanceHash, - publicKey: publicKey.publicKey, - walletType: jsonEncode(walletType), - workchainId: workchainId, - transport: transport.transportBox, - ); + instance.wallet = await TonWalletDartWrapper.subscribe( + publicKey: publicKey.publicKey, + walletType: jsonEncode(walletType), + workchainId: workchainId, + transport: transport.transportBox, + onCustodiansChanged: instance.onCustodiansChanged, + onUnconfirmedTransactionsChanged: + instance.onUnconfirmedTransactionsChanged, + onDetailsChanged: instance.onDetailsChanged, + onMessageExpired: instance.onMessageExpired, + onMessageSent: instance.onMessageSent, + onStateChanged: instance.onStateChanged, + onTransactionsFound: instance.onTransactionsFound, + ); - await instance._initInstance(); + await instance._initInstance(); - return instance; - }); + return instance; + }); /// Create TonWallet by subscribing to its instance by address of wallet. static Future subscribeByAddress({ required Transport transport, required Address address, - }) => - transport.use(() async { - final instance = TonWallet._(transport); - - instance.wallet = await TonWalletDartWrapper.subscribeByAddress( - instanceHash: instance.instanceHash, - address: address.address, - transport: transport.transportBox, - ); + }) => transport.use(() async { + final instance = TonWallet._(transport); + + instance.wallet = await TonWalletDartWrapper.subscribeByAddress( + address: address.address, + transport: transport.transportBox, + onCustodiansChanged: instance.onCustodiansChanged, + onUnconfirmedTransactionsChanged: + instance.onUnconfirmedTransactionsChanged, + onDetailsChanged: instance.onDetailsChanged, + onMessageExpired: instance.onMessageExpired, + onMessageSent: instance.onMessageSent, + onStateChanged: instance.onStateChanged, + onTransactionsFound: instance.onTransactionsFound, + ); - await instance._initInstance(); + await instance._initInstance(); - return instance; - }); + return instance; + }); /// Create TonWallet by subscribing to its instance by existed instance. static Future subscribeByExistingWallet({ required Transport transport, required ExistingWalletInfo existingWallet, - }) => - transport.use(() async { - final instance = TonWallet._(transport); - - instance.wallet = await TonWalletDartWrapper.subscribeByExisting( - instanceHash: instance.instanceHash, - existingWallet: jsonEncode(existingWallet), - transport: transport.transportBox, - ); + }) => transport.use(() async { + final instance = TonWallet._(transport); + + instance.wallet = await TonWalletDartWrapper.subscribeByExisting( + existingWallet: jsonEncode(existingWallet), + transport: transport.transportBox, + onCustodiansChanged: instance.onCustodiansChanged, + onUnconfirmedTransactionsChanged: + instance.onUnconfirmedTransactionsChanged, + onDetailsChanged: instance.onDetailsChanged, + onMessageExpired: instance.onMessageExpired, + onMessageSent: instance.onMessageSent, + onStateChanged: instance.onStateChanged, + onTransactionsFound: instance.onTransactionsFound, + ); - await instance._initInstance(); + await instance._initInstance(); - return instance; - }); + return instance; + }); static Future appendSignatureToWalletV5R1Payload({ required String payload, required String base64Signature, - }) => - TonWalletDartWrapper.appendSignatureToWalletV5R1Payload( - payload: payload, - base64Signature: base64Signature, - ); + }) => TonWalletDartWrapper.appendSignatureToWalletV5R1Payload( + payload: payload, + base64Signature: base64Signature, + ); /// If any error occurs during first initialization of wallet, it will dispose /// wallet and rethrow error; @@ -183,10 +199,12 @@ class TonWallet extends RustToDartMirrorInterface /// /// To update data of this stream, wallet must be refreshed via [refresh]. Stream< - ( - List>, - TransactionsBatchInfo - )> get onTransactionsFoundStream => _onTransactionsFoundController.stream; + ( + List>, + TransactionsBatchInfo, + ) + > + get onTransactionsFoundStream => _onTransactionsFoundController.stream; /// Get workchain of wallet. Future _getWorkchain() => wallet.workchain(); @@ -253,10 +271,9 @@ class TonWallet extends RustToDartMirrorInterface /// Returns UnsignedMessage or throw error. Future prepareDeploy({ required Expiration expiration, - }) async => - UnsignedMessage.create( - message: await wallet.prepareDeploy(expiration: jsonEncode(expiration)), - ); + }) async => UnsignedMessage.create( + message: await wallet.prepareDeploy(expiration: jsonEncode(expiration)), + ); /// Prepare TonWallet for deploy actions if wallet is multisig. /// [custodians] - list of public keys of custodians. @@ -267,15 +284,14 @@ class TonWallet extends RustToDartMirrorInterface required List custodians, required int reqConfirms, int? expirationTime, - }) async => - UnsignedMessage.create( - message: await wallet.prepareDeployWithMultipleOwners( - expiration: jsonEncode(expiration), - custodians: custodians.map((key) => key.publicKey).toList(), - reqConfirms: reqConfirms, - expirationTime: expirationTime, - ), - ); + }) async => UnsignedMessage.create( + message: await wallet.prepareDeployWithMultipleOwners( + expiration: jsonEncode(expiration), + custodians: custodians.map((key) => key.publicKey).toList(), + reqConfirms: reqConfirms, + expirationTime: expirationTime, + ), + ); /// Prepare transferring tokens from this wallet to other. /// [contractState] - wallet contract state @@ -343,15 +359,14 @@ class TonWallet extends RustToDartMirrorInterface required PublicKey publicKey, required String transactionId, required Expiration expiration, - }) async => - UnsignedMessage.create( - message: await wallet.prepareConfirmTransaction( - contractState: jsonEncode(contractState), - publicKey: publicKey.publicKey, - expiration: jsonEncode(expiration), - transactionId: transactionId, - ), - ); + }) async => UnsignedMessage.create( + message: await wallet.prepareConfirmTransaction( + contractState: jsonEncode(contractState), + publicKey: publicKey.publicKey, + expiration: jsonEncode(expiration), + transactionId: transactionId, + ), + ); /// Calculate fees for transaction. /// Returns representation of u128 or throw error. @@ -361,8 +376,9 @@ class TonWallet extends RustToDartMirrorInterface }) async { final fee = await wallet.estimateFees( signedMessage: jsonEncode(signedMessage), - executionOptions: - executionOptions != null ? jsonEncode(executionOptions) : null, + executionOptions: executionOptions != null + ? jsonEncode(executionOptions) + : null, ); return BigInt.parse(fee); } @@ -390,7 +406,7 @@ class TonWallet extends RustToDartMirrorInterface /// May throw error. @override Future refresh() async { - if (_isRefreshing || transport.disposed || avoidCall) return; + if (_isRefreshing || transport.disposed || isDisposed) return; try { _isRefreshing = true; @@ -410,7 +426,7 @@ class TonWallet extends RustToDartMirrorInterface /// [fromLt] - offset for loading data, string representation of u64 /// May throw error. Future preloadTransactions({required String fromLt}) async { - if (avoidCall) return; + if (isDisposed) return; await wallet.preloadTransactions(fromLt: fromLt); await _updateData(); @@ -420,7 +436,7 @@ class TonWallet extends RustToDartMirrorInterface /// [block] - base64-encoded Block that could be got from [GqlTransport.getBlock] /// May throw error. Future handleBlock({required String block}) async { - if (avoidCall) return; + if (isDisposed) return; await wallet.handleBlock(block: block); await _updateData(); @@ -504,22 +520,24 @@ class TonWallet extends RustToDartMirrorInterface /// Calls from rust side when message has been sent to blockchain void onMessageSent(String payload) { - if (avoidCall) return; + if (isDisposed) return; final json = jsonDecode(payload) as List; final pendingTransactionJson = json.first as Map; - final pendingTransaction = - PendingTransaction.fromJson(pendingTransactionJson); + final pendingTransaction = PendingTransaction.fromJson( + pendingTransactionJson, + ); final transactionJson = json.last as Map?; - final transaction = - transactionJson != null ? Transaction.fromJson(transactionJson) : null; + final transaction = transactionJson != null + ? Transaction.fromJson(transactionJson) + : null; _onMessageSentController.add((pendingTransaction, transaction)); } /// Calls from rust side when message has been expired void onMessageExpired(String payload) { - if (avoidCall) return; + if (isDisposed) return; final json = jsonDecode(payload) as Map; final pendingTransaction = PendingTransaction.fromJson(json); @@ -528,7 +546,7 @@ class TonWallet extends RustToDartMirrorInterface /// Calls from rust side when state of wallet has been changed void onStateChanged(String payload) { - if (avoidCall) return; + if (isDisposed) return; final json = jsonDecode(payload) as Map; final contractState = ContractState.fromJson(json); @@ -541,7 +559,7 @@ class TonWallet extends RustToDartMirrorInterface /// Calls from rust side when transactions of wallet has been found void onTransactionsFound(String payload) { - if (avoidCall) return; + if (isDisposed) return; final json = jsonDecode(payload) as List; @@ -566,7 +584,7 @@ class TonWallet extends RustToDartMirrorInterface /// Calls from rust side when details of wallet has been changed void onDetailsChanged(String payload) { - if (avoidCall) return; + if (isDisposed) return; final json = jsonDecode(payload) as Map; final details = TonWalletDetails.fromJson(json); @@ -577,13 +595,11 @@ class TonWallet extends RustToDartMirrorInterface /// Calls from rust side when custodians of wallet has been changed void onCustodiansChanged(String payload) { - if (avoidCall) return; + if (isDisposed) return; final json = jsonDecode(payload) as List; final custodians = json - .map( - (key) => PublicKey(publicKey: key as String), - ) + .map((key) => PublicKey(publicKey: key as String)) .toList(); _custodians = custodians; @@ -592,15 +608,13 @@ class TonWallet extends RustToDartMirrorInterface /// Calls from rust side when unconfirmed transactions of wallet has been found void onUnconfirmedTransactionsChanged(String payload) { - if (avoidCall) return; + if (isDisposed) return; final json = jsonDecode(payload) as List; final unconfirmedTransactions = json .cast>() - .map( - (e) => MultisigPendingTransaction.fromJson(e), - ) + .map((e) => MultisigPendingTransaction.fromJson(e)) .toList(); _unconfirmedTransactions = unconfirmedTransactions; @@ -612,43 +626,34 @@ class TonWallet extends RustToDartMirrorInterface /// This method should be awaited in internal calls to be sure, that dart /// instance gets updates in a good way. /// - /// This shitty repeated avoidCall needs to avoid `Use after free` when + /// This shitty repeated isDisposed needs to avoid `Use after free` when /// method calls after dispose. Future _updateData() async { if (transport.disposed) return; - if (avoidCall) return; + if (isDisposed) return; _contractState = await getContractState(); - if (avoidCall) return; + if (isDisposed) return; _pendingTransactions = await getPendingTransactions(); - if (avoidCall) return; + if (isDisposed) return; _pollingMethod = await getPollingMethod(); - if (avoidCall) return; + if (isDisposed) return; _unconfirmedTransactions = await getUnconfirmedTransactions(); - if (avoidCall) return; + if (isDisposed) return; _custodians = await getCustodians(); - if (avoidCall) return; + if (isDisposed) return; _details = await _getDetails(); - if (avoidCall) return; + if (isDisposed) return; _fieldsUpdateController.add(null); } - @override void dispose() { + _isDisposed = true; wallet.innerWallet.dispose(); _onMessageSentController.close(); _onMessageExpiredController.close(); _onStateChangedController.close(); _onTransactionsFoundController.close(); _fieldsUpdateController.close(); - super.dispose(); - } - - @override - InstanceMirror initializeMirror() { - initializeReflectable(); // auto-generated reflectable file - return reflector.reflect(this); } } - -void main() {} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/ton_wallet.reflectable.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/ton_wallet.reflectable.dart deleted file mode 100644 index c9d44be1..00000000 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/ton_wallet.reflectable.dart +++ /dev/null @@ -1,808 +0,0 @@ -// This file has been generated by the reflectable package. -// https://github.com/dart-lang/reflectable. -import 'dart:core'; -import 'package:flutter_nekoton_bridge/nekoton/core/generic_contract/generic_contract.dart' - as prefix7; -import 'package:flutter_nekoton_bridge/nekoton/core/jetton_wallet/jetton_wallet.dart' - as prefix9; -import 'package:flutter_nekoton_bridge/nekoton/core/token_wallet/token_wallet.dart' - as prefix8; -import 'package:flutter_nekoton_bridge/nekoton/external/gql_connection.dart' - as prefix2; -import 'package:flutter_nekoton_bridge/nekoton/external/jrpc_connection.dart' - as prefix4; -import 'package:flutter_nekoton_bridge/nekoton/external/ledger_connection.dart' - as prefix5; -import 'package:flutter_nekoton_bridge/nekoton/external/proto_connection.dart' - as prefix3; -import 'package:flutter_nekoton_bridge/nekoton/external/storage.dart' - as prefix6; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart' as prefix0; -import 'ton_wallet.dart' as prefix1; - -// ignore_for_file: camel_case_types -// ignore_for_file: implementation_imports -// ignore_for_file: prefer_adjacent_string_concatenation -// ignore_for_file: prefer_collection_literals -// ignore_for_file: unnecessary_const -// ignore_for_file: unused_import -// ignore_for_file: sdk_version_since - -import 'package:reflectable/mirrors.dart' as m; -import 'package:reflectable/src/reflectable_builder_based.dart' as r; -import 'package:reflectable/reflectable.dart' as r show Reflectable; - -final _data = { - const prefix0.Reflector(): r.ReflectorData( - [ - r.NonGenericClassMirrorImpl( - r'TonWallet', - r'.TonWallet', - 134217735, - 0, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix1.TonWallet.subscribe, - r'subscribeByAddress': () => prefix1.TonWallet.subscribeByAddress, - r'subscribeByExistingWallet': () => - prefix1.TonWallet.subscribeByExistingWallet, - r'appendSignatureToWalletV5R1Payload': () => - prefix1.TonWallet.appendSignatureToWalletV5R1Payload, - r'findExistingWallets': () => prefix1.TonWallet.findExistingWallets, - r'getExistingWalletInfo': () => - prefix1.TonWallet.getExistingWalletInfo, - r'getWalletCustodians': () => prefix1.TonWallet.getWalletCustodians, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 13, - r'toString': 0, - r'noSuchMethod': 13, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'getUnconfirmedTransactions': 0, - r'getCustodians': 0, - r'prepareDeploy': 4, - r'prepareDeployWithMultipleOwners': 5, - r'prepareTransfer': 6, - r'prepareWalletV5R1MessageBody': 7, - r'prepareNonexistWalletV5R1MessageBody': 7, - r'prepareConfirmTransaction': 8, - r'estimateFees': 9, - r'send': 9, - r'refresh': 0, - r'preloadTransactions': 10, - r'handleBlock': 11, - r'makeStateInit': 0, - r'getWalletV5R1Seqno': 6, - r'onMessageSent': 13, - r'onMessageExpired': 13, - r'onStateChanged': 13, - r'onTransactionsFound': 13, - r'onDetailsChanged': 13, - r'onCustodiansChanged': 13, - r'onUnconfirmedTransactionsChanged': 13, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 13, - r'transport': 0, - r'publicKey': 0, - r'publicKey=': 13, - r'address': 0, - r'address=': 13, - r'walletType': 0, - r'walletType=': 13, - r'workchain': 0, - r'workchain=': 13, - r'custodians': 0, - r'details': 0, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'unconfirmedTransactions': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 0, - r'subscribeByAddress': 1, - r'subscribeByExistingWallet': 2, - r'appendSignatureToWalletV5R1Payload': 3, - r'findExistingWallets': 12, - r'getExistingWalletInfo': 1, - r'getWalletCustodians': 1, - }, - ), - r.NonGenericClassMirrorImpl( - r'GqlConnection', - r'.GqlConnection', - 134217735, - 1, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix2.GqlConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 13, - r'toString': 0, - r'noSuchMethod': 13, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 13, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 13, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 14, - }, - ), - r.NonGenericClassMirrorImpl( - r'ProtoConnection', - r'.ProtoConnection', - 134217735, - 2, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix3.ProtoConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 13, - r'toString': 0, - r'noSuchMethod': 13, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 13, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 13, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 14, - }, - ), - r.NonGenericClassMirrorImpl( - r'JrpcConnection', - r'.JrpcConnection', - 134217735, - 3, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix4.JrpcConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 13, - r'toString': 0, - r'noSuchMethod': 13, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 13, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 13, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 14, - }, - ), - r.NonGenericClassMirrorImpl( - r'LedgerConnection', - r'.LedgerConnection', - 134217735, - 4, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix5.LedgerConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 13, - r'toString': 0, - r'noSuchMethod': 13, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getPublicKey': 13, - r'sign': 15, - r'signTransaction': 16, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 13, - r'create': 13, - }, - ), - r.NonGenericClassMirrorImpl( - r'Storage', - r'.Storage', - 134217735, - 5, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix6.Storage.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 13, - r'toString': 0, - r'noSuchMethod': 13, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'get': 13, - r'set': 18, - r'setUnchecked': 18, - r'remove': 18, - r'removeUnchecked': 18, - r'initializeMirror': 0, - r'storage': 0, - r'storage=': 13, - r'create': 17, - }, - ), - r.NonGenericClassMirrorImpl( - r'GenericContract', - r'.GenericContract', - 134217735, - 6, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'subscribe': () => prefix7.GenericContract.subscribe}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 13, - r'toString': 0, - r'noSuchMethod': 13, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'executeTransactionLocally': 20, - r'estimateFees': 9, - r'send': 9, - r'refresh': 0, - r'preloadTransactions': 10, - r'handleBlock': 11, - r'onMessageSent': 13, - r'onMessageExpired': 13, - r'onStateChanged': 13, - r'onTransactionsFound': 13, - r'initializeMirror': 0, - r'contract': 0, - r'contract=': 13, - r'transport': 0, - r'address': 0, - r'address=': 13, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 19, - }, - ), - r.NonGenericClassMirrorImpl( - r'TokenWallet', - r'.TokenWallet', - 134217735, - 7, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix8.TokenWallet.subscribe, - r'getTokenWalletDetails': () => - prefix8.TokenWallet.getTokenWalletDetails, - r'getTokenRootDetailsFromTokenWallet': () => - prefix8.TokenWallet.getTokenRootDetailsFromTokenWallet, - r'getTokenRootDetails': () => prefix8.TokenWallet.getTokenRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 13, - r'toString': 0, - r'noSuchMethod': 13, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 22, - r'prepareTransfer': 23, - r'refresh': 0, - r'preloadTransactions': 24, - r'handleBlock': 11, - r'onBalanceChanged': 13, - r'onTransactionsFound': 13, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 13, - r'transport': 0, - r'balance': 0, - r'balance=': 13, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 13, - r'owner': 0, - r'owner=': 13, - r'symbol': 0, - r'symbol=': 13, - r'currency': 0, - r'currency=': 13, - r'version': 0, - r'version=': 13, - r'moneyBalance': 0, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onMoneyBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 21, - r'getTokenWalletDetails': 1, - r'getTokenRootDetailsFromTokenWallet': 1, - r'getTokenRootDetails': 25, - }, - ), - r.NonGenericClassMirrorImpl( - r'JettonWallet', - r'.JettonWallet', - 134217735, - 8, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix9.JettonWallet.subscribe, - r'getJettonWalletDetails': () => - prefix9.JettonWallet.getJettonWalletDetails, - r'getJettonRootDetailsFromJettonWallet': () => - prefix9.JettonWallet.getJettonRootDetailsFromJettonWallet, - r'getJettonRootDetails': () => - prefix9.JettonWallet.getJettonRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 13, - r'toString': 0, - r'noSuchMethod': 13, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 22, - r'prepareTransfer': 26, - r'refresh': 0, - r'preloadTransactions': 24, - r'handleBlock': 11, - r'onBalanceChanged': 13, - r'onTransactionsFound': 13, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 13, - r'transport': 0, - r'balance': 0, - r'balance=': 13, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 13, - r'owner': 0, - r'owner=': 13, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 21, - r'getJettonWalletDetails': 1, - r'getJettonRootDetailsFromJettonWallet': 1, - r'getJettonRootDetails': 25, - }, - ), - ], - null, - null, - [ - prefix1.TonWallet, - prefix2.GqlConnection, - prefix3.ProtoConnection, - prefix4.JrpcConnection, - prefix5.LedgerConnection, - prefix6.Storage, - prefix7.GenericContract, - prefix8.TokenWallet, - prefix9.JettonWallet, - ], - 9, - { - r'==': (dynamic instance) => (x) => instance == x, - r'toString': (dynamic instance) => instance.toString, - r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, - r'hashCode': (dynamic instance) => instance.hashCode, - r'runtimeType': (dynamic instance) => instance.runtimeType, - r'init': (dynamic instance) => instance.init, - r'dispose': (dynamic instance) => instance.dispose, - r'instanceHash': (dynamic instance) => instance.instanceHash, - r'avoidCall': (dynamic instance) => instance.avoidCall, - r'getContractState': (dynamic instance) => instance.getContractState, - r'getPendingTransactions': (dynamic instance) => - instance.getPendingTransactions, - r'getPollingMethod': (dynamic instance) => instance.getPollingMethod, - r'getUnconfirmedTransactions': (dynamic instance) => - instance.getUnconfirmedTransactions, - r'getCustodians': (dynamic instance) => instance.getCustodians, - r'prepareDeploy': (dynamic instance) => instance.prepareDeploy, - r'prepareDeployWithMultipleOwners': (dynamic instance) => - instance.prepareDeployWithMultipleOwners, - r'prepareTransfer': (dynamic instance) => instance.prepareTransfer, - r'prepareWalletV5R1MessageBody': (dynamic instance) => - instance.prepareWalletV5R1MessageBody, - r'prepareNonexistWalletV5R1MessageBody': (dynamic instance) => - instance.prepareNonexistWalletV5R1MessageBody, - r'prepareConfirmTransaction': (dynamic instance) => - instance.prepareConfirmTransaction, - r'estimateFees': (dynamic instance) => instance.estimateFees, - r'send': (dynamic instance) => instance.send, - r'refresh': (dynamic instance) => instance.refresh, - r'preloadTransactions': (dynamic instance) => - instance.preloadTransactions, - r'handleBlock': (dynamic instance) => instance.handleBlock, - r'makeStateInit': (dynamic instance) => instance.makeStateInit, - r'getWalletV5R1Seqno': (dynamic instance) => instance.getWalletV5R1Seqno, - r'onMessageSent': (dynamic instance) => instance.onMessageSent, - r'onMessageExpired': (dynamic instance) => instance.onMessageExpired, - r'onStateChanged': (dynamic instance) => instance.onStateChanged, - r'onTransactionsFound': (dynamic instance) => - instance.onTransactionsFound, - r'onDetailsChanged': (dynamic instance) => instance.onDetailsChanged, - r'onCustodiansChanged': (dynamic instance) => - instance.onCustodiansChanged, - r'onUnconfirmedTransactionsChanged': (dynamic instance) => - instance.onUnconfirmedTransactionsChanged, - r'initializeMirror': (dynamic instance) => instance.initializeMirror, - r'wallet': (dynamic instance) => instance.wallet, - r'transport': (dynamic instance) => instance.transport, - r'publicKey': (dynamic instance) => instance.publicKey, - r'address': (dynamic instance) => instance.address, - r'walletType': (dynamic instance) => instance.walletType, - r'workchain': (dynamic instance) => instance.workchain, - r'custodians': (dynamic instance) => instance.custodians, - r'details': (dynamic instance) => instance.details, - r'contractState': (dynamic instance) => instance.contractState, - r'pendingTransactions': (dynamic instance) => - instance.pendingTransactions, - r'pollingMethod': (dynamic instance) => instance.pollingMethod, - r'unconfirmedTransactions': (dynamic instance) => - instance.unconfirmedTransactions, - r'fieldUpdatesStream': (dynamic instance) => instance.fieldUpdatesStream, - r'onMessageSentStream': (dynamic instance) => - instance.onMessageSentStream, - r'onMessageExpiredStream': (dynamic instance) => - instance.onMessageExpiredStream, - r'onStateChangedStream': (dynamic instance) => - instance.onStateChangedStream, - r'onTransactionsFoundStream': (dynamic instance) => - instance.onTransactionsFoundStream, - r'refreshDescription': (dynamic instance) => instance.refreshDescription, - r'post': (dynamic instance) => instance.post, - r'connection': (dynamic instance) => instance.connection, - r'settings': (dynamic instance) => instance.settings, - r'type': (dynamic instance) => instance.type, - r'name': (dynamic instance) => instance.name, - r'group': (dynamic instance) => instance.group, - r'getPublicKey': (dynamic instance) => instance.getPublicKey, - r'sign': (dynamic instance) => instance.sign, - r'signTransaction': (dynamic instance) => instance.signTransaction, - r'get': (dynamic instance) => instance.get, - r'set': (dynamic instance) => instance.set, - r'setUnchecked': (dynamic instance) => instance.setUnchecked, - r'remove': (dynamic instance) => instance.remove, - r'removeUnchecked': (dynamic instance) => instance.removeUnchecked, - r'storage': (dynamic instance) => instance.storage, - r'executeTransactionLocally': (dynamic instance) => - instance.executeTransactionLocally, - r'contract': (dynamic instance) => instance.contract, - r'estimateMinAttachedAmount': (dynamic instance) => - instance.estimateMinAttachedAmount, - r'onBalanceChanged': (dynamic instance) => instance.onBalanceChanged, - r'balance': (dynamic instance) => instance.balance, - r'rootTokenContract': (dynamic instance) => instance.rootTokenContract, - r'tokenAddress': (dynamic instance) => instance.tokenAddress, - r'owner': (dynamic instance) => instance.owner, - r'symbol': (dynamic instance) => instance.symbol, - r'currency': (dynamic instance) => instance.currency, - r'version': (dynamic instance) => instance.version, - r'moneyBalance': (dynamic instance) => instance.moneyBalance, - r'isTransactionsPreloaded': (dynamic instance) => - instance.isTransactionsPreloaded, - r'onBalanceChangedStream': (dynamic instance) => - instance.onBalanceChangedStream, - r'onMoneyBalanceChangedStream': (dynamic instance) => - instance.onMoneyBalanceChangedStream, - }, - { - r'wallet=': (dynamic instance, value) => instance.wallet = value, - r'publicKey=': (dynamic instance, value) => instance.publicKey = value, - r'address=': (dynamic instance, value) => instance.address = value, - r'walletType=': (dynamic instance, value) => instance.walletType = value, - r'workchain=': (dynamic instance, value) => instance.workchain = value, - r'connection=': (dynamic instance, value) => instance.connection = value, - r'storage=': (dynamic instance, value) => instance.storage = value, - r'contract=': (dynamic instance, value) => instance.contract = value, - r'balance=': (dynamic instance, value) => instance.balance = value, - r'tokenAddress=': (dynamic instance, value) => - instance.tokenAddress = value, - r'owner=': (dynamic instance, value) => instance.owner = value, - r'symbol=': (dynamic instance, value) => instance.symbol = value, - r'currency=': (dynamic instance, value) => instance.currency = value, - r'version=': (dynamic instance, value) => instance.version = value, - }, - null, - [ - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletType], - ], - const [ - 0, - 0, - const [#transport, #address], - ], - const [ - 0, - 0, - const [#transport, #existingWallet], - ], - const [ - 0, - 0, - const [#payload, #base64Signature], - ], - const [ - 0, - 0, - const [#expiration], - ], - const [ - 0, - 0, - const [#expiration, #custodians, #reqConfirms, #expirationTime], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #expiration, #params], - ], - const [ - 0, - 0, - const [ - #contractState, - #publicKey, - #expiration, - #params, - #isInternalFlow, - ], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #transactionId, #expiration], - ], - const [ - 0, - 0, - const [#signedMessage, #executionOptions], - ], - const [ - 0, - 0, - const [#fromLt], - ], - const [ - 0, - 0, - const [#block], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletTypes], - ], - const [1, 0, null], - const [ - 0, - 0, - const [#client, #settings, #name, #group], - ], - const [3, 0, null], - const [5, 0, null], - const [ - 0, - 0, - const [#get, #set, #setUnchecked, #remove, #removeUnchecked], - ], - const [ - 0, - 0, - const [#key, #value], - ], - const [ - 0, - 0, - const [#transport, #address, #preloadTransactions], - ], - const [ - 0, - 0, - const [#signedMessage, #options], - ], - const [ - 0, - 0, - const [#transport, #owner, #rootTokenContract, #preloadTransactions], - ], - const [ - 0, - 0, - const [#destination, #amount, #notifyReceiver, #payload], - ], - const [ - 0, - 0, - const [ - #destination, - #amount, - #notifyReceiver, - #attachedAmount, - #payload, - #remainingGasTo, - ], - ], - const [1, 1, null], - const [ - 0, - 0, - const [#transport, #tokenRoot], - ], - const [ - 0, - 0, - const [ - #amount, - #destination, - #remainingGasTo, - #callbackValue, - #customPayload, - #callbackPayload, - #attachedAmount, - ], - ], - ], - ), -}; - -final _memberSymbolMap = null; - -void initializeReflectable() { - r.data = _data; - r.memberSymbolMap = _memberSymbolMap; -} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/ton_wallet_lib.dart b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/ton_wallet_lib.dart index 7545954f..9d4edba8 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/ton_wallet_lib.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/core/ton_wallet/ton_wallet_lib.dart @@ -1,2 +1,2 @@ -export 'ton_wallet.dart' hide main; +export 'ton_wallet.dart'; export 'models/models.dart'; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input.dart index 53b26cf6..a10b8b97 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input.dart @@ -14,11 +14,13 @@ sealed class DerivedKeyCreateInput implements CreateKeyInput { /// Create new labs key const factory DerivedKeyCreateInput.import( - final DerivedKeyCreateInputImport data) = _DerivedKeyCreateInputImport; + final DerivedKeyCreateInputImport data, + ) = _DerivedKeyCreateInputImport; /// Derive key from masterKey const factory DerivedKeyCreateInput.derive( - final DerivedKeyCreateInputDerive data) = _DerivedKeyCreateInputDerive; + final DerivedKeyCreateInputDerive data, + ) = _DerivedKeyCreateInputDerive; factory DerivedKeyCreateInput.fromJson(Map json) => _$DerivedKeyCreateInputFromJson(json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input.freezed.dart index 056d9b30..e73da2f1 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -13,111 +12,244 @@ part of 'derived_key_create_input.dart'; // dart format off T _$identity(T value) => value; DerivedKeyCreateInput _$DerivedKeyCreateInputFromJson( - Map json) { - switch (json['type']) { - case 'import': - return _DerivedKeyCreateInputImport.fromJson(json); - case 'derive': - return _DerivedKeyCreateInputDerive.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'type', 'DerivedKeyCreateInput', - 'Invalid union type "${json['type']}"!'); - } + Map json +) { + switch (json['type']) { + case 'import': + return _DerivedKeyCreateInputImport.fromJson( + json + ); + case 'derive': + return _DerivedKeyCreateInputDerive.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'DerivedKeyCreateInput', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$DerivedKeyCreateInput { - Object get data; + + Object get data; /// Serializes this DerivedKeyCreateInput to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DerivedKeyCreateInput && - const DeepCollectionEquality().equals(other.data, data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(data)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DerivedKeyCreateInput&&const DeepCollectionEquality().equals(other.data, data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(data)); + +@override +String toString() { + return 'DerivedKeyCreateInput(data: $data)'; +} + - @override - String toString() { - return 'DerivedKeyCreateInput(data: $data)'; - } } /// @nodoc -class $DerivedKeyCreateInputCopyWith<$Res> { - $DerivedKeyCreateInputCopyWith( - DerivedKeyCreateInput _, $Res Function(DerivedKeyCreateInput) __); +class $DerivedKeyCreateInputCopyWith<$Res> { +$DerivedKeyCreateInputCopyWith(DerivedKeyCreateInput _, $Res Function(DerivedKeyCreateInput) __); +} + + +/// Adds pattern-matching-related methods to [DerivedKeyCreateInput]. +extension DerivedKeyCreateInputPatterns on DerivedKeyCreateInput { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( _DerivedKeyCreateInputImport value)? import,TResult Function( _DerivedKeyCreateInputDerive value)? derive,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DerivedKeyCreateInputImport() when import != null: +return import(_that);case _DerivedKeyCreateInputDerive() when derive != null: +return derive(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( _DerivedKeyCreateInputImport value) import,required TResult Function( _DerivedKeyCreateInputDerive value) derive,}){ +final _that = this; +switch (_that) { +case _DerivedKeyCreateInputImport(): +return import(_that);case _DerivedKeyCreateInputDerive(): +return derive(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( _DerivedKeyCreateInputImport value)? import,TResult? Function( _DerivedKeyCreateInputDerive value)? derive,}){ +final _that = this; +switch (_that) { +case _DerivedKeyCreateInputImport() when import != null: +return import(_that);case _DerivedKeyCreateInputDerive() when derive != null: +return derive(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( DerivedKeyCreateInputImport data)? import,TResult Function( DerivedKeyCreateInputDerive data)? derive,required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DerivedKeyCreateInputImport() when import != null: +return import(_that.data);case _DerivedKeyCreateInputDerive() when derive != null: +return derive(_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( DerivedKeyCreateInputImport data) import,required TResult Function( DerivedKeyCreateInputDerive data) derive,}) {final _that = this; +switch (_that) { +case _DerivedKeyCreateInputImport(): +return import(_that.data);case _DerivedKeyCreateInputDerive(): +return derive(_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( DerivedKeyCreateInputImport data)? import,TResult? Function( DerivedKeyCreateInputDerive data)? derive,}) {final _that = this; +switch (_that) { +case _DerivedKeyCreateInputImport() when import != null: +return import(_that.data);case _DerivedKeyCreateInputDerive() when derive != null: +return derive(_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _DerivedKeyCreateInputImport implements DerivedKeyCreateInput { - const _DerivedKeyCreateInputImport(this.data, {final String? $type}) - : $type = $type ?? 'import'; - factory _DerivedKeyCreateInputImport.fromJson(Map json) => - _$DerivedKeyCreateInputImportFromJson(json); - - @override - final DerivedKeyCreateInputImport data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of DerivedKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyCreateInputImportCopyWith<_DerivedKeyCreateInputImport> - get copyWith => __$DerivedKeyCreateInputImportCopyWithImpl< - _DerivedKeyCreateInputImport>(this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyCreateInputImportToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyCreateInputImport && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'DerivedKeyCreateInput.import(data: $data)'; - } + const _DerivedKeyCreateInputImport(this.data, {final String? $type}): $type = $type ?? 'import'; + factory _DerivedKeyCreateInputImport.fromJson(Map json) => _$DerivedKeyCreateInputImportFromJson(json); + +@override final DerivedKeyCreateInputImport data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of DerivedKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyCreateInputImportCopyWith<_DerivedKeyCreateInputImport> get copyWith => __$DerivedKeyCreateInputImportCopyWithImpl<_DerivedKeyCreateInputImport>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyCreateInputImportToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyCreateInputImport&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'DerivedKeyCreateInput.import(data: $data)'; } -/// @nodoc -abstract mixin class _$DerivedKeyCreateInputImportCopyWith<$Res> - implements $DerivedKeyCreateInputCopyWith<$Res> { - factory _$DerivedKeyCreateInputImportCopyWith( - _DerivedKeyCreateInputImport value, - $Res Function(_DerivedKeyCreateInputImport) _then) = - __$DerivedKeyCreateInputImportCopyWithImpl; - @useResult - $Res call({DerivedKeyCreateInputImport data}); - $DerivedKeyCreateInputImportCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class _$DerivedKeyCreateInputImportCopyWith<$Res> implements $DerivedKeyCreateInputCopyWith<$Res> { + factory _$DerivedKeyCreateInputImportCopyWith(_DerivedKeyCreateInputImport value, $Res Function(_DerivedKeyCreateInputImport) _then) = __$DerivedKeyCreateInputImportCopyWithImpl; +@useResult +$Res call({ + DerivedKeyCreateInputImport data +}); + + +$DerivedKeyCreateInputImportCopyWith<$Res> get data; + +} /// @nodoc class __$DerivedKeyCreateInputImportCopyWithImpl<$Res> implements _$DerivedKeyCreateInputImportCopyWith<$Res> { @@ -126,91 +258,80 @@ class __$DerivedKeyCreateInputImportCopyWithImpl<$Res> final _DerivedKeyCreateInputImport _self; final $Res Function(_DerivedKeyCreateInputImport) _then; - /// Create a copy of DerivedKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(_DerivedKeyCreateInputImport( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as DerivedKeyCreateInputImport, - )); - } - - /// Create a copy of DerivedKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $DerivedKeyCreateInputImportCopyWith<$Res> get data { - return $DerivedKeyCreateInputImportCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of DerivedKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(_DerivedKeyCreateInputImport( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as DerivedKeyCreateInputImport, + )); +} + +/// Create a copy of DerivedKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$DerivedKeyCreateInputImportCopyWith<$Res> get data { + + return $DerivedKeyCreateInputImportCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class _DerivedKeyCreateInputDerive implements DerivedKeyCreateInput { - const _DerivedKeyCreateInputDerive(this.data, {final String? $type}) - : $type = $type ?? 'derive'; - factory _DerivedKeyCreateInputDerive.fromJson(Map json) => - _$DerivedKeyCreateInputDeriveFromJson(json); - - @override - final DerivedKeyCreateInputDerive data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of DerivedKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyCreateInputDeriveCopyWith<_DerivedKeyCreateInputDerive> - get copyWith => __$DerivedKeyCreateInputDeriveCopyWithImpl< - _DerivedKeyCreateInputDerive>(this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyCreateInputDeriveToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyCreateInputDerive && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'DerivedKeyCreateInput.derive(data: $data)'; - } + const _DerivedKeyCreateInputDerive(this.data, {final String? $type}): $type = $type ?? 'derive'; + factory _DerivedKeyCreateInputDerive.fromJson(Map json) => _$DerivedKeyCreateInputDeriveFromJson(json); + +@override final DerivedKeyCreateInputDerive data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of DerivedKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyCreateInputDeriveCopyWith<_DerivedKeyCreateInputDerive> get copyWith => __$DerivedKeyCreateInputDeriveCopyWithImpl<_DerivedKeyCreateInputDerive>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyCreateInputDeriveToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyCreateInputDerive&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'DerivedKeyCreateInput.derive(data: $data)'; } -/// @nodoc -abstract mixin class _$DerivedKeyCreateInputDeriveCopyWith<$Res> - implements $DerivedKeyCreateInputCopyWith<$Res> { - factory _$DerivedKeyCreateInputDeriveCopyWith( - _DerivedKeyCreateInputDerive value, - $Res Function(_DerivedKeyCreateInputDerive) _then) = - __$DerivedKeyCreateInputDeriveCopyWithImpl; - @useResult - $Res call({DerivedKeyCreateInputDerive data}); - $DerivedKeyCreateInputDeriveCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class _$DerivedKeyCreateInputDeriveCopyWith<$Res> implements $DerivedKeyCreateInputCopyWith<$Res> { + factory _$DerivedKeyCreateInputDeriveCopyWith(_DerivedKeyCreateInputDerive value, $Res Function(_DerivedKeyCreateInputDerive) _then) = __$DerivedKeyCreateInputDeriveCopyWithImpl; +@useResult +$Res call({ + DerivedKeyCreateInputDerive data +}); + + +$DerivedKeyCreateInputDeriveCopyWith<$Res> get data; + +} /// @nodoc class __$DerivedKeyCreateInputDeriveCopyWithImpl<$Res> implements _$DerivedKeyCreateInputDeriveCopyWith<$Res> { @@ -219,29 +340,25 @@ class __$DerivedKeyCreateInputDeriveCopyWithImpl<$Res> final _DerivedKeyCreateInputDerive _self; final $Res Function(_DerivedKeyCreateInputDerive) _then; - /// Create a copy of DerivedKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(_DerivedKeyCreateInputDerive( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as DerivedKeyCreateInputDerive, - )); - } - - /// Create a copy of DerivedKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $DerivedKeyCreateInputDeriveCopyWith<$Res> get data { - return $DerivedKeyCreateInputDeriveCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of DerivedKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(_DerivedKeyCreateInputDerive( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as DerivedKeyCreateInputDerive, + )); +} + +/// Create a copy of DerivedKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$DerivedKeyCreateInputDeriveCopyWith<$Res> get data { + + return $DerivedKeyCreateInputDeriveCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input.g.dart index 05a53a49..bc4e570d 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input.g.dart @@ -7,31 +7,23 @@ part of 'derived_key_create_input.dart'; // ************************************************************************** _DerivedKeyCreateInputImport _$DerivedKeyCreateInputImportFromJson( - Map json) => - _DerivedKeyCreateInputImport( - DerivedKeyCreateInputImport.fromJson( - json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => _DerivedKeyCreateInputImport( + DerivedKeyCreateInputImport.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$DerivedKeyCreateInputImportToJson( - _DerivedKeyCreateInputImport instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + _DerivedKeyCreateInputImport instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; _DerivedKeyCreateInputDerive _$DerivedKeyCreateInputDeriveFromJson( - Map json) => - _DerivedKeyCreateInputDerive( - DerivedKeyCreateInputDerive.fromJson( - json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => _DerivedKeyCreateInputDerive( + DerivedKeyCreateInputDerive.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$DerivedKeyCreateInputDeriveToJson( - _DerivedKeyCreateInputDerive instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + _DerivedKeyCreateInputDerive instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_derive.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_derive.freezed.dart index cded7472..fa1c8ac5 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_derive.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_derive.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,62 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$DerivedKeyCreateInputDerive { - String? get keyName; - PublicKey get masterKey; - int get accountId; - Password get password; - - /// Create a copy of DerivedKeyCreateInputDerive - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DerivedKeyCreateInputDeriveCopyWith - get copyWith => _$DerivedKeyCreateInputDeriveCopyWithImpl< - DerivedKeyCreateInputDerive>( - this as DerivedKeyCreateInputDerive, _$identity); + + String? get keyName; PublicKey get masterKey; int get accountId; Password get password; +/// Create a copy of DerivedKeyCreateInputDerive +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DerivedKeyCreateInputDeriveCopyWith get copyWith => _$DerivedKeyCreateInputDeriveCopyWithImpl(this as DerivedKeyCreateInputDerive, _$identity); /// Serializes this DerivedKeyCreateInputDerive to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DerivedKeyCreateInputDerive && - (identical(other.keyName, keyName) || other.keyName == keyName) && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.accountId, accountId) || - other.accountId == accountId) && - (identical(other.password, password) || - other.password == password)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, keyName, masterKey, accountId, password); - - @override - String toString() { - return 'DerivedKeyCreateInputDerive(keyName: $keyName, masterKey: $masterKey, accountId: $accountId, password: $password)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DerivedKeyCreateInputDerive&&(identical(other.keyName, keyName) || other.keyName == keyName)&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.password, password) || other.password == password)); } -/// @nodoc -abstract mixin class $DerivedKeyCreateInputDeriveCopyWith<$Res> { - factory $DerivedKeyCreateInputDeriveCopyWith( - DerivedKeyCreateInputDerive value, - $Res Function(DerivedKeyCreateInputDerive) _then) = - _$DerivedKeyCreateInputDeriveCopyWithImpl; - @useResult - $Res call( - {String? keyName, PublicKey masterKey, int accountId, Password password}); - - $PublicKeyCopyWith<$Res> get masterKey; - $PasswordCopyWith<$Res> get password; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,keyName,masterKey,accountId,password); + +@override +String toString() { + return 'DerivedKeyCreateInputDerive(keyName: $keyName, masterKey: $masterKey, accountId: $accountId, password: $password)'; +} + + } +/// @nodoc +abstract mixin class $DerivedKeyCreateInputDeriveCopyWith<$Res> { + factory $DerivedKeyCreateInputDeriveCopyWith(DerivedKeyCreateInputDerive value, $Res Function(DerivedKeyCreateInputDerive) _then) = _$DerivedKeyCreateInputDeriveCopyWithImpl; +@useResult +$Res call({ + String? keyName, PublicKey masterKey, int accountId, Password password +}); + + +$PublicKeyCopyWith<$Res> get masterKey;$PasswordCopyWith<$Res> get password; + +} /// @nodoc class _$DerivedKeyCreateInputDeriveCopyWithImpl<$Res> implements $DerivedKeyCreateInputDeriveCopyWith<$Res> { @@ -79,137 +63,221 @@ class _$DerivedKeyCreateInputDeriveCopyWithImpl<$Res> final DerivedKeyCreateInputDerive _self; final $Res Function(DerivedKeyCreateInputDerive) _then; - /// Create a copy of DerivedKeyCreateInputDerive - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? keyName = freezed, - Object? masterKey = null, - Object? accountId = null, - Object? password = null, - }) { - return _then(_self.copyWith( - keyName: freezed == keyName - ? _self.keyName - : keyName // ignore: cast_nullable_to_non_nullable - as String?, - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - accountId: null == accountId - ? _self.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of DerivedKeyCreateInputDerive - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } - - /// Create a copy of DerivedKeyCreateInputDerive - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of DerivedKeyCreateInputDerive +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? keyName = freezed,Object? masterKey = null,Object? accountId = null,Object? password = null,}) { + return _then(_self.copyWith( +keyName: freezed == keyName ? _self.keyName : keyName // ignore: cast_nullable_to_non_nullable +as String?,masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable +as int,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password, + )); +} +/// Create a copy of DerivedKeyCreateInputDerive +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +}/// Create a copy of DerivedKeyCreateInputDerive +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [DerivedKeyCreateInputDerive]. +extension DerivedKeyCreateInputDerivePatterns on DerivedKeyCreateInputDerive { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DerivedKeyCreateInputDerive value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DerivedKeyCreateInputDerive() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DerivedKeyCreateInputDerive value) $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyCreateInputDerive(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DerivedKeyCreateInputDerive value)? $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyCreateInputDerive() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String? keyName, PublicKey masterKey, int accountId, Password password)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DerivedKeyCreateInputDerive() when $default != null: +return $default(_that.keyName,_that.masterKey,_that.accountId,_that.password);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String? keyName, PublicKey masterKey, int accountId, Password password) $default,) {final _that = this; +switch (_that) { +case _DerivedKeyCreateInputDerive(): +return $default(_that.keyName,_that.masterKey,_that.accountId,_that.password);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? keyName, PublicKey masterKey, int accountId, Password password)? $default,) {final _that = this; +switch (_that) { +case _DerivedKeyCreateInputDerive() when $default != null: +return $default(_that.keyName,_that.masterKey,_that.accountId,_that.password);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _DerivedKeyCreateInputDerive implements DerivedKeyCreateInputDerive { - const _DerivedKeyCreateInputDerive( - {this.keyName, - required this.masterKey, - required this.accountId, - required this.password}); - factory _DerivedKeyCreateInputDerive.fromJson(Map json) => - _$DerivedKeyCreateInputDeriveFromJson(json); - - @override - final String? keyName; - @override - final PublicKey masterKey; - @override - final int accountId; - @override - final Password password; - - /// Create a copy of DerivedKeyCreateInputDerive - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyCreateInputDeriveCopyWith<_DerivedKeyCreateInputDerive> - get copyWith => __$DerivedKeyCreateInputDeriveCopyWithImpl< - _DerivedKeyCreateInputDerive>(this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyCreateInputDeriveToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyCreateInputDerive && - (identical(other.keyName, keyName) || other.keyName == keyName) && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.accountId, accountId) || - other.accountId == accountId) && - (identical(other.password, password) || - other.password == password)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, keyName, masterKey, accountId, password); - - @override - String toString() { - return 'DerivedKeyCreateInputDerive(keyName: $keyName, masterKey: $masterKey, accountId: $accountId, password: $password)'; - } + const _DerivedKeyCreateInputDerive({this.keyName, required this.masterKey, required this.accountId, required this.password}); + factory _DerivedKeyCreateInputDerive.fromJson(Map json) => _$DerivedKeyCreateInputDeriveFromJson(json); + +@override final String? keyName; +@override final PublicKey masterKey; +@override final int accountId; +@override final Password password; + +/// Create a copy of DerivedKeyCreateInputDerive +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyCreateInputDeriveCopyWith<_DerivedKeyCreateInputDerive> get copyWith => __$DerivedKeyCreateInputDeriveCopyWithImpl<_DerivedKeyCreateInputDerive>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyCreateInputDeriveToJson(this, ); } -/// @nodoc -abstract mixin class _$DerivedKeyCreateInputDeriveCopyWith<$Res> - implements $DerivedKeyCreateInputDeriveCopyWith<$Res> { - factory _$DerivedKeyCreateInputDeriveCopyWith( - _DerivedKeyCreateInputDerive value, - $Res Function(_DerivedKeyCreateInputDerive) _then) = - __$DerivedKeyCreateInputDeriveCopyWithImpl; - @override - @useResult - $Res call( - {String? keyName, PublicKey masterKey, int accountId, Password password}); - - @override - $PublicKeyCopyWith<$Res> get masterKey; - @override - $PasswordCopyWith<$Res> get password; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyCreateInputDerive&&(identical(other.keyName, keyName) || other.keyName == keyName)&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.password, password) || other.password == password)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,keyName,masterKey,accountId,password); + +@override +String toString() { + return 'DerivedKeyCreateInputDerive(keyName: $keyName, masterKey: $masterKey, accountId: $accountId, password: $password)'; +} + + } +/// @nodoc +abstract mixin class _$DerivedKeyCreateInputDeriveCopyWith<$Res> implements $DerivedKeyCreateInputDeriveCopyWith<$Res> { + factory _$DerivedKeyCreateInputDeriveCopyWith(_DerivedKeyCreateInputDerive value, $Res Function(_DerivedKeyCreateInputDerive) _then) = __$DerivedKeyCreateInputDeriveCopyWithImpl; +@override @useResult +$Res call({ + String? keyName, PublicKey masterKey, int accountId, Password password +}); + + +@override $PublicKeyCopyWith<$Res> get masterKey;@override $PasswordCopyWith<$Res> get password; + +} /// @nodoc class __$DerivedKeyCreateInputDeriveCopyWithImpl<$Res> implements _$DerivedKeyCreateInputDeriveCopyWith<$Res> { @@ -218,55 +286,37 @@ class __$DerivedKeyCreateInputDeriveCopyWithImpl<$Res> final _DerivedKeyCreateInputDerive _self; final $Res Function(_DerivedKeyCreateInputDerive) _then; - /// Create a copy of DerivedKeyCreateInputDerive - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? keyName = freezed, - Object? masterKey = null, - Object? accountId = null, - Object? password = null, - }) { - return _then(_DerivedKeyCreateInputDerive( - keyName: freezed == keyName - ? _self.keyName - : keyName // ignore: cast_nullable_to_non_nullable - as String?, - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - accountId: null == accountId - ? _self.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of DerivedKeyCreateInputDerive - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } - - /// Create a copy of DerivedKeyCreateInputDerive - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of DerivedKeyCreateInputDerive +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? keyName = freezed,Object? masterKey = null,Object? accountId = null,Object? password = null,}) { + return _then(_DerivedKeyCreateInputDerive( +keyName: freezed == keyName ? _self.keyName : keyName // ignore: cast_nullable_to_non_nullable +as String?,masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable +as int,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password, + )); +} + +/// Create a copy of DerivedKeyCreateInputDerive +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +}/// Create a copy of DerivedKeyCreateInputDerive +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_derive.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_derive.g.dart index 819cea18..b6dac4b0 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_derive.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_derive.g.dart @@ -7,19 +7,19 @@ part of 'derived_key_create_input_derive.dart'; // ************************************************************************** _DerivedKeyCreateInputDerive _$DerivedKeyCreateInputDeriveFromJson( - Map json) => - _DerivedKeyCreateInputDerive( - keyName: json['key_name'] as String?, - masterKey: PublicKey.fromJson(json['master_key'] as String), - accountId: (json['account_id'] as num).toInt(), - password: Password.fromJson(json['password'] as Map), - ); + Map json, +) => _DerivedKeyCreateInputDerive( + keyName: json['key_name'] as String?, + masterKey: PublicKey.fromJson(json['master_key'] as String), + accountId: (json['account_id'] as num).toInt(), + password: Password.fromJson(json['password'] as Map), +); Map _$DerivedKeyCreateInputDeriveToJson( - _DerivedKeyCreateInputDerive instance) => - { - 'key_name': instance.keyName, - 'master_key': instance.masterKey.toJson(), - 'account_id': instance.accountId, - 'password': instance.password.toJson(), - }; + _DerivedKeyCreateInputDerive instance, +) => { + 'key_name': instance.keyName, + 'master_key': instance.masterKey.toJson(), + 'account_id': instance.accountId, + 'password': instance.password.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_import.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_import.freezed.dart index 53f86ac9..222573c2 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_import.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_import.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,55 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$DerivedKeyCreateInputImport { - String? get keyName; - String get phrase; - Password get password; - - /// Create a copy of DerivedKeyCreateInputImport - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DerivedKeyCreateInputImportCopyWith - get copyWith => _$DerivedKeyCreateInputImportCopyWithImpl< - DerivedKeyCreateInputImport>( - this as DerivedKeyCreateInputImport, _$identity); + + String? get keyName; String get phrase; Password get password; +/// Create a copy of DerivedKeyCreateInputImport +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DerivedKeyCreateInputImportCopyWith get copyWith => _$DerivedKeyCreateInputImportCopyWithImpl(this as DerivedKeyCreateInputImport, _$identity); /// Serializes this DerivedKeyCreateInputImport to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DerivedKeyCreateInputImport && - (identical(other.keyName, keyName) || other.keyName == keyName) && - (identical(other.phrase, phrase) || other.phrase == phrase) && - (identical(other.password, password) || - other.password == password)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, keyName, phrase, password); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DerivedKeyCreateInputImport&&(identical(other.keyName, keyName) || other.keyName == keyName)&&(identical(other.phrase, phrase) || other.phrase == phrase)&&(identical(other.password, password) || other.password == password)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,keyName,phrase,password); - @override - String toString() { - return 'DerivedKeyCreateInputImport(keyName: $keyName, phrase: $phrase, password: $password)'; - } +@override +String toString() { + return 'DerivedKeyCreateInputImport(keyName: $keyName, phrase: $phrase, password: $password)'; } -/// @nodoc -abstract mixin class $DerivedKeyCreateInputImportCopyWith<$Res> { - factory $DerivedKeyCreateInputImportCopyWith( - DerivedKeyCreateInputImport value, - $Res Function(DerivedKeyCreateInputImport) _then) = - _$DerivedKeyCreateInputImportCopyWithImpl; - @useResult - $Res call({String? keyName, String phrase, Password password}); - $PasswordCopyWith<$Res> get password; } +/// @nodoc +abstract mixin class $DerivedKeyCreateInputImportCopyWith<$Res> { + factory $DerivedKeyCreateInputImportCopyWith(DerivedKeyCreateInputImport value, $Res Function(DerivedKeyCreateInputImport) _then) = _$DerivedKeyCreateInputImportCopyWithImpl; +@useResult +$Res call({ + String? keyName, String phrase, Password password +}); + + +$PasswordCopyWith<$Res> get password; + +} /// @nodoc class _$DerivedKeyCreateInputImportCopyWithImpl<$Res> implements $DerivedKeyCreateInputImportCopyWith<$Res> { @@ -72,110 +63,210 @@ class _$DerivedKeyCreateInputImportCopyWithImpl<$Res> final DerivedKeyCreateInputImport _self; final $Res Function(DerivedKeyCreateInputImport) _then; - /// Create a copy of DerivedKeyCreateInputImport - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? keyName = freezed, - Object? phrase = null, - Object? password = null, - }) { - return _then(_self.copyWith( - keyName: freezed == keyName - ? _self.keyName - : keyName // ignore: cast_nullable_to_non_nullable - as String?, - phrase: null == phrase - ? _self.phrase - : phrase // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of DerivedKeyCreateInputImport - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of DerivedKeyCreateInputImport +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? keyName = freezed,Object? phrase = null,Object? password = null,}) { + return _then(_self.copyWith( +keyName: freezed == keyName ? _self.keyName : keyName // ignore: cast_nullable_to_non_nullable +as String?,phrase: null == phrase ? _self.phrase : phrase // ignore: cast_nullable_to_non_nullable +as String,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password, + )); +} +/// Create a copy of DerivedKeyCreateInputImport +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [DerivedKeyCreateInputImport]. +extension DerivedKeyCreateInputImportPatterns on DerivedKeyCreateInputImport { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DerivedKeyCreateInputImport value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DerivedKeyCreateInputImport() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DerivedKeyCreateInputImport value) $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyCreateInputImport(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DerivedKeyCreateInputImport value)? $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyCreateInputImport() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String? keyName, String phrase, Password password)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DerivedKeyCreateInputImport() when $default != null: +return $default(_that.keyName,_that.phrase,_that.password);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String? keyName, String phrase, Password password) $default,) {final _that = this; +switch (_that) { +case _DerivedKeyCreateInputImport(): +return $default(_that.keyName,_that.phrase,_that.password);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? keyName, String phrase, Password password)? $default,) {final _that = this; +switch (_that) { +case _DerivedKeyCreateInputImport() when $default != null: +return $default(_that.keyName,_that.phrase,_that.password);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _DerivedKeyCreateInputImport implements DerivedKeyCreateInputImport { - const _DerivedKeyCreateInputImport( - {this.keyName, required this.phrase, required this.password}); - factory _DerivedKeyCreateInputImport.fromJson(Map json) => - _$DerivedKeyCreateInputImportFromJson(json); - - @override - final String? keyName; - @override - final String phrase; - @override - final Password password; - - /// Create a copy of DerivedKeyCreateInputImport - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyCreateInputImportCopyWith<_DerivedKeyCreateInputImport> - get copyWith => __$DerivedKeyCreateInputImportCopyWithImpl< - _DerivedKeyCreateInputImport>(this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyCreateInputImportToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyCreateInputImport && - (identical(other.keyName, keyName) || other.keyName == keyName) && - (identical(other.phrase, phrase) || other.phrase == phrase) && - (identical(other.password, password) || - other.password == password)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, keyName, phrase, password); - - @override - String toString() { - return 'DerivedKeyCreateInputImport(keyName: $keyName, phrase: $phrase, password: $password)'; - } + const _DerivedKeyCreateInputImport({this.keyName, required this.phrase, required this.password}); + factory _DerivedKeyCreateInputImport.fromJson(Map json) => _$DerivedKeyCreateInputImportFromJson(json); + +@override final String? keyName; +@override final String phrase; +@override final Password password; + +/// Create a copy of DerivedKeyCreateInputImport +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyCreateInputImportCopyWith<_DerivedKeyCreateInputImport> get copyWith => __$DerivedKeyCreateInputImportCopyWithImpl<_DerivedKeyCreateInputImport>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyCreateInputImportToJson(this, ); } -/// @nodoc -abstract mixin class _$DerivedKeyCreateInputImportCopyWith<$Res> - implements $DerivedKeyCreateInputImportCopyWith<$Res> { - factory _$DerivedKeyCreateInputImportCopyWith( - _DerivedKeyCreateInputImport value, - $Res Function(_DerivedKeyCreateInputImport) _then) = - __$DerivedKeyCreateInputImportCopyWithImpl; - @override - @useResult - $Res call({String? keyName, String phrase, Password password}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyCreateInputImport&&(identical(other.keyName, keyName) || other.keyName == keyName)&&(identical(other.phrase, phrase) || other.phrase == phrase)&&(identical(other.password, password) || other.password == password)); +} - @override - $PasswordCopyWith<$Res> get password; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,keyName,phrase,password); + +@override +String toString() { + return 'DerivedKeyCreateInputImport(keyName: $keyName, phrase: $phrase, password: $password)'; } + +} + +/// @nodoc +abstract mixin class _$DerivedKeyCreateInputImportCopyWith<$Res> implements $DerivedKeyCreateInputImportCopyWith<$Res> { + factory _$DerivedKeyCreateInputImportCopyWith(_DerivedKeyCreateInputImport value, $Res Function(_DerivedKeyCreateInputImport) _then) = __$DerivedKeyCreateInputImportCopyWithImpl; +@override @useResult +$Res call({ + String? keyName, String phrase, Password password +}); + + +@override $PasswordCopyWith<$Res> get password; + +} /// @nodoc class __$DerivedKeyCreateInputImportCopyWithImpl<$Res> implements _$DerivedKeyCreateInputImportCopyWith<$Res> { @@ -184,40 +275,27 @@ class __$DerivedKeyCreateInputImportCopyWithImpl<$Res> final _DerivedKeyCreateInputImport _self; final $Res Function(_DerivedKeyCreateInputImport) _then; - /// Create a copy of DerivedKeyCreateInputImport - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? keyName = freezed, - Object? phrase = null, - Object? password = null, - }) { - return _then(_DerivedKeyCreateInputImport( - keyName: freezed == keyName - ? _self.keyName - : keyName // ignore: cast_nullable_to_non_nullable - as String?, - phrase: null == phrase - ? _self.phrase - : phrase // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of DerivedKeyCreateInputImport - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of DerivedKeyCreateInputImport +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? keyName = freezed,Object? phrase = null,Object? password = null,}) { + return _then(_DerivedKeyCreateInputImport( +keyName: freezed == keyName ? _self.keyName : keyName // ignore: cast_nullable_to_non_nullable +as String?,phrase: null == phrase ? _self.phrase : phrase // ignore: cast_nullable_to_non_nullable +as String,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password, + )); +} + +/// Create a copy of DerivedKeyCreateInputImport +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_import.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_import.g.dart index 5bbff8d2..5a708524 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_import.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_create_input_import.g.dart @@ -7,17 +7,17 @@ part of 'derived_key_create_input_import.dart'; // ************************************************************************** _DerivedKeyCreateInputImport _$DerivedKeyCreateInputImportFromJson( - Map json) => - _DerivedKeyCreateInputImport( - keyName: json['key_name'] as String?, - phrase: json['phrase'] as String, - password: Password.fromJson(json['password'] as Map), - ); + Map json, +) => _DerivedKeyCreateInputImport( + keyName: json['key_name'] as String?, + phrase: json['phrase'] as String, + password: Password.fromJson(json['password'] as Map), +); Map _$DerivedKeyCreateInputImportToJson( - _DerivedKeyCreateInputImport instance) => - { - 'key_name': instance.keyName, - 'phrase': instance.phrase, - 'password': instance.password.toJson(), - }; + _DerivedKeyCreateInputImport instance, +) => { + 'key_name': instance.keyName, + 'phrase': instance.phrase, + 'password': instance.password.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_output.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_output.dart index 73410b85..1414b153 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_output.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_output.dart @@ -8,9 +8,8 @@ part 'derived_key_export_output.g.dart'; abstract class DerivedKeyExportOutput with _$DerivedKeyExportOutput implements ExportKeyOutput { - const factory DerivedKeyExportOutput({ - required final String phrase, - }) = _DerivedKeyExportOutput; + const factory DerivedKeyExportOutput({required final String phrase}) = + _DerivedKeyExportOutput; factory DerivedKeyExportOutput.fromJson(Map json) => _$DerivedKeyExportOutputFromJson(json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_output.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_output.freezed.dart index c848b0f2..9762f5c1 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_output.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_output.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,46 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$DerivedKeyExportOutput { - String get phrase; - /// Create a copy of DerivedKeyExportOutput - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DerivedKeyExportOutputCopyWith get copyWith => - _$DerivedKeyExportOutputCopyWithImpl( - this as DerivedKeyExportOutput, _$identity); + String get phrase; +/// Create a copy of DerivedKeyExportOutput +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DerivedKeyExportOutputCopyWith get copyWith => _$DerivedKeyExportOutputCopyWithImpl(this as DerivedKeyExportOutput, _$identity); /// Serializes this DerivedKeyExportOutput to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DerivedKeyExportOutput && - (identical(other.phrase, phrase) || other.phrase == phrase)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, phrase); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DerivedKeyExportOutput&&(identical(other.phrase, phrase) || other.phrase == phrase)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,phrase); + +@override +String toString() { + return 'DerivedKeyExportOutput(phrase: $phrase)'; +} + - @override - String toString() { - return 'DerivedKeyExportOutput(phrase: $phrase)'; - } } /// @nodoc -abstract mixin class $DerivedKeyExportOutputCopyWith<$Res> { - factory $DerivedKeyExportOutputCopyWith(DerivedKeyExportOutput value, - $Res Function(DerivedKeyExportOutput) _then) = - _$DerivedKeyExportOutputCopyWithImpl; - @useResult - $Res call({String phrase}); -} +abstract mixin class $DerivedKeyExportOutputCopyWith<$Res> { + factory $DerivedKeyExportOutputCopyWith(DerivedKeyExportOutput value, $Res Function(DerivedKeyExportOutput) _then) = _$DerivedKeyExportOutputCopyWithImpl; +@useResult +$Res call({ + String phrase +}); + + + +} /// @nodoc class _$DerivedKeyExportOutputCopyWithImpl<$Res> implements $DerivedKeyExportOutputCopyWith<$Res> { @@ -63,77 +63,197 @@ class _$DerivedKeyExportOutputCopyWithImpl<$Res> final DerivedKeyExportOutput _self; final $Res Function(DerivedKeyExportOutput) _then; - /// Create a copy of DerivedKeyExportOutput - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? phrase = null, - }) { - return _then(_self.copyWith( - phrase: null == phrase - ? _self.phrase - : phrase // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of DerivedKeyExportOutput +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? phrase = null,}) { + return _then(_self.copyWith( +phrase: null == phrase ? _self.phrase : phrase // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [DerivedKeyExportOutput]. +extension DerivedKeyExportOutputPatterns on DerivedKeyExportOutput { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DerivedKeyExportOutput value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DerivedKeyExportOutput() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DerivedKeyExportOutput value) $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyExportOutput(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DerivedKeyExportOutput value)? $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyExportOutput() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String phrase)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DerivedKeyExportOutput() when $default != null: +return $default(_that.phrase);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String phrase) $default,) {final _that = this; +switch (_that) { +case _DerivedKeyExportOutput(): +return $default(_that.phrase);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String phrase)? $default,) {final _that = this; +switch (_that) { +case _DerivedKeyExportOutput() when $default != null: +return $default(_that.phrase);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _DerivedKeyExportOutput implements DerivedKeyExportOutput { const _DerivedKeyExportOutput({required this.phrase}); - factory _DerivedKeyExportOutput.fromJson(Map json) => - _$DerivedKeyExportOutputFromJson(json); - - @override - final String phrase; - - /// Create a copy of DerivedKeyExportOutput - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyExportOutputCopyWith<_DerivedKeyExportOutput> get copyWith => - __$DerivedKeyExportOutputCopyWithImpl<_DerivedKeyExportOutput>( - this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyExportOutputToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyExportOutput && - (identical(other.phrase, phrase) || other.phrase == phrase)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, phrase); - - @override - String toString() { - return 'DerivedKeyExportOutput(phrase: $phrase)'; - } + factory _DerivedKeyExportOutput.fromJson(Map json) => _$DerivedKeyExportOutputFromJson(json); + +@override final String phrase; + +/// Create a copy of DerivedKeyExportOutput +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyExportOutputCopyWith<_DerivedKeyExportOutput> get copyWith => __$DerivedKeyExportOutputCopyWithImpl<_DerivedKeyExportOutput>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyExportOutputToJson(this, ); } -/// @nodoc -abstract mixin class _$DerivedKeyExportOutputCopyWith<$Res> - implements $DerivedKeyExportOutputCopyWith<$Res> { - factory _$DerivedKeyExportOutputCopyWith(_DerivedKeyExportOutput value, - $Res Function(_DerivedKeyExportOutput) _then) = - __$DerivedKeyExportOutputCopyWithImpl; - @override - @useResult - $Res call({String phrase}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyExportOutput&&(identical(other.phrase, phrase) || other.phrase == phrase)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,phrase); + +@override +String toString() { + return 'DerivedKeyExportOutput(phrase: $phrase)'; +} + + } +/// @nodoc +abstract mixin class _$DerivedKeyExportOutputCopyWith<$Res> implements $DerivedKeyExportOutputCopyWith<$Res> { + factory _$DerivedKeyExportOutputCopyWith(_DerivedKeyExportOutput value, $Res Function(_DerivedKeyExportOutput) _then) = __$DerivedKeyExportOutputCopyWithImpl; +@override @useResult +$Res call({ + String phrase +}); + + + + +} /// @nodoc class __$DerivedKeyExportOutputCopyWithImpl<$Res> implements _$DerivedKeyExportOutputCopyWith<$Res> { @@ -142,20 +262,16 @@ class __$DerivedKeyExportOutputCopyWithImpl<$Res> final _DerivedKeyExportOutput _self; final $Res Function(_DerivedKeyExportOutput) _then; - /// Create a copy of DerivedKeyExportOutput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? phrase = null, - }) { - return _then(_DerivedKeyExportOutput( - phrase: null == phrase - ? _self.phrase - : phrase // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of DerivedKeyExportOutput +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? phrase = null,}) { + return _then(_DerivedKeyExportOutput( +phrase: null == phrase ? _self.phrase : phrase // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_output.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_output.g.dart index feaeeb4d..f8d5c64c 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_output.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_output.g.dart @@ -7,13 +7,9 @@ part of 'derived_key_export_output.dart'; // ************************************************************************** _DerivedKeyExportOutput _$DerivedKeyExportOutputFromJson( - Map json) => - _DerivedKeyExportOutput( - phrase: json['phrase'] as String, - ); + Map json, +) => _DerivedKeyExportOutput(phrase: json['phrase'] as String); Map _$DerivedKeyExportOutputToJson( - _DerivedKeyExportOutput instance) => - { - 'phrase': instance.phrase, - }; + _DerivedKeyExportOutput instance, +) => {'phrase': instance.phrase}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_params.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_params.freezed.dart index a2444683..c62f270f 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_params.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_params.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,54 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$DerivedKeyExportSeedParams { - PublicKey get masterKey; - Password get password; - - /// Create a copy of DerivedKeyExportSeedParams - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DerivedKeyExportSeedParamsCopyWith - get copyWith => - _$DerivedKeyExportSeedParamsCopyWithImpl( - this as DerivedKeyExportSeedParams, _$identity); + + PublicKey get masterKey; Password get password; +/// Create a copy of DerivedKeyExportSeedParams +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DerivedKeyExportSeedParamsCopyWith get copyWith => _$DerivedKeyExportSeedParamsCopyWithImpl(this as DerivedKeyExportSeedParams, _$identity); /// Serializes this DerivedKeyExportSeedParams to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DerivedKeyExportSeedParams && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.password, password) || - other.password == password)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, masterKey, password); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DerivedKeyExportSeedParams&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.password, password) || other.password == password)); +} - @override - String toString() { - return 'DerivedKeyExportSeedParams(masterKey: $masterKey, password: $password)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,masterKey,password); + +@override +String toString() { + return 'DerivedKeyExportSeedParams(masterKey: $masterKey, password: $password)'; } -/// @nodoc -abstract mixin class $DerivedKeyExportSeedParamsCopyWith<$Res> { - factory $DerivedKeyExportSeedParamsCopyWith(DerivedKeyExportSeedParams value, - $Res Function(DerivedKeyExportSeedParams) _then) = - _$DerivedKeyExportSeedParamsCopyWithImpl; - @useResult - $Res call({PublicKey masterKey, Password password}); - $PublicKeyCopyWith<$Res> get masterKey; - $PasswordCopyWith<$Res> get password; } +/// @nodoc +abstract mixin class $DerivedKeyExportSeedParamsCopyWith<$Res> { + factory $DerivedKeyExportSeedParamsCopyWith(DerivedKeyExportSeedParams value, $Res Function(DerivedKeyExportSeedParams) _then) = _$DerivedKeyExportSeedParamsCopyWithImpl; +@useResult +$Res call({ + PublicKey masterKey, Password password +}); + + +$PublicKeyCopyWith<$Res> get masterKey;$PasswordCopyWith<$Res> get password; + +} /// @nodoc class _$DerivedKeyExportSeedParamsCopyWithImpl<$Res> implements $DerivedKeyExportSeedParamsCopyWith<$Res> { @@ -71,115 +63,217 @@ class _$DerivedKeyExportSeedParamsCopyWithImpl<$Res> final DerivedKeyExportSeedParams _self; final $Res Function(DerivedKeyExportSeedParams) _then; - /// Create a copy of DerivedKeyExportSeedParams - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? masterKey = null, - Object? password = null, - }) { - return _then(_self.copyWith( - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of DerivedKeyExportSeedParams - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } - - /// Create a copy of DerivedKeyExportSeedParams - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of DerivedKeyExportSeedParams +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? masterKey = null,Object? password = null,}) { + return _then(_self.copyWith( +masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password, + )); +} +/// Create a copy of DerivedKeyExportSeedParams +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +}/// Create a copy of DerivedKeyExportSeedParams +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [DerivedKeyExportSeedParams]. +extension DerivedKeyExportSeedParamsPatterns on DerivedKeyExportSeedParams { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DerivedKeyExportSeedParams value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DerivedKeyExportSeedParams() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DerivedKeyExportSeedParams value) $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyExportSeedParams(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DerivedKeyExportSeedParams value)? $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyExportSeedParams() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PublicKey masterKey, Password password)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DerivedKeyExportSeedParams() when $default != null: +return $default(_that.masterKey,_that.password);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PublicKey masterKey, Password password) $default,) {final _that = this; +switch (_that) { +case _DerivedKeyExportSeedParams(): +return $default(_that.masterKey,_that.password);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PublicKey masterKey, Password password)? $default,) {final _that = this; +switch (_that) { +case _DerivedKeyExportSeedParams() when $default != null: +return $default(_that.masterKey,_that.password);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _DerivedKeyExportSeedParams implements DerivedKeyExportSeedParams { - const _DerivedKeyExportSeedParams( - {required this.masterKey, required this.password}); - factory _DerivedKeyExportSeedParams.fromJson(Map json) => - _$DerivedKeyExportSeedParamsFromJson(json); - - @override - final PublicKey masterKey; - @override - final Password password; - - /// Create a copy of DerivedKeyExportSeedParams - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyExportSeedParamsCopyWith<_DerivedKeyExportSeedParams> - get copyWith => __$DerivedKeyExportSeedParamsCopyWithImpl< - _DerivedKeyExportSeedParams>(this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyExportSeedParamsToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyExportSeedParams && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.password, password) || - other.password == password)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, masterKey, password); - - @override - String toString() { - return 'DerivedKeyExportSeedParams(masterKey: $masterKey, password: $password)'; - } + const _DerivedKeyExportSeedParams({required this.masterKey, required this.password}); + factory _DerivedKeyExportSeedParams.fromJson(Map json) => _$DerivedKeyExportSeedParamsFromJson(json); + +@override final PublicKey masterKey; +@override final Password password; + +/// Create a copy of DerivedKeyExportSeedParams +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyExportSeedParamsCopyWith<_DerivedKeyExportSeedParams> get copyWith => __$DerivedKeyExportSeedParamsCopyWithImpl<_DerivedKeyExportSeedParams>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyExportSeedParamsToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyExportSeedParams&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.password, password) || other.password == password)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,masterKey,password); + +@override +String toString() { + return 'DerivedKeyExportSeedParams(masterKey: $masterKey, password: $password)'; } -/// @nodoc -abstract mixin class _$DerivedKeyExportSeedParamsCopyWith<$Res> - implements $DerivedKeyExportSeedParamsCopyWith<$Res> { - factory _$DerivedKeyExportSeedParamsCopyWith( - _DerivedKeyExportSeedParams value, - $Res Function(_DerivedKeyExportSeedParams) _then) = - __$DerivedKeyExportSeedParamsCopyWithImpl; - @override - @useResult - $Res call({PublicKey masterKey, Password password}); - @override - $PublicKeyCopyWith<$Res> get masterKey; - @override - $PasswordCopyWith<$Res> get password; } +/// @nodoc +abstract mixin class _$DerivedKeyExportSeedParamsCopyWith<$Res> implements $DerivedKeyExportSeedParamsCopyWith<$Res> { + factory _$DerivedKeyExportSeedParamsCopyWith(_DerivedKeyExportSeedParams value, $Res Function(_DerivedKeyExportSeedParams) _then) = __$DerivedKeyExportSeedParamsCopyWithImpl; +@override @useResult +$Res call({ + PublicKey masterKey, Password password +}); + + +@override $PublicKeyCopyWith<$Res> get masterKey;@override $PasswordCopyWith<$Res> get password; + +} /// @nodoc class __$DerivedKeyExportSeedParamsCopyWithImpl<$Res> implements _$DerivedKeyExportSeedParamsCopyWith<$Res> { @@ -188,45 +282,35 @@ class __$DerivedKeyExportSeedParamsCopyWithImpl<$Res> final _DerivedKeyExportSeedParams _self; final $Res Function(_DerivedKeyExportSeedParams) _then; - /// Create a copy of DerivedKeyExportSeedParams - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? masterKey = null, - Object? password = null, - }) { - return _then(_DerivedKeyExportSeedParams( - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of DerivedKeyExportSeedParams - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } - - /// Create a copy of DerivedKeyExportSeedParams - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of DerivedKeyExportSeedParams +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? masterKey = null,Object? password = null,}) { + return _then(_DerivedKeyExportSeedParams( +masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password, + )); +} + +/// Create a copy of DerivedKeyExportSeedParams +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +}/// Create a copy of DerivedKeyExportSeedParams +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_params.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_params.g.dart index 1f2c30e0..74bc4904 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_params.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_export_params.g.dart @@ -7,15 +7,15 @@ part of 'derived_key_export_params.dart'; // ************************************************************************** _DerivedKeyExportSeedParams _$DerivedKeyExportSeedParamsFromJson( - Map json) => - _DerivedKeyExportSeedParams( - masterKey: PublicKey.fromJson(json['master_key'] as String), - password: Password.fromJson(json['password'] as Map), - ); + Map json, +) => _DerivedKeyExportSeedParams( + masterKey: PublicKey.fromJson(json['master_key'] as String), + password: Password.fromJson(json['password'] as Map), +); Map _$DerivedKeyExportSeedParamsToJson( - _DerivedKeyExportSeedParams instance) => - { - 'master_key': instance.masterKey.toJson(), - 'password': instance.password.toJson(), - }; + _DerivedKeyExportSeedParams instance, +) => { + 'master_key': instance.masterKey.toJson(), + 'password': instance.password.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_get_public_keys.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_get_public_keys.freezed.dart index b52fd84b..3b131d80 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_get_public_keys.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_get_public_keys.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,58 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$DerivedKeyGetPublicKeys { - PublicKey get masterKey; - Password get password; - int get limit; - int get offset; - - /// Create a copy of DerivedKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DerivedKeyGetPublicKeysCopyWith get copyWith => - _$DerivedKeyGetPublicKeysCopyWithImpl( - this as DerivedKeyGetPublicKeys, _$identity); + + PublicKey get masterKey; Password get password; int get limit; int get offset; +/// Create a copy of DerivedKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DerivedKeyGetPublicKeysCopyWith get copyWith => _$DerivedKeyGetPublicKeysCopyWithImpl(this as DerivedKeyGetPublicKeys, _$identity); /// Serializes this DerivedKeyGetPublicKeys to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DerivedKeyGetPublicKeys && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.password, password) || - other.password == password) && - (identical(other.limit, limit) || other.limit == limit) && - (identical(other.offset, offset) || other.offset == offset)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, masterKey, password, limit, offset); - - @override - String toString() { - return 'DerivedKeyGetPublicKeys(masterKey: $masterKey, password: $password, limit: $limit, offset: $offset)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DerivedKeyGetPublicKeys&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.password, password) || other.password == password)&&(identical(other.limit, limit) || other.limit == limit)&&(identical(other.offset, offset) || other.offset == offset)); } -/// @nodoc -abstract mixin class $DerivedKeyGetPublicKeysCopyWith<$Res> { - factory $DerivedKeyGetPublicKeysCopyWith(DerivedKeyGetPublicKeys value, - $Res Function(DerivedKeyGetPublicKeys) _then) = - _$DerivedKeyGetPublicKeysCopyWithImpl; - @useResult - $Res call({PublicKey masterKey, Password password, int limit, int offset}); - - $PublicKeyCopyWith<$Res> get masterKey; - $PasswordCopyWith<$Res> get password; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,masterKey,password,limit,offset); + +@override +String toString() { + return 'DerivedKeyGetPublicKeys(masterKey: $masterKey, password: $password, limit: $limit, offset: $offset)'; +} + + } +/// @nodoc +abstract mixin class $DerivedKeyGetPublicKeysCopyWith<$Res> { + factory $DerivedKeyGetPublicKeysCopyWith(DerivedKeyGetPublicKeys value, $Res Function(DerivedKeyGetPublicKeys) _then) = _$DerivedKeyGetPublicKeysCopyWithImpl; +@useResult +$Res call({ + PublicKey masterKey, Password password, int limit, int offset +}); + + +$PublicKeyCopyWith<$Res> get masterKey;$PasswordCopyWith<$Res> get password; + +} /// @nodoc class _$DerivedKeyGetPublicKeysCopyWithImpl<$Res> implements $DerivedKeyGetPublicKeysCopyWith<$Res> { @@ -75,134 +63,221 @@ class _$DerivedKeyGetPublicKeysCopyWithImpl<$Res> final DerivedKeyGetPublicKeys _self; final $Res Function(DerivedKeyGetPublicKeys) _then; - /// Create a copy of DerivedKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? masterKey = null, - Object? password = null, - Object? limit = null, - Object? offset = null, - }) { - return _then(_self.copyWith( - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - limit: null == limit - ? _self.limit - : limit // ignore: cast_nullable_to_non_nullable - as int, - offset: null == offset - ? _self.offset - : offset // ignore: cast_nullable_to_non_nullable - as int, - )); - } - - /// Create a copy of DerivedKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } - - /// Create a copy of DerivedKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of DerivedKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? masterKey = null,Object? password = null,Object? limit = null,Object? offset = null,}) { + return _then(_self.copyWith( +masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password,limit: null == limit ? _self.limit : limit // ignore: cast_nullable_to_non_nullable +as int,offset: null == offset ? _self.offset : offset // ignore: cast_nullable_to_non_nullable +as int, + )); +} +/// Create a copy of DerivedKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +}/// Create a copy of DerivedKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [DerivedKeyGetPublicKeys]. +extension DerivedKeyGetPublicKeysPatterns on DerivedKeyGetPublicKeys { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DerivedKeyGetPublicKeys value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DerivedKeyGetPublicKeys() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DerivedKeyGetPublicKeys value) $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyGetPublicKeys(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DerivedKeyGetPublicKeys value)? $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyGetPublicKeys() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PublicKey masterKey, Password password, int limit, int offset)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DerivedKeyGetPublicKeys() when $default != null: +return $default(_that.masterKey,_that.password,_that.limit,_that.offset);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PublicKey masterKey, Password password, int limit, int offset) $default,) {final _that = this; +switch (_that) { +case _DerivedKeyGetPublicKeys(): +return $default(_that.masterKey,_that.password,_that.limit,_that.offset);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PublicKey masterKey, Password password, int limit, int offset)? $default,) {final _that = this; +switch (_that) { +case _DerivedKeyGetPublicKeys() when $default != null: +return $default(_that.masterKey,_that.password,_that.limit,_that.offset);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _DerivedKeyGetPublicKeys implements DerivedKeyGetPublicKeys { - const _DerivedKeyGetPublicKeys( - {required this.masterKey, - required this.password, - required this.limit, - required this.offset}); - factory _DerivedKeyGetPublicKeys.fromJson(Map json) => - _$DerivedKeyGetPublicKeysFromJson(json); - - @override - final PublicKey masterKey; - @override - final Password password; - @override - final int limit; - @override - final int offset; - - /// Create a copy of DerivedKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyGetPublicKeysCopyWith<_DerivedKeyGetPublicKeys> get copyWith => - __$DerivedKeyGetPublicKeysCopyWithImpl<_DerivedKeyGetPublicKeys>( - this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyGetPublicKeysToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyGetPublicKeys && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.password, password) || - other.password == password) && - (identical(other.limit, limit) || other.limit == limit) && - (identical(other.offset, offset) || other.offset == offset)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, masterKey, password, limit, offset); - - @override - String toString() { - return 'DerivedKeyGetPublicKeys(masterKey: $masterKey, password: $password, limit: $limit, offset: $offset)'; - } + const _DerivedKeyGetPublicKeys({required this.masterKey, required this.password, required this.limit, required this.offset}); + factory _DerivedKeyGetPublicKeys.fromJson(Map json) => _$DerivedKeyGetPublicKeysFromJson(json); + +@override final PublicKey masterKey; +@override final Password password; +@override final int limit; +@override final int offset; + +/// Create a copy of DerivedKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyGetPublicKeysCopyWith<_DerivedKeyGetPublicKeys> get copyWith => __$DerivedKeyGetPublicKeysCopyWithImpl<_DerivedKeyGetPublicKeys>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyGetPublicKeysToJson(this, ); } -/// @nodoc -abstract mixin class _$DerivedKeyGetPublicKeysCopyWith<$Res> - implements $DerivedKeyGetPublicKeysCopyWith<$Res> { - factory _$DerivedKeyGetPublicKeysCopyWith(_DerivedKeyGetPublicKeys value, - $Res Function(_DerivedKeyGetPublicKeys) _then) = - __$DerivedKeyGetPublicKeysCopyWithImpl; - @override - @useResult - $Res call({PublicKey masterKey, Password password, int limit, int offset}); - - @override - $PublicKeyCopyWith<$Res> get masterKey; - @override - $PasswordCopyWith<$Res> get password; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyGetPublicKeys&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.password, password) || other.password == password)&&(identical(other.limit, limit) || other.limit == limit)&&(identical(other.offset, offset) || other.offset == offset)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,masterKey,password,limit,offset); + +@override +String toString() { + return 'DerivedKeyGetPublicKeys(masterKey: $masterKey, password: $password, limit: $limit, offset: $offset)'; +} + + } +/// @nodoc +abstract mixin class _$DerivedKeyGetPublicKeysCopyWith<$Res> implements $DerivedKeyGetPublicKeysCopyWith<$Res> { + factory _$DerivedKeyGetPublicKeysCopyWith(_DerivedKeyGetPublicKeys value, $Res Function(_DerivedKeyGetPublicKeys) _then) = __$DerivedKeyGetPublicKeysCopyWithImpl; +@override @useResult +$Res call({ + PublicKey masterKey, Password password, int limit, int offset +}); + + +@override $PublicKeyCopyWith<$Res> get masterKey;@override $PasswordCopyWith<$Res> get password; + +} /// @nodoc class __$DerivedKeyGetPublicKeysCopyWithImpl<$Res> implements _$DerivedKeyGetPublicKeysCopyWith<$Res> { @@ -211,55 +286,37 @@ class __$DerivedKeyGetPublicKeysCopyWithImpl<$Res> final _DerivedKeyGetPublicKeys _self; final $Res Function(_DerivedKeyGetPublicKeys) _then; - /// Create a copy of DerivedKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? masterKey = null, - Object? password = null, - Object? limit = null, - Object? offset = null, - }) { - return _then(_DerivedKeyGetPublicKeys( - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - limit: null == limit - ? _self.limit - : limit // ignore: cast_nullable_to_non_nullable - as int, - offset: null == offset - ? _self.offset - : offset // ignore: cast_nullable_to_non_nullable - as int, - )); - } - - /// Create a copy of DerivedKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } - - /// Create a copy of DerivedKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of DerivedKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? masterKey = null,Object? password = null,Object? limit = null,Object? offset = null,}) { + return _then(_DerivedKeyGetPublicKeys( +masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password,limit: null == limit ? _self.limit : limit // ignore: cast_nullable_to_non_nullable +as int,offset: null == offset ? _self.offset : offset // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +/// Create a copy of DerivedKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +}/// Create a copy of DerivedKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_get_public_keys.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_get_public_keys.g.dart index 0b5c3068..be6f8ef0 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_get_public_keys.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_get_public_keys.g.dart @@ -7,19 +7,19 @@ part of 'derived_key_get_public_keys.dart'; // ************************************************************************** _DerivedKeyGetPublicKeys _$DerivedKeyGetPublicKeysFromJson( - Map json) => - _DerivedKeyGetPublicKeys( - masterKey: PublicKey.fromJson(json['master_key'] as String), - password: Password.fromJson(json['password'] as Map), - limit: (json['limit'] as num).toInt(), - offset: (json['offset'] as num).toInt(), - ); + Map json, +) => _DerivedKeyGetPublicKeys( + masterKey: PublicKey.fromJson(json['master_key'] as String), + password: Password.fromJson(json['password'] as Map), + limit: (json['limit'] as num).toInt(), + offset: (json['offset'] as num).toInt(), +); Map _$DerivedKeyGetPublicKeysToJson( - _DerivedKeyGetPublicKeys instance) => - { - 'master_key': instance.masterKey.toJson(), - 'password': instance.password.toJson(), - 'limit': instance.limit, - 'offset': instance.offset, - }; + _DerivedKeyGetPublicKeys instance, +) => { + 'master_key': instance.masterKey.toJson(), + 'password': instance.password.toJson(), + 'limit': instance.limit, + 'offset': instance.offset, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params.dart index 99e8f72c..df25933c 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params.dart @@ -9,12 +9,12 @@ part 'derived_key_sign_params.g.dart'; @Freezed(unionKey: 'type', unionValueCase: FreezedUnionCase.snake) sealed class DerivedKeyPassword with _$DerivedKeyPassword implements SignInput { const factory DerivedKeyPassword.byAccountId( - final DerivedKeyPasswordByAccountId data) = - _DerivedKeyPasswordByAccountId; + final DerivedKeyPasswordByAccountId data, + ) = _DerivedKeyPasswordByAccountId; const factory DerivedKeyPassword.byPublicKey( - final DerivedKeyPasswordByPublicKey data) = - _DerivedKeyPasswordByPublicKey; + final DerivedKeyPasswordByPublicKey data, + ) = _DerivedKeyPasswordByPublicKey; factory DerivedKeyPassword.fromJson(Map json) => _$DerivedKeyPasswordFromJson(json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params.freezed.dart index ddb5832d..5aed4677 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,111 +11,245 @@ part of 'derived_key_sign_params.dart'; // dart format off T _$identity(T value) => value; -DerivedKeyPassword _$DerivedKeyPasswordFromJson(Map json) { - switch (json['type']) { - case 'by_account_id': - return _DerivedKeyPasswordByAccountId.fromJson(json); - case 'by_public_key': - return _DerivedKeyPasswordByPublicKey.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'type', 'DerivedKeyPassword', - 'Invalid union type "${json['type']}"!'); - } +DerivedKeyPassword _$DerivedKeyPasswordFromJson( + Map json +) { + switch (json['type']) { + case 'by_account_id': + return _DerivedKeyPasswordByAccountId.fromJson( + json + ); + case 'by_public_key': + return _DerivedKeyPasswordByPublicKey.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'DerivedKeyPassword', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$DerivedKeyPassword { - Object get data; + + Object get data; /// Serializes this DerivedKeyPassword to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DerivedKeyPassword && - const DeepCollectionEquality().equals(other.data, data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(data)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DerivedKeyPassword&&const DeepCollectionEquality().equals(other.data, data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(data)); + +@override +String toString() { + return 'DerivedKeyPassword(data: $data)'; +} + - @override - String toString() { - return 'DerivedKeyPassword(data: $data)'; - } } /// @nodoc -class $DerivedKeyPasswordCopyWith<$Res> { - $DerivedKeyPasswordCopyWith( - DerivedKeyPassword _, $Res Function(DerivedKeyPassword) __); +class $DerivedKeyPasswordCopyWith<$Res> { +$DerivedKeyPasswordCopyWith(DerivedKeyPassword _, $Res Function(DerivedKeyPassword) __); +} + + +/// Adds pattern-matching-related methods to [DerivedKeyPassword]. +extension DerivedKeyPasswordPatterns on DerivedKeyPassword { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( _DerivedKeyPasswordByAccountId value)? byAccountId,TResult Function( _DerivedKeyPasswordByPublicKey value)? byPublicKey,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DerivedKeyPasswordByAccountId() when byAccountId != null: +return byAccountId(_that);case _DerivedKeyPasswordByPublicKey() when byPublicKey != null: +return byPublicKey(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( _DerivedKeyPasswordByAccountId value) byAccountId,required TResult Function( _DerivedKeyPasswordByPublicKey value) byPublicKey,}){ +final _that = this; +switch (_that) { +case _DerivedKeyPasswordByAccountId(): +return byAccountId(_that);case _DerivedKeyPasswordByPublicKey(): +return byPublicKey(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( _DerivedKeyPasswordByAccountId value)? byAccountId,TResult? Function( _DerivedKeyPasswordByPublicKey value)? byPublicKey,}){ +final _that = this; +switch (_that) { +case _DerivedKeyPasswordByAccountId() when byAccountId != null: +return byAccountId(_that);case _DerivedKeyPasswordByPublicKey() when byPublicKey != null: +return byPublicKey(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( DerivedKeyPasswordByAccountId data)? byAccountId,TResult Function( DerivedKeyPasswordByPublicKey data)? byPublicKey,required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DerivedKeyPasswordByAccountId() when byAccountId != null: +return byAccountId(_that.data);case _DerivedKeyPasswordByPublicKey() when byPublicKey != null: +return byPublicKey(_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( DerivedKeyPasswordByAccountId data) byAccountId,required TResult Function( DerivedKeyPasswordByPublicKey data) byPublicKey,}) {final _that = this; +switch (_that) { +case _DerivedKeyPasswordByAccountId(): +return byAccountId(_that.data);case _DerivedKeyPasswordByPublicKey(): +return byPublicKey(_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( DerivedKeyPasswordByAccountId data)? byAccountId,TResult? Function( DerivedKeyPasswordByPublicKey data)? byPublicKey,}) {final _that = this; +switch (_that) { +case _DerivedKeyPasswordByAccountId() when byAccountId != null: +return byAccountId(_that.data);case _DerivedKeyPasswordByPublicKey() when byPublicKey != null: +return byPublicKey(_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _DerivedKeyPasswordByAccountId implements DerivedKeyPassword { - const _DerivedKeyPasswordByAccountId(this.data, {final String? $type}) - : $type = $type ?? 'by_account_id'; - factory _DerivedKeyPasswordByAccountId.fromJson(Map json) => - _$DerivedKeyPasswordByAccountIdFromJson(json); - - @override - final DerivedKeyPasswordByAccountId data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of DerivedKeyPassword - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyPasswordByAccountIdCopyWith<_DerivedKeyPasswordByAccountId> - get copyWith => __$DerivedKeyPasswordByAccountIdCopyWithImpl< - _DerivedKeyPasswordByAccountId>(this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyPasswordByAccountIdToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyPasswordByAccountId && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'DerivedKeyPassword.byAccountId(data: $data)'; - } + const _DerivedKeyPasswordByAccountId(this.data, {final String? $type}): $type = $type ?? 'by_account_id'; + factory _DerivedKeyPasswordByAccountId.fromJson(Map json) => _$DerivedKeyPasswordByAccountIdFromJson(json); + +@override final DerivedKeyPasswordByAccountId data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of DerivedKeyPassword +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyPasswordByAccountIdCopyWith<_DerivedKeyPasswordByAccountId> get copyWith => __$DerivedKeyPasswordByAccountIdCopyWithImpl<_DerivedKeyPasswordByAccountId>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyPasswordByAccountIdToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyPasswordByAccountId&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'DerivedKeyPassword.byAccountId(data: $data)'; } -/// @nodoc -abstract mixin class _$DerivedKeyPasswordByAccountIdCopyWith<$Res> - implements $DerivedKeyPasswordCopyWith<$Res> { - factory _$DerivedKeyPasswordByAccountIdCopyWith( - _DerivedKeyPasswordByAccountId value, - $Res Function(_DerivedKeyPasswordByAccountId) _then) = - __$DerivedKeyPasswordByAccountIdCopyWithImpl; - @useResult - $Res call({DerivedKeyPasswordByAccountId data}); - $DerivedKeyPasswordByAccountIdCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class _$DerivedKeyPasswordByAccountIdCopyWith<$Res> implements $DerivedKeyPasswordCopyWith<$Res> { + factory _$DerivedKeyPasswordByAccountIdCopyWith(_DerivedKeyPasswordByAccountId value, $Res Function(_DerivedKeyPasswordByAccountId) _then) = __$DerivedKeyPasswordByAccountIdCopyWithImpl; +@useResult +$Res call({ + DerivedKeyPasswordByAccountId data +}); + + +$DerivedKeyPasswordByAccountIdCopyWith<$Res> get data; + +} /// @nodoc class __$DerivedKeyPasswordByAccountIdCopyWithImpl<$Res> implements _$DerivedKeyPasswordByAccountIdCopyWith<$Res> { @@ -125,91 +258,80 @@ class __$DerivedKeyPasswordByAccountIdCopyWithImpl<$Res> final _DerivedKeyPasswordByAccountId _self; final $Res Function(_DerivedKeyPasswordByAccountId) _then; - /// Create a copy of DerivedKeyPassword - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(_DerivedKeyPasswordByAccountId( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as DerivedKeyPasswordByAccountId, - )); - } - - /// Create a copy of DerivedKeyPassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $DerivedKeyPasswordByAccountIdCopyWith<$Res> get data { - return $DerivedKeyPasswordByAccountIdCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of DerivedKeyPassword +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(_DerivedKeyPasswordByAccountId( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as DerivedKeyPasswordByAccountId, + )); +} + +/// Create a copy of DerivedKeyPassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$DerivedKeyPasswordByAccountIdCopyWith<$Res> get data { + + return $DerivedKeyPasswordByAccountIdCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class _DerivedKeyPasswordByPublicKey implements DerivedKeyPassword { - const _DerivedKeyPasswordByPublicKey(this.data, {final String? $type}) - : $type = $type ?? 'by_public_key'; - factory _DerivedKeyPasswordByPublicKey.fromJson(Map json) => - _$DerivedKeyPasswordByPublicKeyFromJson(json); - - @override - final DerivedKeyPasswordByPublicKey data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of DerivedKeyPassword - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyPasswordByPublicKeyCopyWith<_DerivedKeyPasswordByPublicKey> - get copyWith => __$DerivedKeyPasswordByPublicKeyCopyWithImpl< - _DerivedKeyPasswordByPublicKey>(this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyPasswordByPublicKeyToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyPasswordByPublicKey && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'DerivedKeyPassword.byPublicKey(data: $data)'; - } + const _DerivedKeyPasswordByPublicKey(this.data, {final String? $type}): $type = $type ?? 'by_public_key'; + factory _DerivedKeyPasswordByPublicKey.fromJson(Map json) => _$DerivedKeyPasswordByPublicKeyFromJson(json); + +@override final DerivedKeyPasswordByPublicKey data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of DerivedKeyPassword +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyPasswordByPublicKeyCopyWith<_DerivedKeyPasswordByPublicKey> get copyWith => __$DerivedKeyPasswordByPublicKeyCopyWithImpl<_DerivedKeyPasswordByPublicKey>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyPasswordByPublicKeyToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyPasswordByPublicKey&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'DerivedKeyPassword.byPublicKey(data: $data)'; } -/// @nodoc -abstract mixin class _$DerivedKeyPasswordByPublicKeyCopyWith<$Res> - implements $DerivedKeyPasswordCopyWith<$Res> { - factory _$DerivedKeyPasswordByPublicKeyCopyWith( - _DerivedKeyPasswordByPublicKey value, - $Res Function(_DerivedKeyPasswordByPublicKey) _then) = - __$DerivedKeyPasswordByPublicKeyCopyWithImpl; - @useResult - $Res call({DerivedKeyPasswordByPublicKey data}); - $DerivedKeyPasswordByPublicKeyCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class _$DerivedKeyPasswordByPublicKeyCopyWith<$Res> implements $DerivedKeyPasswordCopyWith<$Res> { + factory _$DerivedKeyPasswordByPublicKeyCopyWith(_DerivedKeyPasswordByPublicKey value, $Res Function(_DerivedKeyPasswordByPublicKey) _then) = __$DerivedKeyPasswordByPublicKeyCopyWithImpl; +@useResult +$Res call({ + DerivedKeyPasswordByPublicKey data +}); + + +$DerivedKeyPasswordByPublicKeyCopyWith<$Res> get data; + +} /// @nodoc class __$DerivedKeyPasswordByPublicKeyCopyWithImpl<$Res> implements _$DerivedKeyPasswordByPublicKeyCopyWith<$Res> { @@ -218,29 +340,25 @@ class __$DerivedKeyPasswordByPublicKeyCopyWithImpl<$Res> final _DerivedKeyPasswordByPublicKey _self; final $Res Function(_DerivedKeyPasswordByPublicKey) _then; - /// Create a copy of DerivedKeyPassword - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(_DerivedKeyPasswordByPublicKey( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as DerivedKeyPasswordByPublicKey, - )); - } - - /// Create a copy of DerivedKeyPassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $DerivedKeyPasswordByPublicKeyCopyWith<$Res> get data { - return $DerivedKeyPasswordByPublicKeyCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of DerivedKeyPassword +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(_DerivedKeyPasswordByPublicKey( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as DerivedKeyPasswordByPublicKey, + )); +} + +/// Create a copy of DerivedKeyPassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$DerivedKeyPasswordByPublicKeyCopyWith<$Res> get data { + + return $DerivedKeyPasswordByPublicKeyCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params.g.dart index b9dcf85b..d9807f10 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params.g.dart @@ -7,31 +7,23 @@ part of 'derived_key_sign_params.dart'; // ************************************************************************** _DerivedKeyPasswordByAccountId _$DerivedKeyPasswordByAccountIdFromJson( - Map json) => - _DerivedKeyPasswordByAccountId( - DerivedKeyPasswordByAccountId.fromJson( - json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => _DerivedKeyPasswordByAccountId( + DerivedKeyPasswordByAccountId.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$DerivedKeyPasswordByAccountIdToJson( - _DerivedKeyPasswordByAccountId instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + _DerivedKeyPasswordByAccountId instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; _DerivedKeyPasswordByPublicKey _$DerivedKeyPasswordByPublicKeyFromJson( - Map json) => - _DerivedKeyPasswordByPublicKey( - DerivedKeyPasswordByPublicKey.fromJson( - json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => _DerivedKeyPasswordByPublicKey( + DerivedKeyPasswordByPublicKey.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$DerivedKeyPasswordByPublicKeyToJson( - _DerivedKeyPasswordByPublicKey instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + _DerivedKeyPasswordByPublicKey instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_account_id.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_account_id.freezed.dart index 0f653a55..c580cb86 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_account_id.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_account_id.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,58 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$DerivedKeyPasswordByAccountId { - PublicKey get masterKey; - int get accountId; - Password get password; - - /// Create a copy of DerivedKeyPasswordByAccountId - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DerivedKeyPasswordByAccountIdCopyWith - get copyWith => _$DerivedKeyPasswordByAccountIdCopyWithImpl< - DerivedKeyPasswordByAccountId>( - this as DerivedKeyPasswordByAccountId, _$identity); + + PublicKey get masterKey; int get accountId; Password get password; +/// Create a copy of DerivedKeyPasswordByAccountId +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DerivedKeyPasswordByAccountIdCopyWith get copyWith => _$DerivedKeyPasswordByAccountIdCopyWithImpl(this as DerivedKeyPasswordByAccountId, _$identity); /// Serializes this DerivedKeyPasswordByAccountId to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DerivedKeyPasswordByAccountId && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.accountId, accountId) || - other.accountId == accountId) && - (identical(other.password, password) || - other.password == password)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, masterKey, accountId, password); - - @override - String toString() { - return 'DerivedKeyPasswordByAccountId(masterKey: $masterKey, accountId: $accountId, password: $password)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DerivedKeyPasswordByAccountId&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.password, password) || other.password == password)); } -/// @nodoc -abstract mixin class $DerivedKeyPasswordByAccountIdCopyWith<$Res> { - factory $DerivedKeyPasswordByAccountIdCopyWith( - DerivedKeyPasswordByAccountId value, - $Res Function(DerivedKeyPasswordByAccountId) _then) = - _$DerivedKeyPasswordByAccountIdCopyWithImpl; - @useResult - $Res call({PublicKey masterKey, int accountId, Password password}); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,masterKey,accountId,password); - $PublicKeyCopyWith<$Res> get masterKey; - $PasswordCopyWith<$Res> get password; +@override +String toString() { + return 'DerivedKeyPasswordByAccountId(masterKey: $masterKey, accountId: $accountId, password: $password)'; } + +} + +/// @nodoc +abstract mixin class $DerivedKeyPasswordByAccountIdCopyWith<$Res> { + factory $DerivedKeyPasswordByAccountIdCopyWith(DerivedKeyPasswordByAccountId value, $Res Function(DerivedKeyPasswordByAccountId) _then) = _$DerivedKeyPasswordByAccountIdCopyWithImpl; +@useResult +$Res call({ + PublicKey masterKey, int accountId, Password password +}); + + +$PublicKeyCopyWith<$Res> get masterKey;$PasswordCopyWith<$Res> get password; + +} /// @nodoc class _$DerivedKeyPasswordByAccountIdCopyWithImpl<$Res> implements $DerivedKeyPasswordByAccountIdCopyWith<$Res> { @@ -75,126 +63,219 @@ class _$DerivedKeyPasswordByAccountIdCopyWithImpl<$Res> final DerivedKeyPasswordByAccountId _self; final $Res Function(DerivedKeyPasswordByAccountId) _then; - /// Create a copy of DerivedKeyPasswordByAccountId - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? masterKey = null, - Object? accountId = null, - Object? password = null, - }) { - return _then(_self.copyWith( - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - accountId: null == accountId - ? _self.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of DerivedKeyPasswordByAccountId - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } - - /// Create a copy of DerivedKeyPasswordByAccountId - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of DerivedKeyPasswordByAccountId +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? masterKey = null,Object? accountId = null,Object? password = null,}) { + return _then(_self.copyWith( +masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable +as int,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password, + )); +} +/// Create a copy of DerivedKeyPasswordByAccountId +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +}/// Create a copy of DerivedKeyPasswordByAccountId +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [DerivedKeyPasswordByAccountId]. +extension DerivedKeyPasswordByAccountIdPatterns on DerivedKeyPasswordByAccountId { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DerivedKeyPasswordByAccountId value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DerivedKeyPasswordByAccountId() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DerivedKeyPasswordByAccountId value) $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyPasswordByAccountId(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DerivedKeyPasswordByAccountId value)? $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyPasswordByAccountId() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PublicKey masterKey, int accountId, Password password)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DerivedKeyPasswordByAccountId() when $default != null: +return $default(_that.masterKey,_that.accountId,_that.password);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PublicKey masterKey, int accountId, Password password) $default,) {final _that = this; +switch (_that) { +case _DerivedKeyPasswordByAccountId(): +return $default(_that.masterKey,_that.accountId,_that.password);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PublicKey masterKey, int accountId, Password password)? $default,) {final _that = this; +switch (_that) { +case _DerivedKeyPasswordByAccountId() when $default != null: +return $default(_that.masterKey,_that.accountId,_that.password);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _DerivedKeyPasswordByAccountId implements DerivedKeyPasswordByAccountId { - const _DerivedKeyPasswordByAccountId( - {required this.masterKey, - required this.accountId, - required this.password}); - factory _DerivedKeyPasswordByAccountId.fromJson(Map json) => - _$DerivedKeyPasswordByAccountIdFromJson(json); - - @override - final PublicKey masterKey; - @override - final int accountId; - @override - final Password password; - - /// Create a copy of DerivedKeyPasswordByAccountId - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyPasswordByAccountIdCopyWith<_DerivedKeyPasswordByAccountId> - get copyWith => __$DerivedKeyPasswordByAccountIdCopyWithImpl< - _DerivedKeyPasswordByAccountId>(this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyPasswordByAccountIdToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyPasswordByAccountId && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.accountId, accountId) || - other.accountId == accountId) && - (identical(other.password, password) || - other.password == password)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, masterKey, accountId, password); - - @override - String toString() { - return 'DerivedKeyPasswordByAccountId(masterKey: $masterKey, accountId: $accountId, password: $password)'; - } + const _DerivedKeyPasswordByAccountId({required this.masterKey, required this.accountId, required this.password}); + factory _DerivedKeyPasswordByAccountId.fromJson(Map json) => _$DerivedKeyPasswordByAccountIdFromJson(json); + +@override final PublicKey masterKey; +@override final int accountId; +@override final Password password; + +/// Create a copy of DerivedKeyPasswordByAccountId +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyPasswordByAccountIdCopyWith<_DerivedKeyPasswordByAccountId> get copyWith => __$DerivedKeyPasswordByAccountIdCopyWithImpl<_DerivedKeyPasswordByAccountId>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyPasswordByAccountIdToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyPasswordByAccountId&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.password, password) || other.password == password)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,masterKey,accountId,password); + +@override +String toString() { + return 'DerivedKeyPasswordByAccountId(masterKey: $masterKey, accountId: $accountId, password: $password)'; } -/// @nodoc -abstract mixin class _$DerivedKeyPasswordByAccountIdCopyWith<$Res> - implements $DerivedKeyPasswordByAccountIdCopyWith<$Res> { - factory _$DerivedKeyPasswordByAccountIdCopyWith( - _DerivedKeyPasswordByAccountId value, - $Res Function(_DerivedKeyPasswordByAccountId) _then) = - __$DerivedKeyPasswordByAccountIdCopyWithImpl; - @override - @useResult - $Res call({PublicKey masterKey, int accountId, Password password}); - @override - $PublicKeyCopyWith<$Res> get masterKey; - @override - $PasswordCopyWith<$Res> get password; } +/// @nodoc +abstract mixin class _$DerivedKeyPasswordByAccountIdCopyWith<$Res> implements $DerivedKeyPasswordByAccountIdCopyWith<$Res> { + factory _$DerivedKeyPasswordByAccountIdCopyWith(_DerivedKeyPasswordByAccountId value, $Res Function(_DerivedKeyPasswordByAccountId) _then) = __$DerivedKeyPasswordByAccountIdCopyWithImpl; +@override @useResult +$Res call({ + PublicKey masterKey, int accountId, Password password +}); + + +@override $PublicKeyCopyWith<$Res> get masterKey;@override $PasswordCopyWith<$Res> get password; + +} /// @nodoc class __$DerivedKeyPasswordByAccountIdCopyWithImpl<$Res> implements _$DerivedKeyPasswordByAccountIdCopyWith<$Res> { @@ -203,50 +284,36 @@ class __$DerivedKeyPasswordByAccountIdCopyWithImpl<$Res> final _DerivedKeyPasswordByAccountId _self; final $Res Function(_DerivedKeyPasswordByAccountId) _then; - /// Create a copy of DerivedKeyPasswordByAccountId - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? masterKey = null, - Object? accountId = null, - Object? password = null, - }) { - return _then(_DerivedKeyPasswordByAccountId( - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - accountId: null == accountId - ? _self.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of DerivedKeyPasswordByAccountId - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } - - /// Create a copy of DerivedKeyPasswordByAccountId - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of DerivedKeyPasswordByAccountId +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? masterKey = null,Object? accountId = null,Object? password = null,}) { + return _then(_DerivedKeyPasswordByAccountId( +masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable +as int,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password, + )); +} + +/// Create a copy of DerivedKeyPasswordByAccountId +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +}/// Create a copy of DerivedKeyPasswordByAccountId +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_account_id.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_account_id.g.dart index bce14537..ceaffcbc 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_account_id.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_account_id.g.dart @@ -7,17 +7,17 @@ part of 'derived_key_sign_params_by_account_id.dart'; // ************************************************************************** _DerivedKeyPasswordByAccountId _$DerivedKeyPasswordByAccountIdFromJson( - Map json) => - _DerivedKeyPasswordByAccountId( - masterKey: PublicKey.fromJson(json['master_key'] as String), - accountId: (json['account_id'] as num).toInt(), - password: Password.fromJson(json['password'] as Map), - ); + Map json, +) => _DerivedKeyPasswordByAccountId( + masterKey: PublicKey.fromJson(json['master_key'] as String), + accountId: (json['account_id'] as num).toInt(), + password: Password.fromJson(json['password'] as Map), +); Map _$DerivedKeyPasswordByAccountIdToJson( - _DerivedKeyPasswordByAccountId instance) => - { - 'master_key': instance.masterKey.toJson(), - 'account_id': instance.accountId, - 'password': instance.password.toJson(), - }; + _DerivedKeyPasswordByAccountId instance, +) => { + 'master_key': instance.masterKey.toJson(), + 'account_id': instance.accountId, + 'password': instance.password.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_public_key.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_public_key.freezed.dart index e62a2ff3..ec797197 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_public_key.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_public_key.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,59 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$DerivedKeyPasswordByPublicKey { - PublicKey get masterKey; - PublicKey get publicKey; - Password get password; - - /// Create a copy of DerivedKeyPasswordByPublicKey - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DerivedKeyPasswordByPublicKeyCopyWith - get copyWith => _$DerivedKeyPasswordByPublicKeyCopyWithImpl< - DerivedKeyPasswordByPublicKey>( - this as DerivedKeyPasswordByPublicKey, _$identity); + + PublicKey get masterKey; PublicKey get publicKey; Password get password; +/// Create a copy of DerivedKeyPasswordByPublicKey +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DerivedKeyPasswordByPublicKeyCopyWith get copyWith => _$DerivedKeyPasswordByPublicKeyCopyWithImpl(this as DerivedKeyPasswordByPublicKey, _$identity); /// Serializes this DerivedKeyPasswordByPublicKey to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DerivedKeyPasswordByPublicKey && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.password, password) || - other.password == password)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, masterKey, publicKey, password); - - @override - String toString() { - return 'DerivedKeyPasswordByPublicKey(masterKey: $masterKey, publicKey: $publicKey, password: $password)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DerivedKeyPasswordByPublicKey&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.password, password) || other.password == password)); } -/// @nodoc -abstract mixin class $DerivedKeyPasswordByPublicKeyCopyWith<$Res> { - factory $DerivedKeyPasswordByPublicKeyCopyWith( - DerivedKeyPasswordByPublicKey value, - $Res Function(DerivedKeyPasswordByPublicKey) _then) = - _$DerivedKeyPasswordByPublicKeyCopyWithImpl; - @useResult - $Res call({PublicKey masterKey, PublicKey publicKey, Password password}); - - $PublicKeyCopyWith<$Res> get masterKey; - $PublicKeyCopyWith<$Res> get publicKey; - $PasswordCopyWith<$Res> get password; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,masterKey,publicKey,password); + +@override +String toString() { + return 'DerivedKeyPasswordByPublicKey(masterKey: $masterKey, publicKey: $publicKey, password: $password)'; +} + + } +/// @nodoc +abstract mixin class $DerivedKeyPasswordByPublicKeyCopyWith<$Res> { + factory $DerivedKeyPasswordByPublicKeyCopyWith(DerivedKeyPasswordByPublicKey value, $Res Function(DerivedKeyPasswordByPublicKey) _then) = _$DerivedKeyPasswordByPublicKeyCopyWithImpl; +@useResult +$Res call({ + PublicKey masterKey, PublicKey publicKey, Password password +}); + + +$PublicKeyCopyWith<$Res> get masterKey;$PublicKeyCopyWith<$Res> get publicKey;$PasswordCopyWith<$Res> get password; + +} /// @nodoc class _$DerivedKeyPasswordByPublicKeyCopyWithImpl<$Res> implements $DerivedKeyPasswordByPublicKeyCopyWith<$Res> { @@ -76,138 +63,228 @@ class _$DerivedKeyPasswordByPublicKeyCopyWithImpl<$Res> final DerivedKeyPasswordByPublicKey _self; final $Res Function(DerivedKeyPasswordByPublicKey) _then; - /// Create a copy of DerivedKeyPasswordByPublicKey - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? masterKey = null, - Object? publicKey = null, - Object? password = null, - }) { - return _then(_self.copyWith( - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of DerivedKeyPasswordByPublicKey - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } - - /// Create a copy of DerivedKeyPasswordByPublicKey - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } - - /// Create a copy of DerivedKeyPasswordByPublicKey - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of DerivedKeyPasswordByPublicKey +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? masterKey = null,Object? publicKey = null,Object? password = null,}) { + return _then(_self.copyWith( +masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password, + )); +} +/// Create a copy of DerivedKeyPasswordByPublicKey +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +}/// Create a copy of DerivedKeyPasswordByPublicKey +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of DerivedKeyPasswordByPublicKey +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [DerivedKeyPasswordByPublicKey]. +extension DerivedKeyPasswordByPublicKeyPatterns on DerivedKeyPasswordByPublicKey { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DerivedKeyPasswordByPublicKey value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DerivedKeyPasswordByPublicKey() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DerivedKeyPasswordByPublicKey value) $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyPasswordByPublicKey(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DerivedKeyPasswordByPublicKey value)? $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyPasswordByPublicKey() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PublicKey masterKey, PublicKey publicKey, Password password)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DerivedKeyPasswordByPublicKey() when $default != null: +return $default(_that.masterKey,_that.publicKey,_that.password);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PublicKey masterKey, PublicKey publicKey, Password password) $default,) {final _that = this; +switch (_that) { +case _DerivedKeyPasswordByPublicKey(): +return $default(_that.masterKey,_that.publicKey,_that.password);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PublicKey masterKey, PublicKey publicKey, Password password)? $default,) {final _that = this; +switch (_that) { +case _DerivedKeyPasswordByPublicKey() when $default != null: +return $default(_that.masterKey,_that.publicKey,_that.password);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _DerivedKeyPasswordByPublicKey implements DerivedKeyPasswordByPublicKey { - const _DerivedKeyPasswordByPublicKey( - {required this.masterKey, - required this.publicKey, - required this.password}); - factory _DerivedKeyPasswordByPublicKey.fromJson(Map json) => - _$DerivedKeyPasswordByPublicKeyFromJson(json); - - @override - final PublicKey masterKey; - @override - final PublicKey publicKey; - @override - final Password password; - - /// Create a copy of DerivedKeyPasswordByPublicKey - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyPasswordByPublicKeyCopyWith<_DerivedKeyPasswordByPublicKey> - get copyWith => __$DerivedKeyPasswordByPublicKeyCopyWithImpl< - _DerivedKeyPasswordByPublicKey>(this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyPasswordByPublicKeyToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyPasswordByPublicKey && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.password, password) || - other.password == password)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, masterKey, publicKey, password); - - @override - String toString() { - return 'DerivedKeyPasswordByPublicKey(masterKey: $masterKey, publicKey: $publicKey, password: $password)'; - } + const _DerivedKeyPasswordByPublicKey({required this.masterKey, required this.publicKey, required this.password}); + factory _DerivedKeyPasswordByPublicKey.fromJson(Map json) => _$DerivedKeyPasswordByPublicKeyFromJson(json); + +@override final PublicKey masterKey; +@override final PublicKey publicKey; +@override final Password password; + +/// Create a copy of DerivedKeyPasswordByPublicKey +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyPasswordByPublicKeyCopyWith<_DerivedKeyPasswordByPublicKey> get copyWith => __$DerivedKeyPasswordByPublicKeyCopyWithImpl<_DerivedKeyPasswordByPublicKey>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyPasswordByPublicKeyToJson(this, ); } -/// @nodoc -abstract mixin class _$DerivedKeyPasswordByPublicKeyCopyWith<$Res> - implements $DerivedKeyPasswordByPublicKeyCopyWith<$Res> { - factory _$DerivedKeyPasswordByPublicKeyCopyWith( - _DerivedKeyPasswordByPublicKey value, - $Res Function(_DerivedKeyPasswordByPublicKey) _then) = - __$DerivedKeyPasswordByPublicKeyCopyWithImpl; - @override - @useResult - $Res call({PublicKey masterKey, PublicKey publicKey, Password password}); - - @override - $PublicKeyCopyWith<$Res> get masterKey; - @override - $PublicKeyCopyWith<$Res> get publicKey; - @override - $PasswordCopyWith<$Res> get password; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyPasswordByPublicKey&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.password, password) || other.password == password)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,masterKey,publicKey,password); + +@override +String toString() { + return 'DerivedKeyPasswordByPublicKey(masterKey: $masterKey, publicKey: $publicKey, password: $password)'; +} + + } +/// @nodoc +abstract mixin class _$DerivedKeyPasswordByPublicKeyCopyWith<$Res> implements $DerivedKeyPasswordByPublicKeyCopyWith<$Res> { + factory _$DerivedKeyPasswordByPublicKeyCopyWith(_DerivedKeyPasswordByPublicKey value, $Res Function(_DerivedKeyPasswordByPublicKey) _then) = __$DerivedKeyPasswordByPublicKeyCopyWithImpl; +@override @useResult +$Res call({ + PublicKey masterKey, PublicKey publicKey, Password password +}); + + +@override $PublicKeyCopyWith<$Res> get masterKey;@override $PublicKeyCopyWith<$Res> get publicKey;@override $PasswordCopyWith<$Res> get password; + +} /// @nodoc class __$DerivedKeyPasswordByPublicKeyCopyWithImpl<$Res> implements _$DerivedKeyPasswordByPublicKeyCopyWith<$Res> { @@ -216,60 +293,45 @@ class __$DerivedKeyPasswordByPublicKeyCopyWithImpl<$Res> final _DerivedKeyPasswordByPublicKey _self; final $Res Function(_DerivedKeyPasswordByPublicKey) _then; - /// Create a copy of DerivedKeyPasswordByPublicKey - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? masterKey = null, - Object? publicKey = null, - Object? password = null, - }) { - return _then(_DerivedKeyPasswordByPublicKey( - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of DerivedKeyPasswordByPublicKey - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } - - /// Create a copy of DerivedKeyPasswordByPublicKey - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } - - /// Create a copy of DerivedKeyPasswordByPublicKey - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of DerivedKeyPasswordByPublicKey +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? masterKey = null,Object? publicKey = null,Object? password = null,}) { + return _then(_DerivedKeyPasswordByPublicKey( +masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password, + )); +} + +/// Create a copy of DerivedKeyPasswordByPublicKey +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +}/// Create a copy of DerivedKeyPasswordByPublicKey +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of DerivedKeyPasswordByPublicKey +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_public_key.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_public_key.g.dart index 6d07abe1..ef9f9de6 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_public_key.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_sign_params_by_public_key.g.dart @@ -7,17 +7,17 @@ part of 'derived_key_sign_params_by_public_key.dart'; // ************************************************************************** _DerivedKeyPasswordByPublicKey _$DerivedKeyPasswordByPublicKeyFromJson( - Map json) => - _DerivedKeyPasswordByPublicKey( - masterKey: PublicKey.fromJson(json['master_key'] as String), - publicKey: PublicKey.fromJson(json['public_key'] as String), - password: Password.fromJson(json['password'] as Map), - ); + Map json, +) => _DerivedKeyPasswordByPublicKey( + masterKey: PublicKey.fromJson(json['master_key'] as String), + publicKey: PublicKey.fromJson(json['public_key'] as String), + password: Password.fromJson(json['password'] as Map), +); Map _$DerivedKeyPasswordByPublicKeyToJson( - _DerivedKeyPasswordByPublicKey instance) => - { - 'master_key': instance.masterKey.toJson(), - 'public_key': instance.publicKey.toJson(), - 'password': instance.password.toJson(), - }; + _DerivedKeyPasswordByPublicKey instance, +) => { + 'master_key': instance.masterKey.toJson(), + 'public_key': instance.publicKey.toJson(), + 'password': instance.password.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params.dart index bc4b4a8d..b6c80282 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params.dart @@ -11,12 +11,12 @@ sealed class DerivedKeyUpdateParams with _$DerivedKeyUpdateParams implements UpdateKeyInput { const factory DerivedKeyUpdateParams.renameKey( - final DerivedKeyUpdateParamsRenameKey data) = - _DerivedKeyUpdateParamsRenameKey; + final DerivedKeyUpdateParamsRenameKey data, + ) = _DerivedKeyUpdateParamsRenameKey; const factory DerivedKeyUpdateParams.changePassword( - final DerivedKeyUpdateParamsChangePassword data) = - _DerivedKeyUpdateParamsChangePassword; + final DerivedKeyUpdateParamsChangePassword data, + ) = _DerivedKeyUpdateParamsChangePassword; factory DerivedKeyUpdateParams.fromJson(Map json) => _$DerivedKeyUpdateParamsFromJson(json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params.freezed.dart index 840a798b..35823e74 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -13,112 +12,244 @@ part of 'derived_key_update_params.dart'; // dart format off T _$identity(T value) => value; DerivedKeyUpdateParams _$DerivedKeyUpdateParamsFromJson( - Map json) { - switch (json['type']) { - case 'rename_key': - return _DerivedKeyUpdateParamsRenameKey.fromJson(json); - case 'change_password': - return _DerivedKeyUpdateParamsChangePassword.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'type', 'DerivedKeyUpdateParams', - 'Invalid union type "${json['type']}"!'); - } + Map json +) { + switch (json['type']) { + case 'rename_key': + return _DerivedKeyUpdateParamsRenameKey.fromJson( + json + ); + case 'change_password': + return _DerivedKeyUpdateParamsChangePassword.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'DerivedKeyUpdateParams', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$DerivedKeyUpdateParams { - Object get data; + + Object get data; /// Serializes this DerivedKeyUpdateParams to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DerivedKeyUpdateParams && - const DeepCollectionEquality().equals(other.data, data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(data)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DerivedKeyUpdateParams&&const DeepCollectionEquality().equals(other.data, data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(data)); + +@override +String toString() { + return 'DerivedKeyUpdateParams(data: $data)'; +} + - @override - String toString() { - return 'DerivedKeyUpdateParams(data: $data)'; - } } /// @nodoc -class $DerivedKeyUpdateParamsCopyWith<$Res> { - $DerivedKeyUpdateParamsCopyWith( - DerivedKeyUpdateParams _, $Res Function(DerivedKeyUpdateParams) __); +class $DerivedKeyUpdateParamsCopyWith<$Res> { +$DerivedKeyUpdateParamsCopyWith(DerivedKeyUpdateParams _, $Res Function(DerivedKeyUpdateParams) __); +} + + +/// Adds pattern-matching-related methods to [DerivedKeyUpdateParams]. +extension DerivedKeyUpdateParamsPatterns on DerivedKeyUpdateParams { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( _DerivedKeyUpdateParamsRenameKey value)? renameKey,TResult Function( _DerivedKeyUpdateParamsChangePassword value)? changePassword,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsRenameKey() when renameKey != null: +return renameKey(_that);case _DerivedKeyUpdateParamsChangePassword() when changePassword != null: +return changePassword(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( _DerivedKeyUpdateParamsRenameKey value) renameKey,required TResult Function( _DerivedKeyUpdateParamsChangePassword value) changePassword,}){ +final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsRenameKey(): +return renameKey(_that);case _DerivedKeyUpdateParamsChangePassword(): +return changePassword(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( _DerivedKeyUpdateParamsRenameKey value)? renameKey,TResult? Function( _DerivedKeyUpdateParamsChangePassword value)? changePassword,}){ +final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsRenameKey() when renameKey != null: +return renameKey(_that);case _DerivedKeyUpdateParamsChangePassword() when changePassword != null: +return changePassword(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( DerivedKeyUpdateParamsRenameKey data)? renameKey,TResult Function( DerivedKeyUpdateParamsChangePassword data)? changePassword,required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsRenameKey() when renameKey != null: +return renameKey(_that.data);case _DerivedKeyUpdateParamsChangePassword() when changePassword != null: +return changePassword(_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( DerivedKeyUpdateParamsRenameKey data) renameKey,required TResult Function( DerivedKeyUpdateParamsChangePassword data) changePassword,}) {final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsRenameKey(): +return renameKey(_that.data);case _DerivedKeyUpdateParamsChangePassword(): +return changePassword(_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( DerivedKeyUpdateParamsRenameKey data)? renameKey,TResult? Function( DerivedKeyUpdateParamsChangePassword data)? changePassword,}) {final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsRenameKey() when renameKey != null: +return renameKey(_that.data);case _DerivedKeyUpdateParamsChangePassword() when changePassword != null: +return changePassword(_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _DerivedKeyUpdateParamsRenameKey implements DerivedKeyUpdateParams { - const _DerivedKeyUpdateParamsRenameKey(this.data, {final String? $type}) - : $type = $type ?? 'rename_key'; - factory _DerivedKeyUpdateParamsRenameKey.fromJson( - Map json) => - _$DerivedKeyUpdateParamsRenameKeyFromJson(json); - - @override - final DerivedKeyUpdateParamsRenameKey data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of DerivedKeyUpdateParams - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyUpdateParamsRenameKeyCopyWith<_DerivedKeyUpdateParamsRenameKey> - get copyWith => __$DerivedKeyUpdateParamsRenameKeyCopyWithImpl< - _DerivedKeyUpdateParamsRenameKey>(this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyUpdateParamsRenameKeyToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyUpdateParamsRenameKey && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'DerivedKeyUpdateParams.renameKey(data: $data)'; - } + const _DerivedKeyUpdateParamsRenameKey(this.data, {final String? $type}): $type = $type ?? 'rename_key'; + factory _DerivedKeyUpdateParamsRenameKey.fromJson(Map json) => _$DerivedKeyUpdateParamsRenameKeyFromJson(json); + +@override final DerivedKeyUpdateParamsRenameKey data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of DerivedKeyUpdateParams +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyUpdateParamsRenameKeyCopyWith<_DerivedKeyUpdateParamsRenameKey> get copyWith => __$DerivedKeyUpdateParamsRenameKeyCopyWithImpl<_DerivedKeyUpdateParamsRenameKey>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyUpdateParamsRenameKeyToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyUpdateParamsRenameKey&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'DerivedKeyUpdateParams.renameKey(data: $data)'; } -/// @nodoc -abstract mixin class _$DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> - implements $DerivedKeyUpdateParamsCopyWith<$Res> { - factory _$DerivedKeyUpdateParamsRenameKeyCopyWith( - _DerivedKeyUpdateParamsRenameKey value, - $Res Function(_DerivedKeyUpdateParamsRenameKey) _then) = - __$DerivedKeyUpdateParamsRenameKeyCopyWithImpl; - @useResult - $Res call({DerivedKeyUpdateParamsRenameKey data}); - $DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class _$DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> implements $DerivedKeyUpdateParamsCopyWith<$Res> { + factory _$DerivedKeyUpdateParamsRenameKeyCopyWith(_DerivedKeyUpdateParamsRenameKey value, $Res Function(_DerivedKeyUpdateParamsRenameKey) _then) = __$DerivedKeyUpdateParamsRenameKeyCopyWithImpl; +@useResult +$Res call({ + DerivedKeyUpdateParamsRenameKey data +}); + + +$DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> get data; + +} /// @nodoc class __$DerivedKeyUpdateParamsRenameKeyCopyWithImpl<$Res> implements _$DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> { @@ -127,93 +258,80 @@ class __$DerivedKeyUpdateParamsRenameKeyCopyWithImpl<$Res> final _DerivedKeyUpdateParamsRenameKey _self; final $Res Function(_DerivedKeyUpdateParamsRenameKey) _then; - /// Create a copy of DerivedKeyUpdateParams - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(_DerivedKeyUpdateParamsRenameKey( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as DerivedKeyUpdateParamsRenameKey, - )); - } - - /// Create a copy of DerivedKeyUpdateParams - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> get data { - return $DerivedKeyUpdateParamsRenameKeyCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of DerivedKeyUpdateParams +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(_DerivedKeyUpdateParamsRenameKey( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as DerivedKeyUpdateParamsRenameKey, + )); +} + +/// Create a copy of DerivedKeyUpdateParams +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> get data { + + return $DerivedKeyUpdateParamsRenameKeyCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class _DerivedKeyUpdateParamsChangePassword implements DerivedKeyUpdateParams { - const _DerivedKeyUpdateParamsChangePassword(this.data, {final String? $type}) - : $type = $type ?? 'change_password'; - factory _DerivedKeyUpdateParamsChangePassword.fromJson( - Map json) => - _$DerivedKeyUpdateParamsChangePasswordFromJson(json); - - @override - final DerivedKeyUpdateParamsChangePassword data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of DerivedKeyUpdateParams - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyUpdateParamsChangePasswordCopyWith< - _DerivedKeyUpdateParamsChangePassword> - get copyWith => __$DerivedKeyUpdateParamsChangePasswordCopyWithImpl< - _DerivedKeyUpdateParamsChangePassword>(this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyUpdateParamsChangePasswordToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyUpdateParamsChangePassword && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'DerivedKeyUpdateParams.changePassword(data: $data)'; - } + const _DerivedKeyUpdateParamsChangePassword(this.data, {final String? $type}): $type = $type ?? 'change_password'; + factory _DerivedKeyUpdateParamsChangePassword.fromJson(Map json) => _$DerivedKeyUpdateParamsChangePasswordFromJson(json); + +@override final DerivedKeyUpdateParamsChangePassword data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of DerivedKeyUpdateParams +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyUpdateParamsChangePasswordCopyWith<_DerivedKeyUpdateParamsChangePassword> get copyWith => __$DerivedKeyUpdateParamsChangePasswordCopyWithImpl<_DerivedKeyUpdateParamsChangePassword>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyUpdateParamsChangePasswordToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyUpdateParamsChangePassword&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'DerivedKeyUpdateParams.changePassword(data: $data)'; } -/// @nodoc -abstract mixin class _$DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> - implements $DerivedKeyUpdateParamsCopyWith<$Res> { - factory _$DerivedKeyUpdateParamsChangePasswordCopyWith( - _DerivedKeyUpdateParamsChangePassword value, - $Res Function(_DerivedKeyUpdateParamsChangePassword) _then) = - __$DerivedKeyUpdateParamsChangePasswordCopyWithImpl; - @useResult - $Res call({DerivedKeyUpdateParamsChangePassword data}); - $DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class _$DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> implements $DerivedKeyUpdateParamsCopyWith<$Res> { + factory _$DerivedKeyUpdateParamsChangePasswordCopyWith(_DerivedKeyUpdateParamsChangePassword value, $Res Function(_DerivedKeyUpdateParamsChangePassword) _then) = __$DerivedKeyUpdateParamsChangePasswordCopyWithImpl; +@useResult +$Res call({ + DerivedKeyUpdateParamsChangePassword data +}); + + +$DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> get data; + +} /// @nodoc class __$DerivedKeyUpdateParamsChangePasswordCopyWithImpl<$Res> implements _$DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> { @@ -222,30 +340,25 @@ class __$DerivedKeyUpdateParamsChangePasswordCopyWithImpl<$Res> final _DerivedKeyUpdateParamsChangePassword _self; final $Res Function(_DerivedKeyUpdateParamsChangePassword) _then; - /// Create a copy of DerivedKeyUpdateParams - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(_DerivedKeyUpdateParamsChangePassword( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as DerivedKeyUpdateParamsChangePassword, - )); - } - - /// Create a copy of DerivedKeyUpdateParams - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> get data { - return $DerivedKeyUpdateParamsChangePasswordCopyWith<$Res>(_self.data, - (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of DerivedKeyUpdateParams +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(_DerivedKeyUpdateParamsChangePassword( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as DerivedKeyUpdateParamsChangePassword, + )); +} + +/// Create a copy of DerivedKeyUpdateParams +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> get data { + + return $DerivedKeyUpdateParamsChangePasswordCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params.g.dart index ffc4d8e5..9a435f71 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params.g.dart @@ -7,31 +7,27 @@ part of 'derived_key_update_params.dart'; // ************************************************************************** _DerivedKeyUpdateParamsRenameKey _$DerivedKeyUpdateParamsRenameKeyFromJson( - Map json) => - _DerivedKeyUpdateParamsRenameKey( - DerivedKeyUpdateParamsRenameKey.fromJson( - json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => _DerivedKeyUpdateParamsRenameKey( + DerivedKeyUpdateParamsRenameKey.fromJson( + json['data'] as Map, + ), + $type: json['type'] as String?, +); Map _$DerivedKeyUpdateParamsRenameKeyToJson( - _DerivedKeyUpdateParamsRenameKey instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + _DerivedKeyUpdateParamsRenameKey instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; _DerivedKeyUpdateParamsChangePassword - _$DerivedKeyUpdateParamsChangePasswordFromJson(Map json) => - _DerivedKeyUpdateParamsChangePassword( - DerivedKeyUpdateParamsChangePassword.fromJson( - json['data'] as Map), - $type: json['type'] as String?, - ); +_$DerivedKeyUpdateParamsChangePasswordFromJson(Map json) => + _DerivedKeyUpdateParamsChangePassword( + DerivedKeyUpdateParamsChangePassword.fromJson( + json['data'] as Map, + ), + $type: json['type'] as String?, + ); Map _$DerivedKeyUpdateParamsChangePasswordToJson( - _DerivedKeyUpdateParamsChangePassword instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + _DerivedKeyUpdateParamsChangePassword instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_change_password.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_change_password.dart index 5e8c43a7..66ab2914 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_change_password.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_change_password.dart @@ -16,6 +16,6 @@ abstract class DerivedKeyUpdateParamsChangePassword }) = _DerivedKeyUpdateParamsChangePassword; factory DerivedKeyUpdateParamsChangePassword.fromJson( - Map json) => - _$DerivedKeyUpdateParamsChangePasswordFromJson(json); + Map json, + ) => _$DerivedKeyUpdateParamsChangePasswordFromJson(json); } diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_change_password.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_change_password.freezed.dart index a7752376..16b35d93 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_change_password.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_change_password.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,61 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$DerivedKeyUpdateParamsChangePassword { - PublicKey get masterKey; - Password get oldPassword; - Password get newPassword; - - /// Create a copy of DerivedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DerivedKeyUpdateParamsChangePasswordCopyWith< - DerivedKeyUpdateParamsChangePassword> - get copyWith => _$DerivedKeyUpdateParamsChangePasswordCopyWithImpl< - DerivedKeyUpdateParamsChangePassword>( - this as DerivedKeyUpdateParamsChangePassword, _$identity); + + PublicKey get masterKey; Password get oldPassword; Password get newPassword; +/// Create a copy of DerivedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DerivedKeyUpdateParamsChangePasswordCopyWith get copyWith => _$DerivedKeyUpdateParamsChangePasswordCopyWithImpl(this as DerivedKeyUpdateParamsChangePassword, _$identity); /// Serializes this DerivedKeyUpdateParamsChangePassword to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DerivedKeyUpdateParamsChangePassword && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.oldPassword, oldPassword) || - other.oldPassword == oldPassword) && - (identical(other.newPassword, newPassword) || - other.newPassword == newPassword)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, masterKey, oldPassword, newPassword); - - @override - String toString() { - return 'DerivedKeyUpdateParamsChangePassword(masterKey: $masterKey, oldPassword: $oldPassword, newPassword: $newPassword)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DerivedKeyUpdateParamsChangePassword&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.oldPassword, oldPassword) || other.oldPassword == oldPassword)&&(identical(other.newPassword, newPassword) || other.newPassword == newPassword)); } -/// @nodoc -abstract mixin class $DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> { - factory $DerivedKeyUpdateParamsChangePasswordCopyWith( - DerivedKeyUpdateParamsChangePassword value, - $Res Function(DerivedKeyUpdateParamsChangePassword) _then) = - _$DerivedKeyUpdateParamsChangePasswordCopyWithImpl; - @useResult - $Res call({PublicKey masterKey, Password oldPassword, Password newPassword}); - - $PublicKeyCopyWith<$Res> get masterKey; - $PasswordCopyWith<$Res> get oldPassword; - $PasswordCopyWith<$Res> get newPassword; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,masterKey,oldPassword,newPassword); + +@override +String toString() { + return 'DerivedKeyUpdateParamsChangePassword(masterKey: $masterKey, oldPassword: $oldPassword, newPassword: $newPassword)'; +} + + } +/// @nodoc +abstract mixin class $DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> { + factory $DerivedKeyUpdateParamsChangePasswordCopyWith(DerivedKeyUpdateParamsChangePassword value, $Res Function(DerivedKeyUpdateParamsChangePassword) _then) = _$DerivedKeyUpdateParamsChangePasswordCopyWithImpl; +@useResult +$Res call({ + PublicKey masterKey, Password oldPassword, Password newPassword +}); + + +$PublicKeyCopyWith<$Res> get masterKey;$PasswordCopyWith<$Res> get oldPassword;$PasswordCopyWith<$Res> get newPassword; + +} /// @nodoc class _$DerivedKeyUpdateParamsChangePasswordCopyWithImpl<$Res> implements $DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> { @@ -78,142 +63,228 @@ class _$DerivedKeyUpdateParamsChangePasswordCopyWithImpl<$Res> final DerivedKeyUpdateParamsChangePassword _self; final $Res Function(DerivedKeyUpdateParamsChangePassword) _then; - /// Create a copy of DerivedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? masterKey = null, - Object? oldPassword = null, - Object? newPassword = null, - }) { - return _then(_self.copyWith( - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - oldPassword: null == oldPassword - ? _self.oldPassword - : oldPassword // ignore: cast_nullable_to_non_nullable - as Password, - newPassword: null == newPassword - ? _self.newPassword - : newPassword // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of DerivedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } - - /// Create a copy of DerivedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get oldPassword { - return $PasswordCopyWith<$Res>(_self.oldPassword, (value) { - return _then(_self.copyWith(oldPassword: value)); - }); - } - - /// Create a copy of DerivedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get newPassword { - return $PasswordCopyWith<$Res>(_self.newPassword, (value) { - return _then(_self.copyWith(newPassword: value)); - }); - } +/// Create a copy of DerivedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? masterKey = null,Object? oldPassword = null,Object? newPassword = null,}) { + return _then(_self.copyWith( +masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,oldPassword: null == oldPassword ? _self.oldPassword : oldPassword // ignore: cast_nullable_to_non_nullable +as Password,newPassword: null == newPassword ? _self.newPassword : newPassword // ignore: cast_nullable_to_non_nullable +as Password, + )); +} +/// Create a copy of DerivedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +}/// Create a copy of DerivedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get oldPassword { + + return $PasswordCopyWith<$Res>(_self.oldPassword, (value) { + return _then(_self.copyWith(oldPassword: value)); + }); +}/// Create a copy of DerivedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get newPassword { + + return $PasswordCopyWith<$Res>(_self.newPassword, (value) { + return _then(_self.copyWith(newPassword: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [DerivedKeyUpdateParamsChangePassword]. +extension DerivedKeyUpdateParamsChangePasswordPatterns on DerivedKeyUpdateParamsChangePassword { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DerivedKeyUpdateParamsChangePassword value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsChangePassword() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DerivedKeyUpdateParamsChangePassword value) $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsChangePassword(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DerivedKeyUpdateParamsChangePassword value)? $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsChangePassword() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PublicKey masterKey, Password oldPassword, Password newPassword)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsChangePassword() when $default != null: +return $default(_that.masterKey,_that.oldPassword,_that.newPassword);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PublicKey masterKey, Password oldPassword, Password newPassword) $default,) {final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsChangePassword(): +return $default(_that.masterKey,_that.oldPassword,_that.newPassword);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PublicKey masterKey, Password oldPassword, Password newPassword)? $default,) {final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsChangePassword() when $default != null: +return $default(_that.masterKey,_that.oldPassword,_that.newPassword);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) -class _DerivedKeyUpdateParamsChangePassword - implements DerivedKeyUpdateParamsChangePassword { - const _DerivedKeyUpdateParamsChangePassword( - {required this.masterKey, - required this.oldPassword, - required this.newPassword}); - factory _DerivedKeyUpdateParamsChangePassword.fromJson( - Map json) => - _$DerivedKeyUpdateParamsChangePasswordFromJson(json); - - @override - final PublicKey masterKey; - @override - final Password oldPassword; - @override - final Password newPassword; - - /// Create a copy of DerivedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyUpdateParamsChangePasswordCopyWith< - _DerivedKeyUpdateParamsChangePassword> - get copyWith => __$DerivedKeyUpdateParamsChangePasswordCopyWithImpl< - _DerivedKeyUpdateParamsChangePassword>(this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyUpdateParamsChangePasswordToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyUpdateParamsChangePassword && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.oldPassword, oldPassword) || - other.oldPassword == oldPassword) && - (identical(other.newPassword, newPassword) || - other.newPassword == newPassword)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, masterKey, oldPassword, newPassword); - - @override - String toString() { - return 'DerivedKeyUpdateParamsChangePassword(masterKey: $masterKey, oldPassword: $oldPassword, newPassword: $newPassword)'; - } +class _DerivedKeyUpdateParamsChangePassword implements DerivedKeyUpdateParamsChangePassword { + const _DerivedKeyUpdateParamsChangePassword({required this.masterKey, required this.oldPassword, required this.newPassword}); + factory _DerivedKeyUpdateParamsChangePassword.fromJson(Map json) => _$DerivedKeyUpdateParamsChangePasswordFromJson(json); + +@override final PublicKey masterKey; +@override final Password oldPassword; +@override final Password newPassword; + +/// Create a copy of DerivedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyUpdateParamsChangePasswordCopyWith<_DerivedKeyUpdateParamsChangePassword> get copyWith => __$DerivedKeyUpdateParamsChangePasswordCopyWithImpl<_DerivedKeyUpdateParamsChangePassword>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyUpdateParamsChangePasswordToJson(this, ); } -/// @nodoc -abstract mixin class _$DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> - implements $DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> { - factory _$DerivedKeyUpdateParamsChangePasswordCopyWith( - _DerivedKeyUpdateParamsChangePassword value, - $Res Function(_DerivedKeyUpdateParamsChangePassword) _then) = - __$DerivedKeyUpdateParamsChangePasswordCopyWithImpl; - @override - @useResult - $Res call({PublicKey masterKey, Password oldPassword, Password newPassword}); - - @override - $PublicKeyCopyWith<$Res> get masterKey; - @override - $PasswordCopyWith<$Res> get oldPassword; - @override - $PasswordCopyWith<$Res> get newPassword; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyUpdateParamsChangePassword&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.oldPassword, oldPassword) || other.oldPassword == oldPassword)&&(identical(other.newPassword, newPassword) || other.newPassword == newPassword)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,masterKey,oldPassword,newPassword); + +@override +String toString() { + return 'DerivedKeyUpdateParamsChangePassword(masterKey: $masterKey, oldPassword: $oldPassword, newPassword: $newPassword)'; +} + + } +/// @nodoc +abstract mixin class _$DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> implements $DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> { + factory _$DerivedKeyUpdateParamsChangePasswordCopyWith(_DerivedKeyUpdateParamsChangePassword value, $Res Function(_DerivedKeyUpdateParamsChangePassword) _then) = __$DerivedKeyUpdateParamsChangePasswordCopyWithImpl; +@override @useResult +$Res call({ + PublicKey masterKey, Password oldPassword, Password newPassword +}); + + +@override $PublicKeyCopyWith<$Res> get masterKey;@override $PasswordCopyWith<$Res> get oldPassword;@override $PasswordCopyWith<$Res> get newPassword; + +} /// @nodoc class __$DerivedKeyUpdateParamsChangePasswordCopyWithImpl<$Res> implements _$DerivedKeyUpdateParamsChangePasswordCopyWith<$Res> { @@ -222,60 +293,45 @@ class __$DerivedKeyUpdateParamsChangePasswordCopyWithImpl<$Res> final _DerivedKeyUpdateParamsChangePassword _self; final $Res Function(_DerivedKeyUpdateParamsChangePassword) _then; - /// Create a copy of DerivedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? masterKey = null, - Object? oldPassword = null, - Object? newPassword = null, - }) { - return _then(_DerivedKeyUpdateParamsChangePassword( - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - oldPassword: null == oldPassword - ? _self.oldPassword - : oldPassword // ignore: cast_nullable_to_non_nullable - as Password, - newPassword: null == newPassword - ? _self.newPassword - : newPassword // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of DerivedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } - - /// Create a copy of DerivedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get oldPassword { - return $PasswordCopyWith<$Res>(_self.oldPassword, (value) { - return _then(_self.copyWith(oldPassword: value)); - }); - } - - /// Create a copy of DerivedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get newPassword { - return $PasswordCopyWith<$Res>(_self.newPassword, (value) { - return _then(_self.copyWith(newPassword: value)); - }); - } +/// Create a copy of DerivedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? masterKey = null,Object? oldPassword = null,Object? newPassword = null,}) { + return _then(_DerivedKeyUpdateParamsChangePassword( +masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,oldPassword: null == oldPassword ? _self.oldPassword : oldPassword // ignore: cast_nullable_to_non_nullable +as Password,newPassword: null == newPassword ? _self.newPassword : newPassword // ignore: cast_nullable_to_non_nullable +as Password, + )); +} + +/// Create a copy of DerivedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +}/// Create a copy of DerivedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get oldPassword { + + return $PasswordCopyWith<$Res>(_self.oldPassword, (value) { + return _then(_self.copyWith(oldPassword: value)); + }); +}/// Create a copy of DerivedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get newPassword { + + return $PasswordCopyWith<$Res>(_self.newPassword, (value) { + return _then(_self.copyWith(newPassword: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_change_password.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_change_password.g.dart index 8fe2bcd9..c80b7c03 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_change_password.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_change_password.g.dart @@ -7,19 +7,18 @@ part of 'derived_key_update_params_change_password.dart'; // ************************************************************************** _DerivedKeyUpdateParamsChangePassword - _$DerivedKeyUpdateParamsChangePasswordFromJson(Map json) => - _DerivedKeyUpdateParamsChangePassword( - masterKey: PublicKey.fromJson(json['master_key'] as String), - oldPassword: - Password.fromJson(json['old_password'] as Map), - newPassword: - Password.fromJson(json['new_password'] as Map), - ); +_$DerivedKeyUpdateParamsChangePasswordFromJson( + Map json, +) => _DerivedKeyUpdateParamsChangePassword( + masterKey: PublicKey.fromJson(json['master_key'] as String), + oldPassword: Password.fromJson(json['old_password'] as Map), + newPassword: Password.fromJson(json['new_password'] as Map), +); Map _$DerivedKeyUpdateParamsChangePasswordToJson( - _DerivedKeyUpdateParamsChangePassword instance) => - { - 'master_key': instance.masterKey.toJson(), - 'old_password': instance.oldPassword.toJson(), - 'new_password': instance.newPassword.toJson(), - }; + _DerivedKeyUpdateParamsChangePassword instance, +) => { + 'master_key': instance.masterKey.toJson(), + 'old_password': instance.oldPassword.toJson(), + 'new_password': instance.newPassword.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_rename_key.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_rename_key.freezed.dart index 9beac74a..e3814c9c 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_rename_key.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_rename_key.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,57 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$DerivedKeyUpdateParamsRenameKey { - PublicKey get masterKey; - PublicKey get publicKey; - String get name; - - /// Create a copy of DerivedKeyUpdateParamsRenameKey - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DerivedKeyUpdateParamsRenameKeyCopyWith - get copyWith => _$DerivedKeyUpdateParamsRenameKeyCopyWithImpl< - DerivedKeyUpdateParamsRenameKey>( - this as DerivedKeyUpdateParamsRenameKey, _$identity); + + PublicKey get masterKey; PublicKey get publicKey; String get name; +/// Create a copy of DerivedKeyUpdateParamsRenameKey +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DerivedKeyUpdateParamsRenameKeyCopyWith get copyWith => _$DerivedKeyUpdateParamsRenameKeyCopyWithImpl(this as DerivedKeyUpdateParamsRenameKey, _$identity); /// Serializes this DerivedKeyUpdateParamsRenameKey to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DerivedKeyUpdateParamsRenameKey && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.name, name) || other.name == name)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, masterKey, publicKey, name); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DerivedKeyUpdateParamsRenameKey&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.name, name) || other.name == name)); +} - @override - String toString() { - return 'DerivedKeyUpdateParamsRenameKey(masterKey: $masterKey, publicKey: $publicKey, name: $name)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,masterKey,publicKey,name); + +@override +String toString() { + return 'DerivedKeyUpdateParamsRenameKey(masterKey: $masterKey, publicKey: $publicKey, name: $name)'; } -/// @nodoc -abstract mixin class $DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> { - factory $DerivedKeyUpdateParamsRenameKeyCopyWith( - DerivedKeyUpdateParamsRenameKey value, - $Res Function(DerivedKeyUpdateParamsRenameKey) _then) = - _$DerivedKeyUpdateParamsRenameKeyCopyWithImpl; - @useResult - $Res call({PublicKey masterKey, PublicKey publicKey, String name}); - $PublicKeyCopyWith<$Res> get masterKey; - $PublicKeyCopyWith<$Res> get publicKey; } +/// @nodoc +abstract mixin class $DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> { + factory $DerivedKeyUpdateParamsRenameKeyCopyWith(DerivedKeyUpdateParamsRenameKey value, $Res Function(DerivedKeyUpdateParamsRenameKey) _then) = _$DerivedKeyUpdateParamsRenameKeyCopyWithImpl; +@useResult +$Res call({ + PublicKey masterKey, PublicKey publicKey, String name +}); + + +$PublicKeyCopyWith<$Res> get masterKey;$PublicKeyCopyWith<$Res> get publicKey; + +} /// @nodoc class _$DerivedKeyUpdateParamsRenameKeyCopyWithImpl<$Res> implements $DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> { @@ -74,125 +63,219 @@ class _$DerivedKeyUpdateParamsRenameKeyCopyWithImpl<$Res> final DerivedKeyUpdateParamsRenameKey _self; final $Res Function(DerivedKeyUpdateParamsRenameKey) _then; - /// Create a copy of DerivedKeyUpdateParamsRenameKey - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? masterKey = null, - Object? publicKey = null, - Object? name = null, - }) { - return _then(_self.copyWith( - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of DerivedKeyUpdateParamsRenameKey - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } - - /// Create a copy of DerivedKeyUpdateParamsRenameKey - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } +/// Create a copy of DerivedKeyUpdateParamsRenameKey +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? masterKey = null,Object? publicKey = null,Object? name = null,}) { + return _then(_self.copyWith( +masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String, + )); +} +/// Create a copy of DerivedKeyUpdateParamsRenameKey +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +}/// Create a copy of DerivedKeyUpdateParamsRenameKey +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [DerivedKeyUpdateParamsRenameKey]. +extension DerivedKeyUpdateParamsRenameKeyPatterns on DerivedKeyUpdateParamsRenameKey { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DerivedKeyUpdateParamsRenameKey value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsRenameKey() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DerivedKeyUpdateParamsRenameKey value) $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsRenameKey(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DerivedKeyUpdateParamsRenameKey value)? $default,){ +final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsRenameKey() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PublicKey masterKey, PublicKey publicKey, String name)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsRenameKey() when $default != null: +return $default(_that.masterKey,_that.publicKey,_that.name);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PublicKey masterKey, PublicKey publicKey, String name) $default,) {final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsRenameKey(): +return $default(_that.masterKey,_that.publicKey,_that.name);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PublicKey masterKey, PublicKey publicKey, String name)? $default,) {final _that = this; +switch (_that) { +case _DerivedKeyUpdateParamsRenameKey() when $default != null: +return $default(_that.masterKey,_that.publicKey,_that.name);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) -class _DerivedKeyUpdateParamsRenameKey - implements DerivedKeyUpdateParamsRenameKey { - const _DerivedKeyUpdateParamsRenameKey( - {required this.masterKey, required this.publicKey, required this.name}); - factory _DerivedKeyUpdateParamsRenameKey.fromJson( - Map json) => - _$DerivedKeyUpdateParamsRenameKeyFromJson(json); - - @override - final PublicKey masterKey; - @override - final PublicKey publicKey; - @override - final String name; - - /// Create a copy of DerivedKeyUpdateParamsRenameKey - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DerivedKeyUpdateParamsRenameKeyCopyWith<_DerivedKeyUpdateParamsRenameKey> - get copyWith => __$DerivedKeyUpdateParamsRenameKeyCopyWithImpl< - _DerivedKeyUpdateParamsRenameKey>(this, _$identity); - - @override - Map toJson() { - return _$DerivedKeyUpdateParamsRenameKeyToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DerivedKeyUpdateParamsRenameKey && - (identical(other.masterKey, masterKey) || - other.masterKey == masterKey) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.name, name) || other.name == name)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, masterKey, publicKey, name); - - @override - String toString() { - return 'DerivedKeyUpdateParamsRenameKey(masterKey: $masterKey, publicKey: $publicKey, name: $name)'; - } +class _DerivedKeyUpdateParamsRenameKey implements DerivedKeyUpdateParamsRenameKey { + const _DerivedKeyUpdateParamsRenameKey({required this.masterKey, required this.publicKey, required this.name}); + factory _DerivedKeyUpdateParamsRenameKey.fromJson(Map json) => _$DerivedKeyUpdateParamsRenameKeyFromJson(json); + +@override final PublicKey masterKey; +@override final PublicKey publicKey; +@override final String name; + +/// Create a copy of DerivedKeyUpdateParamsRenameKey +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DerivedKeyUpdateParamsRenameKeyCopyWith<_DerivedKeyUpdateParamsRenameKey> get copyWith => __$DerivedKeyUpdateParamsRenameKeyCopyWithImpl<_DerivedKeyUpdateParamsRenameKey>(this, _$identity); + +@override +Map toJson() { + return _$DerivedKeyUpdateParamsRenameKeyToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DerivedKeyUpdateParamsRenameKey&&(identical(other.masterKey, masterKey) || other.masterKey == masterKey)&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.name, name) || other.name == name)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,masterKey,publicKey,name); + +@override +String toString() { + return 'DerivedKeyUpdateParamsRenameKey(masterKey: $masterKey, publicKey: $publicKey, name: $name)'; } -/// @nodoc -abstract mixin class _$DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> - implements $DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> { - factory _$DerivedKeyUpdateParamsRenameKeyCopyWith( - _DerivedKeyUpdateParamsRenameKey value, - $Res Function(_DerivedKeyUpdateParamsRenameKey) _then) = - __$DerivedKeyUpdateParamsRenameKeyCopyWithImpl; - @override - @useResult - $Res call({PublicKey masterKey, PublicKey publicKey, String name}); - @override - $PublicKeyCopyWith<$Res> get masterKey; - @override - $PublicKeyCopyWith<$Res> get publicKey; } +/// @nodoc +abstract mixin class _$DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> implements $DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> { + factory _$DerivedKeyUpdateParamsRenameKeyCopyWith(_DerivedKeyUpdateParamsRenameKey value, $Res Function(_DerivedKeyUpdateParamsRenameKey) _then) = __$DerivedKeyUpdateParamsRenameKeyCopyWithImpl; +@override @useResult +$Res call({ + PublicKey masterKey, PublicKey publicKey, String name +}); + + +@override $PublicKeyCopyWith<$Res> get masterKey;@override $PublicKeyCopyWith<$Res> get publicKey; + +} /// @nodoc class __$DerivedKeyUpdateParamsRenameKeyCopyWithImpl<$Res> implements _$DerivedKeyUpdateParamsRenameKeyCopyWith<$Res> { @@ -201,50 +284,36 @@ class __$DerivedKeyUpdateParamsRenameKeyCopyWithImpl<$Res> final _DerivedKeyUpdateParamsRenameKey _self; final $Res Function(_DerivedKeyUpdateParamsRenameKey) _then; - /// Create a copy of DerivedKeyUpdateParamsRenameKey - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? masterKey = null, - Object? publicKey = null, - Object? name = null, - }) { - return _then(_DerivedKeyUpdateParamsRenameKey( - masterKey: null == masterKey - ? _self.masterKey - : masterKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of DerivedKeyUpdateParamsRenameKey - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get masterKey { - return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { - return _then(_self.copyWith(masterKey: value)); - }); - } - - /// Create a copy of DerivedKeyUpdateParamsRenameKey - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } +/// Create a copy of DerivedKeyUpdateParamsRenameKey +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? masterKey = null,Object? publicKey = null,Object? name = null,}) { + return _then(_DerivedKeyUpdateParamsRenameKey( +masterKey: null == masterKey ? _self.masterKey : masterKey // ignore: cast_nullable_to_non_nullable +as PublicKey,publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +/// Create a copy of DerivedKeyUpdateParamsRenameKey +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get masterKey { + + return $PublicKeyCopyWith<$Res>(_self.masterKey, (value) { + return _then(_self.copyWith(masterKey: value)); + }); +}/// Create a copy of DerivedKeyUpdateParamsRenameKey +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_rename_key.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_rename_key.g.dart index a37a0db9..53b3dcb8 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_rename_key.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/derived_key/derived_key_update_params_rename_key.g.dart @@ -7,17 +7,17 @@ part of 'derived_key_update_params_rename_key.dart'; // ************************************************************************** _DerivedKeyUpdateParamsRenameKey _$DerivedKeyUpdateParamsRenameKeyFromJson( - Map json) => - _DerivedKeyUpdateParamsRenameKey( - masterKey: PublicKey.fromJson(json['master_key'] as String), - publicKey: PublicKey.fromJson(json['public_key'] as String), - name: json['name'] as String, - ); + Map json, +) => _DerivedKeyUpdateParamsRenameKey( + masterKey: PublicKey.fromJson(json['master_key'] as String), + publicKey: PublicKey.fromJson(json['public_key'] as String), + name: json['name'] as String, +); Map _$DerivedKeyUpdateParamsRenameKeyToJson( - _DerivedKeyUpdateParamsRenameKey instance) => - { - 'master_key': instance.masterKey.toJson(), - 'public_key': instance.publicKey.toJson(), - 'name': instance.name, - }; + _DerivedKeyUpdateParamsRenameKey instance, +) => { + 'master_key': instance.masterKey.toJson(), + 'public_key': instance.publicKey.toJson(), + 'name': instance.name, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_create_input.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_create_input.freezed.dart index 2d79c9de..f3b40f38 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_create_input.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_create_input.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,63 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$EncryptedKeyCreateInput { - String? get name; - String get phrase; - @mnemonicJsonConverter - MnemonicType get mnemonicType; - Password get password; - - /// Create a copy of EncryptedKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $EncryptedKeyCreateInputCopyWith get copyWith => - _$EncryptedKeyCreateInputCopyWithImpl( - this as EncryptedKeyCreateInput, _$identity); + + String? get name; String get phrase;@mnemonicJsonConverter MnemonicType get mnemonicType; Password get password; +/// Create a copy of EncryptedKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$EncryptedKeyCreateInputCopyWith get copyWith => _$EncryptedKeyCreateInputCopyWithImpl(this as EncryptedKeyCreateInput, _$identity); /// Serializes this EncryptedKeyCreateInput to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is EncryptedKeyCreateInput && - (identical(other.name, name) || other.name == name) && - (identical(other.phrase, phrase) || other.phrase == phrase) && - (identical(other.mnemonicType, mnemonicType) || - other.mnemonicType == mnemonicType) && - (identical(other.password, password) || - other.password == password)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, name, phrase, mnemonicType, password); - - @override - String toString() { - return 'EncryptedKeyCreateInput(name: $name, phrase: $phrase, mnemonicType: $mnemonicType, password: $password)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is EncryptedKeyCreateInput&&(identical(other.name, name) || other.name == name)&&(identical(other.phrase, phrase) || other.phrase == phrase)&&(identical(other.mnemonicType, mnemonicType) || other.mnemonicType == mnemonicType)&&(identical(other.password, password) || other.password == password)); } -/// @nodoc -abstract mixin class $EncryptedKeyCreateInputCopyWith<$Res> { - factory $EncryptedKeyCreateInputCopyWith(EncryptedKeyCreateInput value, - $Res Function(EncryptedKeyCreateInput) _then) = - _$EncryptedKeyCreateInputCopyWithImpl; - @useResult - $Res call( - {String? name, - String phrase, - @mnemonicJsonConverter MnemonicType mnemonicType, - Password password}); - - $MnemonicTypeCopyWith<$Res> get mnemonicType; - $PasswordCopyWith<$Res> get password; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,phrase,mnemonicType,password); + +@override +String toString() { + return 'EncryptedKeyCreateInput(name: $name, phrase: $phrase, mnemonicType: $mnemonicType, password: $password)'; +} + + } +/// @nodoc +abstract mixin class $EncryptedKeyCreateInputCopyWith<$Res> { + factory $EncryptedKeyCreateInputCopyWith(EncryptedKeyCreateInput value, $Res Function(EncryptedKeyCreateInput) _then) = _$EncryptedKeyCreateInputCopyWithImpl; +@useResult +$Res call({ + String? name, String phrase,@mnemonicJsonConverter MnemonicType mnemonicType, Password password +}); + + +$MnemonicTypeCopyWith<$Res> get mnemonicType;$PasswordCopyWith<$Res> get password; + +} /// @nodoc class _$EncryptedKeyCreateInputCopyWithImpl<$Res> implements $EncryptedKeyCreateInputCopyWith<$Res> { @@ -80,138 +63,221 @@ class _$EncryptedKeyCreateInputCopyWithImpl<$Res> final EncryptedKeyCreateInput _self; final $Res Function(EncryptedKeyCreateInput) _then; - /// Create a copy of EncryptedKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = freezed, - Object? phrase = null, - Object? mnemonicType = null, - Object? password = null, - }) { - return _then(_self.copyWith( - name: freezed == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - phrase: null == phrase - ? _self.phrase - : phrase // ignore: cast_nullable_to_non_nullable - as String, - mnemonicType: null == mnemonicType - ? _self.mnemonicType - : mnemonicType // ignore: cast_nullable_to_non_nullable - as MnemonicType, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of EncryptedKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $MnemonicTypeCopyWith<$Res> get mnemonicType { - return $MnemonicTypeCopyWith<$Res>(_self.mnemonicType, (value) { - return _then(_self.copyWith(mnemonicType: value)); - }); - } - - /// Create a copy of EncryptedKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of EncryptedKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? name = freezed,Object? phrase = null,Object? mnemonicType = null,Object? password = null,}) { + return _then(_self.copyWith( +name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?,phrase: null == phrase ? _self.phrase : phrase // ignore: cast_nullable_to_non_nullable +as String,mnemonicType: null == mnemonicType ? _self.mnemonicType : mnemonicType // ignore: cast_nullable_to_non_nullable +as MnemonicType,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password, + )); +} +/// Create a copy of EncryptedKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$MnemonicTypeCopyWith<$Res> get mnemonicType { + + return $MnemonicTypeCopyWith<$Res>(_self.mnemonicType, (value) { + return _then(_self.copyWith(mnemonicType: value)); + }); +}/// Create a copy of EncryptedKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [EncryptedKeyCreateInput]. +extension EncryptedKeyCreateInputPatterns on EncryptedKeyCreateInput { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _EncryptedKeyCreateInput value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _EncryptedKeyCreateInput() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _EncryptedKeyCreateInput value) $default,){ +final _that = this; +switch (_that) { +case _EncryptedKeyCreateInput(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _EncryptedKeyCreateInput value)? $default,){ +final _that = this; +switch (_that) { +case _EncryptedKeyCreateInput() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String? name, String phrase, @mnemonicJsonConverter MnemonicType mnemonicType, Password password)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _EncryptedKeyCreateInput() when $default != null: +return $default(_that.name,_that.phrase,_that.mnemonicType,_that.password);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String? name, String phrase, @mnemonicJsonConverter MnemonicType mnemonicType, Password password) $default,) {final _that = this; +switch (_that) { +case _EncryptedKeyCreateInput(): +return $default(_that.name,_that.phrase,_that.mnemonicType,_that.password);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? name, String phrase, @mnemonicJsonConverter MnemonicType mnemonicType, Password password)? $default,) {final _that = this; +switch (_that) { +case _EncryptedKeyCreateInput() when $default != null: +return $default(_that.name,_that.phrase,_that.mnemonicType,_that.password);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _EncryptedKeyCreateInput implements EncryptedKeyCreateInput { - _EncryptedKeyCreateInput( - {this.name, - required this.phrase, - @mnemonicJsonConverter required this.mnemonicType, - required this.password}); - factory _EncryptedKeyCreateInput.fromJson(Map json) => - _$EncryptedKeyCreateInputFromJson(json); - - @override - final String? name; - @override - final String phrase; - @override - @mnemonicJsonConverter - final MnemonicType mnemonicType; - @override - final Password password; - - /// Create a copy of EncryptedKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$EncryptedKeyCreateInputCopyWith<_EncryptedKeyCreateInput> get copyWith => - __$EncryptedKeyCreateInputCopyWithImpl<_EncryptedKeyCreateInput>( - this, _$identity); - - @override - Map toJson() { - return _$EncryptedKeyCreateInputToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _EncryptedKeyCreateInput && - (identical(other.name, name) || other.name == name) && - (identical(other.phrase, phrase) || other.phrase == phrase) && - (identical(other.mnemonicType, mnemonicType) || - other.mnemonicType == mnemonicType) && - (identical(other.password, password) || - other.password == password)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, name, phrase, mnemonicType, password); - - @override - String toString() { - return 'EncryptedKeyCreateInput(name: $name, phrase: $phrase, mnemonicType: $mnemonicType, password: $password)'; - } + _EncryptedKeyCreateInput({this.name, required this.phrase, @mnemonicJsonConverter required this.mnemonicType, required this.password}); + factory _EncryptedKeyCreateInput.fromJson(Map json) => _$EncryptedKeyCreateInputFromJson(json); + +@override final String? name; +@override final String phrase; +@override@mnemonicJsonConverter final MnemonicType mnemonicType; +@override final Password password; + +/// Create a copy of EncryptedKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$EncryptedKeyCreateInputCopyWith<_EncryptedKeyCreateInput> get copyWith => __$EncryptedKeyCreateInputCopyWithImpl<_EncryptedKeyCreateInput>(this, _$identity); + +@override +Map toJson() { + return _$EncryptedKeyCreateInputToJson(this, ); } -/// @nodoc -abstract mixin class _$EncryptedKeyCreateInputCopyWith<$Res> - implements $EncryptedKeyCreateInputCopyWith<$Res> { - factory _$EncryptedKeyCreateInputCopyWith(_EncryptedKeyCreateInput value, - $Res Function(_EncryptedKeyCreateInput) _then) = - __$EncryptedKeyCreateInputCopyWithImpl; - @override - @useResult - $Res call( - {String? name, - String phrase, - @mnemonicJsonConverter MnemonicType mnemonicType, - Password password}); - - @override - $MnemonicTypeCopyWith<$Res> get mnemonicType; - @override - $PasswordCopyWith<$Res> get password; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _EncryptedKeyCreateInput&&(identical(other.name, name) || other.name == name)&&(identical(other.phrase, phrase) || other.phrase == phrase)&&(identical(other.mnemonicType, mnemonicType) || other.mnemonicType == mnemonicType)&&(identical(other.password, password) || other.password == password)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,phrase,mnemonicType,password); + +@override +String toString() { + return 'EncryptedKeyCreateInput(name: $name, phrase: $phrase, mnemonicType: $mnemonicType, password: $password)'; +} + + } +/// @nodoc +abstract mixin class _$EncryptedKeyCreateInputCopyWith<$Res> implements $EncryptedKeyCreateInputCopyWith<$Res> { + factory _$EncryptedKeyCreateInputCopyWith(_EncryptedKeyCreateInput value, $Res Function(_EncryptedKeyCreateInput) _then) = __$EncryptedKeyCreateInputCopyWithImpl; +@override @useResult +$Res call({ + String? name, String phrase,@mnemonicJsonConverter MnemonicType mnemonicType, Password password +}); + + +@override $MnemonicTypeCopyWith<$Res> get mnemonicType;@override $PasswordCopyWith<$Res> get password; + +} /// @nodoc class __$EncryptedKeyCreateInputCopyWithImpl<$Res> implements _$EncryptedKeyCreateInputCopyWith<$Res> { @@ -220,55 +286,37 @@ class __$EncryptedKeyCreateInputCopyWithImpl<$Res> final _EncryptedKeyCreateInput _self; final $Res Function(_EncryptedKeyCreateInput) _then; - /// Create a copy of EncryptedKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? name = freezed, - Object? phrase = null, - Object? mnemonicType = null, - Object? password = null, - }) { - return _then(_EncryptedKeyCreateInput( - name: freezed == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - phrase: null == phrase - ? _self.phrase - : phrase // ignore: cast_nullable_to_non_nullable - as String, - mnemonicType: null == mnemonicType - ? _self.mnemonicType - : mnemonicType // ignore: cast_nullable_to_non_nullable - as MnemonicType, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of EncryptedKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $MnemonicTypeCopyWith<$Res> get mnemonicType { - return $MnemonicTypeCopyWith<$Res>(_self.mnemonicType, (value) { - return _then(_self.copyWith(mnemonicType: value)); - }); - } - - /// Create a copy of EncryptedKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of EncryptedKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? name = freezed,Object? phrase = null,Object? mnemonicType = null,Object? password = null,}) { + return _then(_EncryptedKeyCreateInput( +name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?,phrase: null == phrase ? _self.phrase : phrase // ignore: cast_nullable_to_non_nullable +as String,mnemonicType: null == mnemonicType ? _self.mnemonicType : mnemonicType // ignore: cast_nullable_to_non_nullable +as MnemonicType,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password, + )); +} + +/// Create a copy of EncryptedKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$MnemonicTypeCopyWith<$Res> get mnemonicType { + + return $MnemonicTypeCopyWith<$Res>(_self.mnemonicType, (value) { + return _then(_self.copyWith(mnemonicType: value)); + }); +}/// Create a copy of EncryptedKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_create_input.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_create_input.g.dart index 86f21ef1..2372dc8e 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_create_input.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_create_input.g.dart @@ -7,20 +7,21 @@ part of 'encrypted_key_create_input.dart'; // ************************************************************************** _EncryptedKeyCreateInput _$EncryptedKeyCreateInputFromJson( - Map json) => - _EncryptedKeyCreateInput( - name: json['name'] as String?, - phrase: json['phrase'] as String, - mnemonicType: mnemonicJsonConverter - .fromJson(json['mnemonicType'] as Map), - password: Password.fromJson(json['password'] as Map), - ); + Map json, +) => _EncryptedKeyCreateInput( + name: json['name'] as String?, + phrase: json['phrase'] as String, + mnemonicType: mnemonicJsonConverter.fromJson( + json['mnemonicType'] as Map, + ), + password: Password.fromJson(json['password'] as Map), +); Map _$EncryptedKeyCreateInputToJson( - _EncryptedKeyCreateInput instance) => - { - 'name': instance.name, - 'phrase': instance.phrase, - 'mnemonicType': mnemonicJsonConverter.toJson(instance.mnemonicType), - 'password': instance.password.toJson(), - }; + _EncryptedKeyCreateInput instance, +) => { + 'name': instance.name, + 'phrase': instance.phrase, + 'mnemonicType': mnemonicJsonConverter.toJson(instance.mnemonicType), + 'password': instance.password.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_export_output.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_export_output.freezed.dart index 6c85a14f..a52ded9f 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_export_output.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_export_output.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,54 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$EncryptedKeyExportSeedOutput { - String get phrase; - @mnemonicJsonConverter - MnemonicType get mnemonicType; - - /// Create a copy of EncryptedKeyExportSeedOutput - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $EncryptedKeyExportSeedOutputCopyWith - get copyWith => _$EncryptedKeyExportSeedOutputCopyWithImpl< - EncryptedKeyExportSeedOutput>( - this as EncryptedKeyExportSeedOutput, _$identity); + + String get phrase;@mnemonicJsonConverter MnemonicType get mnemonicType; +/// Create a copy of EncryptedKeyExportSeedOutput +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$EncryptedKeyExportSeedOutputCopyWith get copyWith => _$EncryptedKeyExportSeedOutputCopyWithImpl(this as EncryptedKeyExportSeedOutput, _$identity); /// Serializes this EncryptedKeyExportSeedOutput to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is EncryptedKeyExportSeedOutput && - (identical(other.phrase, phrase) || other.phrase == phrase) && - (identical(other.mnemonicType, mnemonicType) || - other.mnemonicType == mnemonicType)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, phrase, mnemonicType); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is EncryptedKeyExportSeedOutput&&(identical(other.phrase, phrase) || other.phrase == phrase)&&(identical(other.mnemonicType, mnemonicType) || other.mnemonicType == mnemonicType)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,phrase,mnemonicType); - @override - String toString() { - return 'EncryptedKeyExportSeedOutput(phrase: $phrase, mnemonicType: $mnemonicType)'; - } +@override +String toString() { + return 'EncryptedKeyExportSeedOutput(phrase: $phrase, mnemonicType: $mnemonicType)'; } -/// @nodoc -abstract mixin class $EncryptedKeyExportSeedOutputCopyWith<$Res> { - factory $EncryptedKeyExportSeedOutputCopyWith( - EncryptedKeyExportSeedOutput value, - $Res Function(EncryptedKeyExportSeedOutput) _then) = - _$EncryptedKeyExportSeedOutputCopyWithImpl; - @useResult - $Res call({String phrase, @mnemonicJsonConverter MnemonicType mnemonicType}); - $MnemonicTypeCopyWith<$Res> get mnemonicType; } +/// @nodoc +abstract mixin class $EncryptedKeyExportSeedOutputCopyWith<$Res> { + factory $EncryptedKeyExportSeedOutputCopyWith(EncryptedKeyExportSeedOutput value, $Res Function(EncryptedKeyExportSeedOutput) _then) = _$EncryptedKeyExportSeedOutputCopyWithImpl; +@useResult +$Res call({ + String phrase,@mnemonicJsonConverter MnemonicType mnemonicType +}); + + +$MnemonicTypeCopyWith<$Res> get mnemonicType; + +} /// @nodoc class _$EncryptedKeyExportSeedOutputCopyWithImpl<$Res> implements $EncryptedKeyExportSeedOutputCopyWith<$Res> { @@ -71,103 +63,208 @@ class _$EncryptedKeyExportSeedOutputCopyWithImpl<$Res> final EncryptedKeyExportSeedOutput _self; final $Res Function(EncryptedKeyExportSeedOutput) _then; - /// Create a copy of EncryptedKeyExportSeedOutput - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? phrase = null, - Object? mnemonicType = null, - }) { - return _then(_self.copyWith( - phrase: null == phrase - ? _self.phrase - : phrase // ignore: cast_nullable_to_non_nullable - as String, - mnemonicType: null == mnemonicType - ? _self.mnemonicType - : mnemonicType // ignore: cast_nullable_to_non_nullable - as MnemonicType, - )); - } - - /// Create a copy of EncryptedKeyExportSeedOutput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $MnemonicTypeCopyWith<$Res> get mnemonicType { - return $MnemonicTypeCopyWith<$Res>(_self.mnemonicType, (value) { - return _then(_self.copyWith(mnemonicType: value)); - }); - } +/// Create a copy of EncryptedKeyExportSeedOutput +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? phrase = null,Object? mnemonicType = null,}) { + return _then(_self.copyWith( +phrase: null == phrase ? _self.phrase : phrase // ignore: cast_nullable_to_non_nullable +as String,mnemonicType: null == mnemonicType ? _self.mnemonicType : mnemonicType // ignore: cast_nullable_to_non_nullable +as MnemonicType, + )); +} +/// Create a copy of EncryptedKeyExportSeedOutput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$MnemonicTypeCopyWith<$Res> get mnemonicType { + + return $MnemonicTypeCopyWith<$Res>(_self.mnemonicType, (value) { + return _then(_self.copyWith(mnemonicType: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [EncryptedKeyExportSeedOutput]. +extension EncryptedKeyExportSeedOutputPatterns on EncryptedKeyExportSeedOutput { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _EncryptedKeyExportSeedOutput value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _EncryptedKeyExportSeedOutput() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _EncryptedKeyExportSeedOutput value) $default,){ +final _that = this; +switch (_that) { +case _EncryptedKeyExportSeedOutput(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _EncryptedKeyExportSeedOutput value)? $default,){ +final _that = this; +switch (_that) { +case _EncryptedKeyExportSeedOutput() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String phrase, @mnemonicJsonConverter MnemonicType mnemonicType)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _EncryptedKeyExportSeedOutput() when $default != null: +return $default(_that.phrase,_that.mnemonicType);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String phrase, @mnemonicJsonConverter MnemonicType mnemonicType) $default,) {final _that = this; +switch (_that) { +case _EncryptedKeyExportSeedOutput(): +return $default(_that.phrase,_that.mnemonicType);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String phrase, @mnemonicJsonConverter MnemonicType mnemonicType)? $default,) {final _that = this; +switch (_that) { +case _EncryptedKeyExportSeedOutput() when $default != null: +return $default(_that.phrase,_that.mnemonicType);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _EncryptedKeyExportSeedOutput implements EncryptedKeyExportSeedOutput { - _EncryptedKeyExportSeedOutput( - {required this.phrase, - @mnemonicJsonConverter required this.mnemonicType}); - factory _EncryptedKeyExportSeedOutput.fromJson(Map json) => - _$EncryptedKeyExportSeedOutputFromJson(json); - - @override - final String phrase; - @override - @mnemonicJsonConverter - final MnemonicType mnemonicType; - - /// Create a copy of EncryptedKeyExportSeedOutput - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$EncryptedKeyExportSeedOutputCopyWith<_EncryptedKeyExportSeedOutput> - get copyWith => __$EncryptedKeyExportSeedOutputCopyWithImpl< - _EncryptedKeyExportSeedOutput>(this, _$identity); - - @override - Map toJson() { - return _$EncryptedKeyExportSeedOutputToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _EncryptedKeyExportSeedOutput && - (identical(other.phrase, phrase) || other.phrase == phrase) && - (identical(other.mnemonicType, mnemonicType) || - other.mnemonicType == mnemonicType)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, phrase, mnemonicType); - - @override - String toString() { - return 'EncryptedKeyExportSeedOutput(phrase: $phrase, mnemonicType: $mnemonicType)'; - } + _EncryptedKeyExportSeedOutput({required this.phrase, @mnemonicJsonConverter required this.mnemonicType}); + factory _EncryptedKeyExportSeedOutput.fromJson(Map json) => _$EncryptedKeyExportSeedOutputFromJson(json); + +@override final String phrase; +@override@mnemonicJsonConverter final MnemonicType mnemonicType; + +/// Create a copy of EncryptedKeyExportSeedOutput +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$EncryptedKeyExportSeedOutputCopyWith<_EncryptedKeyExportSeedOutput> get copyWith => __$EncryptedKeyExportSeedOutputCopyWithImpl<_EncryptedKeyExportSeedOutput>(this, _$identity); + +@override +Map toJson() { + return _$EncryptedKeyExportSeedOutputToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _EncryptedKeyExportSeedOutput&&(identical(other.phrase, phrase) || other.phrase == phrase)&&(identical(other.mnemonicType, mnemonicType) || other.mnemonicType == mnemonicType)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,phrase,mnemonicType); + +@override +String toString() { + return 'EncryptedKeyExportSeedOutput(phrase: $phrase, mnemonicType: $mnemonicType)'; } -/// @nodoc -abstract mixin class _$EncryptedKeyExportSeedOutputCopyWith<$Res> - implements $EncryptedKeyExportSeedOutputCopyWith<$Res> { - factory _$EncryptedKeyExportSeedOutputCopyWith( - _EncryptedKeyExportSeedOutput value, - $Res Function(_EncryptedKeyExportSeedOutput) _then) = - __$EncryptedKeyExportSeedOutputCopyWithImpl; - @override - @useResult - $Res call({String phrase, @mnemonicJsonConverter MnemonicType mnemonicType}); - @override - $MnemonicTypeCopyWith<$Res> get mnemonicType; } +/// @nodoc +abstract mixin class _$EncryptedKeyExportSeedOutputCopyWith<$Res> implements $EncryptedKeyExportSeedOutputCopyWith<$Res> { + factory _$EncryptedKeyExportSeedOutputCopyWith(_EncryptedKeyExportSeedOutput value, $Res Function(_EncryptedKeyExportSeedOutput) _then) = __$EncryptedKeyExportSeedOutputCopyWithImpl; +@override @useResult +$Res call({ + String phrase,@mnemonicJsonConverter MnemonicType mnemonicType +}); + + +@override $MnemonicTypeCopyWith<$Res> get mnemonicType; + +} /// @nodoc class __$EncryptedKeyExportSeedOutputCopyWithImpl<$Res> implements _$EncryptedKeyExportSeedOutputCopyWith<$Res> { @@ -176,35 +273,26 @@ class __$EncryptedKeyExportSeedOutputCopyWithImpl<$Res> final _EncryptedKeyExportSeedOutput _self; final $Res Function(_EncryptedKeyExportSeedOutput) _then; - /// Create a copy of EncryptedKeyExportSeedOutput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? phrase = null, - Object? mnemonicType = null, - }) { - return _then(_EncryptedKeyExportSeedOutput( - phrase: null == phrase - ? _self.phrase - : phrase // ignore: cast_nullable_to_non_nullable - as String, - mnemonicType: null == mnemonicType - ? _self.mnemonicType - : mnemonicType // ignore: cast_nullable_to_non_nullable - as MnemonicType, - )); - } - - /// Create a copy of EncryptedKeyExportSeedOutput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $MnemonicTypeCopyWith<$Res> get mnemonicType { - return $MnemonicTypeCopyWith<$Res>(_self.mnemonicType, (value) { - return _then(_self.copyWith(mnemonicType: value)); - }); - } +/// Create a copy of EncryptedKeyExportSeedOutput +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? phrase = null,Object? mnemonicType = null,}) { + return _then(_EncryptedKeyExportSeedOutput( +phrase: null == phrase ? _self.phrase : phrase // ignore: cast_nullable_to_non_nullable +as String,mnemonicType: null == mnemonicType ? _self.mnemonicType : mnemonicType // ignore: cast_nullable_to_non_nullable +as MnemonicType, + )); +} + +/// Create a copy of EncryptedKeyExportSeedOutput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$MnemonicTypeCopyWith<$Res> get mnemonicType { + + return $MnemonicTypeCopyWith<$Res>(_self.mnemonicType, (value) { + return _then(_self.copyWith(mnemonicType: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_export_output.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_export_output.g.dart index ddb7ea3f..9e012514 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_export_output.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_export_output.g.dart @@ -7,16 +7,17 @@ part of 'encrypted_key_export_output.dart'; // ************************************************************************** _EncryptedKeyExportSeedOutput _$EncryptedKeyExportSeedOutputFromJson( - Map json) => - _EncryptedKeyExportSeedOutput( - phrase: json['phrase'] as String, - mnemonicType: mnemonicJsonConverter - .fromJson(json['mnemonicType'] as Map), - ); + Map json, +) => _EncryptedKeyExportSeedOutput( + phrase: json['phrase'] as String, + mnemonicType: mnemonicJsonConverter.fromJson( + json['mnemonicType'] as Map, + ), +); Map _$EncryptedKeyExportSeedOutputToJson( - _EncryptedKeyExportSeedOutput instance) => - { - 'phrase': instance.phrase, - 'mnemonicType': mnemonicJsonConverter.toJson(instance.mnemonicType), - }; + _EncryptedKeyExportSeedOutput instance, +) => { + 'phrase': instance.phrase, + 'mnemonicType': mnemonicJsonConverter.toJson(instance.mnemonicType), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_get_public_keys.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_get_public_keys.freezed.dart index 875afb51..08336bc3 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_get_public_keys.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_get_public_keys.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,49 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$EncryptedKeyGetPublicKeys { - PublicKey get publicKey; - /// Create a copy of EncryptedKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $EncryptedKeyGetPublicKeysCopyWith get copyWith => - _$EncryptedKeyGetPublicKeysCopyWithImpl( - this as EncryptedKeyGetPublicKeys, _$identity); + PublicKey get publicKey; +/// Create a copy of EncryptedKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$EncryptedKeyGetPublicKeysCopyWith get copyWith => _$EncryptedKeyGetPublicKeysCopyWithImpl(this as EncryptedKeyGetPublicKeys, _$identity); /// Serializes this EncryptedKeyGetPublicKeys to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is EncryptedKeyGetPublicKeys && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, publicKey); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is EncryptedKeyGetPublicKeys&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,publicKey); - @override - String toString() { - return 'EncryptedKeyGetPublicKeys(publicKey: $publicKey)'; - } +@override +String toString() { + return 'EncryptedKeyGetPublicKeys(publicKey: $publicKey)'; } -/// @nodoc -abstract mixin class $EncryptedKeyGetPublicKeysCopyWith<$Res> { - factory $EncryptedKeyGetPublicKeysCopyWith(EncryptedKeyGetPublicKeys value, - $Res Function(EncryptedKeyGetPublicKeys) _then) = - _$EncryptedKeyGetPublicKeysCopyWithImpl; - @useResult - $Res call({PublicKey publicKey}); - $PublicKeyCopyWith<$Res> get publicKey; } +/// @nodoc +abstract mixin class $EncryptedKeyGetPublicKeysCopyWith<$Res> { + factory $EncryptedKeyGetPublicKeysCopyWith(EncryptedKeyGetPublicKeys value, $Res Function(EncryptedKeyGetPublicKeys) _then) = _$EncryptedKeyGetPublicKeysCopyWithImpl; +@useResult +$Res call({ + PublicKey publicKey +}); + + +$PublicKeyCopyWith<$Res> get publicKey; + +} /// @nodoc class _$EncryptedKeyGetPublicKeysCopyWithImpl<$Res> implements $EncryptedKeyGetPublicKeysCopyWith<$Res> { @@ -66,30 +63,155 @@ class _$EncryptedKeyGetPublicKeysCopyWithImpl<$Res> final EncryptedKeyGetPublicKeys _self; final $Res Function(EncryptedKeyGetPublicKeys) _then; - /// Create a copy of EncryptedKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? publicKey = null, - }) { - return _then(_self.copyWith( - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - )); - } - - /// Create a copy of EncryptedKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } +/// Create a copy of EncryptedKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? publicKey = null,}) { + return _then(_self.copyWith( +publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey, + )); +} +/// Create a copy of EncryptedKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [EncryptedKeyGetPublicKeys]. +extension EncryptedKeyGetPublicKeysPatterns on EncryptedKeyGetPublicKeys { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _EncryptedKeyGetPublicKeys value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _EncryptedKeyGetPublicKeys() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _EncryptedKeyGetPublicKeys value) $default,){ +final _that = this; +switch (_that) { +case _EncryptedKeyGetPublicKeys(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _EncryptedKeyGetPublicKeys value)? $default,){ +final _that = this; +switch (_that) { +case _EncryptedKeyGetPublicKeys() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PublicKey publicKey)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _EncryptedKeyGetPublicKeys() when $default != null: +return $default(_that.publicKey);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PublicKey publicKey) $default,) {final _that = this; +switch (_that) { +case _EncryptedKeyGetPublicKeys(): +return $default(_that.publicKey);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PublicKey publicKey)? $default,) {final _that = this; +switch (_that) { +case _EncryptedKeyGetPublicKeys() when $default != null: +return $default(_that.publicKey);case _: + return null; + +} +} + } /// @nodoc @@ -97,62 +219,50 @@ class _$EncryptedKeyGetPublicKeysCopyWithImpl<$Res> @JsonSerializable(fieldRename: FieldRename.snake) class _EncryptedKeyGetPublicKeys implements EncryptedKeyGetPublicKeys { const _EncryptedKeyGetPublicKeys({required this.publicKey}); - factory _EncryptedKeyGetPublicKeys.fromJson(Map json) => - _$EncryptedKeyGetPublicKeysFromJson(json); - - @override - final PublicKey publicKey; - - /// Create a copy of EncryptedKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$EncryptedKeyGetPublicKeysCopyWith<_EncryptedKeyGetPublicKeys> - get copyWith => - __$EncryptedKeyGetPublicKeysCopyWithImpl<_EncryptedKeyGetPublicKeys>( - this, _$identity); - - @override - Map toJson() { - return _$EncryptedKeyGetPublicKeysToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _EncryptedKeyGetPublicKeys && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, publicKey); - - @override - String toString() { - return 'EncryptedKeyGetPublicKeys(publicKey: $publicKey)'; - } + factory _EncryptedKeyGetPublicKeys.fromJson(Map json) => _$EncryptedKeyGetPublicKeysFromJson(json); + +@override final PublicKey publicKey; + +/// Create a copy of EncryptedKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$EncryptedKeyGetPublicKeysCopyWith<_EncryptedKeyGetPublicKeys> get copyWith => __$EncryptedKeyGetPublicKeysCopyWithImpl<_EncryptedKeyGetPublicKeys>(this, _$identity); + +@override +Map toJson() { + return _$EncryptedKeyGetPublicKeysToJson(this, ); } -/// @nodoc -abstract mixin class _$EncryptedKeyGetPublicKeysCopyWith<$Res> - implements $EncryptedKeyGetPublicKeysCopyWith<$Res> { - factory _$EncryptedKeyGetPublicKeysCopyWith(_EncryptedKeyGetPublicKeys value, - $Res Function(_EncryptedKeyGetPublicKeys) _then) = - __$EncryptedKeyGetPublicKeysCopyWithImpl; - @override - @useResult - $Res call({PublicKey publicKey}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _EncryptedKeyGetPublicKeys&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)); +} - @override - $PublicKeyCopyWith<$Res> get publicKey; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,publicKey); + +@override +String toString() { + return 'EncryptedKeyGetPublicKeys(publicKey: $publicKey)'; } + +} + +/// @nodoc +abstract mixin class _$EncryptedKeyGetPublicKeysCopyWith<$Res> implements $EncryptedKeyGetPublicKeysCopyWith<$Res> { + factory _$EncryptedKeyGetPublicKeysCopyWith(_EncryptedKeyGetPublicKeys value, $Res Function(_EncryptedKeyGetPublicKeys) _then) = __$EncryptedKeyGetPublicKeysCopyWithImpl; +@override @useResult +$Res call({ + PublicKey publicKey +}); + + +@override $PublicKeyCopyWith<$Res> get publicKey; + +} /// @nodoc class __$EncryptedKeyGetPublicKeysCopyWithImpl<$Res> implements _$EncryptedKeyGetPublicKeysCopyWith<$Res> { @@ -161,30 +271,25 @@ class __$EncryptedKeyGetPublicKeysCopyWithImpl<$Res> final _EncryptedKeyGetPublicKeys _self; final $Res Function(_EncryptedKeyGetPublicKeys) _then; - /// Create a copy of EncryptedKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? publicKey = null, - }) { - return _then(_EncryptedKeyGetPublicKeys( - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - )); - } - - /// Create a copy of EncryptedKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } +/// Create a copy of EncryptedKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? publicKey = null,}) { + return _then(_EncryptedKeyGetPublicKeys( +publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey, + )); +} + +/// Create a copy of EncryptedKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_get_public_keys.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_get_public_keys.g.dart index 69d7ad74..cc41c8c7 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_get_public_keys.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_get_public_keys.g.dart @@ -7,13 +7,11 @@ part of 'encrypted_key_get_public_keys.dart'; // ************************************************************************** _EncryptedKeyGetPublicKeys _$EncryptedKeyGetPublicKeysFromJson( - Map json) => - _EncryptedKeyGetPublicKeys( - publicKey: PublicKey.fromJson(json['public_key'] as String), - ); + Map json, +) => _EncryptedKeyGetPublicKeys( + publicKey: PublicKey.fromJson(json['public_key'] as String), +); Map _$EncryptedKeyGetPublicKeysToJson( - _EncryptedKeyGetPublicKeys instance) => - { - 'public_key': instance.publicKey.toJson(), - }; + _EncryptedKeyGetPublicKeys instance, +) => {'public_key': instance.publicKey.toJson()}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_password.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_password.freezed.dart index e5aaa33a..471447d4 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_password.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_password.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,53 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$EncryptedKeyPassword { - PublicKey get publicKey; - Password get password; - /// Create a copy of EncryptedKeyPassword - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $EncryptedKeyPasswordCopyWith get copyWith => - _$EncryptedKeyPasswordCopyWithImpl( - this as EncryptedKeyPassword, _$identity); + PublicKey get publicKey; Password get password; +/// Create a copy of EncryptedKeyPassword +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$EncryptedKeyPasswordCopyWith get copyWith => _$EncryptedKeyPasswordCopyWithImpl(this as EncryptedKeyPassword, _$identity); /// Serializes this EncryptedKeyPassword to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is EncryptedKeyPassword && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.password, password) || - other.password == password)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, publicKey, password); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is EncryptedKeyPassword&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.password, password) || other.password == password)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,publicKey,password); - @override - String toString() { - return 'EncryptedKeyPassword(publicKey: $publicKey, password: $password)'; - } +@override +String toString() { + return 'EncryptedKeyPassword(publicKey: $publicKey, password: $password)'; } -/// @nodoc -abstract mixin class $EncryptedKeyPasswordCopyWith<$Res> { - factory $EncryptedKeyPasswordCopyWith(EncryptedKeyPassword value, - $Res Function(EncryptedKeyPassword) _then) = - _$EncryptedKeyPasswordCopyWithImpl; - @useResult - $Res call({PublicKey publicKey, Password password}); - $PublicKeyCopyWith<$Res> get publicKey; - $PasswordCopyWith<$Res> get password; } +/// @nodoc +abstract mixin class $EncryptedKeyPasswordCopyWith<$Res> { + factory $EncryptedKeyPasswordCopyWith(EncryptedKeyPassword value, $Res Function(EncryptedKeyPassword) _then) = _$EncryptedKeyPasswordCopyWithImpl; +@useResult +$Res call({ + PublicKey publicKey, Password password +}); + + +$PublicKeyCopyWith<$Res> get publicKey;$PasswordCopyWith<$Res> get password; + +} /// @nodoc class _$EncryptedKeyPasswordCopyWithImpl<$Res> implements $EncryptedKeyPasswordCopyWith<$Res> { @@ -70,114 +63,217 @@ class _$EncryptedKeyPasswordCopyWithImpl<$Res> final EncryptedKeyPassword _self; final $Res Function(EncryptedKeyPassword) _then; - /// Create a copy of EncryptedKeyPassword - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? publicKey = null, - Object? password = null, - }) { - return _then(_self.copyWith( - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of EncryptedKeyPassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } - - /// Create a copy of EncryptedKeyPassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of EncryptedKeyPassword +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? publicKey = null,Object? password = null,}) { + return _then(_self.copyWith( +publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password, + )); +} +/// Create a copy of EncryptedKeyPassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of EncryptedKeyPassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [EncryptedKeyPassword]. +extension EncryptedKeyPasswordPatterns on EncryptedKeyPassword { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _EncryptedKeyPassword value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _EncryptedKeyPassword() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _EncryptedKeyPassword value) $default,){ +final _that = this; +switch (_that) { +case _EncryptedKeyPassword(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _EncryptedKeyPassword value)? $default,){ +final _that = this; +switch (_that) { +case _EncryptedKeyPassword() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PublicKey publicKey, Password password)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _EncryptedKeyPassword() when $default != null: +return $default(_that.publicKey,_that.password);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PublicKey publicKey, Password password) $default,) {final _that = this; +switch (_that) { +case _EncryptedKeyPassword(): +return $default(_that.publicKey,_that.password);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PublicKey publicKey, Password password)? $default,) {final _that = this; +switch (_that) { +case _EncryptedKeyPassword() when $default != null: +return $default(_that.publicKey,_that.password);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _EncryptedKeyPassword implements EncryptedKeyPassword { - const _EncryptedKeyPassword( - {required this.publicKey, required this.password}); - factory _EncryptedKeyPassword.fromJson(Map json) => - _$EncryptedKeyPasswordFromJson(json); - - @override - final PublicKey publicKey; - @override - final Password password; - - /// Create a copy of EncryptedKeyPassword - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$EncryptedKeyPasswordCopyWith<_EncryptedKeyPassword> get copyWith => - __$EncryptedKeyPasswordCopyWithImpl<_EncryptedKeyPassword>( - this, _$identity); - - @override - Map toJson() { - return _$EncryptedKeyPasswordToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _EncryptedKeyPassword && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.password, password) || - other.password == password)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, publicKey, password); - - @override - String toString() { - return 'EncryptedKeyPassword(publicKey: $publicKey, password: $password)'; - } + const _EncryptedKeyPassword({required this.publicKey, required this.password}); + factory _EncryptedKeyPassword.fromJson(Map json) => _$EncryptedKeyPasswordFromJson(json); + +@override final PublicKey publicKey; +@override final Password password; + +/// Create a copy of EncryptedKeyPassword +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$EncryptedKeyPasswordCopyWith<_EncryptedKeyPassword> get copyWith => __$EncryptedKeyPasswordCopyWithImpl<_EncryptedKeyPassword>(this, _$identity); + +@override +Map toJson() { + return _$EncryptedKeyPasswordToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _EncryptedKeyPassword&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.password, password) || other.password == password)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,publicKey,password); + +@override +String toString() { + return 'EncryptedKeyPassword(publicKey: $publicKey, password: $password)'; } -/// @nodoc -abstract mixin class _$EncryptedKeyPasswordCopyWith<$Res> - implements $EncryptedKeyPasswordCopyWith<$Res> { - factory _$EncryptedKeyPasswordCopyWith(_EncryptedKeyPassword value, - $Res Function(_EncryptedKeyPassword) _then) = - __$EncryptedKeyPasswordCopyWithImpl; - @override - @useResult - $Res call({PublicKey publicKey, Password password}); - @override - $PublicKeyCopyWith<$Res> get publicKey; - @override - $PasswordCopyWith<$Res> get password; } +/// @nodoc +abstract mixin class _$EncryptedKeyPasswordCopyWith<$Res> implements $EncryptedKeyPasswordCopyWith<$Res> { + factory _$EncryptedKeyPasswordCopyWith(_EncryptedKeyPassword value, $Res Function(_EncryptedKeyPassword) _then) = __$EncryptedKeyPasswordCopyWithImpl; +@override @useResult +$Res call({ + PublicKey publicKey, Password password +}); + + +@override $PublicKeyCopyWith<$Res> get publicKey;@override $PasswordCopyWith<$Res> get password; + +} /// @nodoc class __$EncryptedKeyPasswordCopyWithImpl<$Res> implements _$EncryptedKeyPasswordCopyWith<$Res> { @@ -186,45 +282,35 @@ class __$EncryptedKeyPasswordCopyWithImpl<$Res> final _EncryptedKeyPassword _self; final $Res Function(_EncryptedKeyPassword) _then; - /// Create a copy of EncryptedKeyPassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? publicKey = null, - Object? password = null, - }) { - return _then(_EncryptedKeyPassword( - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of EncryptedKeyPassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } - - /// Create a copy of EncryptedKeyPassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get password { - return $PasswordCopyWith<$Res>(_self.password, (value) { - return _then(_self.copyWith(password: value)); - }); - } +/// Create a copy of EncryptedKeyPassword +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? publicKey = null,Object? password = null,}) { + return _then(_EncryptedKeyPassword( +publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as Password, + )); +} + +/// Create a copy of EncryptedKeyPassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of EncryptedKeyPassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get password { + + return $PasswordCopyWith<$Res>(_self.password, (value) { + return _then(_self.copyWith(password: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_password.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_password.g.dart index 12601c65..4540d101 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_password.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_password.g.dart @@ -7,15 +7,15 @@ part of 'encrypted_key_password.dart'; // ************************************************************************** _EncryptedKeyPassword _$EncryptedKeyPasswordFromJson( - Map json) => - _EncryptedKeyPassword( - publicKey: PublicKey.fromJson(json['public_key'] as String), - password: Password.fromJson(json['password'] as Map), - ); + Map json, +) => _EncryptedKeyPassword( + publicKey: PublicKey.fromJson(json['public_key'] as String), + password: Password.fromJson(json['password'] as Map), +); Map _$EncryptedKeyPasswordToJson( - _EncryptedKeyPassword instance) => - { - 'public_key': instance.publicKey.toJson(), - 'password': instance.password.toJson(), - }; + _EncryptedKeyPassword instance, +) => { + 'public_key': instance.publicKey.toJson(), + 'password': instance.password.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params.dart index 6c686c90..3978fbcc 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params.dart @@ -11,8 +11,8 @@ sealed class EncryptedKeyUpdateParams with _$EncryptedKeyUpdateParams implements UpdateKeyInput { const factory EncryptedKeyUpdateParams.rename( - final EncryptedKeyUpdateParamsRename data) = - _EncryptedKeyUpdateParamsRename; + final EncryptedKeyUpdateParamsRename data, + ) = _EncryptedKeyUpdateParamsRename; const factory EncryptedKeyUpdateParams.changePassword( final EncryptedKeyUpdateParamsChangePassword data, diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params.freezed.dart index e7f769cc..a8fa487a 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -13,111 +12,244 @@ part of 'encrypted_key_update_params.dart'; // dart format off T _$identity(T value) => value; EncryptedKeyUpdateParams _$EncryptedKeyUpdateParamsFromJson( - Map json) { - switch (json['type']) { - case 'rename': - return _EncryptedKeyUpdateParamsRename.fromJson(json); - case 'change_password': - return _EncryptedKeyUpdateParamsChangePassword.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'type', 'EncryptedKeyUpdateParams', - 'Invalid union type "${json['type']}"!'); - } + Map json +) { + switch (json['type']) { + case 'rename': + return _EncryptedKeyUpdateParamsRename.fromJson( + json + ); + case 'change_password': + return _EncryptedKeyUpdateParamsChangePassword.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'EncryptedKeyUpdateParams', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$EncryptedKeyUpdateParams { - Object get data; + + Object get data; /// Serializes this EncryptedKeyUpdateParams to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is EncryptedKeyUpdateParams && - const DeepCollectionEquality().equals(other.data, data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(data)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is EncryptedKeyUpdateParams&&const DeepCollectionEquality().equals(other.data, data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(data)); + +@override +String toString() { + return 'EncryptedKeyUpdateParams(data: $data)'; +} + - @override - String toString() { - return 'EncryptedKeyUpdateParams(data: $data)'; - } } /// @nodoc -class $EncryptedKeyUpdateParamsCopyWith<$Res> { - $EncryptedKeyUpdateParamsCopyWith( - EncryptedKeyUpdateParams _, $Res Function(EncryptedKeyUpdateParams) __); +class $EncryptedKeyUpdateParamsCopyWith<$Res> { +$EncryptedKeyUpdateParamsCopyWith(EncryptedKeyUpdateParams _, $Res Function(EncryptedKeyUpdateParams) __); +} + + +/// Adds pattern-matching-related methods to [EncryptedKeyUpdateParams]. +extension EncryptedKeyUpdateParamsPatterns on EncryptedKeyUpdateParams { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( _EncryptedKeyUpdateParamsRename value)? rename,TResult Function( _EncryptedKeyUpdateParamsChangePassword value)? changePassword,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsRename() when rename != null: +return rename(_that);case _EncryptedKeyUpdateParamsChangePassword() when changePassword != null: +return changePassword(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( _EncryptedKeyUpdateParamsRename value) rename,required TResult Function( _EncryptedKeyUpdateParamsChangePassword value) changePassword,}){ +final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsRename(): +return rename(_that);case _EncryptedKeyUpdateParamsChangePassword(): +return changePassword(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( _EncryptedKeyUpdateParamsRename value)? rename,TResult? Function( _EncryptedKeyUpdateParamsChangePassword value)? changePassword,}){ +final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsRename() when rename != null: +return rename(_that);case _EncryptedKeyUpdateParamsChangePassword() when changePassword != null: +return changePassword(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( EncryptedKeyUpdateParamsRename data)? rename,TResult Function( EncryptedKeyUpdateParamsChangePassword data)? changePassword,required TResult orElse(),}) {final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsRename() when rename != null: +return rename(_that.data);case _EncryptedKeyUpdateParamsChangePassword() when changePassword != null: +return changePassword(_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( EncryptedKeyUpdateParamsRename data) rename,required TResult Function( EncryptedKeyUpdateParamsChangePassword data) changePassword,}) {final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsRename(): +return rename(_that.data);case _EncryptedKeyUpdateParamsChangePassword(): +return changePassword(_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( EncryptedKeyUpdateParamsRename data)? rename,TResult? Function( EncryptedKeyUpdateParamsChangePassword data)? changePassword,}) {final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsRename() when rename != null: +return rename(_that.data);case _EncryptedKeyUpdateParamsChangePassword() when changePassword != null: +return changePassword(_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _EncryptedKeyUpdateParamsRename implements EncryptedKeyUpdateParams { - const _EncryptedKeyUpdateParamsRename(this.data, {final String? $type}) - : $type = $type ?? 'rename'; - factory _EncryptedKeyUpdateParamsRename.fromJson(Map json) => - _$EncryptedKeyUpdateParamsRenameFromJson(json); - - @override - final EncryptedKeyUpdateParamsRename data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of EncryptedKeyUpdateParams - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$EncryptedKeyUpdateParamsRenameCopyWith<_EncryptedKeyUpdateParamsRename> - get copyWith => __$EncryptedKeyUpdateParamsRenameCopyWithImpl< - _EncryptedKeyUpdateParamsRename>(this, _$identity); - - @override - Map toJson() { - return _$EncryptedKeyUpdateParamsRenameToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _EncryptedKeyUpdateParamsRename && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'EncryptedKeyUpdateParams.rename(data: $data)'; - } + const _EncryptedKeyUpdateParamsRename(this.data, {final String? $type}): $type = $type ?? 'rename'; + factory _EncryptedKeyUpdateParamsRename.fromJson(Map json) => _$EncryptedKeyUpdateParamsRenameFromJson(json); + +@override final EncryptedKeyUpdateParamsRename data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of EncryptedKeyUpdateParams +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$EncryptedKeyUpdateParamsRenameCopyWith<_EncryptedKeyUpdateParamsRename> get copyWith => __$EncryptedKeyUpdateParamsRenameCopyWithImpl<_EncryptedKeyUpdateParamsRename>(this, _$identity); + +@override +Map toJson() { + return _$EncryptedKeyUpdateParamsRenameToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _EncryptedKeyUpdateParamsRename&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'EncryptedKeyUpdateParams.rename(data: $data)'; } -/// @nodoc -abstract mixin class _$EncryptedKeyUpdateParamsRenameCopyWith<$Res> - implements $EncryptedKeyUpdateParamsCopyWith<$Res> { - factory _$EncryptedKeyUpdateParamsRenameCopyWith( - _EncryptedKeyUpdateParamsRename value, - $Res Function(_EncryptedKeyUpdateParamsRename) _then) = - __$EncryptedKeyUpdateParamsRenameCopyWithImpl; - @useResult - $Res call({EncryptedKeyUpdateParamsRename data}); - $EncryptedKeyUpdateParamsRenameCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class _$EncryptedKeyUpdateParamsRenameCopyWith<$Res> implements $EncryptedKeyUpdateParamsCopyWith<$Res> { + factory _$EncryptedKeyUpdateParamsRenameCopyWith(_EncryptedKeyUpdateParamsRename value, $Res Function(_EncryptedKeyUpdateParamsRename) _then) = __$EncryptedKeyUpdateParamsRenameCopyWithImpl; +@useResult +$Res call({ + EncryptedKeyUpdateParamsRename data +}); + + +$EncryptedKeyUpdateParamsRenameCopyWith<$Res> get data; + +} /// @nodoc class __$EncryptedKeyUpdateParamsRenameCopyWithImpl<$Res> implements _$EncryptedKeyUpdateParamsRenameCopyWith<$Res> { @@ -126,95 +258,80 @@ class __$EncryptedKeyUpdateParamsRenameCopyWithImpl<$Res> final _EncryptedKeyUpdateParamsRename _self; final $Res Function(_EncryptedKeyUpdateParamsRename) _then; - /// Create a copy of EncryptedKeyUpdateParams - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(_EncryptedKeyUpdateParamsRename( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as EncryptedKeyUpdateParamsRename, - )); - } - - /// Create a copy of EncryptedKeyUpdateParams - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $EncryptedKeyUpdateParamsRenameCopyWith<$Res> get data { - return $EncryptedKeyUpdateParamsRenameCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of EncryptedKeyUpdateParams +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(_EncryptedKeyUpdateParamsRename( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as EncryptedKeyUpdateParamsRename, + )); +} + +/// Create a copy of EncryptedKeyUpdateParams +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$EncryptedKeyUpdateParamsRenameCopyWith<$Res> get data { + + return $EncryptedKeyUpdateParamsRenameCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() -class _EncryptedKeyUpdateParamsChangePassword - implements EncryptedKeyUpdateParams { - const _EncryptedKeyUpdateParamsChangePassword(this.data, - {final String? $type}) - : $type = $type ?? 'change_password'; - factory _EncryptedKeyUpdateParamsChangePassword.fromJson( - Map json) => - _$EncryptedKeyUpdateParamsChangePasswordFromJson(json); - - @override - final EncryptedKeyUpdateParamsChangePassword data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of EncryptedKeyUpdateParams - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$EncryptedKeyUpdateParamsChangePasswordCopyWith< - _EncryptedKeyUpdateParamsChangePassword> - get copyWith => __$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl< - _EncryptedKeyUpdateParamsChangePassword>(this, _$identity); - - @override - Map toJson() { - return _$EncryptedKeyUpdateParamsChangePasswordToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _EncryptedKeyUpdateParamsChangePassword && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'EncryptedKeyUpdateParams.changePassword(data: $data)'; - } + +class _EncryptedKeyUpdateParamsChangePassword implements EncryptedKeyUpdateParams { + const _EncryptedKeyUpdateParamsChangePassword(this.data, {final String? $type}): $type = $type ?? 'change_password'; + factory _EncryptedKeyUpdateParamsChangePassword.fromJson(Map json) => _$EncryptedKeyUpdateParamsChangePasswordFromJson(json); + +@override final EncryptedKeyUpdateParamsChangePassword data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of EncryptedKeyUpdateParams +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$EncryptedKeyUpdateParamsChangePasswordCopyWith<_EncryptedKeyUpdateParamsChangePassword> get copyWith => __$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl<_EncryptedKeyUpdateParamsChangePassword>(this, _$identity); + +@override +Map toJson() { + return _$EncryptedKeyUpdateParamsChangePasswordToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _EncryptedKeyUpdateParamsChangePassword&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'EncryptedKeyUpdateParams.changePassword(data: $data)'; } -/// @nodoc -abstract mixin class _$EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> - implements $EncryptedKeyUpdateParamsCopyWith<$Res> { - factory _$EncryptedKeyUpdateParamsChangePasswordCopyWith( - _EncryptedKeyUpdateParamsChangePassword value, - $Res Function(_EncryptedKeyUpdateParamsChangePassword) _then) = - __$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl; - @useResult - $Res call({EncryptedKeyUpdateParamsChangePassword data}); - $EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class _$EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> implements $EncryptedKeyUpdateParamsCopyWith<$Res> { + factory _$EncryptedKeyUpdateParamsChangePasswordCopyWith(_EncryptedKeyUpdateParamsChangePassword value, $Res Function(_EncryptedKeyUpdateParamsChangePassword) _then) = __$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl; +@useResult +$Res call({ + EncryptedKeyUpdateParamsChangePassword data +}); + + +$EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> get data; + +} /// @nodoc class __$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl<$Res> implements _$EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> { @@ -223,30 +340,25 @@ class __$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl<$Res> final _EncryptedKeyUpdateParamsChangePassword _self; final $Res Function(_EncryptedKeyUpdateParamsChangePassword) _then; - /// Create a copy of EncryptedKeyUpdateParams - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(_EncryptedKeyUpdateParamsChangePassword( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as EncryptedKeyUpdateParamsChangePassword, - )); - } - - /// Create a copy of EncryptedKeyUpdateParams - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> get data { - return $EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res>(_self.data, - (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of EncryptedKeyUpdateParams +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(_EncryptedKeyUpdateParamsChangePassword( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as EncryptedKeyUpdateParamsChangePassword, + )); +} + +/// Create a copy of EncryptedKeyUpdateParams +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> get data { + + return $EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params.g.dart index 0caa57ae..2865af7b 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params.g.dart @@ -7,32 +7,25 @@ part of 'encrypted_key_update_params.dart'; // ************************************************************************** _EncryptedKeyUpdateParamsRename _$EncryptedKeyUpdateParamsRenameFromJson( - Map json) => - _EncryptedKeyUpdateParamsRename( - EncryptedKeyUpdateParamsRename.fromJson( - json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => _EncryptedKeyUpdateParamsRename( + EncryptedKeyUpdateParamsRename.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$EncryptedKeyUpdateParamsRenameToJson( - _EncryptedKeyUpdateParamsRename instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + _EncryptedKeyUpdateParamsRename instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; _EncryptedKeyUpdateParamsChangePassword - _$EncryptedKeyUpdateParamsChangePasswordFromJson( - Map json) => - _EncryptedKeyUpdateParamsChangePassword( - EncryptedKeyUpdateParamsChangePassword.fromJson( - json['data'] as Map), - $type: json['type'] as String?, - ); +_$EncryptedKeyUpdateParamsChangePasswordFromJson(Map json) => + _EncryptedKeyUpdateParamsChangePassword( + EncryptedKeyUpdateParamsChangePassword.fromJson( + json['data'] as Map, + ), + $type: json['type'] as String?, + ); Map _$EncryptedKeyUpdateParamsChangePasswordToJson( - _EncryptedKeyUpdateParamsChangePassword instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + _EncryptedKeyUpdateParamsChangePassword instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_change_password.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_change_password.dart index 10c3222c..0af1f446 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_change_password.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_change_password.dart @@ -16,6 +16,6 @@ abstract class EncryptedKeyUpdateParamsChangePassword }) = _EncryptedKeyUpdateParamsChangePassword; factory EncryptedKeyUpdateParamsChangePassword.fromJson( - Map json) => - _$EncryptedKeyUpdateParamsChangePasswordFromJson(json); + Map json, + ) => _$EncryptedKeyUpdateParamsChangePasswordFromJson(json); } diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_change_password.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_change_password.freezed.dart index 3f4886bc..bb51092b 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_change_password.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_change_password.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,61 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$EncryptedKeyUpdateParamsChangePassword { - PublicKey get publicKey; - Password get oldPassword; - Password get newPassword; - - /// Create a copy of EncryptedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $EncryptedKeyUpdateParamsChangePasswordCopyWith< - EncryptedKeyUpdateParamsChangePassword> - get copyWith => _$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl< - EncryptedKeyUpdateParamsChangePassword>( - this as EncryptedKeyUpdateParamsChangePassword, _$identity); + + PublicKey get publicKey; Password get oldPassword; Password get newPassword; +/// Create a copy of EncryptedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$EncryptedKeyUpdateParamsChangePasswordCopyWith get copyWith => _$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl(this as EncryptedKeyUpdateParamsChangePassword, _$identity); /// Serializes this EncryptedKeyUpdateParamsChangePassword to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is EncryptedKeyUpdateParamsChangePassword && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.oldPassword, oldPassword) || - other.oldPassword == oldPassword) && - (identical(other.newPassword, newPassword) || - other.newPassword == newPassword)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, publicKey, oldPassword, newPassword); - - @override - String toString() { - return 'EncryptedKeyUpdateParamsChangePassword(publicKey: $publicKey, oldPassword: $oldPassword, newPassword: $newPassword)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is EncryptedKeyUpdateParamsChangePassword&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.oldPassword, oldPassword) || other.oldPassword == oldPassword)&&(identical(other.newPassword, newPassword) || other.newPassword == newPassword)); } -/// @nodoc -abstract mixin class $EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> { - factory $EncryptedKeyUpdateParamsChangePasswordCopyWith( - EncryptedKeyUpdateParamsChangePassword value, - $Res Function(EncryptedKeyUpdateParamsChangePassword) _then) = - _$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl; - @useResult - $Res call({PublicKey publicKey, Password oldPassword, Password newPassword}); - - $PublicKeyCopyWith<$Res> get publicKey; - $PasswordCopyWith<$Res> get oldPassword; - $PasswordCopyWith<$Res> get newPassword; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,publicKey,oldPassword,newPassword); + +@override +String toString() { + return 'EncryptedKeyUpdateParamsChangePassword(publicKey: $publicKey, oldPassword: $oldPassword, newPassword: $newPassword)'; +} + + } +/// @nodoc +abstract mixin class $EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> { + factory $EncryptedKeyUpdateParamsChangePasswordCopyWith(EncryptedKeyUpdateParamsChangePassword value, $Res Function(EncryptedKeyUpdateParamsChangePassword) _then) = _$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl; +@useResult +$Res call({ + PublicKey publicKey, Password oldPassword, Password newPassword +}); + + +$PublicKeyCopyWith<$Res> get publicKey;$PasswordCopyWith<$Res> get oldPassword;$PasswordCopyWith<$Res> get newPassword; + +} /// @nodoc class _$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl<$Res> implements $EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> { @@ -78,142 +63,228 @@ class _$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl<$Res> final EncryptedKeyUpdateParamsChangePassword _self; final $Res Function(EncryptedKeyUpdateParamsChangePassword) _then; - /// Create a copy of EncryptedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? publicKey = null, - Object? oldPassword = null, - Object? newPassword = null, - }) { - return _then(_self.copyWith( - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - oldPassword: null == oldPassword - ? _self.oldPassword - : oldPassword // ignore: cast_nullable_to_non_nullable - as Password, - newPassword: null == newPassword - ? _self.newPassword - : newPassword // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of EncryptedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } - - /// Create a copy of EncryptedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get oldPassword { - return $PasswordCopyWith<$Res>(_self.oldPassword, (value) { - return _then(_self.copyWith(oldPassword: value)); - }); - } - - /// Create a copy of EncryptedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get newPassword { - return $PasswordCopyWith<$Res>(_self.newPassword, (value) { - return _then(_self.copyWith(newPassword: value)); - }); - } +/// Create a copy of EncryptedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? publicKey = null,Object? oldPassword = null,Object? newPassword = null,}) { + return _then(_self.copyWith( +publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,oldPassword: null == oldPassword ? _self.oldPassword : oldPassword // ignore: cast_nullable_to_non_nullable +as Password,newPassword: null == newPassword ? _self.newPassword : newPassword // ignore: cast_nullable_to_non_nullable +as Password, + )); +} +/// Create a copy of EncryptedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of EncryptedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get oldPassword { + + return $PasswordCopyWith<$Res>(_self.oldPassword, (value) { + return _then(_self.copyWith(oldPassword: value)); + }); +}/// Create a copy of EncryptedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get newPassword { + + return $PasswordCopyWith<$Res>(_self.newPassword, (value) { + return _then(_self.copyWith(newPassword: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [EncryptedKeyUpdateParamsChangePassword]. +extension EncryptedKeyUpdateParamsChangePasswordPatterns on EncryptedKeyUpdateParamsChangePassword { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _EncryptedKeyUpdateParamsChangePassword value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsChangePassword() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _EncryptedKeyUpdateParamsChangePassword value) $default,){ +final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsChangePassword(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _EncryptedKeyUpdateParamsChangePassword value)? $default,){ +final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsChangePassword() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PublicKey publicKey, Password oldPassword, Password newPassword)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsChangePassword() when $default != null: +return $default(_that.publicKey,_that.oldPassword,_that.newPassword);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PublicKey publicKey, Password oldPassword, Password newPassword) $default,) {final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsChangePassword(): +return $default(_that.publicKey,_that.oldPassword,_that.newPassword);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PublicKey publicKey, Password oldPassword, Password newPassword)? $default,) {final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsChangePassword() when $default != null: +return $default(_that.publicKey,_that.oldPassword,_that.newPassword);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) -class _EncryptedKeyUpdateParamsChangePassword - implements EncryptedKeyUpdateParamsChangePassword { - const _EncryptedKeyUpdateParamsChangePassword( - {required this.publicKey, - required this.oldPassword, - required this.newPassword}); - factory _EncryptedKeyUpdateParamsChangePassword.fromJson( - Map json) => - _$EncryptedKeyUpdateParamsChangePasswordFromJson(json); - - @override - final PublicKey publicKey; - @override - final Password oldPassword; - @override - final Password newPassword; - - /// Create a copy of EncryptedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$EncryptedKeyUpdateParamsChangePasswordCopyWith< - _EncryptedKeyUpdateParamsChangePassword> - get copyWith => __$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl< - _EncryptedKeyUpdateParamsChangePassword>(this, _$identity); - - @override - Map toJson() { - return _$EncryptedKeyUpdateParamsChangePasswordToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _EncryptedKeyUpdateParamsChangePassword && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.oldPassword, oldPassword) || - other.oldPassword == oldPassword) && - (identical(other.newPassword, newPassword) || - other.newPassword == newPassword)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, publicKey, oldPassword, newPassword); - - @override - String toString() { - return 'EncryptedKeyUpdateParamsChangePassword(publicKey: $publicKey, oldPassword: $oldPassword, newPassword: $newPassword)'; - } +class _EncryptedKeyUpdateParamsChangePassword implements EncryptedKeyUpdateParamsChangePassword { + const _EncryptedKeyUpdateParamsChangePassword({required this.publicKey, required this.oldPassword, required this.newPassword}); + factory _EncryptedKeyUpdateParamsChangePassword.fromJson(Map json) => _$EncryptedKeyUpdateParamsChangePasswordFromJson(json); + +@override final PublicKey publicKey; +@override final Password oldPassword; +@override final Password newPassword; + +/// Create a copy of EncryptedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$EncryptedKeyUpdateParamsChangePasswordCopyWith<_EncryptedKeyUpdateParamsChangePassword> get copyWith => __$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl<_EncryptedKeyUpdateParamsChangePassword>(this, _$identity); + +@override +Map toJson() { + return _$EncryptedKeyUpdateParamsChangePasswordToJson(this, ); } -/// @nodoc -abstract mixin class _$EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> - implements $EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> { - factory _$EncryptedKeyUpdateParamsChangePasswordCopyWith( - _EncryptedKeyUpdateParamsChangePassword value, - $Res Function(_EncryptedKeyUpdateParamsChangePassword) _then) = - __$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl; - @override - @useResult - $Res call({PublicKey publicKey, Password oldPassword, Password newPassword}); - - @override - $PublicKeyCopyWith<$Res> get publicKey; - @override - $PasswordCopyWith<$Res> get oldPassword; - @override - $PasswordCopyWith<$Res> get newPassword; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _EncryptedKeyUpdateParamsChangePassword&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.oldPassword, oldPassword) || other.oldPassword == oldPassword)&&(identical(other.newPassword, newPassword) || other.newPassword == newPassword)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,publicKey,oldPassword,newPassword); + +@override +String toString() { + return 'EncryptedKeyUpdateParamsChangePassword(publicKey: $publicKey, oldPassword: $oldPassword, newPassword: $newPassword)'; +} + + } +/// @nodoc +abstract mixin class _$EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> implements $EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> { + factory _$EncryptedKeyUpdateParamsChangePasswordCopyWith(_EncryptedKeyUpdateParamsChangePassword value, $Res Function(_EncryptedKeyUpdateParamsChangePassword) _then) = __$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl; +@override @useResult +$Res call({ + PublicKey publicKey, Password oldPassword, Password newPassword +}); + + +@override $PublicKeyCopyWith<$Res> get publicKey;@override $PasswordCopyWith<$Res> get oldPassword;@override $PasswordCopyWith<$Res> get newPassword; + +} /// @nodoc class __$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl<$Res> implements _$EncryptedKeyUpdateParamsChangePasswordCopyWith<$Res> { @@ -222,60 +293,45 @@ class __$EncryptedKeyUpdateParamsChangePasswordCopyWithImpl<$Res> final _EncryptedKeyUpdateParamsChangePassword _self; final $Res Function(_EncryptedKeyUpdateParamsChangePassword) _then; - /// Create a copy of EncryptedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? publicKey = null, - Object? oldPassword = null, - Object? newPassword = null, - }) { - return _then(_EncryptedKeyUpdateParamsChangePassword( - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - oldPassword: null == oldPassword - ? _self.oldPassword - : oldPassword // ignore: cast_nullable_to_non_nullable - as Password, - newPassword: null == newPassword - ? _self.newPassword - : newPassword // ignore: cast_nullable_to_non_nullable - as Password, - )); - } - - /// Create a copy of EncryptedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } - - /// Create a copy of EncryptedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get oldPassword { - return $PasswordCopyWith<$Res>(_self.oldPassword, (value) { - return _then(_self.copyWith(oldPassword: value)); - }); - } - - /// Create a copy of EncryptedKeyUpdateParamsChangePassword - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCopyWith<$Res> get newPassword { - return $PasswordCopyWith<$Res>(_self.newPassword, (value) { - return _then(_self.copyWith(newPassword: value)); - }); - } +/// Create a copy of EncryptedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? publicKey = null,Object? oldPassword = null,Object? newPassword = null,}) { + return _then(_EncryptedKeyUpdateParamsChangePassword( +publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,oldPassword: null == oldPassword ? _self.oldPassword : oldPassword // ignore: cast_nullable_to_non_nullable +as Password,newPassword: null == newPassword ? _self.newPassword : newPassword // ignore: cast_nullable_to_non_nullable +as Password, + )); +} + +/// Create a copy of EncryptedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of EncryptedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get oldPassword { + + return $PasswordCopyWith<$Res>(_self.oldPassword, (value) { + return _then(_self.copyWith(oldPassword: value)); + }); +}/// Create a copy of EncryptedKeyUpdateParamsChangePassword +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCopyWith<$Res> get newPassword { + + return $PasswordCopyWith<$Res>(_self.newPassword, (value) { + return _then(_self.copyWith(newPassword: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_change_password.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_change_password.g.dart index 9b9644d1..1d71fc20 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_change_password.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_change_password.g.dart @@ -7,20 +7,18 @@ part of 'encrypted_key_update_params_change_password.dart'; // ************************************************************************** _EncryptedKeyUpdateParamsChangePassword - _$EncryptedKeyUpdateParamsChangePasswordFromJson( - Map json) => - _EncryptedKeyUpdateParamsChangePassword( - publicKey: PublicKey.fromJson(json['public_key'] as String), - oldPassword: - Password.fromJson(json['old_password'] as Map), - newPassword: - Password.fromJson(json['new_password'] as Map), - ); +_$EncryptedKeyUpdateParamsChangePasswordFromJson( + Map json, +) => _EncryptedKeyUpdateParamsChangePassword( + publicKey: PublicKey.fromJson(json['public_key'] as String), + oldPassword: Password.fromJson(json['old_password'] as Map), + newPassword: Password.fromJson(json['new_password'] as Map), +); Map _$EncryptedKeyUpdateParamsChangePasswordToJson( - _EncryptedKeyUpdateParamsChangePassword instance) => - { - 'public_key': instance.publicKey.toJson(), - 'old_password': instance.oldPassword.toJson(), - 'new_password': instance.newPassword.toJson(), - }; + _EncryptedKeyUpdateParamsChangePassword instance, +) => { + 'public_key': instance.publicKey.toJson(), + 'old_password': instance.oldPassword.toJson(), + 'new_password': instance.newPassword.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_rename.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_rename.freezed.dart index 48081c4f..0243a01f 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_rename.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_rename.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,53 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$EncryptedKeyUpdateParamsRename { - PublicKey get publicKey; - String get name; - - /// Create a copy of EncryptedKeyUpdateParamsRename - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $EncryptedKeyUpdateParamsRenameCopyWith - get copyWith => _$EncryptedKeyUpdateParamsRenameCopyWithImpl< - EncryptedKeyUpdateParamsRename>( - this as EncryptedKeyUpdateParamsRename, _$identity); + + PublicKey get publicKey; String get name; +/// Create a copy of EncryptedKeyUpdateParamsRename +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$EncryptedKeyUpdateParamsRenameCopyWith get copyWith => _$EncryptedKeyUpdateParamsRenameCopyWithImpl(this as EncryptedKeyUpdateParamsRename, _$identity); /// Serializes this EncryptedKeyUpdateParamsRename to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is EncryptedKeyUpdateParamsRename && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.name, name) || other.name == name)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, publicKey, name); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is EncryptedKeyUpdateParamsRename&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.name, name) || other.name == name)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,publicKey,name); - @override - String toString() { - return 'EncryptedKeyUpdateParamsRename(publicKey: $publicKey, name: $name)'; - } +@override +String toString() { + return 'EncryptedKeyUpdateParamsRename(publicKey: $publicKey, name: $name)'; } -/// @nodoc -abstract mixin class $EncryptedKeyUpdateParamsRenameCopyWith<$Res> { - factory $EncryptedKeyUpdateParamsRenameCopyWith( - EncryptedKeyUpdateParamsRename value, - $Res Function(EncryptedKeyUpdateParamsRename) _then) = - _$EncryptedKeyUpdateParamsRenameCopyWithImpl; - @useResult - $Res call({PublicKey publicKey, String name}); - $PublicKeyCopyWith<$Res> get publicKey; } +/// @nodoc +abstract mixin class $EncryptedKeyUpdateParamsRenameCopyWith<$Res> { + factory $EncryptedKeyUpdateParamsRenameCopyWith(EncryptedKeyUpdateParamsRename value, $Res Function(EncryptedKeyUpdateParamsRename) _then) = _$EncryptedKeyUpdateParamsRenameCopyWithImpl; +@useResult +$Res call({ + PublicKey publicKey, String name +}); + + +$PublicKeyCopyWith<$Res> get publicKey; + +} /// @nodoc class _$EncryptedKeyUpdateParamsRenameCopyWithImpl<$Res> implements $EncryptedKeyUpdateParamsRenameCopyWith<$Res> { @@ -70,103 +63,208 @@ class _$EncryptedKeyUpdateParamsRenameCopyWithImpl<$Res> final EncryptedKeyUpdateParamsRename _self; final $Res Function(EncryptedKeyUpdateParamsRename) _then; - /// Create a copy of EncryptedKeyUpdateParamsRename - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? publicKey = null, - Object? name = null, - }) { - return _then(_self.copyWith( - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of EncryptedKeyUpdateParamsRename - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } +/// Create a copy of EncryptedKeyUpdateParamsRename +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? publicKey = null,Object? name = null,}) { + return _then(_self.copyWith( +publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String, + )); +} +/// Create a copy of EncryptedKeyUpdateParamsRename +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [EncryptedKeyUpdateParamsRename]. +extension EncryptedKeyUpdateParamsRenamePatterns on EncryptedKeyUpdateParamsRename { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _EncryptedKeyUpdateParamsRename value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsRename() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _EncryptedKeyUpdateParamsRename value) $default,){ +final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsRename(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _EncryptedKeyUpdateParamsRename value)? $default,){ +final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsRename() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PublicKey publicKey, String name)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsRename() when $default != null: +return $default(_that.publicKey,_that.name);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PublicKey publicKey, String name) $default,) {final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsRename(): +return $default(_that.publicKey,_that.name);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PublicKey publicKey, String name)? $default,) {final _that = this; +switch (_that) { +case _EncryptedKeyUpdateParamsRename() when $default != null: +return $default(_that.publicKey,_that.name);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) -class _EncryptedKeyUpdateParamsRename - implements EncryptedKeyUpdateParamsRename { - const _EncryptedKeyUpdateParamsRename( - {required this.publicKey, required this.name}); - factory _EncryptedKeyUpdateParamsRename.fromJson(Map json) => - _$EncryptedKeyUpdateParamsRenameFromJson(json); - - @override - final PublicKey publicKey; - @override - final String name; - - /// Create a copy of EncryptedKeyUpdateParamsRename - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$EncryptedKeyUpdateParamsRenameCopyWith<_EncryptedKeyUpdateParamsRename> - get copyWith => __$EncryptedKeyUpdateParamsRenameCopyWithImpl< - _EncryptedKeyUpdateParamsRename>(this, _$identity); - - @override - Map toJson() { - return _$EncryptedKeyUpdateParamsRenameToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _EncryptedKeyUpdateParamsRename && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.name, name) || other.name == name)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, publicKey, name); - - @override - String toString() { - return 'EncryptedKeyUpdateParamsRename(publicKey: $publicKey, name: $name)'; - } +class _EncryptedKeyUpdateParamsRename implements EncryptedKeyUpdateParamsRename { + const _EncryptedKeyUpdateParamsRename({required this.publicKey, required this.name}); + factory _EncryptedKeyUpdateParamsRename.fromJson(Map json) => _$EncryptedKeyUpdateParamsRenameFromJson(json); + +@override final PublicKey publicKey; +@override final String name; + +/// Create a copy of EncryptedKeyUpdateParamsRename +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$EncryptedKeyUpdateParamsRenameCopyWith<_EncryptedKeyUpdateParamsRename> get copyWith => __$EncryptedKeyUpdateParamsRenameCopyWithImpl<_EncryptedKeyUpdateParamsRename>(this, _$identity); + +@override +Map toJson() { + return _$EncryptedKeyUpdateParamsRenameToJson(this, ); } -/// @nodoc -abstract mixin class _$EncryptedKeyUpdateParamsRenameCopyWith<$Res> - implements $EncryptedKeyUpdateParamsRenameCopyWith<$Res> { - factory _$EncryptedKeyUpdateParamsRenameCopyWith( - _EncryptedKeyUpdateParamsRename value, - $Res Function(_EncryptedKeyUpdateParamsRename) _then) = - __$EncryptedKeyUpdateParamsRenameCopyWithImpl; - @override - @useResult - $Res call({PublicKey publicKey, String name}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _EncryptedKeyUpdateParamsRename&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.name, name) || other.name == name)); +} - @override - $PublicKeyCopyWith<$Res> get publicKey; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,publicKey,name); + +@override +String toString() { + return 'EncryptedKeyUpdateParamsRename(publicKey: $publicKey, name: $name)'; } + +} + +/// @nodoc +abstract mixin class _$EncryptedKeyUpdateParamsRenameCopyWith<$Res> implements $EncryptedKeyUpdateParamsRenameCopyWith<$Res> { + factory _$EncryptedKeyUpdateParamsRenameCopyWith(_EncryptedKeyUpdateParamsRename value, $Res Function(_EncryptedKeyUpdateParamsRename) _then) = __$EncryptedKeyUpdateParamsRenameCopyWithImpl; +@override @useResult +$Res call({ + PublicKey publicKey, String name +}); + + +@override $PublicKeyCopyWith<$Res> get publicKey; + +} /// @nodoc class __$EncryptedKeyUpdateParamsRenameCopyWithImpl<$Res> implements _$EncryptedKeyUpdateParamsRenameCopyWith<$Res> { @@ -175,35 +273,26 @@ class __$EncryptedKeyUpdateParamsRenameCopyWithImpl<$Res> final _EncryptedKeyUpdateParamsRename _self; final $Res Function(_EncryptedKeyUpdateParamsRename) _then; - /// Create a copy of EncryptedKeyUpdateParamsRename - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? publicKey = null, - Object? name = null, - }) { - return _then(_EncryptedKeyUpdateParamsRename( - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of EncryptedKeyUpdateParamsRename - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } +/// Create a copy of EncryptedKeyUpdateParamsRename +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? publicKey = null,Object? name = null,}) { + return _then(_EncryptedKeyUpdateParamsRename( +publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +/// Create a copy of EncryptedKeyUpdateParamsRename +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_rename.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_rename.g.dart index c573dc39..408e31c6 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_rename.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/encrypted_key/encrypted_key_update_params_rename.g.dart @@ -7,15 +7,15 @@ part of 'encrypted_key_update_params_rename.dart'; // ************************************************************************** _EncryptedKeyUpdateParamsRename _$EncryptedKeyUpdateParamsRenameFromJson( - Map json) => - _EncryptedKeyUpdateParamsRename( - publicKey: PublicKey.fromJson(json['public_key'] as String), - name: json['name'] as String, - ); + Map json, +) => _EncryptedKeyUpdateParamsRename( + publicKey: PublicKey.fromJson(json['public_key'] as String), + name: json['name'] as String, +); Map _$EncryptedKeyUpdateParamsRenameToJson( - _EncryptedKeyUpdateParamsRename instance) => - { - 'public_key': instance.publicKey.toJson(), - 'name': instance.name, - }; + _EncryptedKeyUpdateParamsRename instance, +) => { + 'public_key': instance.publicKey.toJson(), + 'name': instance.name, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_create_input.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_create_input.freezed.dart index d3af0d77..f2c6a3fa 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_create_input.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_create_input.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,49 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$LedgerKeyCreateInput { - String? get name; - int get accountId; - /// Create a copy of LedgerKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $LedgerKeyCreateInputCopyWith get copyWith => - _$LedgerKeyCreateInputCopyWithImpl( - this as LedgerKeyCreateInput, _$identity); + String? get name; int get accountId; +/// Create a copy of LedgerKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$LedgerKeyCreateInputCopyWith get copyWith => _$LedgerKeyCreateInputCopyWithImpl(this as LedgerKeyCreateInput, _$identity); /// Serializes this LedgerKeyCreateInput to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is LedgerKeyCreateInput && - (identical(other.name, name) || other.name == name) && - (identical(other.accountId, accountId) || - other.accountId == accountId)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, name, accountId); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LedgerKeyCreateInput&&(identical(other.name, name) || other.name == name)&&(identical(other.accountId, accountId) || other.accountId == accountId)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,accountId); + +@override +String toString() { + return 'LedgerKeyCreateInput(name: $name, accountId: $accountId)'; +} + - @override - String toString() { - return 'LedgerKeyCreateInput(name: $name, accountId: $accountId)'; - } } /// @nodoc -abstract mixin class $LedgerKeyCreateInputCopyWith<$Res> { - factory $LedgerKeyCreateInputCopyWith(LedgerKeyCreateInput value, - $Res Function(LedgerKeyCreateInput) _then) = - _$LedgerKeyCreateInputCopyWithImpl; - @useResult - $Res call({String? name, int accountId}); -} +abstract mixin class $LedgerKeyCreateInputCopyWith<$Res> { + factory $LedgerKeyCreateInputCopyWith(LedgerKeyCreateInput value, $Res Function(LedgerKeyCreateInput) _then) = _$LedgerKeyCreateInputCopyWithImpl; +@useResult +$Res call({ + String? name, int accountId +}); + + + +} /// @nodoc class _$LedgerKeyCreateInputCopyWithImpl<$Res> implements $LedgerKeyCreateInputCopyWith<$Res> { @@ -66,25 +63,147 @@ class _$LedgerKeyCreateInputCopyWithImpl<$Res> final LedgerKeyCreateInput _self; final $Res Function(LedgerKeyCreateInput) _then; - /// Create a copy of LedgerKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = freezed, - Object? accountId = null, - }) { - return _then(_self.copyWith( - name: freezed == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - accountId: null == accountId - ? _self.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of LedgerKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? name = freezed,Object? accountId = null,}) { + return _then(_self.copyWith( +name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [LedgerKeyCreateInput]. +extension LedgerKeyCreateInputPatterns on LedgerKeyCreateInput { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LedgerKeyCreateInput value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LedgerKeyCreateInput() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LedgerKeyCreateInput value) $default,){ +final _that = this; +switch (_that) { +case _LedgerKeyCreateInput(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LedgerKeyCreateInput value)? $default,){ +final _that = this; +switch (_that) { +case _LedgerKeyCreateInput() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String? name, int accountId)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LedgerKeyCreateInput() when $default != null: +return $default(_that.name,_that.accountId);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String? name, int accountId) $default,) {final _that = this; +switch (_that) { +case _LedgerKeyCreateInput(): +return $default(_that.name,_that.accountId);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? name, int accountId)? $default,) {final _that = this; +switch (_that) { +case _LedgerKeyCreateInput() when $default != null: +return $default(_that.name,_that.accountId);case _: + return null; + +} +} + } /// @nodoc @@ -92,61 +211,51 @@ class _$LedgerKeyCreateInputCopyWithImpl<$Res> @JsonSerializable(fieldRename: FieldRename.snake) class _LedgerKeyCreateInput implements LedgerKeyCreateInput { const _LedgerKeyCreateInput({this.name, required this.accountId}); - factory _LedgerKeyCreateInput.fromJson(Map json) => - _$LedgerKeyCreateInputFromJson(json); - - @override - final String? name; - @override - final int accountId; - - /// Create a copy of LedgerKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$LedgerKeyCreateInputCopyWith<_LedgerKeyCreateInput> get copyWith => - __$LedgerKeyCreateInputCopyWithImpl<_LedgerKeyCreateInput>( - this, _$identity); - - @override - Map toJson() { - return _$LedgerKeyCreateInputToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _LedgerKeyCreateInput && - (identical(other.name, name) || other.name == name) && - (identical(other.accountId, accountId) || - other.accountId == accountId)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, name, accountId); - - @override - String toString() { - return 'LedgerKeyCreateInput(name: $name, accountId: $accountId)'; - } + factory _LedgerKeyCreateInput.fromJson(Map json) => _$LedgerKeyCreateInputFromJson(json); + +@override final String? name; +@override final int accountId; + +/// Create a copy of LedgerKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LedgerKeyCreateInputCopyWith<_LedgerKeyCreateInput> get copyWith => __$LedgerKeyCreateInputCopyWithImpl<_LedgerKeyCreateInput>(this, _$identity); + +@override +Map toJson() { + return _$LedgerKeyCreateInputToJson(this, ); } -/// @nodoc -abstract mixin class _$LedgerKeyCreateInputCopyWith<$Res> - implements $LedgerKeyCreateInputCopyWith<$Res> { - factory _$LedgerKeyCreateInputCopyWith(_LedgerKeyCreateInput value, - $Res Function(_LedgerKeyCreateInput) _then) = - __$LedgerKeyCreateInputCopyWithImpl; - @override - @useResult - $Res call({String? name, int accountId}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LedgerKeyCreateInput&&(identical(other.name, name) || other.name == name)&&(identical(other.accountId, accountId) || other.accountId == accountId)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,accountId); + +@override +String toString() { + return 'LedgerKeyCreateInput(name: $name, accountId: $accountId)'; +} + + } +/// @nodoc +abstract mixin class _$LedgerKeyCreateInputCopyWith<$Res> implements $LedgerKeyCreateInputCopyWith<$Res> { + factory _$LedgerKeyCreateInputCopyWith(_LedgerKeyCreateInput value, $Res Function(_LedgerKeyCreateInput) _then) = __$LedgerKeyCreateInputCopyWithImpl; +@override @useResult +$Res call({ + String? name, int accountId +}); + + + + +} /// @nodoc class __$LedgerKeyCreateInputCopyWithImpl<$Res> implements _$LedgerKeyCreateInputCopyWith<$Res> { @@ -155,25 +264,17 @@ class __$LedgerKeyCreateInputCopyWithImpl<$Res> final _LedgerKeyCreateInput _self; final $Res Function(_LedgerKeyCreateInput) _then; - /// Create a copy of LedgerKeyCreateInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? name = freezed, - Object? accountId = null, - }) { - return _then(_LedgerKeyCreateInput( - name: freezed == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - accountId: null == accountId - ? _self.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of LedgerKeyCreateInput +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? name = freezed,Object? accountId = null,}) { + return _then(_LedgerKeyCreateInput( +name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_create_input.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_create_input.g.dart index 59a95cc8..b98af2e8 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_create_input.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_create_input.g.dart @@ -7,15 +7,12 @@ part of 'ledger_key_create_input.dart'; // ************************************************************************** _LedgerKeyCreateInput _$LedgerKeyCreateInputFromJson( - Map json) => - _LedgerKeyCreateInput( - name: json['name'] as String?, - accountId: (json['account_id'] as num).toInt(), - ); + Map json, +) => _LedgerKeyCreateInput( + name: json['name'] as String?, + accountId: (json['account_id'] as num).toInt(), +); Map _$LedgerKeyCreateInputToJson( - _LedgerKeyCreateInput instance) => - { - 'name': instance.name, - 'account_id': instance.accountId, - }; + _LedgerKeyCreateInput instance, +) => {'name': instance.name, 'account_id': instance.accountId}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_get_public_keys.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_get_public_keys.freezed.dart index 0a6c95f0..f0d41116 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_get_public_keys.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_get_public_keys.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,48 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$LedgerKeyGetPublicKeys { - int get offset; - int get limit; - /// Create a copy of LedgerKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $LedgerKeyGetPublicKeysCopyWith get copyWith => - _$LedgerKeyGetPublicKeysCopyWithImpl( - this as LedgerKeyGetPublicKeys, _$identity); + int get offset; int get limit; +/// Create a copy of LedgerKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$LedgerKeyGetPublicKeysCopyWith get copyWith => _$LedgerKeyGetPublicKeysCopyWithImpl(this as LedgerKeyGetPublicKeys, _$identity); /// Serializes this LedgerKeyGetPublicKeys to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is LedgerKeyGetPublicKeys && - (identical(other.offset, offset) || other.offset == offset) && - (identical(other.limit, limit) || other.limit == limit)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, offset, limit); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LedgerKeyGetPublicKeys&&(identical(other.offset, offset) || other.offset == offset)&&(identical(other.limit, limit) || other.limit == limit)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,offset,limit); + +@override +String toString() { + return 'LedgerKeyGetPublicKeys(offset: $offset, limit: $limit)'; +} + - @override - String toString() { - return 'LedgerKeyGetPublicKeys(offset: $offset, limit: $limit)'; - } } /// @nodoc -abstract mixin class $LedgerKeyGetPublicKeysCopyWith<$Res> { - factory $LedgerKeyGetPublicKeysCopyWith(LedgerKeyGetPublicKeys value, - $Res Function(LedgerKeyGetPublicKeys) _then) = - _$LedgerKeyGetPublicKeysCopyWithImpl; - @useResult - $Res call({int offset, int limit}); -} +abstract mixin class $LedgerKeyGetPublicKeysCopyWith<$Res> { + factory $LedgerKeyGetPublicKeysCopyWith(LedgerKeyGetPublicKeys value, $Res Function(LedgerKeyGetPublicKeys) _then) = _$LedgerKeyGetPublicKeysCopyWithImpl; +@useResult +$Res call({ + int offset, int limit +}); + + + +} /// @nodoc class _$LedgerKeyGetPublicKeysCopyWithImpl<$Res> implements $LedgerKeyGetPublicKeysCopyWith<$Res> { @@ -65,85 +63,199 @@ class _$LedgerKeyGetPublicKeysCopyWithImpl<$Res> final LedgerKeyGetPublicKeys _self; final $Res Function(LedgerKeyGetPublicKeys) _then; - /// Create a copy of LedgerKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? offset = null, - Object? limit = null, - }) { - return _then(_self.copyWith( - offset: null == offset - ? _self.offset - : offset // ignore: cast_nullable_to_non_nullable - as int, - limit: null == limit - ? _self.limit - : limit // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of LedgerKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? offset = null,Object? limit = null,}) { + return _then(_self.copyWith( +offset: null == offset ? _self.offset : offset // ignore: cast_nullable_to_non_nullable +as int,limit: null == limit ? _self.limit : limit // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [LedgerKeyGetPublicKeys]. +extension LedgerKeyGetPublicKeysPatterns on LedgerKeyGetPublicKeys { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LedgerKeyGetPublicKeys value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LedgerKeyGetPublicKeys() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LedgerKeyGetPublicKeys value) $default,){ +final _that = this; +switch (_that) { +case _LedgerKeyGetPublicKeys(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LedgerKeyGetPublicKeys value)? $default,){ +final _that = this; +switch (_that) { +case _LedgerKeyGetPublicKeys() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int offset, int limit)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LedgerKeyGetPublicKeys() when $default != null: +return $default(_that.offset,_that.limit);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int offset, int limit) $default,) {final _that = this; +switch (_that) { +case _LedgerKeyGetPublicKeys(): +return $default(_that.offset,_that.limit);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int offset, int limit)? $default,) {final _that = this; +switch (_that) { +case _LedgerKeyGetPublicKeys() when $default != null: +return $default(_that.offset,_that.limit);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _LedgerKeyGetPublicKeys implements LedgerKeyGetPublicKeys { const _LedgerKeyGetPublicKeys({required this.offset, required this.limit}); - factory _LedgerKeyGetPublicKeys.fromJson(Map json) => - _$LedgerKeyGetPublicKeysFromJson(json); - - @override - final int offset; - @override - final int limit; - - /// Create a copy of LedgerKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$LedgerKeyGetPublicKeysCopyWith<_LedgerKeyGetPublicKeys> get copyWith => - __$LedgerKeyGetPublicKeysCopyWithImpl<_LedgerKeyGetPublicKeys>( - this, _$identity); - - @override - Map toJson() { - return _$LedgerKeyGetPublicKeysToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _LedgerKeyGetPublicKeys && - (identical(other.offset, offset) || other.offset == offset) && - (identical(other.limit, limit) || other.limit == limit)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, offset, limit); - - @override - String toString() { - return 'LedgerKeyGetPublicKeys(offset: $offset, limit: $limit)'; - } + factory _LedgerKeyGetPublicKeys.fromJson(Map json) => _$LedgerKeyGetPublicKeysFromJson(json); + +@override final int offset; +@override final int limit; + +/// Create a copy of LedgerKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LedgerKeyGetPublicKeysCopyWith<_LedgerKeyGetPublicKeys> get copyWith => __$LedgerKeyGetPublicKeysCopyWithImpl<_LedgerKeyGetPublicKeys>(this, _$identity); + +@override +Map toJson() { + return _$LedgerKeyGetPublicKeysToJson(this, ); } -/// @nodoc -abstract mixin class _$LedgerKeyGetPublicKeysCopyWith<$Res> - implements $LedgerKeyGetPublicKeysCopyWith<$Res> { - factory _$LedgerKeyGetPublicKeysCopyWith(_LedgerKeyGetPublicKeys value, - $Res Function(_LedgerKeyGetPublicKeys) _then) = - __$LedgerKeyGetPublicKeysCopyWithImpl; - @override - @useResult - $Res call({int offset, int limit}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LedgerKeyGetPublicKeys&&(identical(other.offset, offset) || other.offset == offset)&&(identical(other.limit, limit) || other.limit == limit)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,offset,limit); + +@override +String toString() { + return 'LedgerKeyGetPublicKeys(offset: $offset, limit: $limit)'; +} + + } +/// @nodoc +abstract mixin class _$LedgerKeyGetPublicKeysCopyWith<$Res> implements $LedgerKeyGetPublicKeysCopyWith<$Res> { + factory _$LedgerKeyGetPublicKeysCopyWith(_LedgerKeyGetPublicKeys value, $Res Function(_LedgerKeyGetPublicKeys) _then) = __$LedgerKeyGetPublicKeysCopyWithImpl; +@override @useResult +$Res call({ + int offset, int limit +}); + + + + +} /// @nodoc class __$LedgerKeyGetPublicKeysCopyWithImpl<$Res> implements _$LedgerKeyGetPublicKeysCopyWith<$Res> { @@ -152,25 +264,17 @@ class __$LedgerKeyGetPublicKeysCopyWithImpl<$Res> final _LedgerKeyGetPublicKeys _self; final $Res Function(_LedgerKeyGetPublicKeys) _then; - /// Create a copy of LedgerKeyGetPublicKeys - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? offset = null, - Object? limit = null, - }) { - return _then(_LedgerKeyGetPublicKeys( - offset: null == offset - ? _self.offset - : offset // ignore: cast_nullable_to_non_nullable - as int, - limit: null == limit - ? _self.limit - : limit // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of LedgerKeyGetPublicKeys +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? offset = null,Object? limit = null,}) { + return _then(_LedgerKeyGetPublicKeys( +offset: null == offset ? _self.offset : offset // ignore: cast_nullable_to_non_nullable +as int,limit: null == limit ? _self.limit : limit // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_get_public_keys.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_get_public_keys.g.dart index 6b7499ca..a8796eab 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_get_public_keys.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_key_get_public_keys.g.dart @@ -7,15 +7,12 @@ part of 'ledger_key_get_public_keys.dart'; // ************************************************************************** _LedgerKeyGetPublicKeys _$LedgerKeyGetPublicKeysFromJson( - Map json) => - _LedgerKeyGetPublicKeys( - offset: (json['offset'] as num).toInt(), - limit: (json['limit'] as num).toInt(), - ); + Map json, +) => _LedgerKeyGetPublicKeys( + offset: (json['offset'] as num).toInt(), + limit: (json['limit'] as num).toInt(), +); Map _$LedgerKeyGetPublicKeysToJson( - _LedgerKeyGetPublicKeys instance) => - { - 'offset': instance.offset, - 'limit': instance.limit, - }; + _LedgerKeyGetPublicKeys instance, +) => {'offset': instance.offset, 'limit': instance.limit}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_sign_input.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_sign_input.freezed.dart index a6483084..ca8bbdb7 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_sign_input.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_sign_input.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,58 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$LedgerSignInput { - WalletType get wallet; - PublicKey get publicKey; - LedgerSignatureContext? get context; - - /// Create a copy of LedgerSignInput - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $LedgerSignInputCopyWith get copyWith => - _$LedgerSignInputCopyWithImpl( - this as LedgerSignInput, _$identity); + + WalletType get wallet; PublicKey get publicKey; LedgerSignatureContext? get context; +/// Create a copy of LedgerSignInput +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$LedgerSignInputCopyWith get copyWith => _$LedgerSignInputCopyWithImpl(this as LedgerSignInput, _$identity); /// Serializes this LedgerSignInput to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is LedgerSignInput && - (identical(other.wallet, wallet) || other.wallet == wallet) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.context, context) || other.context == context)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, wallet, publicKey, context); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LedgerSignInput&&(identical(other.wallet, wallet) || other.wallet == wallet)&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.context, context) || other.context == context)); +} - @override - String toString() { - return 'LedgerSignInput(wallet: $wallet, publicKey: $publicKey, context: $context)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,wallet,publicKey,context); + +@override +String toString() { + return 'LedgerSignInput(wallet: $wallet, publicKey: $publicKey, context: $context)'; } -/// @nodoc -abstract mixin class $LedgerSignInputCopyWith<$Res> { - factory $LedgerSignInputCopyWith( - LedgerSignInput value, $Res Function(LedgerSignInput) _then) = - _$LedgerSignInputCopyWithImpl; - @useResult - $Res call( - {WalletType wallet, - PublicKey publicKey, - LedgerSignatureContext? context}); - - $WalletTypeCopyWith<$Res> get wallet; - $PublicKeyCopyWith<$Res> get publicKey; - $LedgerSignatureContextCopyWith<$Res>? get context; + } +/// @nodoc +abstract mixin class $LedgerSignInputCopyWith<$Res> { + factory $LedgerSignInputCopyWith(LedgerSignInput value, $Res Function(LedgerSignInput) _then) = _$LedgerSignInputCopyWithImpl; +@useResult +$Res call({ + WalletType wallet, PublicKey publicKey, LedgerSignatureContext? context +}); + + +$WalletTypeCopyWith<$Res> get wallet;$PublicKeyCopyWith<$Res> get publicKey;$LedgerSignatureContextCopyWith<$Res>? get context; + +} /// @nodoc class _$LedgerSignInputCopyWithImpl<$Res> implements $LedgerSignInputCopyWith<$Res> { @@ -75,138 +63,231 @@ class _$LedgerSignInputCopyWithImpl<$Res> final LedgerSignInput _self; final $Res Function(LedgerSignInput) _then; - /// Create a copy of LedgerSignInput - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? wallet = null, - Object? publicKey = null, - Object? context = freezed, - }) { - return _then(_self.copyWith( - wallet: null == wallet - ? _self.wallet - : wallet // ignore: cast_nullable_to_non_nullable - as WalletType, - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - context: freezed == context - ? _self.context - : context // ignore: cast_nullable_to_non_nullable - as LedgerSignatureContext?, - )); +/// Create a copy of LedgerSignInput +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? wallet = null,Object? publicKey = null,Object? context = freezed,}) { + return _then(_self.copyWith( +wallet: null == wallet ? _self.wallet : wallet // ignore: cast_nullable_to_non_nullable +as WalletType,publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,context: freezed == context ? _self.context : context // ignore: cast_nullable_to_non_nullable +as LedgerSignatureContext?, + )); +} +/// Create a copy of LedgerSignInput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$WalletTypeCopyWith<$Res> get wallet { + + return $WalletTypeCopyWith<$Res>(_self.wallet, (value) { + return _then(_self.copyWith(wallet: value)); + }); +}/// Create a copy of LedgerSignInput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of LedgerSignInput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$LedgerSignatureContextCopyWith<$Res>? get context { + if (_self.context == null) { + return null; } - /// Create a copy of LedgerSignInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $WalletTypeCopyWith<$Res> get wallet { - return $WalletTypeCopyWith<$Res>(_self.wallet, (value) { - return _then(_self.copyWith(wallet: value)); - }); - } + return $LedgerSignatureContextCopyWith<$Res>(_self.context!, (value) { + return _then(_self.copyWith(context: value)); + }); +} +} - /// Create a copy of LedgerSignInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } - /// Create a copy of LedgerSignInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $LedgerSignatureContextCopyWith<$Res>? get context { - if (_self.context == null) { - return null; - } +/// Adds pattern-matching-related methods to [LedgerSignInput]. +extension LedgerSignInputPatterns on LedgerSignInput { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LedgerSignInput value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LedgerSignInput() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LedgerSignInput value) $default,){ +final _that = this; +switch (_that) { +case _LedgerSignInput(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LedgerSignInput value)? $default,){ +final _that = this; +switch (_that) { +case _LedgerSignInput() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( WalletType wallet, PublicKey publicKey, LedgerSignatureContext? context)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LedgerSignInput() when $default != null: +return $default(_that.wallet,_that.publicKey,_that.context);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( WalletType wallet, PublicKey publicKey, LedgerSignatureContext? context) $default,) {final _that = this; +switch (_that) { +case _LedgerSignInput(): +return $default(_that.wallet,_that.publicKey,_that.context);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( WalletType wallet, PublicKey publicKey, LedgerSignatureContext? context)? $default,) {final _that = this; +switch (_that) { +case _LedgerSignInput() when $default != null: +return $default(_that.wallet,_that.publicKey,_that.context);case _: + return null; + +} +} - return $LedgerSignatureContextCopyWith<$Res>(_self.context!, (value) { - return _then(_self.copyWith(context: value)); - }); - } } /// @nodoc @JsonSerializable() + class _LedgerSignInput implements LedgerSignInput { - const _LedgerSignInput( - {required this.wallet, required this.publicKey, this.context}); - factory _LedgerSignInput.fromJson(Map json) => - _$LedgerSignInputFromJson(json); - - @override - final WalletType wallet; - @override - final PublicKey publicKey; - @override - final LedgerSignatureContext? context; - - /// Create a copy of LedgerSignInput - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$LedgerSignInputCopyWith<_LedgerSignInput> get copyWith => - __$LedgerSignInputCopyWithImpl<_LedgerSignInput>(this, _$identity); - - @override - Map toJson() { - return _$LedgerSignInputToJson( - this, - ); - } + const _LedgerSignInput({required this.wallet, required this.publicKey, this.context}); + factory _LedgerSignInput.fromJson(Map json) => _$LedgerSignInputFromJson(json); + +@override final WalletType wallet; +@override final PublicKey publicKey; +@override final LedgerSignatureContext? context; + +/// Create a copy of LedgerSignInput +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LedgerSignInputCopyWith<_LedgerSignInput> get copyWith => __$LedgerSignInputCopyWithImpl<_LedgerSignInput>(this, _$identity); + +@override +Map toJson() { + return _$LedgerSignInputToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _LedgerSignInput && - (identical(other.wallet, wallet) || other.wallet == wallet) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.context, context) || other.context == context)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LedgerSignInput&&(identical(other.wallet, wallet) || other.wallet == wallet)&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.context, context) || other.context == context)); +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, wallet, publicKey, context); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,wallet,publicKey,context); - @override - String toString() { - return 'LedgerSignInput(wallet: $wallet, publicKey: $publicKey, context: $context)'; - } +@override +String toString() { + return 'LedgerSignInput(wallet: $wallet, publicKey: $publicKey, context: $context)'; } -/// @nodoc -abstract mixin class _$LedgerSignInputCopyWith<$Res> - implements $LedgerSignInputCopyWith<$Res> { - factory _$LedgerSignInputCopyWith( - _LedgerSignInput value, $Res Function(_LedgerSignInput) _then) = - __$LedgerSignInputCopyWithImpl; - @override - @useResult - $Res call( - {WalletType wallet, - PublicKey publicKey, - LedgerSignatureContext? context}); - - @override - $WalletTypeCopyWith<$Res> get wallet; - @override - $PublicKeyCopyWith<$Res> get publicKey; - @override - $LedgerSignatureContextCopyWith<$Res>? get context; + } +/// @nodoc +abstract mixin class _$LedgerSignInputCopyWith<$Res> implements $LedgerSignInputCopyWith<$Res> { + factory _$LedgerSignInputCopyWith(_LedgerSignInput value, $Res Function(_LedgerSignInput) _then) = __$LedgerSignInputCopyWithImpl; +@override @useResult +$Res call({ + WalletType wallet, PublicKey publicKey, LedgerSignatureContext? context +}); + + +@override $WalletTypeCopyWith<$Res> get wallet;@override $PublicKeyCopyWith<$Res> get publicKey;@override $LedgerSignatureContextCopyWith<$Res>? get context; + +} /// @nodoc class __$LedgerSignInputCopyWithImpl<$Res> implements _$LedgerSignInputCopyWith<$Res> { @@ -215,64 +296,48 @@ class __$LedgerSignInputCopyWithImpl<$Res> final _LedgerSignInput _self; final $Res Function(_LedgerSignInput) _then; - /// Create a copy of LedgerSignInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? wallet = null, - Object? publicKey = null, - Object? context = freezed, - }) { - return _then(_LedgerSignInput( - wallet: null == wallet - ? _self.wallet - : wallet // ignore: cast_nullable_to_non_nullable - as WalletType, - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - context: freezed == context - ? _self.context - : context // ignore: cast_nullable_to_non_nullable - as LedgerSignatureContext?, - )); - } - - /// Create a copy of LedgerSignInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $WalletTypeCopyWith<$Res> get wallet { - return $WalletTypeCopyWith<$Res>(_self.wallet, (value) { - return _then(_self.copyWith(wallet: value)); - }); - } - - /// Create a copy of LedgerSignInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } +/// Create a copy of LedgerSignInput +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? wallet = null,Object? publicKey = null,Object? context = freezed,}) { + return _then(_LedgerSignInput( +wallet: null == wallet ? _self.wallet : wallet // ignore: cast_nullable_to_non_nullable +as WalletType,publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,context: freezed == context ? _self.context : context // ignore: cast_nullable_to_non_nullable +as LedgerSignatureContext?, + )); +} - /// Create a copy of LedgerSignInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $LedgerSignatureContextCopyWith<$Res>? get context { +/// Create a copy of LedgerSignInput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$WalletTypeCopyWith<$Res> get wallet { + + return $WalletTypeCopyWith<$Res>(_self.wallet, (value) { + return _then(_self.copyWith(wallet: value)); + }); +}/// Create a copy of LedgerSignInput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +}/// Create a copy of LedgerSignInput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$LedgerSignatureContextCopyWith<$Res>? get context { if (_self.context == null) { - return null; - } - - return $LedgerSignatureContextCopyWith<$Res>(_self.context!, (value) { - return _then(_self.copyWith(context: value)); - }); + return null; } + + return $LedgerSignatureContextCopyWith<$Res>(_self.context!, (value) { + return _then(_self.copyWith(context: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_sign_input.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_sign_input.g.dart index 73baa899..98aad48f 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_sign_input.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_sign_input.g.dart @@ -13,7 +13,8 @@ _LedgerSignInput _$LedgerSignInputFromJson(Map json) => context: json['context'] == null ? null : LedgerSignatureContext.fromJson( - json['context'] as Map), + json['context'] as Map, + ), ); Map _$LedgerSignInputToJson(_LedgerSignInput instance) => diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input.dart index 4c5dea4b..9ea5f8aa 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input.dart @@ -12,7 +12,8 @@ sealed class LedgerUpdateKeyInput const factory LedgerUpdateKeyInput() = _LedgerUpdateKeyInputDefault; const factory LedgerUpdateKeyInput.rename( - final LedgerUpdateKeyInputRename data) = _LedgerUpdateKeyInputRename; + final LedgerUpdateKeyInputRename data, + ) = _LedgerUpdateKeyInputRename; factory LedgerUpdateKeyInput.fromJson(Map json) => _$LedgerUpdateKeyInputFromJson(json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input.freezed.dart index 794e2378..6775ce14 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,140 +11,284 @@ part of 'ledger_update_key_input.dart'; // dart format off T _$identity(T value) => value; -LedgerUpdateKeyInput _$LedgerUpdateKeyInputFromJson(Map json) { - switch (json['type']) { - case 'default': - return _LedgerUpdateKeyInputDefault.fromJson(json); - case 'rename': - return _LedgerUpdateKeyInputRename.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'type', 'LedgerUpdateKeyInput', - 'Invalid union type "${json['type']}"!'); - } +LedgerUpdateKeyInput _$LedgerUpdateKeyInputFromJson( + Map json +) { + switch (json['type']) { + case 'default': + return _LedgerUpdateKeyInputDefault.fromJson( + json + ); + case 'rename': + return _LedgerUpdateKeyInputRename.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'LedgerUpdateKeyInput', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$LedgerUpdateKeyInput { + + + /// Serializes this LedgerUpdateKeyInput to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is LedgerUpdateKeyInput); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LedgerUpdateKeyInput); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'LedgerUpdateKeyInput()'; +} + - @override - String toString() { - return 'LedgerUpdateKeyInput()'; - } } /// @nodoc -class $LedgerUpdateKeyInputCopyWith<$Res> { - $LedgerUpdateKeyInputCopyWith( - LedgerUpdateKeyInput _, $Res Function(LedgerUpdateKeyInput) __); +class $LedgerUpdateKeyInputCopyWith<$Res> { +$LedgerUpdateKeyInputCopyWith(LedgerUpdateKeyInput _, $Res Function(LedgerUpdateKeyInput) __); +} + + +/// Adds pattern-matching-related methods to [LedgerUpdateKeyInput]. +extension LedgerUpdateKeyInputPatterns on LedgerUpdateKeyInput { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LedgerUpdateKeyInputDefault value)? $default,{TResult Function( _LedgerUpdateKeyInputRename value)? rename,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LedgerUpdateKeyInputDefault() when $default != null: +return $default(_that);case _LedgerUpdateKeyInputRename() when rename != null: +return rename(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LedgerUpdateKeyInputDefault value) $default,{required TResult Function( _LedgerUpdateKeyInputRename value) rename,}){ +final _that = this; +switch (_that) { +case _LedgerUpdateKeyInputDefault(): +return $default(_that);case _LedgerUpdateKeyInputRename(): +return rename(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LedgerUpdateKeyInputDefault value)? $default,{TResult? Function( _LedgerUpdateKeyInputRename value)? rename,}){ +final _that = this; +switch (_that) { +case _LedgerUpdateKeyInputDefault() when $default != null: +return $default(_that);case _LedgerUpdateKeyInputRename() when rename != null: +return rename(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function()? $default,{TResult Function( LedgerUpdateKeyInputRename data)? rename,required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LedgerUpdateKeyInputDefault() when $default != null: +return $default();case _LedgerUpdateKeyInputRename() when rename != null: +return rename(_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function() $default,{required TResult Function( LedgerUpdateKeyInputRename data) rename,}) {final _that = this; +switch (_that) { +case _LedgerUpdateKeyInputDefault(): +return $default();case _LedgerUpdateKeyInputRename(): +return rename(_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function()? $default,{TResult? Function( LedgerUpdateKeyInputRename data)? rename,}) {final _that = this; +switch (_that) { +case _LedgerUpdateKeyInputDefault() when $default != null: +return $default();case _LedgerUpdateKeyInputRename() when rename != null: +return rename(_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _LedgerUpdateKeyInputDefault implements LedgerUpdateKeyInput { - const _LedgerUpdateKeyInputDefault({final String? $type}) - : $type = $type ?? 'default'; - factory _LedgerUpdateKeyInputDefault.fromJson(Map json) => - _$LedgerUpdateKeyInputDefaultFromJson(json); - - @JsonKey(name: 'type') - final String $type; - - @override - Map toJson() { - return _$LedgerUpdateKeyInputDefaultToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _LedgerUpdateKeyInputDefault); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; - - @override - String toString() { - return 'LedgerUpdateKeyInput()'; - } + const _LedgerUpdateKeyInputDefault({final String? $type}): $type = $type ?? 'default'; + factory _LedgerUpdateKeyInputDefault.fromJson(Map json) => _$LedgerUpdateKeyInputDefaultFromJson(json); + + + +@JsonKey(name: 'type') +final String $type; + + + +@override +Map toJson() { + return _$LedgerUpdateKeyInputDefaultToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LedgerUpdateKeyInputDefault); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'LedgerUpdateKeyInput()'; } + +} + + + + /// @nodoc @JsonSerializable() + class _LedgerUpdateKeyInputRename implements LedgerUpdateKeyInput { - const _LedgerUpdateKeyInputRename(this.data, {final String? $type}) - : $type = $type ?? 'rename'; - factory _LedgerUpdateKeyInputRename.fromJson(Map json) => - _$LedgerUpdateKeyInputRenameFromJson(json); - - final LedgerUpdateKeyInputRename data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of LedgerUpdateKeyInput - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$LedgerUpdateKeyInputRenameCopyWith<_LedgerUpdateKeyInputRename> - get copyWith => __$LedgerUpdateKeyInputRenameCopyWithImpl< - _LedgerUpdateKeyInputRename>(this, _$identity); - - @override - Map toJson() { - return _$LedgerUpdateKeyInputRenameToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _LedgerUpdateKeyInputRename && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'LedgerUpdateKeyInput.rename(data: $data)'; - } + const _LedgerUpdateKeyInputRename(this.data, {final String? $type}): $type = $type ?? 'rename'; + factory _LedgerUpdateKeyInputRename.fromJson(Map json) => _$LedgerUpdateKeyInputRenameFromJson(json); + + final LedgerUpdateKeyInputRename data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of LedgerUpdateKeyInput +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LedgerUpdateKeyInputRenameCopyWith<_LedgerUpdateKeyInputRename> get copyWith => __$LedgerUpdateKeyInputRenameCopyWithImpl<_LedgerUpdateKeyInputRename>(this, _$identity); + +@override +Map toJson() { + return _$LedgerUpdateKeyInputRenameToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LedgerUpdateKeyInputRename&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'LedgerUpdateKeyInput.rename(data: $data)'; } -/// @nodoc -abstract mixin class _$LedgerUpdateKeyInputRenameCopyWith<$Res> - implements $LedgerUpdateKeyInputCopyWith<$Res> { - factory _$LedgerUpdateKeyInputRenameCopyWith( - _LedgerUpdateKeyInputRename value, - $Res Function(_LedgerUpdateKeyInputRename) _then) = - __$LedgerUpdateKeyInputRenameCopyWithImpl; - @useResult - $Res call({LedgerUpdateKeyInputRename data}); - $LedgerUpdateKeyInputRenameCopyWith<$Res> get data; } +/// @nodoc +abstract mixin class _$LedgerUpdateKeyInputRenameCopyWith<$Res> implements $LedgerUpdateKeyInputCopyWith<$Res> { + factory _$LedgerUpdateKeyInputRenameCopyWith(_LedgerUpdateKeyInputRename value, $Res Function(_LedgerUpdateKeyInputRename) _then) = __$LedgerUpdateKeyInputRenameCopyWithImpl; +@useResult +$Res call({ + LedgerUpdateKeyInputRename data +}); + + +$LedgerUpdateKeyInputRenameCopyWith<$Res> get data; + +} /// @nodoc class __$LedgerUpdateKeyInputRenameCopyWithImpl<$Res> implements _$LedgerUpdateKeyInputRenameCopyWith<$Res> { @@ -154,29 +297,25 @@ class __$LedgerUpdateKeyInputRenameCopyWithImpl<$Res> final _LedgerUpdateKeyInputRename _self; final $Res Function(_LedgerUpdateKeyInputRename) _then; - /// Create a copy of LedgerUpdateKeyInput - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(_LedgerUpdateKeyInputRename( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as LedgerUpdateKeyInputRename, - )); - } - - /// Create a copy of LedgerUpdateKeyInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $LedgerUpdateKeyInputRenameCopyWith<$Res> get data { - return $LedgerUpdateKeyInputRenameCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of LedgerUpdateKeyInput +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(_LedgerUpdateKeyInputRename( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as LedgerUpdateKeyInputRename, + )); +} + +/// Create a copy of LedgerUpdateKeyInput +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$LedgerUpdateKeyInputRenameCopyWith<$Res> get data { + + return $LedgerUpdateKeyInputRenameCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input.g.dart index 811183f0..11d8ea56 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input.g.dart @@ -7,27 +7,20 @@ part of 'ledger_update_key_input.dart'; // ************************************************************************** _LedgerUpdateKeyInputDefault _$LedgerUpdateKeyInputDefaultFromJson( - Map json) => - _LedgerUpdateKeyInputDefault( - $type: json['type'] as String?, - ); + Map json, +) => _LedgerUpdateKeyInputDefault($type: json['type'] as String?); Map _$LedgerUpdateKeyInputDefaultToJson( - _LedgerUpdateKeyInputDefault instance) => - { - 'type': instance.$type, - }; + _LedgerUpdateKeyInputDefault instance, +) => {'type': instance.$type}; _LedgerUpdateKeyInputRename _$LedgerUpdateKeyInputRenameFromJson( - Map json) => - _LedgerUpdateKeyInputRename( - LedgerUpdateKeyInputRename.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); + Map json, +) => _LedgerUpdateKeyInputRename( + LedgerUpdateKeyInputRename.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$LedgerUpdateKeyInputRenameToJson( - _LedgerUpdateKeyInputRename instance) => - { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + _LedgerUpdateKeyInputRename instance, +) => {'data': instance.data.toJson(), 'type': instance.$type}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input_rename.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input_rename.freezed.dart index 646f845b..e05e31c8 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input_rename.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input_rename.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,52 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$LedgerUpdateKeyInputRename { - PublicKey get publicKey; - String get name; - - /// Create a copy of LedgerUpdateKeyInputRename - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $LedgerUpdateKeyInputRenameCopyWith - get copyWith => - _$LedgerUpdateKeyInputRenameCopyWithImpl( - this as LedgerUpdateKeyInputRename, _$identity); + + PublicKey get publicKey; String get name; +/// Create a copy of LedgerUpdateKeyInputRename +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$LedgerUpdateKeyInputRenameCopyWith get copyWith => _$LedgerUpdateKeyInputRenameCopyWithImpl(this as LedgerUpdateKeyInputRename, _$identity); /// Serializes this LedgerUpdateKeyInputRename to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is LedgerUpdateKeyInputRename && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.name, name) || other.name == name)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, publicKey, name); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LedgerUpdateKeyInputRename&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.name, name) || other.name == name)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,publicKey,name); - @override - String toString() { - return 'LedgerUpdateKeyInputRename(publicKey: $publicKey, name: $name)'; - } +@override +String toString() { + return 'LedgerUpdateKeyInputRename(publicKey: $publicKey, name: $name)'; } -/// @nodoc -abstract mixin class $LedgerUpdateKeyInputRenameCopyWith<$Res> { - factory $LedgerUpdateKeyInputRenameCopyWith(LedgerUpdateKeyInputRename value, - $Res Function(LedgerUpdateKeyInputRename) _then) = - _$LedgerUpdateKeyInputRenameCopyWithImpl; - @useResult - $Res call({PublicKey publicKey, String name}); - $PublicKeyCopyWith<$Res> get publicKey; } +/// @nodoc +abstract mixin class $LedgerUpdateKeyInputRenameCopyWith<$Res> { + factory $LedgerUpdateKeyInputRenameCopyWith(LedgerUpdateKeyInputRename value, $Res Function(LedgerUpdateKeyInputRename) _then) = _$LedgerUpdateKeyInputRenameCopyWithImpl; +@useResult +$Res call({ + PublicKey publicKey, String name +}); + + +$PublicKeyCopyWith<$Res> get publicKey; + +} /// @nodoc class _$LedgerUpdateKeyInputRenameCopyWithImpl<$Res> implements $LedgerUpdateKeyInputRenameCopyWith<$Res> { @@ -69,102 +63,208 @@ class _$LedgerUpdateKeyInputRenameCopyWithImpl<$Res> final LedgerUpdateKeyInputRename _self; final $Res Function(LedgerUpdateKeyInputRename) _then; - /// Create a copy of LedgerUpdateKeyInputRename - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? publicKey = null, - Object? name = null, - }) { - return _then(_self.copyWith( - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of LedgerUpdateKeyInputRename - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } +/// Create a copy of LedgerUpdateKeyInputRename +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? publicKey = null,Object? name = null,}) { + return _then(_self.copyWith( +publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String, + )); +} +/// Create a copy of LedgerUpdateKeyInputRename +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [LedgerUpdateKeyInputRename]. +extension LedgerUpdateKeyInputRenamePatterns on LedgerUpdateKeyInputRename { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LedgerUpdateKeyInputRename value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LedgerUpdateKeyInputRename() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LedgerUpdateKeyInputRename value) $default,){ +final _that = this; +switch (_that) { +case _LedgerUpdateKeyInputRename(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LedgerUpdateKeyInputRename value)? $default,){ +final _that = this; +switch (_that) { +case _LedgerUpdateKeyInputRename() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PublicKey publicKey, String name)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LedgerUpdateKeyInputRename() when $default != null: +return $default(_that.publicKey,_that.name);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PublicKey publicKey, String name) $default,) {final _that = this; +switch (_that) { +case _LedgerUpdateKeyInputRename(): +return $default(_that.publicKey,_that.name);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PublicKey publicKey, String name)? $default,) {final _that = this; +switch (_that) { +case _LedgerUpdateKeyInputRename() when $default != null: +return $default(_that.publicKey,_that.name);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _LedgerUpdateKeyInputRename implements LedgerUpdateKeyInputRename { - const _LedgerUpdateKeyInputRename( - {required this.publicKey, required this.name}); - factory _LedgerUpdateKeyInputRename.fromJson(Map json) => - _$LedgerUpdateKeyInputRenameFromJson(json); - - @override - final PublicKey publicKey; - @override - final String name; - - /// Create a copy of LedgerUpdateKeyInputRename - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$LedgerUpdateKeyInputRenameCopyWith<_LedgerUpdateKeyInputRename> - get copyWith => __$LedgerUpdateKeyInputRenameCopyWithImpl< - _LedgerUpdateKeyInputRename>(this, _$identity); - - @override - Map toJson() { - return _$LedgerUpdateKeyInputRenameToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _LedgerUpdateKeyInputRename && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.name, name) || other.name == name)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, publicKey, name); - - @override - String toString() { - return 'LedgerUpdateKeyInputRename(publicKey: $publicKey, name: $name)'; - } + const _LedgerUpdateKeyInputRename({required this.publicKey, required this.name}); + factory _LedgerUpdateKeyInputRename.fromJson(Map json) => _$LedgerUpdateKeyInputRenameFromJson(json); + +@override final PublicKey publicKey; +@override final String name; + +/// Create a copy of LedgerUpdateKeyInputRename +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LedgerUpdateKeyInputRenameCopyWith<_LedgerUpdateKeyInputRename> get copyWith => __$LedgerUpdateKeyInputRenameCopyWithImpl<_LedgerUpdateKeyInputRename>(this, _$identity); + +@override +Map toJson() { + return _$LedgerUpdateKeyInputRenameToJson(this, ); } -/// @nodoc -abstract mixin class _$LedgerUpdateKeyInputRenameCopyWith<$Res> - implements $LedgerUpdateKeyInputRenameCopyWith<$Res> { - factory _$LedgerUpdateKeyInputRenameCopyWith( - _LedgerUpdateKeyInputRename value, - $Res Function(_LedgerUpdateKeyInputRename) _then) = - __$LedgerUpdateKeyInputRenameCopyWithImpl; - @override - @useResult - $Res call({PublicKey publicKey, String name}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LedgerUpdateKeyInputRename&&(identical(other.publicKey, publicKey) || other.publicKey == publicKey)&&(identical(other.name, name) || other.name == name)); +} - @override - $PublicKeyCopyWith<$Res> get publicKey; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,publicKey,name); + +@override +String toString() { + return 'LedgerUpdateKeyInputRename(publicKey: $publicKey, name: $name)'; } + +} + +/// @nodoc +abstract mixin class _$LedgerUpdateKeyInputRenameCopyWith<$Res> implements $LedgerUpdateKeyInputRenameCopyWith<$Res> { + factory _$LedgerUpdateKeyInputRenameCopyWith(_LedgerUpdateKeyInputRename value, $Res Function(_LedgerUpdateKeyInputRename) _then) = __$LedgerUpdateKeyInputRenameCopyWithImpl; +@override @useResult +$Res call({ + PublicKey publicKey, String name +}); + + +@override $PublicKeyCopyWith<$Res> get publicKey; + +} /// @nodoc class __$LedgerUpdateKeyInputRenameCopyWithImpl<$Res> implements _$LedgerUpdateKeyInputRenameCopyWith<$Res> { @@ -173,35 +273,26 @@ class __$LedgerUpdateKeyInputRenameCopyWithImpl<$Res> final _LedgerUpdateKeyInputRename _self; final $Res Function(_LedgerUpdateKeyInputRename) _then; - /// Create a copy of LedgerUpdateKeyInputRename - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? publicKey = null, - Object? name = null, - }) { - return _then(_LedgerUpdateKeyInputRename( - publicKey: null == publicKey - ? _self.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of LedgerUpdateKeyInputRename - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get publicKey { - return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { - return _then(_self.copyWith(publicKey: value)); - }); - } +/// Create a copy of LedgerUpdateKeyInputRename +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? publicKey = null,Object? name = null,}) { + return _then(_LedgerUpdateKeyInputRename( +publicKey: null == publicKey ? _self.publicKey : publicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +/// Create a copy of LedgerUpdateKeyInputRename +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get publicKey { + + return $PublicKeyCopyWith<$Res>(_self.publicKey, (value) { + return _then(_self.copyWith(publicKey: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input_rename.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input_rename.g.dart index 073c24cb..a7d0f70c 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input_rename.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/ledger_key/ledger_update_key_input_rename.g.dart @@ -7,15 +7,15 @@ part of 'ledger_update_key_input_rename.dart'; // ************************************************************************** _LedgerUpdateKeyInputRename _$LedgerUpdateKeyInputRenameFromJson( - Map json) => - _LedgerUpdateKeyInputRename( - publicKey: PublicKey.fromJson(json['public_key'] as String), - name: json['name'] as String, - ); + Map json, +) => _LedgerUpdateKeyInputRename( + publicKey: PublicKey.fromJson(json['public_key'] as String), + name: json['name'] as String, +); Map _$LedgerUpdateKeyInputRenameToJson( - _LedgerUpdateKeyInputRename instance) => - { - 'public_key': instance.publicKey.toJson(), - 'name': instance.name, - }; + _LedgerUpdateKeyInputRename instance, +) => { + 'public_key': instance.publicKey.toJson(), + 'name': instance.name, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/mnemonic/mnemonic.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/mnemonic/mnemonic.dart index 90c0fe51..d2fcfeac 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/mnemonic/mnemonic.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/mnemonic/mnemonic.dart @@ -22,11 +22,6 @@ Keypair deriveFromPhrase({ required MnemonicType mnemonicType, }) { return Keypair.fromJson( - jsonDecode( - ntDeriveFromPhrase( - phrase: phrase, - mnemonicType: mnemonicType, - ), - ), + jsonDecode(ntDeriveFromPhrase(phrase: phrase, mnemonicType: mnemonicType)), ); } diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/encrypted_data.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/encrypted_data.freezed.dart index 2b9a40ee..879fdb93 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/encrypted_data.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/encrypted_data.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,66 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$EncryptedData { - EncryptionAlgorithm get algorithm; - PublicKey get sourcePublicKey; - PublicKey get recipientPublicKey; - String get data; - String get nonce; - - /// Create a copy of EncryptedData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $EncryptedDataCopyWith get copyWith => - _$EncryptedDataCopyWithImpl( - this as EncryptedData, _$identity); + + EncryptionAlgorithm get algorithm; PublicKey get sourcePublicKey; PublicKey get recipientPublicKey; String get data; String get nonce; +/// Create a copy of EncryptedData +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$EncryptedDataCopyWith get copyWith => _$EncryptedDataCopyWithImpl(this as EncryptedData, _$identity); /// Serializes this EncryptedData to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is EncryptedData && - (identical(other.algorithm, algorithm) || - other.algorithm == algorithm) && - (identical(other.sourcePublicKey, sourcePublicKey) || - other.sourcePublicKey == sourcePublicKey) && - (identical(other.recipientPublicKey, recipientPublicKey) || - other.recipientPublicKey == recipientPublicKey) && - (identical(other.data, data) || other.data == data) && - (identical(other.nonce, nonce) || other.nonce == nonce)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, algorithm, sourcePublicKey, recipientPublicKey, data, nonce); - - @override - String toString() { - return 'EncryptedData(algorithm: $algorithm, sourcePublicKey: $sourcePublicKey, recipientPublicKey: $recipientPublicKey, data: $data, nonce: $nonce)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is EncryptedData&&(identical(other.algorithm, algorithm) || other.algorithm == algorithm)&&(identical(other.sourcePublicKey, sourcePublicKey) || other.sourcePublicKey == sourcePublicKey)&&(identical(other.recipientPublicKey, recipientPublicKey) || other.recipientPublicKey == recipientPublicKey)&&(identical(other.data, data) || other.data == data)&&(identical(other.nonce, nonce) || other.nonce == nonce)); } -/// @nodoc -abstract mixin class $EncryptedDataCopyWith<$Res> { - factory $EncryptedDataCopyWith( - EncryptedData value, $Res Function(EncryptedData) _then) = - _$EncryptedDataCopyWithImpl; - @useResult - $Res call( - {EncryptionAlgorithm algorithm, - PublicKey sourcePublicKey, - PublicKey recipientPublicKey, - String data, - String nonce}); - - $PublicKeyCopyWith<$Res> get sourcePublicKey; - $PublicKeyCopyWith<$Res> get recipientPublicKey; +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,algorithm,sourcePublicKey,recipientPublicKey,data,nonce); + +@override +String toString() { + return 'EncryptedData(algorithm: $algorithm, sourcePublicKey: $sourcePublicKey, recipientPublicKey: $recipientPublicKey, data: $data, nonce: $nonce)'; +} + + } +/// @nodoc +abstract mixin class $EncryptedDataCopyWith<$Res> { + factory $EncryptedDataCopyWith(EncryptedData value, $Res Function(EncryptedData) _then) = _$EncryptedDataCopyWithImpl; +@useResult +$Res call({ + EncryptionAlgorithm algorithm, PublicKey sourcePublicKey, PublicKey recipientPublicKey, String data, String nonce +}); + + +$PublicKeyCopyWith<$Res> get sourcePublicKey;$PublicKeyCopyWith<$Res> get recipientPublicKey; + +} /// @nodoc class _$EncryptedDataCopyWithImpl<$Res> implements $EncryptedDataCopyWith<$Res> { @@ -83,147 +63,217 @@ class _$EncryptedDataCopyWithImpl<$Res> final EncryptedData _self; final $Res Function(EncryptedData) _then; - /// Create a copy of EncryptedData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? algorithm = null, - Object? sourcePublicKey = null, - Object? recipientPublicKey = null, - Object? data = null, - Object? nonce = null, - }) { - return _then(_self.copyWith( - algorithm: null == algorithm - ? _self.algorithm - : algorithm // ignore: cast_nullable_to_non_nullable - as EncryptionAlgorithm, - sourcePublicKey: null == sourcePublicKey - ? _self.sourcePublicKey - : sourcePublicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - recipientPublicKey: null == recipientPublicKey - ? _self.recipientPublicKey - : recipientPublicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - data: null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as String, - nonce: null == nonce - ? _self.nonce - : nonce // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of EncryptedData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get sourcePublicKey { - return $PublicKeyCopyWith<$Res>(_self.sourcePublicKey, (value) { - return _then(_self.copyWith(sourcePublicKey: value)); - }); - } - - /// Create a copy of EncryptedData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get recipientPublicKey { - return $PublicKeyCopyWith<$Res>(_self.recipientPublicKey, (value) { - return _then(_self.copyWith(recipientPublicKey: value)); - }); - } +/// Create a copy of EncryptedData +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? algorithm = null,Object? sourcePublicKey = null,Object? recipientPublicKey = null,Object? data = null,Object? nonce = null,}) { + return _then(_self.copyWith( +algorithm: null == algorithm ? _self.algorithm : algorithm // ignore: cast_nullable_to_non_nullable +as EncryptionAlgorithm,sourcePublicKey: null == sourcePublicKey ? _self.sourcePublicKey : sourcePublicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,recipientPublicKey: null == recipientPublicKey ? _self.recipientPublicKey : recipientPublicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as String,nonce: null == nonce ? _self.nonce : nonce // ignore: cast_nullable_to_non_nullable +as String, + )); +} +/// Create a copy of EncryptedData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get sourcePublicKey { + + return $PublicKeyCopyWith<$Res>(_self.sourcePublicKey, (value) { + return _then(_self.copyWith(sourcePublicKey: value)); + }); +}/// Create a copy of EncryptedData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get recipientPublicKey { + + return $PublicKeyCopyWith<$Res>(_self.recipientPublicKey, (value) { + return _then(_self.copyWith(recipientPublicKey: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [EncryptedData]. +extension EncryptedDataPatterns on EncryptedData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _EncryptedData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _EncryptedData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _EncryptedData value) $default,){ +final _that = this; +switch (_that) { +case _EncryptedData(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _EncryptedData value)? $default,){ +final _that = this; +switch (_that) { +case _EncryptedData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( EncryptionAlgorithm algorithm, PublicKey sourcePublicKey, PublicKey recipientPublicKey, String data, String nonce)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _EncryptedData() when $default != null: +return $default(_that.algorithm,_that.sourcePublicKey,_that.recipientPublicKey,_that.data,_that.nonce);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( EncryptionAlgorithm algorithm, PublicKey sourcePublicKey, PublicKey recipientPublicKey, String data, String nonce) $default,) {final _that = this; +switch (_that) { +case _EncryptedData(): +return $default(_that.algorithm,_that.sourcePublicKey,_that.recipientPublicKey,_that.data,_that.nonce);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( EncryptionAlgorithm algorithm, PublicKey sourcePublicKey, PublicKey recipientPublicKey, String data, String nonce)? $default,) {final _that = this; +switch (_that) { +case _EncryptedData() when $default != null: +return $default(_that.algorithm,_that.sourcePublicKey,_that.recipientPublicKey,_that.data,_that.nonce);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _EncryptedData implements EncryptedData { - const _EncryptedData( - {required this.algorithm, - required this.sourcePublicKey, - required this.recipientPublicKey, - required this.data, - required this.nonce}); - factory _EncryptedData.fromJson(Map json) => - _$EncryptedDataFromJson(json); - - @override - final EncryptionAlgorithm algorithm; - @override - final PublicKey sourcePublicKey; - @override - final PublicKey recipientPublicKey; - @override - final String data; - @override - final String nonce; - - /// Create a copy of EncryptedData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$EncryptedDataCopyWith<_EncryptedData> get copyWith => - __$EncryptedDataCopyWithImpl<_EncryptedData>(this, _$identity); - - @override - Map toJson() { - return _$EncryptedDataToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _EncryptedData && - (identical(other.algorithm, algorithm) || - other.algorithm == algorithm) && - (identical(other.sourcePublicKey, sourcePublicKey) || - other.sourcePublicKey == sourcePublicKey) && - (identical(other.recipientPublicKey, recipientPublicKey) || - other.recipientPublicKey == recipientPublicKey) && - (identical(other.data, data) || other.data == data) && - (identical(other.nonce, nonce) || other.nonce == nonce)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, algorithm, sourcePublicKey, recipientPublicKey, data, nonce); - - @override - String toString() { - return 'EncryptedData(algorithm: $algorithm, sourcePublicKey: $sourcePublicKey, recipientPublicKey: $recipientPublicKey, data: $data, nonce: $nonce)'; - } + const _EncryptedData({required this.algorithm, required this.sourcePublicKey, required this.recipientPublicKey, required this.data, required this.nonce}); + factory _EncryptedData.fromJson(Map json) => _$EncryptedDataFromJson(json); + +@override final EncryptionAlgorithm algorithm; +@override final PublicKey sourcePublicKey; +@override final PublicKey recipientPublicKey; +@override final String data; +@override final String nonce; + +/// Create a copy of EncryptedData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$EncryptedDataCopyWith<_EncryptedData> get copyWith => __$EncryptedDataCopyWithImpl<_EncryptedData>(this, _$identity); + +@override +Map toJson() { + return _$EncryptedDataToJson(this, ); } -/// @nodoc -abstract mixin class _$EncryptedDataCopyWith<$Res> - implements $EncryptedDataCopyWith<$Res> { - factory _$EncryptedDataCopyWith( - _EncryptedData value, $Res Function(_EncryptedData) _then) = - __$EncryptedDataCopyWithImpl; - @override - @useResult - $Res call( - {EncryptionAlgorithm algorithm, - PublicKey sourcePublicKey, - PublicKey recipientPublicKey, - String data, - String nonce}); - - @override - $PublicKeyCopyWith<$Res> get sourcePublicKey; - @override - $PublicKeyCopyWith<$Res> get recipientPublicKey; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _EncryptedData&&(identical(other.algorithm, algorithm) || other.algorithm == algorithm)&&(identical(other.sourcePublicKey, sourcePublicKey) || other.sourcePublicKey == sourcePublicKey)&&(identical(other.recipientPublicKey, recipientPublicKey) || other.recipientPublicKey == recipientPublicKey)&&(identical(other.data, data) || other.data == data)&&(identical(other.nonce, nonce) || other.nonce == nonce)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,algorithm,sourcePublicKey,recipientPublicKey,data,nonce); + +@override +String toString() { + return 'EncryptedData(algorithm: $algorithm, sourcePublicKey: $sourcePublicKey, recipientPublicKey: $recipientPublicKey, data: $data, nonce: $nonce)'; +} + + } +/// @nodoc +abstract mixin class _$EncryptedDataCopyWith<$Res> implements $EncryptedDataCopyWith<$Res> { + factory _$EncryptedDataCopyWith(_EncryptedData value, $Res Function(_EncryptedData) _then) = __$EncryptedDataCopyWithImpl; +@override @useResult +$Res call({ + EncryptionAlgorithm algorithm, PublicKey sourcePublicKey, PublicKey recipientPublicKey, String data, String nonce +}); + + +@override $PublicKeyCopyWith<$Res> get sourcePublicKey;@override $PublicKeyCopyWith<$Res> get recipientPublicKey; + +} /// @nodoc class __$EncryptedDataCopyWithImpl<$Res> implements _$EncryptedDataCopyWith<$Res> { @@ -232,60 +282,38 @@ class __$EncryptedDataCopyWithImpl<$Res> final _EncryptedData _self; final $Res Function(_EncryptedData) _then; - /// Create a copy of EncryptedData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? algorithm = null, - Object? sourcePublicKey = null, - Object? recipientPublicKey = null, - Object? data = null, - Object? nonce = null, - }) { - return _then(_EncryptedData( - algorithm: null == algorithm - ? _self.algorithm - : algorithm // ignore: cast_nullable_to_non_nullable - as EncryptionAlgorithm, - sourcePublicKey: null == sourcePublicKey - ? _self.sourcePublicKey - : sourcePublicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - recipientPublicKey: null == recipientPublicKey - ? _self.recipientPublicKey - : recipientPublicKey // ignore: cast_nullable_to_non_nullable - as PublicKey, - data: null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as String, - nonce: null == nonce - ? _self.nonce - : nonce // ignore: cast_nullable_to_non_nullable - as String, - )); - } - - /// Create a copy of EncryptedData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get sourcePublicKey { - return $PublicKeyCopyWith<$Res>(_self.sourcePublicKey, (value) { - return _then(_self.copyWith(sourcePublicKey: value)); - }); - } - - /// Create a copy of EncryptedData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get recipientPublicKey { - return $PublicKeyCopyWith<$Res>(_self.recipientPublicKey, (value) { - return _then(_self.copyWith(recipientPublicKey: value)); - }); - } +/// Create a copy of EncryptedData +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? algorithm = null,Object? sourcePublicKey = null,Object? recipientPublicKey = null,Object? data = null,Object? nonce = null,}) { + return _then(_EncryptedData( +algorithm: null == algorithm ? _self.algorithm : algorithm // ignore: cast_nullable_to_non_nullable +as EncryptionAlgorithm,sourcePublicKey: null == sourcePublicKey ? _self.sourcePublicKey : sourcePublicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,recipientPublicKey: null == recipientPublicKey ? _self.recipientPublicKey : recipientPublicKey // ignore: cast_nullable_to_non_nullable +as PublicKey,data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as String,nonce: null == nonce ? _self.nonce : nonce // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +/// Create a copy of EncryptedData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get sourcePublicKey { + + return $PublicKeyCopyWith<$Res>(_self.sourcePublicKey, (value) { + return _then(_self.copyWith(sourcePublicKey: value)); + }); +}/// Create a copy of EncryptedData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get recipientPublicKey { + + return $PublicKeyCopyWith<$Res>(_self.recipientPublicKey, (value) { + return _then(_self.copyWith(recipientPublicKey: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/encrypted_data.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/encrypted_data.g.dart index 5dd75353..a60a0cea 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/encrypted_data.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/encrypted_data.g.dart @@ -10,8 +10,9 @@ _EncryptedData _$EncryptedDataFromJson(Map json) => _EncryptedData( algorithm: $enumDecode(_$EncryptionAlgorithmEnumMap, json['algorithm']), sourcePublicKey: PublicKey.fromJson(json['sourcePublicKey'] as String), - recipientPublicKey: - PublicKey.fromJson(json['recipientPublicKey'] as String), + recipientPublicKey: PublicKey.fromJson( + json['recipientPublicKey'] as String, + ), data: json['data'] as String, nonce: json['nonce'] as String, ); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/encryption_algorithm.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/encryption_algorithm.dart index a6774c25..1cda49b9 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/encryption_algorithm.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/encryption_algorithm.dart @@ -2,10 +2,7 @@ import 'package:freezed_annotation/freezed_annotation.dart'; part 'encryption_algorithm.g.dart'; -@JsonEnum( - alwaysCreate: true, - fieldRename: FieldRename.pascal, -) +@JsonEnum(alwaysCreate: true, fieldRename: FieldRename.pascal) enum EncryptionAlgorithm { chaCha20Poly1305; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/keypair.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/keypair.freezed.dart index 3990bd3b..7676433d 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/keypair.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/keypair.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,203 +14,297 @@ T _$identity(T value) => value; /// @nodoc mixin _$Keypair { - PublicKey get public; - PublicKey get secret; - /// Create a copy of Keypair - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $KeypairCopyWith get copyWith => - _$KeypairCopyWithImpl(this as Keypair, _$identity); + PublicKey get public; PublicKey get secret; +/// Create a copy of Keypair +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$KeypairCopyWith get copyWith => _$KeypairCopyWithImpl(this as Keypair, _$identity); /// Serializes this Keypair to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is Keypair && - (identical(other.public, public) || other.public == public) && - (identical(other.secret, secret) || other.secret == secret)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, public, secret); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Keypair&&(identical(other.public, public) || other.public == public)&&(identical(other.secret, secret) || other.secret == secret)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,public,secret); - @override - String toString() { - return 'Keypair(public: $public, secret: $secret)'; - } +@override +String toString() { + return 'Keypair(public: $public, secret: $secret)'; } -/// @nodoc -abstract mixin class $KeypairCopyWith<$Res> { - factory $KeypairCopyWith(Keypair value, $Res Function(Keypair) _then) = - _$KeypairCopyWithImpl; - @useResult - $Res call({PublicKey public, PublicKey secret}); - $PublicKeyCopyWith<$Res> get public; - $PublicKeyCopyWith<$Res> get secret; } /// @nodoc -class _$KeypairCopyWithImpl<$Res> implements $KeypairCopyWith<$Res> { +abstract mixin class $KeypairCopyWith<$Res> { + factory $KeypairCopyWith(Keypair value, $Res Function(Keypair) _then) = _$KeypairCopyWithImpl; +@useResult +$Res call({ + PublicKey public, PublicKey secret +}); + + +$PublicKeyCopyWith<$Res> get public;$PublicKeyCopyWith<$Res> get secret; + +} +/// @nodoc +class _$KeypairCopyWithImpl<$Res> + implements $KeypairCopyWith<$Res> { _$KeypairCopyWithImpl(this._self, this._then); final Keypair _self; final $Res Function(Keypair) _then; - /// Create a copy of Keypair - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? public = null, - Object? secret = null, - }) { - return _then(_self.copyWith( - public: null == public - ? _self.public - : public // ignore: cast_nullable_to_non_nullable - as PublicKey, - secret: null == secret - ? _self.secret - : secret // ignore: cast_nullable_to_non_nullable - as PublicKey, - )); - } - - /// Create a copy of Keypair - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get public { - return $PublicKeyCopyWith<$Res>(_self.public, (value) { - return _then(_self.copyWith(public: value)); - }); - } - - /// Create a copy of Keypair - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get secret { - return $PublicKeyCopyWith<$Res>(_self.secret, (value) { - return _then(_self.copyWith(secret: value)); - }); - } +/// Create a copy of Keypair +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? public = null,Object? secret = null,}) { + return _then(_self.copyWith( +public: null == public ? _self.public : public // ignore: cast_nullable_to_non_nullable +as PublicKey,secret: null == secret ? _self.secret : secret // ignore: cast_nullable_to_non_nullable +as PublicKey, + )); +} +/// Create a copy of Keypair +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get public { + + return $PublicKeyCopyWith<$Res>(_self.public, (value) { + return _then(_self.copyWith(public: value)); + }); +}/// Create a copy of Keypair +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get secret { + + return $PublicKeyCopyWith<$Res>(_self.secret, (value) { + return _then(_self.copyWith(secret: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [Keypair]. +extension KeypairPatterns on Keypair { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _Keypair value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Keypair() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _Keypair value) $default,){ +final _that = this; +switch (_that) { +case _Keypair(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _Keypair value)? $default,){ +final _that = this; +switch (_that) { +case _Keypair() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( PublicKey public, PublicKey secret)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Keypair() when $default != null: +return $default(_that.public,_that.secret);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( PublicKey public, PublicKey secret) $default,) {final _that = this; +switch (_that) { +case _Keypair(): +return $default(_that.public,_that.secret);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( PublicKey public, PublicKey secret)? $default,) {final _that = this; +switch (_that) { +case _Keypair() when $default != null: +return $default(_that.public,_that.secret);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _Keypair implements Keypair { const _Keypair({required this.public, required this.secret}); - factory _Keypair.fromJson(Map json) => - _$KeypairFromJson(json); - - @override - final PublicKey public; - @override - final PublicKey secret; - - /// Create a copy of Keypair - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$KeypairCopyWith<_Keypair> get copyWith => - __$KeypairCopyWithImpl<_Keypair>(this, _$identity); - - @override - Map toJson() { - return _$KeypairToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _Keypair && - (identical(other.public, public) || other.public == public) && - (identical(other.secret, secret) || other.secret == secret)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, public, secret); - - @override - String toString() { - return 'Keypair(public: $public, secret: $secret)'; - } + factory _Keypair.fromJson(Map json) => _$KeypairFromJson(json); + +@override final PublicKey public; +@override final PublicKey secret; + +/// Create a copy of Keypair +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$KeypairCopyWith<_Keypair> get copyWith => __$KeypairCopyWithImpl<_Keypair>(this, _$identity); + +@override +Map toJson() { + return _$KeypairToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Keypair&&(identical(other.public, public) || other.public == public)&&(identical(other.secret, secret) || other.secret == secret)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,public,secret); + +@override +String toString() { + return 'Keypair(public: $public, secret: $secret)'; +} + + } /// @nodoc abstract mixin class _$KeypairCopyWith<$Res> implements $KeypairCopyWith<$Res> { - factory _$KeypairCopyWith(_Keypair value, $Res Function(_Keypair) _then) = - __$KeypairCopyWithImpl; - @override - @useResult - $Res call({PublicKey public, PublicKey secret}); + factory _$KeypairCopyWith(_Keypair value, $Res Function(_Keypair) _then) = __$KeypairCopyWithImpl; +@override @useResult +$Res call({ + PublicKey public, PublicKey secret +}); - @override - $PublicKeyCopyWith<$Res> get public; - @override - $PublicKeyCopyWith<$Res> get secret; -} +@override $PublicKeyCopyWith<$Res> get public;@override $PublicKeyCopyWith<$Res> get secret; + +} /// @nodoc -class __$KeypairCopyWithImpl<$Res> implements _$KeypairCopyWith<$Res> { +class __$KeypairCopyWithImpl<$Res> + implements _$KeypairCopyWith<$Res> { __$KeypairCopyWithImpl(this._self, this._then); final _Keypair _self; final $Res Function(_Keypair) _then; - /// Create a copy of Keypair - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? public = null, - Object? secret = null, - }) { - return _then(_Keypair( - public: null == public - ? _self.public - : public // ignore: cast_nullable_to_non_nullable - as PublicKey, - secret: null == secret - ? _self.secret - : secret // ignore: cast_nullable_to_non_nullable - as PublicKey, - )); - } - - /// Create a copy of Keypair - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get public { - return $PublicKeyCopyWith<$Res>(_self.public, (value) { - return _then(_self.copyWith(public: value)); - }); - } - - /// Create a copy of Keypair - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PublicKeyCopyWith<$Res> get secret { - return $PublicKeyCopyWith<$Res>(_self.secret, (value) { - return _then(_self.copyWith(secret: value)); - }); - } +/// Create a copy of Keypair +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? public = null,Object? secret = null,}) { + return _then(_Keypair( +public: null == public ? _self.public : public // ignore: cast_nullable_to_non_nullable +as PublicKey,secret: null == secret ? _self.secret : secret // ignore: cast_nullable_to_non_nullable +as PublicKey, + )); +} + +/// Create a copy of Keypair +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get public { + + return $PublicKeyCopyWith<$Res>(_self.public, (value) { + return _then(_self.copyWith(public: value)); + }); +}/// Create a copy of Keypair +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PublicKeyCopyWith<$Res> get secret { + + return $PublicKeyCopyWith<$Res>(_self.secret, (value) { + return _then(_self.copyWith(secret: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/keypair.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/keypair.g.dart index db007a24..1364c0e3 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/keypair.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/keypair.g.dart @@ -7,11 +7,11 @@ part of 'keypair.dart'; // ************************************************************************** _Keypair _$KeypairFromJson(Map json) => _Keypair( - public: PublicKey.fromJson(json['public'] as String), - secret: PublicKey.fromJson(json['secret'] as String), - ); + public: PublicKey.fromJson(json['public'] as String), + secret: PublicKey.fromJson(json['secret'] as String), +); Map _$KeypairToJson(_Keypair instance) => { - 'public': instance.public.toJson(), - 'secret': instance.secret.toJson(), - }; + 'public': instance.public.toJson(), + 'secret': instance.secret.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/signed_message.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/signed_message.freezed.dart index 68683cc1..43d89333 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/signed_message.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/signed_message.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,55 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$SignedMessage { - String get hash; - @dateSecondsSinceEpochJsonConverter - DateTime get expireAt; - String get boc; - - /// Create a copy of SignedMessage - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $SignedMessageCopyWith get copyWith => - _$SignedMessageCopyWithImpl( - this as SignedMessage, _$identity); + + String get hash;@dateSecondsSinceEpochJsonConverter DateTime get expireAt; String get boc; +/// Create a copy of SignedMessage +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$SignedMessageCopyWith get copyWith => _$SignedMessageCopyWithImpl(this as SignedMessage, _$identity); /// Serializes this SignedMessage to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is SignedMessage && - (identical(other.hash, hash) || other.hash == hash) && - (identical(other.expireAt, expireAt) || - other.expireAt == expireAt) && - (identical(other.boc, boc) || other.boc == boc)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, hash, expireAt, boc); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is SignedMessage&&(identical(other.hash, hash) || other.hash == hash)&&(identical(other.expireAt, expireAt) || other.expireAt == expireAt)&&(identical(other.boc, boc) || other.boc == boc)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,hash,expireAt,boc); - @override - String toString() { - return 'SignedMessage(hash: $hash, expireAt: $expireAt, boc: $boc)'; - } +@override +String toString() { + return 'SignedMessage(hash: $hash, expireAt: $expireAt, boc: $boc)'; } -/// @nodoc -abstract mixin class $SignedMessageCopyWith<$Res> { - factory $SignedMessageCopyWith( - SignedMessage value, $Res Function(SignedMessage) _then) = - _$SignedMessageCopyWithImpl; - @useResult - $Res call( - {String hash, - @dateSecondsSinceEpochJsonConverter DateTime expireAt, - String boc}); + } +/// @nodoc +abstract mixin class $SignedMessageCopyWith<$Res> { + factory $SignedMessageCopyWith(SignedMessage value, $Res Function(SignedMessage) _then) = _$SignedMessageCopyWithImpl; +@useResult +$Res call({ + String hash,@dateSecondsSinceEpochJsonConverter DateTime expireAt, String boc +}); + + + + +} /// @nodoc class _$SignedMessageCopyWithImpl<$Res> implements $SignedMessageCopyWith<$Res> { @@ -72,100 +63,195 @@ class _$SignedMessageCopyWithImpl<$Res> final SignedMessage _self; final $Res Function(SignedMessage) _then; - /// Create a copy of SignedMessage - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? hash = null, - Object? expireAt = null, - Object? boc = null, - }) { - return _then(_self.copyWith( - hash: null == hash - ? _self.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - expireAt: null == expireAt - ? _self.expireAt - : expireAt // ignore: cast_nullable_to_non_nullable - as DateTime, - boc: null == boc - ? _self.boc - : boc // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of SignedMessage +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? hash = null,Object? expireAt = null,Object? boc = null,}) { + return _then(_self.copyWith( +hash: null == hash ? _self.hash : hash // ignore: cast_nullable_to_non_nullable +as String,expireAt: null == expireAt ? _self.expireAt : expireAt // ignore: cast_nullable_to_non_nullable +as DateTime,boc: null == boc ? _self.boc : boc // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [SignedMessage]. +extension SignedMessagePatterns on SignedMessage { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _SignedMessage value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _SignedMessage() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _SignedMessage value) $default,){ +final _that = this; +switch (_that) { +case _SignedMessage(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _SignedMessage value)? $default,){ +final _that = this; +switch (_that) { +case _SignedMessage() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String hash, @dateSecondsSinceEpochJsonConverter DateTime expireAt, String boc)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _SignedMessage() when $default != null: +return $default(_that.hash,_that.expireAt,_that.boc);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String hash, @dateSecondsSinceEpochJsonConverter DateTime expireAt, String boc) $default,) {final _that = this; +switch (_that) { +case _SignedMessage(): +return $default(_that.hash,_that.expireAt,_that.boc);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String hash, @dateSecondsSinceEpochJsonConverter DateTime expireAt, String boc)? $default,) {final _that = this; +switch (_that) { +case _SignedMessage() when $default != null: +return $default(_that.hash,_that.expireAt,_that.boc);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _SignedMessage implements SignedMessage { - const _SignedMessage( - {required this.hash, - @dateSecondsSinceEpochJsonConverter required this.expireAt, - required this.boc}); - factory _SignedMessage.fromJson(Map json) => - _$SignedMessageFromJson(json); - - @override - final String hash; - @override - @dateSecondsSinceEpochJsonConverter - final DateTime expireAt; - @override - final String boc; - - /// Create a copy of SignedMessage - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$SignedMessageCopyWith<_SignedMessage> get copyWith => - __$SignedMessageCopyWithImpl<_SignedMessage>(this, _$identity); - - @override - Map toJson() { - return _$SignedMessageToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _SignedMessage && - (identical(other.hash, hash) || other.hash == hash) && - (identical(other.expireAt, expireAt) || - other.expireAt == expireAt) && - (identical(other.boc, boc) || other.boc == boc)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, hash, expireAt, boc); - - @override - String toString() { - return 'SignedMessage(hash: $hash, expireAt: $expireAt, boc: $boc)'; - } + const _SignedMessage({required this.hash, @dateSecondsSinceEpochJsonConverter required this.expireAt, required this.boc}); + factory _SignedMessage.fromJson(Map json) => _$SignedMessageFromJson(json); + +@override final String hash; +@override@dateSecondsSinceEpochJsonConverter final DateTime expireAt; +@override final String boc; + +/// Create a copy of SignedMessage +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$SignedMessageCopyWith<_SignedMessage> get copyWith => __$SignedMessageCopyWithImpl<_SignedMessage>(this, _$identity); + +@override +Map toJson() { + return _$SignedMessageToJson(this, ); } -/// @nodoc -abstract mixin class _$SignedMessageCopyWith<$Res> - implements $SignedMessageCopyWith<$Res> { - factory _$SignedMessageCopyWith( - _SignedMessage value, $Res Function(_SignedMessage) _then) = - __$SignedMessageCopyWithImpl; - @override - @useResult - $Res call( - {String hash, - @dateSecondsSinceEpochJsonConverter DateTime expireAt, - String boc}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _SignedMessage&&(identical(other.hash, hash) || other.hash == hash)&&(identical(other.expireAt, expireAt) || other.expireAt == expireAt)&&(identical(other.boc, boc) || other.boc == boc)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,hash,expireAt,boc); + +@override +String toString() { + return 'SignedMessage(hash: $hash, expireAt: $expireAt, boc: $boc)'; +} + + } +/// @nodoc +abstract mixin class _$SignedMessageCopyWith<$Res> implements $SignedMessageCopyWith<$Res> { + factory _$SignedMessageCopyWith(_SignedMessage value, $Res Function(_SignedMessage) _then) = __$SignedMessageCopyWithImpl; +@override @useResult +$Res call({ + String hash,@dateSecondsSinceEpochJsonConverter DateTime expireAt, String boc +}); + + + + +} /// @nodoc class __$SignedMessageCopyWithImpl<$Res> implements _$SignedMessageCopyWith<$Res> { @@ -174,30 +260,18 @@ class __$SignedMessageCopyWithImpl<$Res> final _SignedMessage _self; final $Res Function(_SignedMessage) _then; - /// Create a copy of SignedMessage - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? hash = null, - Object? expireAt = null, - Object? boc = null, - }) { - return _then(_SignedMessage( - hash: null == hash - ? _self.hash - : hash // ignore: cast_nullable_to_non_nullable - as String, - expireAt: null == expireAt - ? _self.expireAt - : expireAt // ignore: cast_nullable_to_non_nullable - as DateTime, - boc: null == boc - ? _self.boc - : boc // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of SignedMessage +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? hash = null,Object? expireAt = null,Object? boc = null,}) { + return _then(_SignedMessage( +hash: null == hash ? _self.hash : hash // ignore: cast_nullable_to_non_nullable +as String,expireAt: null == expireAt ? _self.expireAt : expireAt // ignore: cast_nullable_to_non_nullable +as DateTime,boc: null == boc ? _self.boc : boc // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/signed_message.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/signed_message.g.dart index 6036ee74..35def0ea 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/signed_message.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/models/signed_message.g.dart @@ -9,8 +9,9 @@ part of 'signed_message.dart'; _SignedMessage _$SignedMessageFromJson(Map json) => _SignedMessage( hash: json['hash'] as String, - expireAt: dateSecondsSinceEpochJsonConverter - .fromJson((json['expireAt'] as num).toInt()), + expireAt: dateSecondsSinceEpochJsonConverter.fromJson( + (json['expireAt'] as num).toInt(), + ), boc: json['boc'] as String, ); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password.freezed.dart index 5aa1cc68..39c7f141 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,164 +11,311 @@ part of 'password.dart'; // dart format off T _$identity(T value) => value; -Password _$PasswordFromJson(Map json) { - switch (json['type']) { - case 'explicit': - return _Explicit.fromJson(json); - case 'from_cache': - return _FromCache.fromJson(json); - - default: - throw CheckedFromJsonException( - json, 'type', 'Password', 'Invalid union type "${json['type']}"!'); - } +Password _$PasswordFromJson( + Map json +) { + switch (json['type']) { + case 'explicit': + return _Explicit.fromJson( + json + ); + case 'from_cache': + return _FromCache.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'Password', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$Password { + + + /// Serializes this Password to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is Password); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Password); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'Password()'; +} + - @override - String toString() { - return 'Password()'; - } } /// @nodoc -class $PasswordCopyWith<$Res> { - $PasswordCopyWith(Password _, $Res Function(Password) __); +class $PasswordCopyWith<$Res> { +$PasswordCopyWith(Password _, $Res Function(Password) __); +} + + +/// Adds pattern-matching-related methods to [Password]. +extension PasswordPatterns on Password { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( _Explicit value)? explicit,TResult Function( _FromCache value)? fromCache,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Explicit() when explicit != null: +return explicit(_that);case _FromCache() when fromCache != null: +return fromCache(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( _Explicit value) explicit,required TResult Function( _FromCache value) fromCache,}){ +final _that = this; +switch (_that) { +case _Explicit(): +return explicit(_that);case _FromCache(): +return fromCache(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( _Explicit value)? explicit,TResult? Function( _FromCache value)? fromCache,}){ +final _that = this; +switch (_that) { +case _Explicit() when explicit != null: +return explicit(_that);case _FromCache() when fromCache != null: +return fromCache(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( PasswordExplicit data)? explicit,TResult Function()? fromCache,required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Explicit() when explicit != null: +return explicit(_that.data);case _FromCache() when fromCache != null: +return fromCache();case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( PasswordExplicit data) explicit,required TResult Function() fromCache,}) {final _that = this; +switch (_that) { +case _Explicit(): +return explicit(_that.data);case _FromCache(): +return fromCache();} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( PasswordExplicit data)? explicit,TResult? Function()? fromCache,}) {final _that = this; +switch (_that) { +case _Explicit() when explicit != null: +return explicit(_that.data);case _FromCache() when fromCache != null: +return fromCache();case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _Explicit implements Password { - const _Explicit(this.data, {final String? $type}) - : $type = $type ?? 'explicit'; - factory _Explicit.fromJson(Map json) => - _$ExplicitFromJson(json); - - final PasswordExplicit data; - - @JsonKey(name: 'type') - final String $type; - - /// Create a copy of Password - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$ExplicitCopyWith<_Explicit> get copyWith => - __$ExplicitCopyWithImpl<_Explicit>(this, _$identity); - - @override - Map toJson() { - return _$ExplicitToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _Explicit && - (identical(other.data, data) || other.data == data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); - - @override - String toString() { - return 'Password.explicit(data: $data)'; - } + const _Explicit(this.data, {final String? $type}): $type = $type ?? 'explicit'; + factory _Explicit.fromJson(Map json) => _$ExplicitFromJson(json); + + final PasswordExplicit data; + +@JsonKey(name: 'type') +final String $type; + + +/// Create a copy of Password +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$ExplicitCopyWith<_Explicit> get copyWith => __$ExplicitCopyWithImpl<_Explicit>(this, _$identity); + +@override +Map toJson() { + return _$ExplicitToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Explicit&&(identical(other.data, data) || other.data == data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); + +@override +String toString() { + return 'Password.explicit(data: $data)'; } -/// @nodoc -abstract mixin class _$ExplicitCopyWith<$Res> - implements $PasswordCopyWith<$Res> { - factory _$ExplicitCopyWith(_Explicit value, $Res Function(_Explicit) _then) = - __$ExplicitCopyWithImpl; - @useResult - $Res call({PasswordExplicit data}); - $PasswordExplicitCopyWith<$Res> get data; } /// @nodoc -class __$ExplicitCopyWithImpl<$Res> implements _$ExplicitCopyWith<$Res> { +abstract mixin class _$ExplicitCopyWith<$Res> implements $PasswordCopyWith<$Res> { + factory _$ExplicitCopyWith(_Explicit value, $Res Function(_Explicit) _then) = __$ExplicitCopyWithImpl; +@useResult +$Res call({ + PasswordExplicit data +}); + + +$PasswordExplicitCopyWith<$Res> get data; + +} +/// @nodoc +class __$ExplicitCopyWithImpl<$Res> + implements _$ExplicitCopyWith<$Res> { __$ExplicitCopyWithImpl(this._self, this._then); final _Explicit _self; final $Res Function(_Explicit) _then; - /// Create a copy of Password - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(_Explicit( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as PasswordExplicit, - )); - } - - /// Create a copy of Password - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordExplicitCopyWith<$Res> get data { - return $PasswordExplicitCopyWith<$Res>(_self.data, (value) { - return _then(_self.copyWith(data: value)); - }); - } +/// Create a copy of Password +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(_Explicit( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as PasswordExplicit, + )); +} + +/// Create a copy of Password +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordExplicitCopyWith<$Res> get data { + + return $PasswordExplicitCopyWith<$Res>(_self.data, (value) { + return _then(_self.copyWith(data: value)); + }); +} } /// @nodoc @JsonSerializable() + class _FromCache implements Password { - const _FromCache({final String? $type}) : $type = $type ?? 'from_cache'; - factory _FromCache.fromJson(Map json) => - _$FromCacheFromJson(json); - - @JsonKey(name: 'type') - final String $type; - - @override - Map toJson() { - return _$FromCacheToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _FromCache); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; - - @override - String toString() { - return 'Password.fromCache()'; - } + const _FromCache({final String? $type}): $type = $type ?? 'from_cache'; + factory _FromCache.fromJson(Map json) => _$FromCacheFromJson(json); + + + +@JsonKey(name: 'type') +final String $type; + + + +@override +Map toJson() { + return _$FromCacheToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _FromCache); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'Password.fromCache()'; +} + + +} + + + + // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password.g.dart index a59f88f1..455eb430 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password.g.dart @@ -7,20 +7,17 @@ part of 'password.dart'; // ************************************************************************** _Explicit _$ExplicitFromJson(Map json) => _Explicit( - PasswordExplicit.fromJson(json['data'] as Map), - $type: json['type'] as String?, - ); + PasswordExplicit.fromJson(json['data'] as Map), + $type: json['type'] as String?, +); Map _$ExplicitToJson(_Explicit instance) => { - 'data': instance.data.toJson(), - 'type': instance.$type, - }; + 'data': instance.data.toJson(), + 'type': instance.$type, +}; -_FromCache _$FromCacheFromJson(Map json) => _FromCache( - $type: json['type'] as String?, - ); +_FromCache _$FromCacheFromJson(Map json) => + _FromCache($type: json['type'] as String?); Map _$FromCacheToJson(_FromCache instance) => - { - 'type': instance.$type, - }; + {'type': instance.$type}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_cache_behavior.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_cache_behavior.freezed.dart index 986cbcd1..93426d7b 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_cache_behavior.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_cache_behavior.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -13,184 +12,350 @@ part of 'password_cache_behavior.dart'; // dart format off T _$identity(T value) => value; PasswordCacheBehavior _$PasswordCacheBehaviorFromJson( - Map json) { - switch (json['type']) { - case 'store': - return _Store.fromJson(json); - case 'remove': - return _Remove.fromJson(json); - case 'nop': - return _Nop.fromJson(json); - - default: - throw CheckedFromJsonException(json, 'type', 'PasswordCacheBehavior', - 'Invalid union type "${json['type']}"!'); - } + Map json +) { + switch (json['type']) { + case 'store': + return _Store.fromJson( + json + ); + case 'remove': + return _Remove.fromJson( + json + ); + case 'nop': + return _Nop.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'type', + 'PasswordCacheBehavior', + 'Invalid union type "${json['type']}"!' +); + } + } /// @nodoc mixin _$PasswordCacheBehavior { + + + /// Serializes this PasswordCacheBehavior to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is PasswordCacheBehavior); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is PasswordCacheBehavior); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'PasswordCacheBehavior()'; +} + - @override - String toString() { - return 'PasswordCacheBehavior()'; - } } /// @nodoc -class $PasswordCacheBehaviorCopyWith<$Res> { - $PasswordCacheBehaviorCopyWith( - PasswordCacheBehavior _, $Res Function(PasswordCacheBehavior) __); +class $PasswordCacheBehaviorCopyWith<$Res> { +$PasswordCacheBehaviorCopyWith(PasswordCacheBehavior _, $Res Function(PasswordCacheBehavior) __); +} + + +/// Adds pattern-matching-related methods to [PasswordCacheBehavior]. +extension PasswordCacheBehaviorPatterns on PasswordCacheBehavior { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( _Store value)? store,TResult Function( _Remove value)? remove,TResult Function( _Nop value)? nop,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Store() when store != null: +return store(_that);case _Remove() when remove != null: +return remove(_that);case _Nop() when nop != null: +return nop(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( _Store value) store,required TResult Function( _Remove value) remove,required TResult Function( _Nop value) nop,}){ +final _that = this; +switch (_that) { +case _Store(): +return store(_that);case _Remove(): +return remove(_that);case _Nop(): +return nop(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( _Store value)? store,TResult? Function( _Remove value)? remove,TResult? Function( _Nop value)? nop,}){ +final _that = this; +switch (_that) { +case _Store() when store != null: +return store(_that);case _Remove() when remove != null: +return remove(_that);case _Nop() when nop != null: +return nop(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( int data)? store,TResult Function()? remove,TResult Function()? nop,required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Store() when store != null: +return store(_that.data);case _Remove() when remove != null: +return remove();case _Nop() when nop != null: +return nop();case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( int data) store,required TResult Function() remove,required TResult Function() nop,}) {final _that = this; +switch (_that) { +case _Store(): +return store(_that.data);case _Remove(): +return remove();case _Nop(): +return nop();} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( int data)? store,TResult? Function()? remove,TResult? Function()? nop,}) {final _that = this; +switch (_that) { +case _Store() when store != null: +return store(_that.data);case _Remove() when remove != null: +return remove();case _Nop() when nop != null: +return nop();case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _Store implements PasswordCacheBehavior { - const _Store(this.data, {final String? $type}) : $type = $type ?? 'store'; + const _Store(this.data, {final String? $type}): $type = $type ?? 'store'; factory _Store.fromJson(Map json) => _$StoreFromJson(json); - final int data; + final int data; + +@JsonKey(name: 'type') +final String $type; - @JsonKey(name: 'type') - final String $type; - /// Create a copy of PasswordCacheBehavior - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$StoreCopyWith<_Store> get copyWith => - __$StoreCopyWithImpl<_Store>(this, _$identity); +/// Create a copy of PasswordCacheBehavior +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$StoreCopyWith<_Store> get copyWith => __$StoreCopyWithImpl<_Store>(this, _$identity); - @override - Map toJson() { - return _$StoreToJson( - this, - ); - } +@override +Map toJson() { + return _$StoreToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _Store && - (identical(other.data, data) || other.data == data)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Store&&(identical(other.data, data) || other.data == data)); +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, data); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,data); - @override - String toString() { - return 'PasswordCacheBehavior.store(data: $data)'; - } +@override +String toString() { + return 'PasswordCacheBehavior.store(data: $data)'; } -/// @nodoc -abstract mixin class _$StoreCopyWith<$Res> - implements $PasswordCacheBehaviorCopyWith<$Res> { - factory _$StoreCopyWith(_Store value, $Res Function(_Store) _then) = - __$StoreCopyWithImpl; - @useResult - $Res call({int data}); + } /// @nodoc -class __$StoreCopyWithImpl<$Res> implements _$StoreCopyWith<$Res> { +abstract mixin class _$StoreCopyWith<$Res> implements $PasswordCacheBehaviorCopyWith<$Res> { + factory _$StoreCopyWith(_Store value, $Res Function(_Store) _then) = __$StoreCopyWithImpl; +@useResult +$Res call({ + int data +}); + + + + +} +/// @nodoc +class __$StoreCopyWithImpl<$Res> + implements _$StoreCopyWith<$Res> { __$StoreCopyWithImpl(this._self, this._then); final _Store _self; final $Res Function(_Store) _then; - /// Create a copy of PasswordCacheBehavior - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? data = null, - }) { - return _then(_Store( - null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of PasswordCacheBehavior +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? data = null,}) { + return _then(_Store( +null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + } /// @nodoc @JsonSerializable() + class _Remove implements PasswordCacheBehavior { - const _Remove({final String? $type}) : $type = $type ?? 'remove'; + const _Remove({final String? $type}): $type = $type ?? 'remove'; factory _Remove.fromJson(Map json) => _$RemoveFromJson(json); - @JsonKey(name: 'type') - final String $type; - @override - Map toJson() { - return _$RemoveToJson( - this, - ); - } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _Remove); - } +@JsonKey(name: 'type') +final String $type; + - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'PasswordCacheBehavior.remove()'; - } +@override +Map toJson() { + return _$RemoveToJson(this, ); } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Remove); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'PasswordCacheBehavior.remove()'; +} + + +} + + + + /// @nodoc @JsonSerializable() + class _Nop implements PasswordCacheBehavior { - const _Nop({final String? $type}) : $type = $type ?? 'nop'; + const _Nop({final String? $type}): $type = $type ?? 'nop'; factory _Nop.fromJson(Map json) => _$NopFromJson(json); - @JsonKey(name: 'type') - final String $type; - @override - Map toJson() { - return _$NopToJson( - this, - ); - } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _Nop); - } +@JsonKey(name: 'type') +final String $type; - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'PasswordCacheBehavior.nop()'; - } + +@override +Map toJson() { + return _$NopToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Nop); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'PasswordCacheBehavior.nop()'; +} + + +} + + + + // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_cache_behavior.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_cache_behavior.g.dart index 1719e08e..616e020e 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_cache_behavior.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_cache_behavior.g.dart @@ -6,28 +6,24 @@ part of 'password_cache_behavior.dart'; // JsonSerializableGenerator // ************************************************************************** -_Store _$StoreFromJson(Map json) => _Store( - (json['data'] as num).toInt(), - $type: json['type'] as String?, - ); +_Store _$StoreFromJson(Map json) => + _Store((json['data'] as num).toInt(), $type: json['type'] as String?); Map _$StoreToJson(_Store instance) => { - 'data': instance.data, - 'type': instance.$type, - }; + 'data': instance.data, + 'type': instance.$type, +}; -_Remove _$RemoveFromJson(Map json) => _Remove( - $type: json['type'] as String?, - ); +_Remove _$RemoveFromJson(Map json) => + _Remove($type: json['type'] as String?); Map _$RemoveToJson(_Remove instance) => { - 'type': instance.$type, - }; + 'type': instance.$type, +}; -_Nop _$NopFromJson(Map json) => _Nop( - $type: json['type'] as String?, - ); +_Nop _$NopFromJson(Map json) => + _Nop($type: json['type'] as String?); Map _$NopToJson(_Nop instance) => { - 'type': instance.$type, - }; + 'type': instance.$type, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_explicit.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_explicit.freezed.dart index ab950301..7f69906d 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_explicit.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_explicit.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,58 +11,57 @@ part of 'password_explicit.dart'; // dart format off T _$identity(T value) => value; -PasswordExplicit _$PasswordExplicitFromJson(Map json) { - return _PasswordExplicitExplicit.fromJson(json); +PasswordExplicit _$PasswordExplicitFromJson( + Map json +) { + return _PasswordExplicitExplicit.fromJson( + json + ); } /// @nodoc mixin _$PasswordExplicit { - String get password; - PasswordCacheBehavior get cacheBehavior; - /// Create a copy of PasswordExplicit - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $PasswordExplicitCopyWith get copyWith => - _$PasswordExplicitCopyWithImpl( - this as PasswordExplicit, _$identity); + String get password; PasswordCacheBehavior get cacheBehavior; +/// Create a copy of PasswordExplicit +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$PasswordExplicitCopyWith get copyWith => _$PasswordExplicitCopyWithImpl(this as PasswordExplicit, _$identity); /// Serializes this PasswordExplicit to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is PasswordExplicit && - (identical(other.password, password) || - other.password == password) && - (identical(other.cacheBehavior, cacheBehavior) || - other.cacheBehavior == cacheBehavior)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, password, cacheBehavior); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is PasswordExplicit&&(identical(other.password, password) || other.password == password)&&(identical(other.cacheBehavior, cacheBehavior) || other.cacheBehavior == cacheBehavior)); +} - @override - String toString() { - return 'PasswordExplicit(password: $password, cacheBehavior: $cacheBehavior)'; - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,password,cacheBehavior); + +@override +String toString() { + return 'PasswordExplicit(password: $password, cacheBehavior: $cacheBehavior)'; } -/// @nodoc -abstract mixin class $PasswordExplicitCopyWith<$Res> { - factory $PasswordExplicitCopyWith( - PasswordExplicit value, $Res Function(PasswordExplicit) _then) = - _$PasswordExplicitCopyWithImpl; - @useResult - $Res call({String password, PasswordCacheBehavior cacheBehavior}); - $PasswordCacheBehaviorCopyWith<$Res> get cacheBehavior; } +/// @nodoc +abstract mixin class $PasswordExplicitCopyWith<$Res> { + factory $PasswordExplicitCopyWith(PasswordExplicit value, $Res Function(PasswordExplicit) _then) = _$PasswordExplicitCopyWithImpl; +@useResult +$Res call({ + String password, PasswordCacheBehavior cacheBehavior +}); + + +$PasswordCacheBehaviorCopyWith<$Res> get cacheBehavior; + +} /// @nodoc class _$PasswordExplicitCopyWithImpl<$Res> implements $PasswordExplicitCopyWith<$Res> { @@ -72,102 +70,202 @@ class _$PasswordExplicitCopyWithImpl<$Res> final PasswordExplicit _self; final $Res Function(PasswordExplicit) _then; - /// Create a copy of PasswordExplicit - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? password = null, - Object? cacheBehavior = null, - }) { - return _then(_self.copyWith( - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as String, - cacheBehavior: null == cacheBehavior - ? _self.cacheBehavior - : cacheBehavior // ignore: cast_nullable_to_non_nullable - as PasswordCacheBehavior, - )); - } - - /// Create a copy of PasswordExplicit - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCacheBehaviorCopyWith<$Res> get cacheBehavior { - return $PasswordCacheBehaviorCopyWith<$Res>(_self.cacheBehavior, (value) { - return _then(_self.copyWith(cacheBehavior: value)); - }); - } +/// Create a copy of PasswordExplicit +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? password = null,Object? cacheBehavior = null,}) { + return _then(_self.copyWith( +password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as String,cacheBehavior: null == cacheBehavior ? _self.cacheBehavior : cacheBehavior // ignore: cast_nullable_to_non_nullable +as PasswordCacheBehavior, + )); +} +/// Create a copy of PasswordExplicit +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCacheBehaviorCopyWith<$Res> get cacheBehavior { + + return $PasswordCacheBehaviorCopyWith<$Res>(_self.cacheBehavior, (value) { + return _then(_self.copyWith(cacheBehavior: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [PasswordExplicit]. +extension PasswordExplicitPatterns on PasswordExplicit { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _PasswordExplicitExplicit value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _PasswordExplicitExplicit() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _PasswordExplicitExplicit value) $default,){ +final _that = this; +switch (_that) { +case _PasswordExplicitExplicit(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _PasswordExplicitExplicit value)? $default,){ +final _that = this; +switch (_that) { +case _PasswordExplicitExplicit() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String password, PasswordCacheBehavior cacheBehavior)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _PasswordExplicitExplicit() when $default != null: +return $default(_that.password,_that.cacheBehavior);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String password, PasswordCacheBehavior cacheBehavior) $default,) {final _that = this; +switch (_that) { +case _PasswordExplicitExplicit(): +return $default(_that.password,_that.cacheBehavior);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String password, PasswordCacheBehavior cacheBehavior)? $default,) {final _that = this; +switch (_that) { +case _PasswordExplicitExplicit() when $default != null: +return $default(_that.password,_that.cacheBehavior);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable(fieldRename: FieldRename.snake) class _PasswordExplicitExplicit implements PasswordExplicit { - const _PasswordExplicitExplicit( - {required this.password, required this.cacheBehavior}); - factory _PasswordExplicitExplicit.fromJson(Map json) => - _$PasswordExplicitExplicitFromJson(json); - - @override - final String password; - @override - final PasswordCacheBehavior cacheBehavior; - - /// Create a copy of PasswordExplicit - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$PasswordExplicitExplicitCopyWith<_PasswordExplicitExplicit> get copyWith => - __$PasswordExplicitExplicitCopyWithImpl<_PasswordExplicitExplicit>( - this, _$identity); - - @override - Map toJson() { - return _$PasswordExplicitExplicitToJson( - this, - ); - } + const _PasswordExplicitExplicit({required this.password, required this.cacheBehavior}); + factory _PasswordExplicitExplicit.fromJson(Map json) => _$PasswordExplicitExplicitFromJson(json); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _PasswordExplicitExplicit && - (identical(other.password, password) || - other.password == password) && - (identical(other.cacheBehavior, cacheBehavior) || - other.cacheBehavior == cacheBehavior)); - } +@override final String password; +@override final PasswordCacheBehavior cacheBehavior; - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, password, cacheBehavior); +/// Create a copy of PasswordExplicit +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$PasswordExplicitExplicitCopyWith<_PasswordExplicitExplicit> get copyWith => __$PasswordExplicitExplicitCopyWithImpl<_PasswordExplicitExplicit>(this, _$identity); - @override - String toString() { - return 'PasswordExplicit(password: $password, cacheBehavior: $cacheBehavior)'; - } +@override +Map toJson() { + return _$PasswordExplicitExplicitToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _PasswordExplicitExplicit&&(identical(other.password, password) || other.password == password)&&(identical(other.cacheBehavior, cacheBehavior) || other.cacheBehavior == cacheBehavior)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,password,cacheBehavior); + +@override +String toString() { + return 'PasswordExplicit(password: $password, cacheBehavior: $cacheBehavior)'; } -/// @nodoc -abstract mixin class _$PasswordExplicitExplicitCopyWith<$Res> - implements $PasswordExplicitCopyWith<$Res> { - factory _$PasswordExplicitExplicitCopyWith(_PasswordExplicitExplicit value, - $Res Function(_PasswordExplicitExplicit) _then) = - __$PasswordExplicitExplicitCopyWithImpl; - @override - @useResult - $Res call({String password, PasswordCacheBehavior cacheBehavior}); - @override - $PasswordCacheBehaviorCopyWith<$Res> get cacheBehavior; } +/// @nodoc +abstract mixin class _$PasswordExplicitExplicitCopyWith<$Res> implements $PasswordExplicitCopyWith<$Res> { + factory _$PasswordExplicitExplicitCopyWith(_PasswordExplicitExplicit value, $Res Function(_PasswordExplicitExplicit) _then) = __$PasswordExplicitExplicitCopyWithImpl; +@override @useResult +$Res call({ + String password, PasswordCacheBehavior cacheBehavior +}); + + +@override $PasswordCacheBehaviorCopyWith<$Res> get cacheBehavior; + +} /// @nodoc class __$PasswordExplicitExplicitCopyWithImpl<$Res> implements _$PasswordExplicitExplicitCopyWith<$Res> { @@ -176,35 +274,26 @@ class __$PasswordExplicitExplicitCopyWithImpl<$Res> final _PasswordExplicitExplicit _self; final $Res Function(_PasswordExplicitExplicit) _then; - /// Create a copy of PasswordExplicit - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? password = null, - Object? cacheBehavior = null, - }) { - return _then(_PasswordExplicitExplicit( - password: null == password - ? _self.password - : password // ignore: cast_nullable_to_non_nullable - as String, - cacheBehavior: null == cacheBehavior - ? _self.cacheBehavior - : cacheBehavior // ignore: cast_nullable_to_non_nullable - as PasswordCacheBehavior, - )); - } - - /// Create a copy of PasswordExplicit - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PasswordCacheBehaviorCopyWith<$Res> get cacheBehavior { - return $PasswordCacheBehaviorCopyWith<$Res>(_self.cacheBehavior, (value) { - return _then(_self.copyWith(cacheBehavior: value)); - }); - } +/// Create a copy of PasswordExplicit +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? password = null,Object? cacheBehavior = null,}) { + return _then(_PasswordExplicitExplicit( +password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable +as String,cacheBehavior: null == cacheBehavior ? _self.cacheBehavior : cacheBehavior // ignore: cast_nullable_to_non_nullable +as PasswordCacheBehavior, + )); +} + +/// Create a copy of PasswordExplicit +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PasswordCacheBehaviorCopyWith<$Res> get cacheBehavior { + + return $PasswordCacheBehaviorCopyWith<$Res>(_self.cacheBehavior, (value) { + return _then(_self.copyWith(cacheBehavior: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_explicit.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_explicit.g.dart index 6e72f8ba..e699d590 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_explicit.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/password_cache/password_explicit.g.dart @@ -7,16 +7,17 @@ part of 'password_explicit.dart'; // ************************************************************************** _PasswordExplicitExplicit _$PasswordExplicitExplicitFromJson( - Map json) => - _PasswordExplicitExplicit( - password: json['password'] as String, - cacheBehavior: PasswordCacheBehavior.fromJson( - json['cache_behavior'] as Map), - ); + Map json, +) => _PasswordExplicitExplicit( + password: json['password'] as String, + cacheBehavior: PasswordCacheBehavior.fromJson( + json['cache_behavior'] as Map, + ), +); Map _$PasswordExplicitExplicitToJson( - _PasswordExplicitExplicit instance) => - { - 'password': instance.password, - 'cache_behavior': instance.cacheBehavior.toJson(), - }; + _PasswordExplicitExplicit instance, +) => { + 'password': instance.password, + 'cache_behavior': instance.cacheBehavior.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/unsigned_message.dart b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/unsigned_message.dart index 44c6e16b..8f472ff7 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/crypto/unsigned_message.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/crypto/unsigned_message.dart @@ -20,8 +20,9 @@ class UnsignedMessage { final instance = UnsignedMessage._(message); instance.hash = await message.hash(); - instance.expireAt = - dateSecondsSinceEpochJsonConverter.fromJson(await message.expireAt()); + instance.expireAt = dateSecondsSinceEpochJsonConverter.fromJson( + await message.expireAt(), + ); return instance; } diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/external_lib.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/external_lib.dart index dccf9b0e..5ea62162 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/external_lib.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/external_lib.dart @@ -1,8 +1,8 @@ -export 'gql_connection.dart' hide main; -export 'proto_connection.dart' hide main; -export 'jrpc_connection.dart' hide main; -export 'ledger_connection.dart' hide main; -export 'storage.dart' hide main; +export 'gql_connection.dart'; +export 'proto_connection.dart'; +export 'jrpc_connection.dart'; +export 'ledger_connection.dart'; +export 'storage.dart'; export 'models/gql_network_settings.dart'; export 'models/proto_network_settings.dart'; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/gql_connection.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/gql_connection.dart index 0c21be9d..c5bf5634 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/gql_connection.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/gql_connection.dart @@ -3,9 +3,6 @@ import 'dart:convert'; import 'package:flutter/foundation.dart'; import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart'; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart'; -import 'package:reflectable/mirrors.dart'; -import 'gql_connection.reflectable.dart'; abstract interface class GqlConnectionHttpClient { Future post({ @@ -19,8 +16,7 @@ abstract interface class GqlConnectionHttpClient { void dispose(); } -@reflector -class GqlConnection extends RustToDartMirrorInterface { +class GqlConnection { late GqlConnectionDartWrapper connection; final GqlConnectionHttpClient _client; @@ -33,12 +29,7 @@ class GqlConnection extends RustToDartMirrorInterface { String? _cachedEndpoint; - GqlConnection._( - this._client, - this.settings, - this._name, - this._group, - ); + GqlConnection._(this._client, this.settings, this._name, this._group); static GqlConnection create({ required GqlConnectionHttpClient client, @@ -49,8 +40,8 @@ class GqlConnection extends RustToDartMirrorInterface { final instance = GqlConnection._(client, settings, name, group); instance.connection = GqlConnectionDartWrapper( - instanceHash: instance.instanceHash, isLocal: settings.local, + onPost: instance.post, ); return instance; @@ -73,9 +64,7 @@ class GqlConnection extends RustToDartMirrorInterface { return await _client.post( endpoint: endpoint, - headers: { - 'Content-Type': 'application/json', - }, + headers: {'Content-Type': 'application/json'}, data: requestData, ); } catch (error) { @@ -105,19 +94,24 @@ class GqlConnection extends RustToDartMirrorInterface { var checkedEndpoints = 0; for (final e in settings.endpoints) { - _checkLatency(e).whenComplete(() { - checkedEndpoints++; - }).then((v) { - if (!completer.isCompleted) completer.complete(e); - }).onError((err, st) { - if (checkedEndpoints == endpointsCount && !completer.isCompleted) { - completer.completeError(err!, st); - } - }); + _checkLatency(e) + .whenComplete(() { + checkedEndpoints++; + }) + .then((v) { + if (!completer.isCompleted) completer.complete(e); + }) + .onError((err, st) { + if (checkedEndpoints == endpointsCount && + !completer.isCompleted) { + completer.completeError(err!, st); + } + }); } - return await completer.future - .timeout(Duration(milliseconds: maxLatency)); + return await completer.future.timeout( + Duration(milliseconds: maxLatency), + ); } catch (err, st) { debugPrint(err.toString()); debugPrint(st.toString()); @@ -141,18 +135,8 @@ class GqlConnection extends RustToDartMirrorInterface { return latency; } - @override void dispose() { connection.innerConnection.dispose(); _client.dispose(); - super.dispose(); - } - - @override - InstanceMirror initializeMirror() { - initializeReflectable(); // auto-generated reflectable file - return reflector.reflect(this); } } - -void main() {} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/gql_connection.reflectable.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/gql_connection.reflectable.dart deleted file mode 100644 index a0a24a25..00000000 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/gql_connection.reflectable.dart +++ /dev/null @@ -1,803 +0,0 @@ -// This file has been generated by the reflectable package. -// https://github.com/dart-lang/reflectable. -import 'dart:core'; -import 'gql_connection.dart' as prefix1; -import 'package:flutter_nekoton_bridge/nekoton/core/generic_contract/generic_contract.dart' - as prefix6; -import 'package:flutter_nekoton_bridge/nekoton/core/jetton_wallet/jetton_wallet.dart' - as prefix8; -import 'package:flutter_nekoton_bridge/nekoton/core/token_wallet/token_wallet.dart' - as prefix7; -import 'package:flutter_nekoton_bridge/nekoton/core/ton_wallet/ton_wallet.dart' - as prefix9; -import 'package:flutter_nekoton_bridge/nekoton/external/jrpc_connection.dart' - as prefix3; -import 'package:flutter_nekoton_bridge/nekoton/external/ledger_connection.dart' - as prefix4; -import 'package:flutter_nekoton_bridge/nekoton/external/proto_connection.dart' - as prefix2; -import 'package:flutter_nekoton_bridge/nekoton/external/storage.dart' - as prefix5; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart' as prefix0; - -// ignore_for_file: camel_case_types -// ignore_for_file: implementation_imports -// ignore_for_file: prefer_adjacent_string_concatenation -// ignore_for_file: prefer_collection_literals -// ignore_for_file: unnecessary_const -// ignore_for_file: unused_import -// ignore_for_file: sdk_version_since - -import 'package:reflectable/mirrors.dart' as m; -import 'package:reflectable/src/reflectable_builder_based.dart' as r; -import 'package:reflectable/reflectable.dart' as r show Reflectable; - -final _data = { - const prefix0.Reflector(): r.ReflectorData( - [ - r.NonGenericClassMirrorImpl( - r'GqlConnection', - r'.GqlConnection', - 134217735, - 0, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix1.GqlConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 1, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 0, - }, - ), - r.NonGenericClassMirrorImpl( - r'ProtoConnection', - r'.ProtoConnection', - 134217735, - 1, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix2.ProtoConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 1, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 0, - }, - ), - r.NonGenericClassMirrorImpl( - r'JrpcConnection', - r'.JrpcConnection', - 134217735, - 2, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix3.JrpcConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 1, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 0, - }, - ), - r.NonGenericClassMirrorImpl( - r'LedgerConnection', - r'.LedgerConnection', - 134217735, - 3, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix4.LedgerConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getPublicKey': 1, - r'sign': 2, - r'signTransaction': 3, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'create': 1, - }, - ), - r.NonGenericClassMirrorImpl( - r'Storage', - r'.Storage', - 134217735, - 4, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix5.Storage.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'get': 1, - r'set': 5, - r'setUnchecked': 5, - r'remove': 5, - r'removeUnchecked': 5, - r'initializeMirror': 0, - r'storage': 0, - r'storage=': 1, - r'create': 4, - }, - ), - r.NonGenericClassMirrorImpl( - r'GenericContract', - r'.GenericContract', - 134217735, - 5, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'subscribe': () => prefix6.GenericContract.subscribe}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'executeTransactionLocally': 7, - r'estimateFees': 7, - r'send': 7, - r'refresh': 0, - r'preloadTransactions': 8, - r'handleBlock': 9, - r'onMessageSent': 1, - r'onMessageExpired': 1, - r'onStateChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 0, - r'contract': 0, - r'contract=': 1, - r'transport': 0, - r'address': 0, - r'address=': 1, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 6, - }, - ), - r.NonGenericClassMirrorImpl( - r'TokenWallet', - r'.TokenWallet', - 134217735, - 6, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix7.TokenWallet.subscribe, - r'getTokenWalletDetails': () => - prefix7.TokenWallet.getTokenWalletDetails, - r'getTokenRootDetailsFromTokenWallet': () => - prefix7.TokenWallet.getTokenRootDetailsFromTokenWallet, - r'getTokenRootDetails': () => prefix7.TokenWallet.getTokenRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 11, - r'prepareTransfer': 12, - r'refresh': 0, - r'preloadTransactions': 13, - r'handleBlock': 9, - r'onBalanceChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 1, - r'transport': 0, - r'balance': 0, - r'balance=': 1, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 1, - r'owner': 0, - r'owner=': 1, - r'symbol': 0, - r'symbol=': 1, - r'currency': 0, - r'currency=': 1, - r'version': 0, - r'version=': 1, - r'moneyBalance': 0, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onMoneyBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 10, - r'getTokenWalletDetails': 6, - r'getTokenRootDetailsFromTokenWallet': 6, - r'getTokenRootDetails': 14, - }, - ), - r.NonGenericClassMirrorImpl( - r'JettonWallet', - r'.JettonWallet', - 134217735, - 7, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix8.JettonWallet.subscribe, - r'getJettonWalletDetails': () => - prefix8.JettonWallet.getJettonWalletDetails, - r'getJettonRootDetailsFromJettonWallet': () => - prefix8.JettonWallet.getJettonRootDetailsFromJettonWallet, - r'getJettonRootDetails': () => - prefix8.JettonWallet.getJettonRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 11, - r'prepareTransfer': 15, - r'refresh': 0, - r'preloadTransactions': 13, - r'handleBlock': 9, - r'onBalanceChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 1, - r'transport': 0, - r'balance': 0, - r'balance=': 1, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 1, - r'owner': 0, - r'owner=': 1, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 10, - r'getJettonWalletDetails': 6, - r'getJettonRootDetailsFromJettonWallet': 6, - r'getJettonRootDetails': 14, - }, - ), - r.NonGenericClassMirrorImpl( - r'TonWallet', - r'.TonWallet', - 134217735, - 8, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix9.TonWallet.subscribe, - r'subscribeByAddress': () => prefix9.TonWallet.subscribeByAddress, - r'subscribeByExistingWallet': () => - prefix9.TonWallet.subscribeByExistingWallet, - r'appendSignatureToWalletV5R1Payload': () => - prefix9.TonWallet.appendSignatureToWalletV5R1Payload, - r'findExistingWallets': () => prefix9.TonWallet.findExistingWallets, - r'getExistingWalletInfo': () => - prefix9.TonWallet.getExistingWalletInfo, - r'getWalletCustodians': () => prefix9.TonWallet.getWalletCustodians, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'getUnconfirmedTransactions': 0, - r'getCustodians': 0, - r'prepareDeploy': 19, - r'prepareDeployWithMultipleOwners': 20, - r'prepareTransfer': 21, - r'prepareWalletV5R1MessageBody': 22, - r'prepareNonexistWalletV5R1MessageBody': 22, - r'prepareConfirmTransaction': 23, - r'estimateFees': 24, - r'send': 7, - r'refresh': 0, - r'preloadTransactions': 8, - r'handleBlock': 9, - r'makeStateInit': 0, - r'getWalletV5R1Seqno': 21, - r'onMessageSent': 1, - r'onMessageExpired': 1, - r'onStateChanged': 1, - r'onTransactionsFound': 1, - r'onDetailsChanged': 1, - r'onCustodiansChanged': 1, - r'onUnconfirmedTransactionsChanged': 1, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 1, - r'transport': 0, - r'publicKey': 0, - r'publicKey=': 1, - r'address': 0, - r'address=': 1, - r'walletType': 0, - r'walletType=': 1, - r'workchain': 0, - r'workchain=': 1, - r'custodians': 0, - r'details': 0, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'unconfirmedTransactions': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 16, - r'subscribeByAddress': 6, - r'subscribeByExistingWallet': 17, - r'appendSignatureToWalletV5R1Payload': 18, - r'findExistingWallets': 25, - r'getExistingWalletInfo': 6, - r'getWalletCustodians': 6, - }, - ), - ], - null, - null, - [ - prefix1.GqlConnection, - prefix2.ProtoConnection, - prefix3.JrpcConnection, - prefix4.LedgerConnection, - prefix5.Storage, - prefix6.GenericContract, - prefix7.TokenWallet, - prefix8.JettonWallet, - prefix9.TonWallet, - ], - 9, - { - r'==': (dynamic instance) => (x) => instance == x, - r'toString': (dynamic instance) => instance.toString, - r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, - r'hashCode': (dynamic instance) => instance.hashCode, - r'runtimeType': (dynamic instance) => instance.runtimeType, - r'init': (dynamic instance) => instance.init, - r'dispose': (dynamic instance) => instance.dispose, - r'instanceHash': (dynamic instance) => instance.instanceHash, - r'avoidCall': (dynamic instance) => instance.avoidCall, - r'post': (dynamic instance) => instance.post, - r'initializeMirror': (dynamic instance) => instance.initializeMirror, - r'connection': (dynamic instance) => instance.connection, - r'settings': (dynamic instance) => instance.settings, - r'type': (dynamic instance) => instance.type, - r'name': (dynamic instance) => instance.name, - r'group': (dynamic instance) => instance.group, - r'getPublicKey': (dynamic instance) => instance.getPublicKey, - r'sign': (dynamic instance) => instance.sign, - r'signTransaction': (dynamic instance) => instance.signTransaction, - r'get': (dynamic instance) => instance.get, - r'set': (dynamic instance) => instance.set, - r'setUnchecked': (dynamic instance) => instance.setUnchecked, - r'remove': (dynamic instance) => instance.remove, - r'removeUnchecked': (dynamic instance) => instance.removeUnchecked, - r'storage': (dynamic instance) => instance.storage, - r'getContractState': (dynamic instance) => instance.getContractState, - r'getPendingTransactions': (dynamic instance) => - instance.getPendingTransactions, - r'getPollingMethod': (dynamic instance) => instance.getPollingMethod, - r'executeTransactionLocally': (dynamic instance) => - instance.executeTransactionLocally, - r'estimateFees': (dynamic instance) => instance.estimateFees, - r'send': (dynamic instance) => instance.send, - r'refresh': (dynamic instance) => instance.refresh, - r'preloadTransactions': (dynamic instance) => - instance.preloadTransactions, - r'handleBlock': (dynamic instance) => instance.handleBlock, - r'onMessageSent': (dynamic instance) => instance.onMessageSent, - r'onMessageExpired': (dynamic instance) => instance.onMessageExpired, - r'onStateChanged': (dynamic instance) => instance.onStateChanged, - r'onTransactionsFound': (dynamic instance) => - instance.onTransactionsFound, - r'contract': (dynamic instance) => instance.contract, - r'transport': (dynamic instance) => instance.transport, - r'address': (dynamic instance) => instance.address, - r'contractState': (dynamic instance) => instance.contractState, - r'pendingTransactions': (dynamic instance) => - instance.pendingTransactions, - r'pollingMethod': (dynamic instance) => instance.pollingMethod, - r'fieldUpdatesStream': (dynamic instance) => instance.fieldUpdatesStream, - r'onMessageSentStream': (dynamic instance) => - instance.onMessageSentStream, - r'onMessageExpiredStream': (dynamic instance) => - instance.onMessageExpiredStream, - r'onStateChangedStream': (dynamic instance) => - instance.onStateChangedStream, - r'onTransactionsFoundStream': (dynamic instance) => - instance.onTransactionsFoundStream, - r'refreshDescription': (dynamic instance) => instance.refreshDescription, - r'estimateMinAttachedAmount': (dynamic instance) => - instance.estimateMinAttachedAmount, - r'prepareTransfer': (dynamic instance) => instance.prepareTransfer, - r'onBalanceChanged': (dynamic instance) => instance.onBalanceChanged, - r'wallet': (dynamic instance) => instance.wallet, - r'balance': (dynamic instance) => instance.balance, - r'rootTokenContract': (dynamic instance) => instance.rootTokenContract, - r'tokenAddress': (dynamic instance) => instance.tokenAddress, - r'owner': (dynamic instance) => instance.owner, - r'symbol': (dynamic instance) => instance.symbol, - r'currency': (dynamic instance) => instance.currency, - r'version': (dynamic instance) => instance.version, - r'moneyBalance': (dynamic instance) => instance.moneyBalance, - r'isTransactionsPreloaded': (dynamic instance) => - instance.isTransactionsPreloaded, - r'onBalanceChangedStream': (dynamic instance) => - instance.onBalanceChangedStream, - r'onMoneyBalanceChangedStream': (dynamic instance) => - instance.onMoneyBalanceChangedStream, - r'getUnconfirmedTransactions': (dynamic instance) => - instance.getUnconfirmedTransactions, - r'getCustodians': (dynamic instance) => instance.getCustodians, - r'prepareDeploy': (dynamic instance) => instance.prepareDeploy, - r'prepareDeployWithMultipleOwners': (dynamic instance) => - instance.prepareDeployWithMultipleOwners, - r'prepareWalletV5R1MessageBody': (dynamic instance) => - instance.prepareWalletV5R1MessageBody, - r'prepareNonexistWalletV5R1MessageBody': (dynamic instance) => - instance.prepareNonexistWalletV5R1MessageBody, - r'prepareConfirmTransaction': (dynamic instance) => - instance.prepareConfirmTransaction, - r'makeStateInit': (dynamic instance) => instance.makeStateInit, - r'getWalletV5R1Seqno': (dynamic instance) => instance.getWalletV5R1Seqno, - r'onDetailsChanged': (dynamic instance) => instance.onDetailsChanged, - r'onCustodiansChanged': (dynamic instance) => - instance.onCustodiansChanged, - r'onUnconfirmedTransactionsChanged': (dynamic instance) => - instance.onUnconfirmedTransactionsChanged, - r'publicKey': (dynamic instance) => instance.publicKey, - r'walletType': (dynamic instance) => instance.walletType, - r'workchain': (dynamic instance) => instance.workchain, - r'custodians': (dynamic instance) => instance.custodians, - r'details': (dynamic instance) => instance.details, - r'unconfirmedTransactions': (dynamic instance) => - instance.unconfirmedTransactions, - }, - { - r'connection=': (dynamic instance, value) => instance.connection = value, - r'storage=': (dynamic instance, value) => instance.storage = value, - r'contract=': (dynamic instance, value) => instance.contract = value, - r'address=': (dynamic instance, value) => instance.address = value, - r'wallet=': (dynamic instance, value) => instance.wallet = value, - r'balance=': (dynamic instance, value) => instance.balance = value, - r'tokenAddress=': (dynamic instance, value) => - instance.tokenAddress = value, - r'owner=': (dynamic instance, value) => instance.owner = value, - r'symbol=': (dynamic instance, value) => instance.symbol = value, - r'currency=': (dynamic instance, value) => instance.currency = value, - r'version=': (dynamic instance, value) => instance.version = value, - r'publicKey=': (dynamic instance, value) => instance.publicKey = value, - r'walletType=': (dynamic instance, value) => instance.walletType = value, - r'workchain=': (dynamic instance, value) => instance.workchain = value, - }, - null, - [ - const [ - 0, - 0, - const [#client, #settings, #name, #group], - ], - const [1, 0, null], - const [3, 0, null], - const [5, 0, null], - const [ - 0, - 0, - const [#get, #set, #setUnchecked, #remove, #removeUnchecked], - ], - const [ - 0, - 0, - const [#key, #value], - ], - const [ - 0, - 0, - const [#transport, #address, #preloadTransactions], - ], - const [ - 0, - 0, - const [#signedMessage, #options], - ], - const [ - 0, - 0, - const [#fromLt], - ], - const [ - 0, - 0, - const [#block], - ], - const [ - 0, - 0, - const [#transport, #owner, #rootTokenContract, #preloadTransactions], - ], - const [ - 0, - 0, - const [#destination, #amount, #notifyReceiver, #payload], - ], - const [ - 0, - 0, - const [ - #destination, - #amount, - #notifyReceiver, - #attachedAmount, - #payload, - #remainingGasTo, - ], - ], - const [1, 1, null], - const [ - 0, - 0, - const [#transport, #tokenRoot], - ], - const [ - 0, - 0, - const [ - #amount, - #destination, - #remainingGasTo, - #callbackValue, - #customPayload, - #callbackPayload, - #attachedAmount, - ], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletType], - ], - const [ - 0, - 0, - const [#transport, #existingWallet], - ], - const [ - 0, - 0, - const [#payload, #base64Signature], - ], - const [ - 0, - 0, - const [#expiration], - ], - const [ - 0, - 0, - const [#expiration, #custodians, #reqConfirms, #expirationTime], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #expiration, #params], - ], - const [ - 0, - 0, - const [ - #contractState, - #publicKey, - #expiration, - #params, - #isInternalFlow, - ], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #transactionId, #expiration], - ], - const [ - 0, - 0, - const [#signedMessage, #executionOptions], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletTypes], - ], - ], - ), -}; - -final _memberSymbolMap = null; - -void initializeReflectable() { - r.data = _data; - r.memberSymbolMap = _memberSymbolMap; -} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/jrpc_connection.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/jrpc_connection.dart index 8a6cee37..86646466 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/jrpc_connection.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/jrpc_connection.dart @@ -1,8 +1,5 @@ import 'dart:async'; import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart'; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart'; -import 'package:reflectable/mirrors.dart'; -import 'jrpc_connection.reflectable.dart'; /// Interface for http client to make post requests. abstract interface class JrpcConnectionHttpClient { @@ -15,8 +12,7 @@ abstract interface class JrpcConnectionHttpClient { void dispose(); } -@reflector -class JrpcConnection extends RustToDartMirrorInterface { +class JrpcConnection { late JrpcConnectionDartWrapper connection; final JrpcConnectionHttpClient _client; @@ -27,12 +23,7 @@ class JrpcConnection extends RustToDartMirrorInterface { final type = TransportType.gql; - JrpcConnection._( - this._client, - this.settings, - this._name, - this._group, - ); + JrpcConnection._(this._client, this.settings, this._name, this._group); static JrpcConnection create({ required JrpcConnectionHttpClient client, @@ -42,9 +33,7 @@ class JrpcConnection extends RustToDartMirrorInterface { }) { final instance = JrpcConnection._(client, settings, name, group); - instance.connection = JrpcConnectionDartWrapper( - instanceHash: instance.instanceHash, - ); + instance.connection = JrpcConnectionDartWrapper(onPost: instance.post); return instance; } @@ -58,9 +47,7 @@ class JrpcConnection extends RustToDartMirrorInterface { try { return await _client.post( endpoint: settings.endpoint, - headers: { - 'Content-Type': 'application/json', - }, + headers: {'Content-Type': 'application/json'}, data: requestData, ); } catch (error) { @@ -68,18 +55,8 @@ class JrpcConnection extends RustToDartMirrorInterface { } } - @override void dispose() { connection.innerConnection.dispose(); _client.dispose(); - super.dispose(); - } - - @override - InstanceMirror initializeMirror() { - initializeReflectable(); // auto-generated reflectable file - return reflector.reflect(this); } } - -void main() {} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/jrpc_connection.reflectable.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/jrpc_connection.reflectable.dart deleted file mode 100644 index 98a9cb18..00000000 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/jrpc_connection.reflectable.dart +++ /dev/null @@ -1,803 +0,0 @@ -// This file has been generated by the reflectable package. -// https://github.com/dart-lang/reflectable. -import 'dart:core'; -import 'jrpc_connection.dart' as prefix1; -import 'package:flutter_nekoton_bridge/nekoton/core/generic_contract/generic_contract.dart' - as prefix6; -import 'package:flutter_nekoton_bridge/nekoton/core/jetton_wallet/jetton_wallet.dart' - as prefix8; -import 'package:flutter_nekoton_bridge/nekoton/core/token_wallet/token_wallet.dart' - as prefix7; -import 'package:flutter_nekoton_bridge/nekoton/core/ton_wallet/ton_wallet.dart' - as prefix9; -import 'package:flutter_nekoton_bridge/nekoton/external/gql_connection.dart' - as prefix2; -import 'package:flutter_nekoton_bridge/nekoton/external/ledger_connection.dart' - as prefix4; -import 'package:flutter_nekoton_bridge/nekoton/external/proto_connection.dart' - as prefix3; -import 'package:flutter_nekoton_bridge/nekoton/external/storage.dart' - as prefix5; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart' as prefix0; - -// ignore_for_file: camel_case_types -// ignore_for_file: implementation_imports -// ignore_for_file: prefer_adjacent_string_concatenation -// ignore_for_file: prefer_collection_literals -// ignore_for_file: unnecessary_const -// ignore_for_file: unused_import -// ignore_for_file: sdk_version_since - -import 'package:reflectable/mirrors.dart' as m; -import 'package:reflectable/src/reflectable_builder_based.dart' as r; -import 'package:reflectable/reflectable.dart' as r show Reflectable; - -final _data = { - const prefix0.Reflector(): r.ReflectorData( - [ - r.NonGenericClassMirrorImpl( - r'JrpcConnection', - r'.JrpcConnection', - 134217735, - 0, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix1.JrpcConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 1, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 0, - }, - ), - r.NonGenericClassMirrorImpl( - r'GqlConnection', - r'.GqlConnection', - 134217735, - 1, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix2.GqlConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 1, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 0, - }, - ), - r.NonGenericClassMirrorImpl( - r'ProtoConnection', - r'.ProtoConnection', - 134217735, - 2, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix3.ProtoConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 1, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 0, - }, - ), - r.NonGenericClassMirrorImpl( - r'LedgerConnection', - r'.LedgerConnection', - 134217735, - 3, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix4.LedgerConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getPublicKey': 1, - r'sign': 2, - r'signTransaction': 3, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'create': 1, - }, - ), - r.NonGenericClassMirrorImpl( - r'Storage', - r'.Storage', - 134217735, - 4, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix5.Storage.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'get': 1, - r'set': 5, - r'setUnchecked': 5, - r'remove': 5, - r'removeUnchecked': 5, - r'initializeMirror': 0, - r'storage': 0, - r'storage=': 1, - r'create': 4, - }, - ), - r.NonGenericClassMirrorImpl( - r'GenericContract', - r'.GenericContract', - 134217735, - 5, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'subscribe': () => prefix6.GenericContract.subscribe}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'executeTransactionLocally': 7, - r'estimateFees': 7, - r'send': 7, - r'refresh': 0, - r'preloadTransactions': 8, - r'handleBlock': 9, - r'onMessageSent': 1, - r'onMessageExpired': 1, - r'onStateChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 0, - r'contract': 0, - r'contract=': 1, - r'transport': 0, - r'address': 0, - r'address=': 1, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 6, - }, - ), - r.NonGenericClassMirrorImpl( - r'TokenWallet', - r'.TokenWallet', - 134217735, - 6, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix7.TokenWallet.subscribe, - r'getTokenWalletDetails': () => - prefix7.TokenWallet.getTokenWalletDetails, - r'getTokenRootDetailsFromTokenWallet': () => - prefix7.TokenWallet.getTokenRootDetailsFromTokenWallet, - r'getTokenRootDetails': () => prefix7.TokenWallet.getTokenRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 11, - r'prepareTransfer': 12, - r'refresh': 0, - r'preloadTransactions': 13, - r'handleBlock': 9, - r'onBalanceChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 1, - r'transport': 0, - r'balance': 0, - r'balance=': 1, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 1, - r'owner': 0, - r'owner=': 1, - r'symbol': 0, - r'symbol=': 1, - r'currency': 0, - r'currency=': 1, - r'version': 0, - r'version=': 1, - r'moneyBalance': 0, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onMoneyBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 10, - r'getTokenWalletDetails': 6, - r'getTokenRootDetailsFromTokenWallet': 6, - r'getTokenRootDetails': 14, - }, - ), - r.NonGenericClassMirrorImpl( - r'JettonWallet', - r'.JettonWallet', - 134217735, - 7, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix8.JettonWallet.subscribe, - r'getJettonWalletDetails': () => - prefix8.JettonWallet.getJettonWalletDetails, - r'getJettonRootDetailsFromJettonWallet': () => - prefix8.JettonWallet.getJettonRootDetailsFromJettonWallet, - r'getJettonRootDetails': () => - prefix8.JettonWallet.getJettonRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 11, - r'prepareTransfer': 15, - r'refresh': 0, - r'preloadTransactions': 13, - r'handleBlock': 9, - r'onBalanceChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 1, - r'transport': 0, - r'balance': 0, - r'balance=': 1, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 1, - r'owner': 0, - r'owner=': 1, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 10, - r'getJettonWalletDetails': 6, - r'getJettonRootDetailsFromJettonWallet': 6, - r'getJettonRootDetails': 14, - }, - ), - r.NonGenericClassMirrorImpl( - r'TonWallet', - r'.TonWallet', - 134217735, - 8, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix9.TonWallet.subscribe, - r'subscribeByAddress': () => prefix9.TonWallet.subscribeByAddress, - r'subscribeByExistingWallet': () => - prefix9.TonWallet.subscribeByExistingWallet, - r'appendSignatureToWalletV5R1Payload': () => - prefix9.TonWallet.appendSignatureToWalletV5R1Payload, - r'findExistingWallets': () => prefix9.TonWallet.findExistingWallets, - r'getExistingWalletInfo': () => - prefix9.TonWallet.getExistingWalletInfo, - r'getWalletCustodians': () => prefix9.TonWallet.getWalletCustodians, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'getUnconfirmedTransactions': 0, - r'getCustodians': 0, - r'prepareDeploy': 19, - r'prepareDeployWithMultipleOwners': 20, - r'prepareTransfer': 21, - r'prepareWalletV5R1MessageBody': 22, - r'prepareNonexistWalletV5R1MessageBody': 22, - r'prepareConfirmTransaction': 23, - r'estimateFees': 24, - r'send': 7, - r'refresh': 0, - r'preloadTransactions': 8, - r'handleBlock': 9, - r'makeStateInit': 0, - r'getWalletV5R1Seqno': 21, - r'onMessageSent': 1, - r'onMessageExpired': 1, - r'onStateChanged': 1, - r'onTransactionsFound': 1, - r'onDetailsChanged': 1, - r'onCustodiansChanged': 1, - r'onUnconfirmedTransactionsChanged': 1, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 1, - r'transport': 0, - r'publicKey': 0, - r'publicKey=': 1, - r'address': 0, - r'address=': 1, - r'walletType': 0, - r'walletType=': 1, - r'workchain': 0, - r'workchain=': 1, - r'custodians': 0, - r'details': 0, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'unconfirmedTransactions': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 16, - r'subscribeByAddress': 6, - r'subscribeByExistingWallet': 17, - r'appendSignatureToWalletV5R1Payload': 18, - r'findExistingWallets': 25, - r'getExistingWalletInfo': 6, - r'getWalletCustodians': 6, - }, - ), - ], - null, - null, - [ - prefix1.JrpcConnection, - prefix2.GqlConnection, - prefix3.ProtoConnection, - prefix4.LedgerConnection, - prefix5.Storage, - prefix6.GenericContract, - prefix7.TokenWallet, - prefix8.JettonWallet, - prefix9.TonWallet, - ], - 9, - { - r'==': (dynamic instance) => (x) => instance == x, - r'toString': (dynamic instance) => instance.toString, - r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, - r'hashCode': (dynamic instance) => instance.hashCode, - r'runtimeType': (dynamic instance) => instance.runtimeType, - r'init': (dynamic instance) => instance.init, - r'dispose': (dynamic instance) => instance.dispose, - r'instanceHash': (dynamic instance) => instance.instanceHash, - r'avoidCall': (dynamic instance) => instance.avoidCall, - r'post': (dynamic instance) => instance.post, - r'initializeMirror': (dynamic instance) => instance.initializeMirror, - r'connection': (dynamic instance) => instance.connection, - r'settings': (dynamic instance) => instance.settings, - r'type': (dynamic instance) => instance.type, - r'name': (dynamic instance) => instance.name, - r'group': (dynamic instance) => instance.group, - r'getPublicKey': (dynamic instance) => instance.getPublicKey, - r'sign': (dynamic instance) => instance.sign, - r'signTransaction': (dynamic instance) => instance.signTransaction, - r'get': (dynamic instance) => instance.get, - r'set': (dynamic instance) => instance.set, - r'setUnchecked': (dynamic instance) => instance.setUnchecked, - r'remove': (dynamic instance) => instance.remove, - r'removeUnchecked': (dynamic instance) => instance.removeUnchecked, - r'storage': (dynamic instance) => instance.storage, - r'getContractState': (dynamic instance) => instance.getContractState, - r'getPendingTransactions': (dynamic instance) => - instance.getPendingTransactions, - r'getPollingMethod': (dynamic instance) => instance.getPollingMethod, - r'executeTransactionLocally': (dynamic instance) => - instance.executeTransactionLocally, - r'estimateFees': (dynamic instance) => instance.estimateFees, - r'send': (dynamic instance) => instance.send, - r'refresh': (dynamic instance) => instance.refresh, - r'preloadTransactions': (dynamic instance) => - instance.preloadTransactions, - r'handleBlock': (dynamic instance) => instance.handleBlock, - r'onMessageSent': (dynamic instance) => instance.onMessageSent, - r'onMessageExpired': (dynamic instance) => instance.onMessageExpired, - r'onStateChanged': (dynamic instance) => instance.onStateChanged, - r'onTransactionsFound': (dynamic instance) => - instance.onTransactionsFound, - r'contract': (dynamic instance) => instance.contract, - r'transport': (dynamic instance) => instance.transport, - r'address': (dynamic instance) => instance.address, - r'contractState': (dynamic instance) => instance.contractState, - r'pendingTransactions': (dynamic instance) => - instance.pendingTransactions, - r'pollingMethod': (dynamic instance) => instance.pollingMethod, - r'fieldUpdatesStream': (dynamic instance) => instance.fieldUpdatesStream, - r'onMessageSentStream': (dynamic instance) => - instance.onMessageSentStream, - r'onMessageExpiredStream': (dynamic instance) => - instance.onMessageExpiredStream, - r'onStateChangedStream': (dynamic instance) => - instance.onStateChangedStream, - r'onTransactionsFoundStream': (dynamic instance) => - instance.onTransactionsFoundStream, - r'refreshDescription': (dynamic instance) => instance.refreshDescription, - r'estimateMinAttachedAmount': (dynamic instance) => - instance.estimateMinAttachedAmount, - r'prepareTransfer': (dynamic instance) => instance.prepareTransfer, - r'onBalanceChanged': (dynamic instance) => instance.onBalanceChanged, - r'wallet': (dynamic instance) => instance.wallet, - r'balance': (dynamic instance) => instance.balance, - r'rootTokenContract': (dynamic instance) => instance.rootTokenContract, - r'tokenAddress': (dynamic instance) => instance.tokenAddress, - r'owner': (dynamic instance) => instance.owner, - r'symbol': (dynamic instance) => instance.symbol, - r'currency': (dynamic instance) => instance.currency, - r'version': (dynamic instance) => instance.version, - r'moneyBalance': (dynamic instance) => instance.moneyBalance, - r'isTransactionsPreloaded': (dynamic instance) => - instance.isTransactionsPreloaded, - r'onBalanceChangedStream': (dynamic instance) => - instance.onBalanceChangedStream, - r'onMoneyBalanceChangedStream': (dynamic instance) => - instance.onMoneyBalanceChangedStream, - r'getUnconfirmedTransactions': (dynamic instance) => - instance.getUnconfirmedTransactions, - r'getCustodians': (dynamic instance) => instance.getCustodians, - r'prepareDeploy': (dynamic instance) => instance.prepareDeploy, - r'prepareDeployWithMultipleOwners': (dynamic instance) => - instance.prepareDeployWithMultipleOwners, - r'prepareWalletV5R1MessageBody': (dynamic instance) => - instance.prepareWalletV5R1MessageBody, - r'prepareNonexistWalletV5R1MessageBody': (dynamic instance) => - instance.prepareNonexistWalletV5R1MessageBody, - r'prepareConfirmTransaction': (dynamic instance) => - instance.prepareConfirmTransaction, - r'makeStateInit': (dynamic instance) => instance.makeStateInit, - r'getWalletV5R1Seqno': (dynamic instance) => instance.getWalletV5R1Seqno, - r'onDetailsChanged': (dynamic instance) => instance.onDetailsChanged, - r'onCustodiansChanged': (dynamic instance) => - instance.onCustodiansChanged, - r'onUnconfirmedTransactionsChanged': (dynamic instance) => - instance.onUnconfirmedTransactionsChanged, - r'publicKey': (dynamic instance) => instance.publicKey, - r'walletType': (dynamic instance) => instance.walletType, - r'workchain': (dynamic instance) => instance.workchain, - r'custodians': (dynamic instance) => instance.custodians, - r'details': (dynamic instance) => instance.details, - r'unconfirmedTransactions': (dynamic instance) => - instance.unconfirmedTransactions, - }, - { - r'connection=': (dynamic instance, value) => instance.connection = value, - r'storage=': (dynamic instance, value) => instance.storage = value, - r'contract=': (dynamic instance, value) => instance.contract = value, - r'address=': (dynamic instance, value) => instance.address = value, - r'wallet=': (dynamic instance, value) => instance.wallet = value, - r'balance=': (dynamic instance, value) => instance.balance = value, - r'tokenAddress=': (dynamic instance, value) => - instance.tokenAddress = value, - r'owner=': (dynamic instance, value) => instance.owner = value, - r'symbol=': (dynamic instance, value) => instance.symbol = value, - r'currency=': (dynamic instance, value) => instance.currency = value, - r'version=': (dynamic instance, value) => instance.version = value, - r'publicKey=': (dynamic instance, value) => instance.publicKey = value, - r'walletType=': (dynamic instance, value) => instance.walletType = value, - r'workchain=': (dynamic instance, value) => instance.workchain = value, - }, - null, - [ - const [ - 0, - 0, - const [#client, #settings, #name, #group], - ], - const [1, 0, null], - const [3, 0, null], - const [5, 0, null], - const [ - 0, - 0, - const [#get, #set, #setUnchecked, #remove, #removeUnchecked], - ], - const [ - 0, - 0, - const [#key, #value], - ], - const [ - 0, - 0, - const [#transport, #address, #preloadTransactions], - ], - const [ - 0, - 0, - const [#signedMessage, #options], - ], - const [ - 0, - 0, - const [#fromLt], - ], - const [ - 0, - 0, - const [#block], - ], - const [ - 0, - 0, - const [#transport, #owner, #rootTokenContract, #preloadTransactions], - ], - const [ - 0, - 0, - const [#destination, #amount, #notifyReceiver, #payload], - ], - const [ - 0, - 0, - const [ - #destination, - #amount, - #notifyReceiver, - #attachedAmount, - #payload, - #remainingGasTo, - ], - ], - const [1, 1, null], - const [ - 0, - 0, - const [#transport, #tokenRoot], - ], - const [ - 0, - 0, - const [ - #amount, - #destination, - #remainingGasTo, - #callbackValue, - #customPayload, - #callbackPayload, - #attachedAmount, - ], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletType], - ], - const [ - 0, - 0, - const [#transport, #existingWallet], - ], - const [ - 0, - 0, - const [#payload, #base64Signature], - ], - const [ - 0, - 0, - const [#expiration], - ], - const [ - 0, - 0, - const [#expiration, #custodians, #reqConfirms, #expirationTime], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #expiration, #params], - ], - const [ - 0, - 0, - const [ - #contractState, - #publicKey, - #expiration, - #params, - #isInternalFlow, - ], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #transactionId, #expiration], - ], - const [ - 0, - 0, - const [#signedMessage, #executionOptions], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletTypes], - ], - ], - ), -}; - -final _memberSymbolMap = null; - -void initializeReflectable() { - r.data = _data; - r.memberSymbolMap = _memberSymbolMap; -} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/ledger_connection.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/ledger_connection.dart index 792a70a1..d7a2960d 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/ledger_connection.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/ledger_connection.dart @@ -2,9 +2,6 @@ import 'dart:async'; import 'dart:convert'; import 'dart:typed_data'; import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart'; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart'; -import 'package:reflectable/mirrors.dart'; -import 'ledger_connection.reflectable.dart'; abstract interface class LedgerConnectionHandler { Future getPublicKey(int accountId); @@ -22,21 +19,20 @@ abstract interface class LedgerConnectionHandler { }); } -@reflector -class LedgerConnection extends RustToDartMirrorInterface { +class LedgerConnection { late LedgerConnectionDartWrapper connection; final LedgerConnectionHandler _handler; - LedgerConnection._( - this._handler, - ); + LedgerConnection._(this._handler); static LedgerConnection create(LedgerConnectionHandler handler) { final instance = LedgerConnection._(handler); instance.connection = LedgerConnectionDartWrapper( - instanceHash: instance.instanceHash, + onGetPublicKey: instance.getPublicKey, + onSign: instance.sign, + onSignTransaction: instance.signTransaction, ); return instance; @@ -95,17 +91,7 @@ class LedgerConnection extends RustToDartMirrorInterface { } } - @override void dispose() { connection.innerConnection.dispose(); - super.dispose(); - } - - @override - InstanceMirror initializeMirror() { - initializeReflectable(); // auto-generated reflectable file - return reflector.reflect(this); } } - -void main() {} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/ledger_connection.reflectable.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/ledger_connection.reflectable.dart deleted file mode 100644 index cbea24c5..00000000 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/ledger_connection.reflectable.dart +++ /dev/null @@ -1,804 +0,0 @@ -// This file has been generated by the reflectable package. -// https://github.com/dart-lang/reflectable. -import 'dart:core'; -import 'ledger_connection.dart' as prefix1; -import 'package:flutter_nekoton_bridge/nekoton/core/generic_contract/generic_contract.dart' - as prefix6; -import 'package:flutter_nekoton_bridge/nekoton/core/jetton_wallet/jetton_wallet.dart' - as prefix8; -import 'package:flutter_nekoton_bridge/nekoton/core/token_wallet/token_wallet.dart' - as prefix7; -import 'package:flutter_nekoton_bridge/nekoton/core/ton_wallet/ton_wallet.dart' - as prefix9; -import 'package:flutter_nekoton_bridge/nekoton/external/gql_connection.dart' - as prefix2; -import 'package:flutter_nekoton_bridge/nekoton/external/jrpc_connection.dart' - as prefix4; -import 'package:flutter_nekoton_bridge/nekoton/external/proto_connection.dart' - as prefix3; -import 'package:flutter_nekoton_bridge/nekoton/external/storage.dart' - as prefix5; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart' as prefix0; - -// ignore_for_file: camel_case_types -// ignore_for_file: implementation_imports -// ignore_for_file: prefer_adjacent_string_concatenation -// ignore_for_file: prefer_collection_literals -// ignore_for_file: unnecessary_const -// ignore_for_file: unused_import -// ignore_for_file: sdk_version_since - -import 'package:reflectable/mirrors.dart' as m; -import 'package:reflectable/src/reflectable_builder_based.dart' as r; -import 'package:reflectable/reflectable.dart' as r show Reflectable; - -final _data = { - const prefix0.Reflector(): r.ReflectorData( - [ - r.NonGenericClassMirrorImpl( - r'LedgerConnection', - r'.LedgerConnection', - 134217735, - 0, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix1.LedgerConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 0, - r'toString': 3, - r'noSuchMethod': 0, - r'hashCode': 3, - r'runtimeType': 3, - r'init': 3, - r'dispose': 3, - r'instanceHash': 3, - r'avoidCall': 3, - r'getPublicKey': 0, - r'sign': 1, - r'signTransaction': 2, - r'initializeMirror': 3, - r'connection': 3, - r'connection=': 0, - r'create': 0, - }, - ), - r.NonGenericClassMirrorImpl( - r'GqlConnection', - r'.GqlConnection', - 134217735, - 1, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix2.GqlConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 0, - r'toString': 3, - r'noSuchMethod': 0, - r'hashCode': 3, - r'runtimeType': 3, - r'init': 3, - r'dispose': 3, - r'instanceHash': 3, - r'avoidCall': 3, - r'post': 0, - r'initializeMirror': 3, - r'connection': 3, - r'connection=': 0, - r'settings': 3, - r'type': 3, - r'name': 3, - r'group': 3, - r'create': 4, - }, - ), - r.NonGenericClassMirrorImpl( - r'ProtoConnection', - r'.ProtoConnection', - 134217735, - 2, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix3.ProtoConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 0, - r'toString': 3, - r'noSuchMethod': 0, - r'hashCode': 3, - r'runtimeType': 3, - r'init': 3, - r'dispose': 3, - r'instanceHash': 3, - r'avoidCall': 3, - r'post': 0, - r'initializeMirror': 3, - r'connection': 3, - r'connection=': 0, - r'settings': 3, - r'type': 3, - r'name': 3, - r'group': 3, - r'create': 4, - }, - ), - r.NonGenericClassMirrorImpl( - r'JrpcConnection', - r'.JrpcConnection', - 134217735, - 3, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix4.JrpcConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 0, - r'toString': 3, - r'noSuchMethod': 0, - r'hashCode': 3, - r'runtimeType': 3, - r'init': 3, - r'dispose': 3, - r'instanceHash': 3, - r'avoidCall': 3, - r'post': 0, - r'initializeMirror': 3, - r'connection': 3, - r'connection=': 0, - r'settings': 3, - r'type': 3, - r'name': 3, - r'group': 3, - r'create': 4, - }, - ), - r.NonGenericClassMirrorImpl( - r'Storage', - r'.Storage', - 134217735, - 4, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix5.Storage.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 0, - r'toString': 3, - r'noSuchMethod': 0, - r'hashCode': 3, - r'runtimeType': 3, - r'init': 3, - r'dispose': 3, - r'instanceHash': 3, - r'avoidCall': 3, - r'get': 0, - r'set': 6, - r'setUnchecked': 6, - r'remove': 6, - r'removeUnchecked': 6, - r'initializeMirror': 3, - r'storage': 3, - r'storage=': 0, - r'create': 5, - }, - ), - r.NonGenericClassMirrorImpl( - r'GenericContract', - r'.GenericContract', - 134217735, - 5, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'subscribe': () => prefix6.GenericContract.subscribe}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 0, - r'toString': 3, - r'noSuchMethod': 0, - r'hashCode': 3, - r'runtimeType': 3, - r'init': 3, - r'dispose': 3, - r'instanceHash': 3, - r'avoidCall': 3, - r'getContractState': 3, - r'getPendingTransactions': 3, - r'getPollingMethod': 3, - r'executeTransactionLocally': 8, - r'estimateFees': 8, - r'send': 8, - r'refresh': 3, - r'preloadTransactions': 9, - r'handleBlock': 10, - r'onMessageSent': 0, - r'onMessageExpired': 0, - r'onStateChanged': 0, - r'onTransactionsFound': 0, - r'initializeMirror': 3, - r'contract': 3, - r'contract=': 0, - r'transport': 3, - r'address': 3, - r'address=': 0, - r'contractState': 3, - r'pendingTransactions': 3, - r'pollingMethod': 3, - r'fieldUpdatesStream': 3, - r'onMessageSentStream': 3, - r'onMessageExpiredStream': 3, - r'onStateChangedStream': 3, - r'onTransactionsFoundStream': 3, - r'refreshDescription': 3, - r'subscribe': 7, - }, - ), - r.NonGenericClassMirrorImpl( - r'TokenWallet', - r'.TokenWallet', - 134217735, - 6, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix7.TokenWallet.subscribe, - r'getTokenWalletDetails': () => - prefix7.TokenWallet.getTokenWalletDetails, - r'getTokenRootDetailsFromTokenWallet': () => - prefix7.TokenWallet.getTokenRootDetailsFromTokenWallet, - r'getTokenRootDetails': () => prefix7.TokenWallet.getTokenRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 0, - r'toString': 3, - r'noSuchMethod': 0, - r'hashCode': 3, - r'runtimeType': 3, - r'init': 3, - r'dispose': 3, - r'instanceHash': 3, - r'avoidCall': 3, - r'getContractState': 3, - r'estimateMinAttachedAmount': 12, - r'prepareTransfer': 13, - r'refresh': 3, - r'preloadTransactions': 14, - r'handleBlock': 10, - r'onBalanceChanged': 0, - r'onTransactionsFound': 0, - r'initializeMirror': 3, - r'wallet': 3, - r'wallet=': 0, - r'transport': 3, - r'balance': 3, - r'balance=': 0, - r'rootTokenContract': 3, - r'tokenAddress': 3, - r'tokenAddress=': 0, - r'owner': 3, - r'owner=': 0, - r'symbol': 3, - r'symbol=': 0, - r'currency': 3, - r'currency=': 0, - r'version': 3, - r'version=': 0, - r'moneyBalance': 3, - r'isTransactionsPreloaded': 3, - r'contractState': 3, - r'fieldUpdatesStream': 3, - r'onBalanceChangedStream': 3, - r'onMoneyBalanceChangedStream': 3, - r'onTransactionsFoundStream': 3, - r'refreshDescription': 3, - r'subscribe': 11, - r'getTokenWalletDetails': 7, - r'getTokenRootDetailsFromTokenWallet': 7, - r'getTokenRootDetails': 15, - }, - ), - r.NonGenericClassMirrorImpl( - r'JettonWallet', - r'.JettonWallet', - 134217735, - 7, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix8.JettonWallet.subscribe, - r'getJettonWalletDetails': () => - prefix8.JettonWallet.getJettonWalletDetails, - r'getJettonRootDetailsFromJettonWallet': () => - prefix8.JettonWallet.getJettonRootDetailsFromJettonWallet, - r'getJettonRootDetails': () => - prefix8.JettonWallet.getJettonRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 0, - r'toString': 3, - r'noSuchMethod': 0, - r'hashCode': 3, - r'runtimeType': 3, - r'init': 3, - r'dispose': 3, - r'instanceHash': 3, - r'avoidCall': 3, - r'getContractState': 3, - r'estimateMinAttachedAmount': 12, - r'prepareTransfer': 16, - r'refresh': 3, - r'preloadTransactions': 14, - r'handleBlock': 10, - r'onBalanceChanged': 0, - r'onTransactionsFound': 0, - r'initializeMirror': 3, - r'wallet': 3, - r'wallet=': 0, - r'transport': 3, - r'balance': 3, - r'balance=': 0, - r'rootTokenContract': 3, - r'tokenAddress': 3, - r'tokenAddress=': 0, - r'owner': 3, - r'owner=': 0, - r'isTransactionsPreloaded': 3, - r'contractState': 3, - r'fieldUpdatesStream': 3, - r'onBalanceChangedStream': 3, - r'onTransactionsFoundStream': 3, - r'refreshDescription': 3, - r'subscribe': 11, - r'getJettonWalletDetails': 7, - r'getJettonRootDetailsFromJettonWallet': 7, - r'getJettonRootDetails': 15, - }, - ), - r.NonGenericClassMirrorImpl( - r'TonWallet', - r'.TonWallet', - 134217735, - 8, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix9.TonWallet.subscribe, - r'subscribeByAddress': () => prefix9.TonWallet.subscribeByAddress, - r'subscribeByExistingWallet': () => - prefix9.TonWallet.subscribeByExistingWallet, - r'appendSignatureToWalletV5R1Payload': () => - prefix9.TonWallet.appendSignatureToWalletV5R1Payload, - r'findExistingWallets': () => prefix9.TonWallet.findExistingWallets, - r'getExistingWalletInfo': () => - prefix9.TonWallet.getExistingWalletInfo, - r'getWalletCustodians': () => prefix9.TonWallet.getWalletCustodians, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 0, - r'toString': 3, - r'noSuchMethod': 0, - r'hashCode': 3, - r'runtimeType': 3, - r'init': 3, - r'dispose': 3, - r'instanceHash': 3, - r'avoidCall': 3, - r'getContractState': 3, - r'getPendingTransactions': 3, - r'getPollingMethod': 3, - r'getUnconfirmedTransactions': 3, - r'getCustodians': 3, - r'prepareDeploy': 20, - r'prepareDeployWithMultipleOwners': 21, - r'prepareTransfer': 22, - r'prepareWalletV5R1MessageBody': 23, - r'prepareNonexistWalletV5R1MessageBody': 23, - r'prepareConfirmTransaction': 24, - r'estimateFees': 25, - r'send': 8, - r'refresh': 3, - r'preloadTransactions': 9, - r'handleBlock': 10, - r'makeStateInit': 3, - r'getWalletV5R1Seqno': 22, - r'onMessageSent': 0, - r'onMessageExpired': 0, - r'onStateChanged': 0, - r'onTransactionsFound': 0, - r'onDetailsChanged': 0, - r'onCustodiansChanged': 0, - r'onUnconfirmedTransactionsChanged': 0, - r'initializeMirror': 3, - r'wallet': 3, - r'wallet=': 0, - r'transport': 3, - r'publicKey': 3, - r'publicKey=': 0, - r'address': 3, - r'address=': 0, - r'walletType': 3, - r'walletType=': 0, - r'workchain': 3, - r'workchain=': 0, - r'custodians': 3, - r'details': 3, - r'contractState': 3, - r'pendingTransactions': 3, - r'pollingMethod': 3, - r'unconfirmedTransactions': 3, - r'fieldUpdatesStream': 3, - r'onMessageSentStream': 3, - r'onMessageExpiredStream': 3, - r'onStateChangedStream': 3, - r'onTransactionsFoundStream': 3, - r'refreshDescription': 3, - r'subscribe': 17, - r'subscribeByAddress': 7, - r'subscribeByExistingWallet': 18, - r'appendSignatureToWalletV5R1Payload': 19, - r'findExistingWallets': 26, - r'getExistingWalletInfo': 7, - r'getWalletCustodians': 7, - }, - ), - ], - null, - null, - [ - prefix1.LedgerConnection, - prefix2.GqlConnection, - prefix3.ProtoConnection, - prefix4.JrpcConnection, - prefix5.Storage, - prefix6.GenericContract, - prefix7.TokenWallet, - prefix8.JettonWallet, - prefix9.TonWallet, - ], - 9, - { - r'==': (dynamic instance) => (x) => instance == x, - r'toString': (dynamic instance) => instance.toString, - r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, - r'hashCode': (dynamic instance) => instance.hashCode, - r'runtimeType': (dynamic instance) => instance.runtimeType, - r'init': (dynamic instance) => instance.init, - r'dispose': (dynamic instance) => instance.dispose, - r'instanceHash': (dynamic instance) => instance.instanceHash, - r'avoidCall': (dynamic instance) => instance.avoidCall, - r'getPublicKey': (dynamic instance) => instance.getPublicKey, - r'sign': (dynamic instance) => instance.sign, - r'signTransaction': (dynamic instance) => instance.signTransaction, - r'initializeMirror': (dynamic instance) => instance.initializeMirror, - r'connection': (dynamic instance) => instance.connection, - r'post': (dynamic instance) => instance.post, - r'settings': (dynamic instance) => instance.settings, - r'type': (dynamic instance) => instance.type, - r'name': (dynamic instance) => instance.name, - r'group': (dynamic instance) => instance.group, - r'get': (dynamic instance) => instance.get, - r'set': (dynamic instance) => instance.set, - r'setUnchecked': (dynamic instance) => instance.setUnchecked, - r'remove': (dynamic instance) => instance.remove, - r'removeUnchecked': (dynamic instance) => instance.removeUnchecked, - r'storage': (dynamic instance) => instance.storage, - r'getContractState': (dynamic instance) => instance.getContractState, - r'getPendingTransactions': (dynamic instance) => - instance.getPendingTransactions, - r'getPollingMethod': (dynamic instance) => instance.getPollingMethod, - r'executeTransactionLocally': (dynamic instance) => - instance.executeTransactionLocally, - r'estimateFees': (dynamic instance) => instance.estimateFees, - r'send': (dynamic instance) => instance.send, - r'refresh': (dynamic instance) => instance.refresh, - r'preloadTransactions': (dynamic instance) => - instance.preloadTransactions, - r'handleBlock': (dynamic instance) => instance.handleBlock, - r'onMessageSent': (dynamic instance) => instance.onMessageSent, - r'onMessageExpired': (dynamic instance) => instance.onMessageExpired, - r'onStateChanged': (dynamic instance) => instance.onStateChanged, - r'onTransactionsFound': (dynamic instance) => - instance.onTransactionsFound, - r'contract': (dynamic instance) => instance.contract, - r'transport': (dynamic instance) => instance.transport, - r'address': (dynamic instance) => instance.address, - r'contractState': (dynamic instance) => instance.contractState, - r'pendingTransactions': (dynamic instance) => - instance.pendingTransactions, - r'pollingMethod': (dynamic instance) => instance.pollingMethod, - r'fieldUpdatesStream': (dynamic instance) => instance.fieldUpdatesStream, - r'onMessageSentStream': (dynamic instance) => - instance.onMessageSentStream, - r'onMessageExpiredStream': (dynamic instance) => - instance.onMessageExpiredStream, - r'onStateChangedStream': (dynamic instance) => - instance.onStateChangedStream, - r'onTransactionsFoundStream': (dynamic instance) => - instance.onTransactionsFoundStream, - r'refreshDescription': (dynamic instance) => instance.refreshDescription, - r'estimateMinAttachedAmount': (dynamic instance) => - instance.estimateMinAttachedAmount, - r'prepareTransfer': (dynamic instance) => instance.prepareTransfer, - r'onBalanceChanged': (dynamic instance) => instance.onBalanceChanged, - r'wallet': (dynamic instance) => instance.wallet, - r'balance': (dynamic instance) => instance.balance, - r'rootTokenContract': (dynamic instance) => instance.rootTokenContract, - r'tokenAddress': (dynamic instance) => instance.tokenAddress, - r'owner': (dynamic instance) => instance.owner, - r'symbol': (dynamic instance) => instance.symbol, - r'currency': (dynamic instance) => instance.currency, - r'version': (dynamic instance) => instance.version, - r'moneyBalance': (dynamic instance) => instance.moneyBalance, - r'isTransactionsPreloaded': (dynamic instance) => - instance.isTransactionsPreloaded, - r'onBalanceChangedStream': (dynamic instance) => - instance.onBalanceChangedStream, - r'onMoneyBalanceChangedStream': (dynamic instance) => - instance.onMoneyBalanceChangedStream, - r'getUnconfirmedTransactions': (dynamic instance) => - instance.getUnconfirmedTransactions, - r'getCustodians': (dynamic instance) => instance.getCustodians, - r'prepareDeploy': (dynamic instance) => instance.prepareDeploy, - r'prepareDeployWithMultipleOwners': (dynamic instance) => - instance.prepareDeployWithMultipleOwners, - r'prepareWalletV5R1MessageBody': (dynamic instance) => - instance.prepareWalletV5R1MessageBody, - r'prepareNonexistWalletV5R1MessageBody': (dynamic instance) => - instance.prepareNonexistWalletV5R1MessageBody, - r'prepareConfirmTransaction': (dynamic instance) => - instance.prepareConfirmTransaction, - r'makeStateInit': (dynamic instance) => instance.makeStateInit, - r'getWalletV5R1Seqno': (dynamic instance) => instance.getWalletV5R1Seqno, - r'onDetailsChanged': (dynamic instance) => instance.onDetailsChanged, - r'onCustodiansChanged': (dynamic instance) => - instance.onCustodiansChanged, - r'onUnconfirmedTransactionsChanged': (dynamic instance) => - instance.onUnconfirmedTransactionsChanged, - r'publicKey': (dynamic instance) => instance.publicKey, - r'walletType': (dynamic instance) => instance.walletType, - r'workchain': (dynamic instance) => instance.workchain, - r'custodians': (dynamic instance) => instance.custodians, - r'details': (dynamic instance) => instance.details, - r'unconfirmedTransactions': (dynamic instance) => - instance.unconfirmedTransactions, - }, - { - r'connection=': (dynamic instance, value) => instance.connection = value, - r'storage=': (dynamic instance, value) => instance.storage = value, - r'contract=': (dynamic instance, value) => instance.contract = value, - r'address=': (dynamic instance, value) => instance.address = value, - r'wallet=': (dynamic instance, value) => instance.wallet = value, - r'balance=': (dynamic instance, value) => instance.balance = value, - r'tokenAddress=': (dynamic instance, value) => - instance.tokenAddress = value, - r'owner=': (dynamic instance, value) => instance.owner = value, - r'symbol=': (dynamic instance, value) => instance.symbol = value, - r'currency=': (dynamic instance, value) => instance.currency = value, - r'version=': (dynamic instance, value) => instance.version = value, - r'publicKey=': (dynamic instance, value) => instance.publicKey = value, - r'walletType=': (dynamic instance, value) => instance.walletType = value, - r'workchain=': (dynamic instance, value) => instance.workchain = value, - }, - null, - [ - const [1, 0, null], - const [3, 0, null], - const [5, 0, null], - const [0, 0, null], - const [ - 0, - 0, - const [#client, #settings, #name, #group], - ], - const [ - 0, - 0, - const [#get, #set, #setUnchecked, #remove, #removeUnchecked], - ], - const [ - 0, - 0, - const [#key, #value], - ], - const [ - 0, - 0, - const [#transport, #address, #preloadTransactions], - ], - const [ - 0, - 0, - const [#signedMessage, #options], - ], - const [ - 0, - 0, - const [#fromLt], - ], - const [ - 0, - 0, - const [#block], - ], - const [ - 0, - 0, - const [#transport, #owner, #rootTokenContract, #preloadTransactions], - ], - const [ - 0, - 0, - const [#destination, #amount, #notifyReceiver, #payload], - ], - const [ - 0, - 0, - const [ - #destination, - #amount, - #notifyReceiver, - #attachedAmount, - #payload, - #remainingGasTo, - ], - ], - const [1, 1, null], - const [ - 0, - 0, - const [#transport, #tokenRoot], - ], - const [ - 0, - 0, - const [ - #amount, - #destination, - #remainingGasTo, - #callbackValue, - #customPayload, - #callbackPayload, - #attachedAmount, - ], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletType], - ], - const [ - 0, - 0, - const [#transport, #existingWallet], - ], - const [ - 0, - 0, - const [#payload, #base64Signature], - ], - const [ - 0, - 0, - const [#expiration], - ], - const [ - 0, - 0, - const [#expiration, #custodians, #reqConfirms, #expirationTime], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #expiration, #params], - ], - const [ - 0, - 0, - const [ - #contractState, - #publicKey, - #expiration, - #params, - #isInternalFlow, - ], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #transactionId, #expiration], - ], - const [ - 0, - 0, - const [#signedMessage, #executionOptions], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletTypes], - ], - ], - ), -}; - -final _memberSymbolMap = null; - -void initializeReflectable() { - r.data = _data; - r.memberSymbolMap = _memberSymbolMap; -} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/gql_network_settings.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/gql_network_settings.freezed.dart index 4c2799ad..93db52d2 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/gql_network_settings.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/gql_network_settings.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,71 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$GqlNetworkSettings { - List get endpoints; - int get latencyDetectionInterval; - int get maxLatency; - int get endpointSelectionRetryCount; - bool get local; - - /// Create a copy of GqlNetworkSettings - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $GqlNetworkSettingsCopyWith get copyWith => - _$GqlNetworkSettingsCopyWithImpl( - this as GqlNetworkSettings, _$identity); + + List get endpoints; int get latencyDetectionInterval; int get maxLatency; int get endpointSelectionRetryCount; bool get local; +/// Create a copy of GqlNetworkSettings +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$GqlNetworkSettingsCopyWith get copyWith => _$GqlNetworkSettingsCopyWithImpl(this as GqlNetworkSettings, _$identity); /// Serializes this GqlNetworkSettings to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is GqlNetworkSettings && - const DeepCollectionEquality().equals(other.endpoints, endpoints) && - (identical( - other.latencyDetectionInterval, latencyDetectionInterval) || - other.latencyDetectionInterval == latencyDetectionInterval) && - (identical(other.maxLatency, maxLatency) || - other.maxLatency == maxLatency) && - (identical(other.endpointSelectionRetryCount, - endpointSelectionRetryCount) || - other.endpointSelectionRetryCount == - endpointSelectionRetryCount) && - (identical(other.local, local) || other.local == local)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(endpoints), - latencyDetectionInterval, - maxLatency, - endpointSelectionRetryCount, - local); - - @override - String toString() { - return 'GqlNetworkSettings(endpoints: $endpoints, latencyDetectionInterval: $latencyDetectionInterval, maxLatency: $maxLatency, endpointSelectionRetryCount: $endpointSelectionRetryCount, local: $local)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is GqlNetworkSettings&&const DeepCollectionEquality().equals(other.endpoints, endpoints)&&(identical(other.latencyDetectionInterval, latencyDetectionInterval) || other.latencyDetectionInterval == latencyDetectionInterval)&&(identical(other.maxLatency, maxLatency) || other.maxLatency == maxLatency)&&(identical(other.endpointSelectionRetryCount, endpointSelectionRetryCount) || other.endpointSelectionRetryCount == endpointSelectionRetryCount)&&(identical(other.local, local) || other.local == local)); } -/// @nodoc -abstract mixin class $GqlNetworkSettingsCopyWith<$Res> { - factory $GqlNetworkSettingsCopyWith( - GqlNetworkSettings value, $Res Function(GqlNetworkSettings) _then) = - _$GqlNetworkSettingsCopyWithImpl; - @useResult - $Res call( - {List endpoints, - int latencyDetectionInterval, - int maxLatency, - int endpointSelectionRetryCount, - bool local}); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(endpoints),latencyDetectionInterval,maxLatency,endpointSelectionRetryCount,local); + +@override +String toString() { + return 'GqlNetworkSettings(endpoints: $endpoints, latencyDetectionInterval: $latencyDetectionInterval, maxLatency: $maxLatency, endpointSelectionRetryCount: $endpointSelectionRetryCount, local: $local)'; +} + + } +/// @nodoc +abstract mixin class $GqlNetworkSettingsCopyWith<$Res> { + factory $GqlNetworkSettingsCopyWith(GqlNetworkSettings value, $Res Function(GqlNetworkSettings) _then) = _$GqlNetworkSettingsCopyWithImpl; +@useResult +$Res call({ + List endpoints, int latencyDetectionInterval, int maxLatency, int endpointSelectionRetryCount, bool local +}); + + + + +} /// @nodoc class _$GqlNetworkSettingsCopyWithImpl<$Res> implements $GqlNetworkSettingsCopyWith<$Res> { @@ -88,138 +63,205 @@ class _$GqlNetworkSettingsCopyWithImpl<$Res> final GqlNetworkSettings _self; final $Res Function(GqlNetworkSettings) _then; - /// Create a copy of GqlNetworkSettings - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? endpoints = null, - Object? latencyDetectionInterval = null, - Object? maxLatency = null, - Object? endpointSelectionRetryCount = null, - Object? local = null, - }) { - return _then(_self.copyWith( - endpoints: null == endpoints - ? _self.endpoints - : endpoints // ignore: cast_nullable_to_non_nullable - as List, - latencyDetectionInterval: null == latencyDetectionInterval - ? _self.latencyDetectionInterval - : latencyDetectionInterval // ignore: cast_nullable_to_non_nullable - as int, - maxLatency: null == maxLatency - ? _self.maxLatency - : maxLatency // ignore: cast_nullable_to_non_nullable - as int, - endpointSelectionRetryCount: null == endpointSelectionRetryCount - ? _self.endpointSelectionRetryCount - : endpointSelectionRetryCount // ignore: cast_nullable_to_non_nullable - as int, - local: null == local - ? _self.local - : local // ignore: cast_nullable_to_non_nullable - as bool, - )); - } +/// Create a copy of GqlNetworkSettings +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? endpoints = null,Object? latencyDetectionInterval = null,Object? maxLatency = null,Object? endpointSelectionRetryCount = null,Object? local = null,}) { + return _then(_self.copyWith( +endpoints: null == endpoints ? _self.endpoints : endpoints // ignore: cast_nullable_to_non_nullable +as List,latencyDetectionInterval: null == latencyDetectionInterval ? _self.latencyDetectionInterval : latencyDetectionInterval // ignore: cast_nullable_to_non_nullable +as int,maxLatency: null == maxLatency ? _self.maxLatency : maxLatency // ignore: cast_nullable_to_non_nullable +as int,endpointSelectionRetryCount: null == endpointSelectionRetryCount ? _self.endpointSelectionRetryCount : endpointSelectionRetryCount // ignore: cast_nullable_to_non_nullable +as int,local: null == local ? _self.local : local // ignore: cast_nullable_to_non_nullable +as bool, + )); +} + +} + + +/// Adds pattern-matching-related methods to [GqlNetworkSettings]. +extension GqlNetworkSettingsPatterns on GqlNetworkSettings { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _GqlNetworkSettings value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _GqlNetworkSettings() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _GqlNetworkSettings value) $default,){ +final _that = this; +switch (_that) { +case _GqlNetworkSettings(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _GqlNetworkSettings value)? $default,){ +final _that = this; +switch (_that) { +case _GqlNetworkSettings() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List endpoints, int latencyDetectionInterval, int maxLatency, int endpointSelectionRetryCount, bool local)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _GqlNetworkSettings() when $default != null: +return $default(_that.endpoints,_that.latencyDetectionInterval,_that.maxLatency,_that.endpointSelectionRetryCount,_that.local);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List endpoints, int latencyDetectionInterval, int maxLatency, int endpointSelectionRetryCount, bool local) $default,) {final _that = this; +switch (_that) { +case _GqlNetworkSettings(): +return $default(_that.endpoints,_that.latencyDetectionInterval,_that.maxLatency,_that.endpointSelectionRetryCount,_that.local);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List endpoints, int latencyDetectionInterval, int maxLatency, int endpointSelectionRetryCount, bool local)? $default,) {final _that = this; +switch (_that) { +case _GqlNetworkSettings() when $default != null: +return $default(_that.endpoints,_that.latencyDetectionInterval,_that.maxLatency,_that.endpointSelectionRetryCount,_that.local);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _GqlNetworkSettings implements GqlNetworkSettings { - const _GqlNetworkSettings( - {required final List endpoints, - required this.latencyDetectionInterval, - required this.maxLatency, - required this.endpointSelectionRetryCount, - required this.local}) - : _endpoints = endpoints; - factory _GqlNetworkSettings.fromJson(Map json) => - _$GqlNetworkSettingsFromJson(json); - - final List _endpoints; - @override - List get endpoints { - if (_endpoints is EqualUnmodifiableListView) return _endpoints; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_endpoints); - } - - @override - final int latencyDetectionInterval; - @override - final int maxLatency; - @override - final int endpointSelectionRetryCount; - @override - final bool local; - - /// Create a copy of GqlNetworkSettings - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$GqlNetworkSettingsCopyWith<_GqlNetworkSettings> get copyWith => - __$GqlNetworkSettingsCopyWithImpl<_GqlNetworkSettings>(this, _$identity); - - @override - Map toJson() { - return _$GqlNetworkSettingsToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _GqlNetworkSettings && - const DeepCollectionEquality() - .equals(other._endpoints, _endpoints) && - (identical( - other.latencyDetectionInterval, latencyDetectionInterval) || - other.latencyDetectionInterval == latencyDetectionInterval) && - (identical(other.maxLatency, maxLatency) || - other.maxLatency == maxLatency) && - (identical(other.endpointSelectionRetryCount, - endpointSelectionRetryCount) || - other.endpointSelectionRetryCount == - endpointSelectionRetryCount) && - (identical(other.local, local) || other.local == local)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_endpoints), - latencyDetectionInterval, - maxLatency, - endpointSelectionRetryCount, - local); - - @override - String toString() { - return 'GqlNetworkSettings(endpoints: $endpoints, latencyDetectionInterval: $latencyDetectionInterval, maxLatency: $maxLatency, endpointSelectionRetryCount: $endpointSelectionRetryCount, local: $local)'; - } + const _GqlNetworkSettings({required final List endpoints, required this.latencyDetectionInterval, required this.maxLatency, required this.endpointSelectionRetryCount, required this.local}): _endpoints = endpoints; + factory _GqlNetworkSettings.fromJson(Map json) => _$GqlNetworkSettingsFromJson(json); + + final List _endpoints; +@override List get endpoints { + if (_endpoints is EqualUnmodifiableListView) return _endpoints; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_endpoints); } -/// @nodoc -abstract mixin class _$GqlNetworkSettingsCopyWith<$Res> - implements $GqlNetworkSettingsCopyWith<$Res> { - factory _$GqlNetworkSettingsCopyWith( - _GqlNetworkSettings value, $Res Function(_GqlNetworkSettings) _then) = - __$GqlNetworkSettingsCopyWithImpl; - @override - @useResult - $Res call( - {List endpoints, - int latencyDetectionInterval, - int maxLatency, - int endpointSelectionRetryCount, - bool local}); +@override final int latencyDetectionInterval; +@override final int maxLatency; +@override final int endpointSelectionRetryCount; +@override final bool local; + +/// Create a copy of GqlNetworkSettings +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$GqlNetworkSettingsCopyWith<_GqlNetworkSettings> get copyWith => __$GqlNetworkSettingsCopyWithImpl<_GqlNetworkSettings>(this, _$identity); + +@override +Map toJson() { + return _$GqlNetworkSettingsToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _GqlNetworkSettings&&const DeepCollectionEquality().equals(other._endpoints, _endpoints)&&(identical(other.latencyDetectionInterval, latencyDetectionInterval) || other.latencyDetectionInterval == latencyDetectionInterval)&&(identical(other.maxLatency, maxLatency) || other.maxLatency == maxLatency)&&(identical(other.endpointSelectionRetryCount, endpointSelectionRetryCount) || other.endpointSelectionRetryCount == endpointSelectionRetryCount)&&(identical(other.local, local) || other.local == local)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_endpoints),latencyDetectionInterval,maxLatency,endpointSelectionRetryCount,local); + +@override +String toString() { + return 'GqlNetworkSettings(endpoints: $endpoints, latencyDetectionInterval: $latencyDetectionInterval, maxLatency: $maxLatency, endpointSelectionRetryCount: $endpointSelectionRetryCount, local: $local)'; } + +} + +/// @nodoc +abstract mixin class _$GqlNetworkSettingsCopyWith<$Res> implements $GqlNetworkSettingsCopyWith<$Res> { + factory _$GqlNetworkSettingsCopyWith(_GqlNetworkSettings value, $Res Function(_GqlNetworkSettings) _then) = __$GqlNetworkSettingsCopyWithImpl; +@override @useResult +$Res call({ + List endpoints, int latencyDetectionInterval, int maxLatency, int endpointSelectionRetryCount, bool local +}); + + + + +} /// @nodoc class __$GqlNetworkSettingsCopyWithImpl<$Res> implements _$GqlNetworkSettingsCopyWith<$Res> { @@ -228,40 +270,20 @@ class __$GqlNetworkSettingsCopyWithImpl<$Res> final _GqlNetworkSettings _self; final $Res Function(_GqlNetworkSettings) _then; - /// Create a copy of GqlNetworkSettings - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? endpoints = null, - Object? latencyDetectionInterval = null, - Object? maxLatency = null, - Object? endpointSelectionRetryCount = null, - Object? local = null, - }) { - return _then(_GqlNetworkSettings( - endpoints: null == endpoints - ? _self._endpoints - : endpoints // ignore: cast_nullable_to_non_nullable - as List, - latencyDetectionInterval: null == latencyDetectionInterval - ? _self.latencyDetectionInterval - : latencyDetectionInterval // ignore: cast_nullable_to_non_nullable - as int, - maxLatency: null == maxLatency - ? _self.maxLatency - : maxLatency // ignore: cast_nullable_to_non_nullable - as int, - endpointSelectionRetryCount: null == endpointSelectionRetryCount - ? _self.endpointSelectionRetryCount - : endpointSelectionRetryCount // ignore: cast_nullable_to_non_nullable - as int, - local: null == local - ? _self.local - : local // ignore: cast_nullable_to_non_nullable - as bool, - )); - } +/// Create a copy of GqlNetworkSettings +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? endpoints = null,Object? latencyDetectionInterval = null,Object? maxLatency = null,Object? endpointSelectionRetryCount = null,Object? local = null,}) { + return _then(_GqlNetworkSettings( +endpoints: null == endpoints ? _self._endpoints : endpoints // ignore: cast_nullable_to_non_nullable +as List,latencyDetectionInterval: null == latencyDetectionInterval ? _self.latencyDetectionInterval : latencyDetectionInterval // ignore: cast_nullable_to_non_nullable +as int,maxLatency: null == maxLatency ? _self.maxLatency : maxLatency // ignore: cast_nullable_to_non_nullable +as int,endpointSelectionRetryCount: null == endpointSelectionRetryCount ? _self.endpointSelectionRetryCount : endpointSelectionRetryCount // ignore: cast_nullable_to_non_nullable +as int,local: null == local ? _self.local : local // ignore: cast_nullable_to_non_nullable +as bool, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/gql_network_settings.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/gql_network_settings.g.dart index 30d43ed8..621d6ef4 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/gql_network_settings.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/gql_network_settings.g.dart @@ -8,13 +8,14 @@ part of 'gql_network_settings.dart'; _GqlNetworkSettings _$GqlNetworkSettingsFromJson(Map json) => _GqlNetworkSettings( - endpoints: - (json['endpoints'] as List).map((e) => e as String).toList(), - latencyDetectionInterval: - (json['latencyDetectionInterval'] as num).toInt(), + endpoints: (json['endpoints'] as List) + .map((e) => e as String) + .toList(), + latencyDetectionInterval: (json['latencyDetectionInterval'] as num) + .toInt(), maxLatency: (json['maxLatency'] as num).toInt(), - endpointSelectionRetryCount: - (json['endpointSelectionRetryCount'] as num).toInt(), + endpointSelectionRetryCount: (json['endpointSelectionRetryCount'] as num) + .toInt(), local: json['local'] as bool, ); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/jrpc_network_settings.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/jrpc_network_settings.dart index e61ce74a..78a0f86f 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/jrpc_network_settings.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/jrpc_network_settings.dart @@ -5,9 +5,8 @@ part 'jrpc_network_settings.g.dart'; @freezed sealed class JrpcNetworkSettings with _$JrpcNetworkSettings { - const factory JrpcNetworkSettings({ - required final String endpoint, - }) = _JrpcNetworkSettings; + const factory JrpcNetworkSettings({required final String endpoint}) = + _JrpcNetworkSettings; factory JrpcNetworkSettings.fromJson(Map json) => _$JrpcNetworkSettingsFromJson(json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/jrpc_network_settings.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/jrpc_network_settings.freezed.dart index 4286ff3e..6b4545f4 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/jrpc_network_settings.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/jrpc_network_settings.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,47 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$JrpcNetworkSettings { - String get endpoint; - /// Create a copy of JrpcNetworkSettings - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $JrpcNetworkSettingsCopyWith get copyWith => - _$JrpcNetworkSettingsCopyWithImpl( - this as JrpcNetworkSettings, _$identity); + String get endpoint; +/// Create a copy of JrpcNetworkSettings +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$JrpcNetworkSettingsCopyWith get copyWith => _$JrpcNetworkSettingsCopyWithImpl(this as JrpcNetworkSettings, _$identity); /// Serializes this JrpcNetworkSettings to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is JrpcNetworkSettings && - (identical(other.endpoint, endpoint) || - other.endpoint == endpoint)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, endpoint); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is JrpcNetworkSettings&&(identical(other.endpoint, endpoint) || other.endpoint == endpoint)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,endpoint); - @override - String toString() { - return 'JrpcNetworkSettings(endpoint: $endpoint)'; - } +@override +String toString() { + return 'JrpcNetworkSettings(endpoint: $endpoint)'; } -/// @nodoc -abstract mixin class $JrpcNetworkSettingsCopyWith<$Res> { - factory $JrpcNetworkSettingsCopyWith( - JrpcNetworkSettings value, $Res Function(JrpcNetworkSettings) _then) = - _$JrpcNetworkSettingsCopyWithImpl; - @useResult - $Res call({String endpoint}); + } +/// @nodoc +abstract mixin class $JrpcNetworkSettingsCopyWith<$Res> { + factory $JrpcNetworkSettingsCopyWith(JrpcNetworkSettings value, $Res Function(JrpcNetworkSettings) _then) = _$JrpcNetworkSettingsCopyWithImpl; +@useResult +$Res call({ + String endpoint +}); + + + + +} /// @nodoc class _$JrpcNetworkSettingsCopyWithImpl<$Res> implements $JrpcNetworkSettingsCopyWith<$Res> { @@ -64,78 +63,191 @@ class _$JrpcNetworkSettingsCopyWithImpl<$Res> final JrpcNetworkSettings _self; final $Res Function(JrpcNetworkSettings) _then; - /// Create a copy of JrpcNetworkSettings - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? endpoint = null, - }) { - return _then(_self.copyWith( - endpoint: null == endpoint - ? _self.endpoint - : endpoint // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of JrpcNetworkSettings +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? endpoint = null,}) { + return _then(_self.copyWith( +endpoint: null == endpoint ? _self.endpoint : endpoint // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [JrpcNetworkSettings]. +extension JrpcNetworkSettingsPatterns on JrpcNetworkSettings { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _JrpcNetworkSettings value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _JrpcNetworkSettings() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _JrpcNetworkSettings value) $default,){ +final _that = this; +switch (_that) { +case _JrpcNetworkSettings(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _JrpcNetworkSettings value)? $default,){ +final _that = this; +switch (_that) { +case _JrpcNetworkSettings() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String endpoint)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _JrpcNetworkSettings() when $default != null: +return $default(_that.endpoint);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String endpoint) $default,) {final _that = this; +switch (_that) { +case _JrpcNetworkSettings(): +return $default(_that.endpoint);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String endpoint)? $default,) {final _that = this; +switch (_that) { +case _JrpcNetworkSettings() when $default != null: +return $default(_that.endpoint);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _JrpcNetworkSettings implements JrpcNetworkSettings { const _JrpcNetworkSettings({required this.endpoint}); - factory _JrpcNetworkSettings.fromJson(Map json) => - _$JrpcNetworkSettingsFromJson(json); - - @override - final String endpoint; - - /// Create a copy of JrpcNetworkSettings - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$JrpcNetworkSettingsCopyWith<_JrpcNetworkSettings> get copyWith => - __$JrpcNetworkSettingsCopyWithImpl<_JrpcNetworkSettings>( - this, _$identity); - - @override - Map toJson() { - return _$JrpcNetworkSettingsToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _JrpcNetworkSettings && - (identical(other.endpoint, endpoint) || - other.endpoint == endpoint)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, endpoint); - - @override - String toString() { - return 'JrpcNetworkSettings(endpoint: $endpoint)'; - } + factory _JrpcNetworkSettings.fromJson(Map json) => _$JrpcNetworkSettingsFromJson(json); + +@override final String endpoint; + +/// Create a copy of JrpcNetworkSettings +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$JrpcNetworkSettingsCopyWith<_JrpcNetworkSettings> get copyWith => __$JrpcNetworkSettingsCopyWithImpl<_JrpcNetworkSettings>(this, _$identity); + +@override +Map toJson() { + return _$JrpcNetworkSettingsToJson(this, ); } -/// @nodoc -abstract mixin class _$JrpcNetworkSettingsCopyWith<$Res> - implements $JrpcNetworkSettingsCopyWith<$Res> { - factory _$JrpcNetworkSettingsCopyWith(_JrpcNetworkSettings value, - $Res Function(_JrpcNetworkSettings) _then) = - __$JrpcNetworkSettingsCopyWithImpl; - @override - @useResult - $Res call({String endpoint}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _JrpcNetworkSettings&&(identical(other.endpoint, endpoint) || other.endpoint == endpoint)); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,endpoint); + +@override +String toString() { + return 'JrpcNetworkSettings(endpoint: $endpoint)'; +} + + +} + +/// @nodoc +abstract mixin class _$JrpcNetworkSettingsCopyWith<$Res> implements $JrpcNetworkSettingsCopyWith<$Res> { + factory _$JrpcNetworkSettingsCopyWith(_JrpcNetworkSettings value, $Res Function(_JrpcNetworkSettings) _then) = __$JrpcNetworkSettingsCopyWithImpl; +@override @useResult +$Res call({ + String endpoint +}); + + + + +} /// @nodoc class __$JrpcNetworkSettingsCopyWithImpl<$Res> implements _$JrpcNetworkSettingsCopyWith<$Res> { @@ -144,20 +256,16 @@ class __$JrpcNetworkSettingsCopyWithImpl<$Res> final _JrpcNetworkSettings _self; final $Res Function(_JrpcNetworkSettings) _then; - /// Create a copy of JrpcNetworkSettings - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? endpoint = null, - }) { - return _then(_JrpcNetworkSettings( - endpoint: null == endpoint - ? _self.endpoint - : endpoint // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of JrpcNetworkSettings +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? endpoint = null,}) { + return _then(_JrpcNetworkSettings( +endpoint: null == endpoint ? _self.endpoint : endpoint // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/jrpc_network_settings.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/jrpc_network_settings.g.dart index 6c4a68bd..203e7a43 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/jrpc_network_settings.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/jrpc_network_settings.g.dart @@ -7,12 +7,8 @@ part of 'jrpc_network_settings.dart'; // ************************************************************************** _JrpcNetworkSettings _$JrpcNetworkSettingsFromJson(Map json) => - _JrpcNetworkSettings( - endpoint: json['endpoint'] as String, - ); + _JrpcNetworkSettings(endpoint: json['endpoint'] as String); Map _$JrpcNetworkSettingsToJson( - _JrpcNetworkSettings instance) => - { - 'endpoint': instance.endpoint, - }; + _JrpcNetworkSettings instance, +) => {'endpoint': instance.endpoint}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/ledger_signature_context.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/ledger_signature_context.freezed.dart index 4a294d0a..06761dc1 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/ledger_signature_context.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/ledger_signature_context.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,55 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$LedgerSignatureContext { - int get decimals; - String get asset; - int? get workchainId; - String? get address; - - /// Create a copy of LedgerSignatureContext - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $LedgerSignatureContextCopyWith get copyWith => - _$LedgerSignatureContextCopyWithImpl( - this as LedgerSignatureContext, _$identity); + + int get decimals; String get asset; int? get workchainId; String? get address; +/// Create a copy of LedgerSignatureContext +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$LedgerSignatureContextCopyWith get copyWith => _$LedgerSignatureContextCopyWithImpl(this as LedgerSignatureContext, _$identity); /// Serializes this LedgerSignatureContext to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is LedgerSignatureContext && - (identical(other.decimals, decimals) || - other.decimals == decimals) && - (identical(other.asset, asset) || other.asset == asset) && - (identical(other.workchainId, workchainId) || - other.workchainId == workchainId) && - (identical(other.address, address) || other.address == address)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, decimals, asset, workchainId, address); - - @override - String toString() { - return 'LedgerSignatureContext(decimals: $decimals, asset: $asset, workchainId: $workchainId, address: $address)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LedgerSignatureContext&&(identical(other.decimals, decimals) || other.decimals == decimals)&&(identical(other.asset, asset) || other.asset == asset)&&(identical(other.workchainId, workchainId) || other.workchainId == workchainId)&&(identical(other.address, address) || other.address == address)); } -/// @nodoc -abstract mixin class $LedgerSignatureContextCopyWith<$Res> { - factory $LedgerSignatureContextCopyWith(LedgerSignatureContext value, - $Res Function(LedgerSignatureContext) _then) = - _$LedgerSignatureContextCopyWithImpl; - @useResult - $Res call({int decimals, String asset, int? workchainId, String? address}); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,decimals,asset,workchainId,address); + +@override +String toString() { + return 'LedgerSignatureContext(decimals: $decimals, asset: $asset, workchainId: $workchainId, address: $address)'; +} + + } +/// @nodoc +abstract mixin class $LedgerSignatureContextCopyWith<$Res> { + factory $LedgerSignatureContextCopyWith(LedgerSignatureContext value, $Res Function(LedgerSignatureContext) _then) = _$LedgerSignatureContextCopyWithImpl; +@useResult +$Res call({ + int decimals, String asset, int? workchainId, String? address +}); + + + + +} /// @nodoc class _$LedgerSignatureContextCopyWithImpl<$Res> implements $LedgerSignatureContextCopyWith<$Res> { @@ -72,108 +63,197 @@ class _$LedgerSignatureContextCopyWithImpl<$Res> final LedgerSignatureContext _self; final $Res Function(LedgerSignatureContext) _then; - /// Create a copy of LedgerSignatureContext - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? decimals = null, - Object? asset = null, - Object? workchainId = freezed, - Object? address = freezed, - }) { - return _then(_self.copyWith( - decimals: null == decimals - ? _self.decimals - : decimals // ignore: cast_nullable_to_non_nullable - as int, - asset: null == asset - ? _self.asset - : asset // ignore: cast_nullable_to_non_nullable - as String, - workchainId: freezed == workchainId - ? _self.workchainId - : workchainId // ignore: cast_nullable_to_non_nullable - as int?, - address: freezed == address - ? _self.address - : address // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of LedgerSignatureContext +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? decimals = null,Object? asset = null,Object? workchainId = freezed,Object? address = freezed,}) { + return _then(_self.copyWith( +decimals: null == decimals ? _self.decimals : decimals // ignore: cast_nullable_to_non_nullable +as int,asset: null == asset ? _self.asset : asset // ignore: cast_nullable_to_non_nullable +as String,workchainId: freezed == workchainId ? _self.workchainId : workchainId // ignore: cast_nullable_to_non_nullable +as int?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [LedgerSignatureContext]. +extension LedgerSignatureContextPatterns on LedgerSignatureContext { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LedgerSignatureContext value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LedgerSignatureContext() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LedgerSignatureContext value) $default,){ +final _that = this; +switch (_that) { +case _LedgerSignatureContext(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LedgerSignatureContext value)? $default,){ +final _that = this; +switch (_that) { +case _LedgerSignatureContext() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int decimals, String asset, int? workchainId, String? address)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LedgerSignatureContext() when $default != null: +return $default(_that.decimals,_that.asset,_that.workchainId,_that.address);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int decimals, String asset, int? workchainId, String? address) $default,) {final _that = this; +switch (_that) { +case _LedgerSignatureContext(): +return $default(_that.decimals,_that.asset,_that.workchainId,_that.address);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int decimals, String asset, int? workchainId, String? address)? $default,) {final _that = this; +switch (_that) { +case _LedgerSignatureContext() when $default != null: +return $default(_that.decimals,_that.asset,_that.workchainId,_that.address);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _LedgerSignatureContext implements LedgerSignatureContext { - const _LedgerSignatureContext( - {required this.decimals, - required this.asset, - this.workchainId, - this.address}); - factory _LedgerSignatureContext.fromJson(Map json) => - _$LedgerSignatureContextFromJson(json); - - @override - final int decimals; - @override - final String asset; - @override - final int? workchainId; - @override - final String? address; - - /// Create a copy of LedgerSignatureContext - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$LedgerSignatureContextCopyWith<_LedgerSignatureContext> get copyWith => - __$LedgerSignatureContextCopyWithImpl<_LedgerSignatureContext>( - this, _$identity); - - @override - Map toJson() { - return _$LedgerSignatureContextToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _LedgerSignatureContext && - (identical(other.decimals, decimals) || - other.decimals == decimals) && - (identical(other.asset, asset) || other.asset == asset) && - (identical(other.workchainId, workchainId) || - other.workchainId == workchainId) && - (identical(other.address, address) || other.address == address)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, decimals, asset, workchainId, address); - - @override - String toString() { - return 'LedgerSignatureContext(decimals: $decimals, asset: $asset, workchainId: $workchainId, address: $address)'; - } + const _LedgerSignatureContext({required this.decimals, required this.asset, this.workchainId, this.address}); + factory _LedgerSignatureContext.fromJson(Map json) => _$LedgerSignatureContextFromJson(json); + +@override final int decimals; +@override final String asset; +@override final int? workchainId; +@override final String? address; + +/// Create a copy of LedgerSignatureContext +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LedgerSignatureContextCopyWith<_LedgerSignatureContext> get copyWith => __$LedgerSignatureContextCopyWithImpl<_LedgerSignatureContext>(this, _$identity); + +@override +Map toJson() { + return _$LedgerSignatureContextToJson(this, ); } -/// @nodoc -abstract mixin class _$LedgerSignatureContextCopyWith<$Res> - implements $LedgerSignatureContextCopyWith<$Res> { - factory _$LedgerSignatureContextCopyWith(_LedgerSignatureContext value, - $Res Function(_LedgerSignatureContext) _then) = - __$LedgerSignatureContextCopyWithImpl; - @override - @useResult - $Res call({int decimals, String asset, int? workchainId, String? address}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LedgerSignatureContext&&(identical(other.decimals, decimals) || other.decimals == decimals)&&(identical(other.asset, asset) || other.asset == asset)&&(identical(other.workchainId, workchainId) || other.workchainId == workchainId)&&(identical(other.address, address) || other.address == address)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,decimals,asset,workchainId,address); + +@override +String toString() { + return 'LedgerSignatureContext(decimals: $decimals, asset: $asset, workchainId: $workchainId, address: $address)'; +} + + } +/// @nodoc +abstract mixin class _$LedgerSignatureContextCopyWith<$Res> implements $LedgerSignatureContextCopyWith<$Res> { + factory _$LedgerSignatureContextCopyWith(_LedgerSignatureContext value, $Res Function(_LedgerSignatureContext) _then) = __$LedgerSignatureContextCopyWithImpl; +@override @useResult +$Res call({ + int decimals, String asset, int? workchainId, String? address +}); + + + + +} /// @nodoc class __$LedgerSignatureContextCopyWithImpl<$Res> implements _$LedgerSignatureContextCopyWith<$Res> { @@ -182,35 +262,19 @@ class __$LedgerSignatureContextCopyWithImpl<$Res> final _LedgerSignatureContext _self; final $Res Function(_LedgerSignatureContext) _then; - /// Create a copy of LedgerSignatureContext - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? decimals = null, - Object? asset = null, - Object? workchainId = freezed, - Object? address = freezed, - }) { - return _then(_LedgerSignatureContext( - decimals: null == decimals - ? _self.decimals - : decimals // ignore: cast_nullable_to_non_nullable - as int, - asset: null == asset - ? _self.asset - : asset // ignore: cast_nullable_to_non_nullable - as String, - workchainId: freezed == workchainId - ? _self.workchainId - : workchainId // ignore: cast_nullable_to_non_nullable - as int?, - address: freezed == address - ? _self.address - : address // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of LedgerSignatureContext +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? decimals = null,Object? asset = null,Object? workchainId = freezed,Object? address = freezed,}) { + return _then(_LedgerSignatureContext( +decimals: null == decimals ? _self.decimals : decimals // ignore: cast_nullable_to_non_nullable +as int,asset: null == asset ? _self.asset : asset // ignore: cast_nullable_to_non_nullable +as String,workchainId: freezed == workchainId ? _self.workchainId : workchainId // ignore: cast_nullable_to_non_nullable +as int?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/ledger_signature_context.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/ledger_signature_context.g.dart index 1ba8275f..31975062 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/ledger_signature_context.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/ledger_signature_context.g.dart @@ -7,19 +7,19 @@ part of 'ledger_signature_context.dart'; // ************************************************************************** _LedgerSignatureContext _$LedgerSignatureContextFromJson( - Map json) => - _LedgerSignatureContext( - decimals: (json['decimals'] as num).toInt(), - asset: json['asset'] as String, - workchainId: (json['workchainId'] as num?)?.toInt(), - address: json['address'] as String?, - ); + Map json, +) => _LedgerSignatureContext( + decimals: (json['decimals'] as num).toInt(), + asset: json['asset'] as String, + workchainId: (json['workchainId'] as num?)?.toInt(), + address: json['address'] as String?, +); Map _$LedgerSignatureContextToJson( - _LedgerSignatureContext instance) => - { - 'decimals': instance.decimals, - 'asset': instance.asset, - 'workchainId': instance.workchainId, - 'address': instance.address, - }; + _LedgerSignatureContext instance, +) => { + 'decimals': instance.decimals, + 'asset': instance.asset, + 'workchainId': instance.workchainId, + 'address': instance.address, +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/proto_network_settings.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/proto_network_settings.dart index 5714fd17..5879fdb4 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/proto_network_settings.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/proto_network_settings.dart @@ -5,9 +5,8 @@ part 'proto_network_settings.g.dart'; @freezed sealed class ProtoNetworkSettings with _$ProtoNetworkSettings { - const factory ProtoNetworkSettings({ - required final String endpoint, - }) = _ProtoNetworkSettings; + const factory ProtoNetworkSettings({required final String endpoint}) = + _ProtoNetworkSettings; factory ProtoNetworkSettings.fromJson(Map json) => _$ProtoNetworkSettingsFromJson(json); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/proto_network_settings.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/proto_network_settings.freezed.dart index 127a8a8d..6521838f 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/proto_network_settings.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/proto_network_settings.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,47 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$ProtoNetworkSettings { - String get endpoint; - /// Create a copy of ProtoNetworkSettings - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $ProtoNetworkSettingsCopyWith get copyWith => - _$ProtoNetworkSettingsCopyWithImpl( - this as ProtoNetworkSettings, _$identity); + String get endpoint; +/// Create a copy of ProtoNetworkSettings +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$ProtoNetworkSettingsCopyWith get copyWith => _$ProtoNetworkSettingsCopyWithImpl(this as ProtoNetworkSettings, _$identity); /// Serializes this ProtoNetworkSettings to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is ProtoNetworkSettings && - (identical(other.endpoint, endpoint) || - other.endpoint == endpoint)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, endpoint); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is ProtoNetworkSettings&&(identical(other.endpoint, endpoint) || other.endpoint == endpoint)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,endpoint); - @override - String toString() { - return 'ProtoNetworkSettings(endpoint: $endpoint)'; - } +@override +String toString() { + return 'ProtoNetworkSettings(endpoint: $endpoint)'; } -/// @nodoc -abstract mixin class $ProtoNetworkSettingsCopyWith<$Res> { - factory $ProtoNetworkSettingsCopyWith(ProtoNetworkSettings value, - $Res Function(ProtoNetworkSettings) _then) = - _$ProtoNetworkSettingsCopyWithImpl; - @useResult - $Res call({String endpoint}); + } +/// @nodoc +abstract mixin class $ProtoNetworkSettingsCopyWith<$Res> { + factory $ProtoNetworkSettingsCopyWith(ProtoNetworkSettings value, $Res Function(ProtoNetworkSettings) _then) = _$ProtoNetworkSettingsCopyWithImpl; +@useResult +$Res call({ + String endpoint +}); + + + + +} /// @nodoc class _$ProtoNetworkSettingsCopyWithImpl<$Res> implements $ProtoNetworkSettingsCopyWith<$Res> { @@ -64,78 +63,191 @@ class _$ProtoNetworkSettingsCopyWithImpl<$Res> final ProtoNetworkSettings _self; final $Res Function(ProtoNetworkSettings) _then; - /// Create a copy of ProtoNetworkSettings - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? endpoint = null, - }) { - return _then(_self.copyWith( - endpoint: null == endpoint - ? _self.endpoint - : endpoint // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of ProtoNetworkSettings +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? endpoint = null,}) { + return _then(_self.copyWith( +endpoint: null == endpoint ? _self.endpoint : endpoint // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [ProtoNetworkSettings]. +extension ProtoNetworkSettingsPatterns on ProtoNetworkSettings { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _ProtoNetworkSettings value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _ProtoNetworkSettings() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _ProtoNetworkSettings value) $default,){ +final _that = this; +switch (_that) { +case _ProtoNetworkSettings(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _ProtoNetworkSettings value)? $default,){ +final _that = this; +switch (_that) { +case _ProtoNetworkSettings() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String endpoint)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _ProtoNetworkSettings() when $default != null: +return $default(_that.endpoint);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String endpoint) $default,) {final _that = this; +switch (_that) { +case _ProtoNetworkSettings(): +return $default(_that.endpoint);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String endpoint)? $default,) {final _that = this; +switch (_that) { +case _ProtoNetworkSettings() when $default != null: +return $default(_that.endpoint);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _ProtoNetworkSettings implements ProtoNetworkSettings { const _ProtoNetworkSettings({required this.endpoint}); - factory _ProtoNetworkSettings.fromJson(Map json) => - _$ProtoNetworkSettingsFromJson(json); - - @override - final String endpoint; - - /// Create a copy of ProtoNetworkSettings - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$ProtoNetworkSettingsCopyWith<_ProtoNetworkSettings> get copyWith => - __$ProtoNetworkSettingsCopyWithImpl<_ProtoNetworkSettings>( - this, _$identity); - - @override - Map toJson() { - return _$ProtoNetworkSettingsToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _ProtoNetworkSettings && - (identical(other.endpoint, endpoint) || - other.endpoint == endpoint)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, endpoint); - - @override - String toString() { - return 'ProtoNetworkSettings(endpoint: $endpoint)'; - } + factory _ProtoNetworkSettings.fromJson(Map json) => _$ProtoNetworkSettingsFromJson(json); + +@override final String endpoint; + +/// Create a copy of ProtoNetworkSettings +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$ProtoNetworkSettingsCopyWith<_ProtoNetworkSettings> get copyWith => __$ProtoNetworkSettingsCopyWithImpl<_ProtoNetworkSettings>(this, _$identity); + +@override +Map toJson() { + return _$ProtoNetworkSettingsToJson(this, ); } -/// @nodoc -abstract mixin class _$ProtoNetworkSettingsCopyWith<$Res> - implements $ProtoNetworkSettingsCopyWith<$Res> { - factory _$ProtoNetworkSettingsCopyWith(_ProtoNetworkSettings value, - $Res Function(_ProtoNetworkSettings) _then) = - __$ProtoNetworkSettingsCopyWithImpl; - @override - @useResult - $Res call({String endpoint}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProtoNetworkSettings&&(identical(other.endpoint, endpoint) || other.endpoint == endpoint)); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,endpoint); + +@override +String toString() { + return 'ProtoNetworkSettings(endpoint: $endpoint)'; +} + + +} + +/// @nodoc +abstract mixin class _$ProtoNetworkSettingsCopyWith<$Res> implements $ProtoNetworkSettingsCopyWith<$Res> { + factory _$ProtoNetworkSettingsCopyWith(_ProtoNetworkSettings value, $Res Function(_ProtoNetworkSettings) _then) = __$ProtoNetworkSettingsCopyWithImpl; +@override @useResult +$Res call({ + String endpoint +}); + + + + +} /// @nodoc class __$ProtoNetworkSettingsCopyWithImpl<$Res> implements _$ProtoNetworkSettingsCopyWith<$Res> { @@ -144,20 +256,16 @@ class __$ProtoNetworkSettingsCopyWithImpl<$Res> final _ProtoNetworkSettings _self; final $Res Function(_ProtoNetworkSettings) _then; - /// Create a copy of ProtoNetworkSettings - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? endpoint = null, - }) { - return _then(_ProtoNetworkSettings( - endpoint: null == endpoint - ? _self.endpoint - : endpoint // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of ProtoNetworkSettings +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? endpoint = null,}) { + return _then(_ProtoNetworkSettings( +endpoint: null == endpoint ? _self.endpoint : endpoint // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/proto_network_settings.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/proto_network_settings.g.dart index 763de251..b5a32aee 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/models/proto_network_settings.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/models/proto_network_settings.g.dart @@ -7,13 +7,9 @@ part of 'proto_network_settings.dart'; // ************************************************************************** _ProtoNetworkSettings _$ProtoNetworkSettingsFromJson( - Map json) => - _ProtoNetworkSettings( - endpoint: json['endpoint'] as String, - ); + Map json, +) => _ProtoNetworkSettings(endpoint: json['endpoint'] as String); Map _$ProtoNetworkSettingsToJson( - _ProtoNetworkSettings instance) => - { - 'endpoint': instance.endpoint, - }; + _ProtoNetworkSettings instance, +) => {'endpoint': instance.endpoint}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/proto_connection.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/proto_connection.dart index 7cb6452f..9c1f40f5 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/proto_connection.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/proto_connection.dart @@ -1,9 +1,6 @@ import 'dart:async'; import 'dart:typed_data'; import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart'; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart'; -import 'package:reflectable/mirrors.dart'; -import 'proto_connection.reflectable.dart'; /// Interface for http client to make post requests. abstract interface class ProtoConnectionHttpClient { @@ -16,8 +13,7 @@ abstract interface class ProtoConnectionHttpClient { void dispose(); } -@reflector -class ProtoConnection extends RustToDartMirrorInterface { +class ProtoConnection { late ProtoConnectionDartWrapper connection; final ProtoConnectionHttpClient _client; @@ -28,12 +24,7 @@ class ProtoConnection extends RustToDartMirrorInterface { final type = TransportType.proto; - ProtoConnection._( - this._client, - this.settings, - this._name, - this._group, - ); + ProtoConnection._(this._client, this.settings, this._name, this._group); static ProtoConnection create({ required ProtoConnectionHttpClient client, @@ -43,9 +34,7 @@ class ProtoConnection extends RustToDartMirrorInterface { }) { final instance = ProtoConnection._(client, settings, name, group); - instance.connection = ProtoConnectionDartWrapper( - instanceHash: instance.instanceHash, - ); + instance.connection = ProtoConnectionDartWrapper(onPost: instance.post); return instance; } @@ -59,9 +48,7 @@ class ProtoConnection extends RustToDartMirrorInterface { try { return await _client.post( endpoint: settings.endpoint, - headers: { - 'Content-Type': 'application/x-protobuf', - }, + headers: {'Content-Type': 'application/x-protobuf'}, dataBytes: requestData, ); } catch (error) { @@ -69,18 +56,8 @@ class ProtoConnection extends RustToDartMirrorInterface { } } - @override void dispose() { connection.innerConnection.dispose(); _client.dispose(); - super.dispose(); - } - - @override - InstanceMirror initializeMirror() { - initializeReflectable(); // auto-generated reflectable file - return reflector.reflect(this); } } - -void main() {} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/proto_connection.reflectable.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/proto_connection.reflectable.dart deleted file mode 100644 index 3598f5f2..00000000 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/proto_connection.reflectable.dart +++ /dev/null @@ -1,803 +0,0 @@ -// This file has been generated by the reflectable package. -// https://github.com/dart-lang/reflectable. -import 'dart:core'; -import 'package:flutter_nekoton_bridge/nekoton/core/generic_contract/generic_contract.dart' - as prefix6; -import 'package:flutter_nekoton_bridge/nekoton/core/jetton_wallet/jetton_wallet.dart' - as prefix8; -import 'package:flutter_nekoton_bridge/nekoton/core/token_wallet/token_wallet.dart' - as prefix7; -import 'package:flutter_nekoton_bridge/nekoton/core/ton_wallet/ton_wallet.dart' - as prefix9; -import 'package:flutter_nekoton_bridge/nekoton/external/gql_connection.dart' - as prefix2; -import 'package:flutter_nekoton_bridge/nekoton/external/jrpc_connection.dart' - as prefix3; -import 'package:flutter_nekoton_bridge/nekoton/external/ledger_connection.dart' - as prefix4; -import 'package:flutter_nekoton_bridge/nekoton/external/storage.dart' - as prefix5; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart' as prefix0; -import 'proto_connection.dart' as prefix1; - -// ignore_for_file: camel_case_types -// ignore_for_file: implementation_imports -// ignore_for_file: prefer_adjacent_string_concatenation -// ignore_for_file: prefer_collection_literals -// ignore_for_file: unnecessary_const -// ignore_for_file: unused_import -// ignore_for_file: sdk_version_since - -import 'package:reflectable/mirrors.dart' as m; -import 'package:reflectable/src/reflectable_builder_based.dart' as r; -import 'package:reflectable/reflectable.dart' as r show Reflectable; - -final _data = { - const prefix0.Reflector(): r.ReflectorData( - [ - r.NonGenericClassMirrorImpl( - r'ProtoConnection', - r'.ProtoConnection', - 134217735, - 0, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix1.ProtoConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 1, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 0, - }, - ), - r.NonGenericClassMirrorImpl( - r'GqlConnection', - r'.GqlConnection', - 134217735, - 1, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix2.GqlConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 1, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 0, - }, - ), - r.NonGenericClassMirrorImpl( - r'JrpcConnection', - r'.JrpcConnection', - 134217735, - 2, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix3.JrpcConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 1, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 0, - }, - ), - r.NonGenericClassMirrorImpl( - r'LedgerConnection', - r'.LedgerConnection', - 134217735, - 3, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix4.LedgerConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getPublicKey': 1, - r'sign': 2, - r'signTransaction': 3, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'create': 1, - }, - ), - r.NonGenericClassMirrorImpl( - r'Storage', - r'.Storage', - 134217735, - 4, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix5.Storage.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'get': 1, - r'set': 5, - r'setUnchecked': 5, - r'remove': 5, - r'removeUnchecked': 5, - r'initializeMirror': 0, - r'storage': 0, - r'storage=': 1, - r'create': 4, - }, - ), - r.NonGenericClassMirrorImpl( - r'GenericContract', - r'.GenericContract', - 134217735, - 5, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'subscribe': () => prefix6.GenericContract.subscribe}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'executeTransactionLocally': 7, - r'estimateFees': 7, - r'send': 7, - r'refresh': 0, - r'preloadTransactions': 8, - r'handleBlock': 9, - r'onMessageSent': 1, - r'onMessageExpired': 1, - r'onStateChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 0, - r'contract': 0, - r'contract=': 1, - r'transport': 0, - r'address': 0, - r'address=': 1, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 6, - }, - ), - r.NonGenericClassMirrorImpl( - r'TokenWallet', - r'.TokenWallet', - 134217735, - 6, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix7.TokenWallet.subscribe, - r'getTokenWalletDetails': () => - prefix7.TokenWallet.getTokenWalletDetails, - r'getTokenRootDetailsFromTokenWallet': () => - prefix7.TokenWallet.getTokenRootDetailsFromTokenWallet, - r'getTokenRootDetails': () => prefix7.TokenWallet.getTokenRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 11, - r'prepareTransfer': 12, - r'refresh': 0, - r'preloadTransactions': 13, - r'handleBlock': 9, - r'onBalanceChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 1, - r'transport': 0, - r'balance': 0, - r'balance=': 1, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 1, - r'owner': 0, - r'owner=': 1, - r'symbol': 0, - r'symbol=': 1, - r'currency': 0, - r'currency=': 1, - r'version': 0, - r'version=': 1, - r'moneyBalance': 0, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onMoneyBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 10, - r'getTokenWalletDetails': 6, - r'getTokenRootDetailsFromTokenWallet': 6, - r'getTokenRootDetails': 14, - }, - ), - r.NonGenericClassMirrorImpl( - r'JettonWallet', - r'.JettonWallet', - 134217735, - 7, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix8.JettonWallet.subscribe, - r'getJettonWalletDetails': () => - prefix8.JettonWallet.getJettonWalletDetails, - r'getJettonRootDetailsFromJettonWallet': () => - prefix8.JettonWallet.getJettonRootDetailsFromJettonWallet, - r'getJettonRootDetails': () => - prefix8.JettonWallet.getJettonRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 11, - r'prepareTransfer': 15, - r'refresh': 0, - r'preloadTransactions': 13, - r'handleBlock': 9, - r'onBalanceChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 1, - r'transport': 0, - r'balance': 0, - r'balance=': 1, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 1, - r'owner': 0, - r'owner=': 1, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 10, - r'getJettonWalletDetails': 6, - r'getJettonRootDetailsFromJettonWallet': 6, - r'getJettonRootDetails': 14, - }, - ), - r.NonGenericClassMirrorImpl( - r'TonWallet', - r'.TonWallet', - 134217735, - 8, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix9.TonWallet.subscribe, - r'subscribeByAddress': () => prefix9.TonWallet.subscribeByAddress, - r'subscribeByExistingWallet': () => - prefix9.TonWallet.subscribeByExistingWallet, - r'appendSignatureToWalletV5R1Payload': () => - prefix9.TonWallet.appendSignatureToWalletV5R1Payload, - r'findExistingWallets': () => prefix9.TonWallet.findExistingWallets, - r'getExistingWalletInfo': () => - prefix9.TonWallet.getExistingWalletInfo, - r'getWalletCustodians': () => prefix9.TonWallet.getWalletCustodians, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'getUnconfirmedTransactions': 0, - r'getCustodians': 0, - r'prepareDeploy': 19, - r'prepareDeployWithMultipleOwners': 20, - r'prepareTransfer': 21, - r'prepareWalletV5R1MessageBody': 22, - r'prepareNonexistWalletV5R1MessageBody': 22, - r'prepareConfirmTransaction': 23, - r'estimateFees': 24, - r'send': 7, - r'refresh': 0, - r'preloadTransactions': 8, - r'handleBlock': 9, - r'makeStateInit': 0, - r'getWalletV5R1Seqno': 21, - r'onMessageSent': 1, - r'onMessageExpired': 1, - r'onStateChanged': 1, - r'onTransactionsFound': 1, - r'onDetailsChanged': 1, - r'onCustodiansChanged': 1, - r'onUnconfirmedTransactionsChanged': 1, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 1, - r'transport': 0, - r'publicKey': 0, - r'publicKey=': 1, - r'address': 0, - r'address=': 1, - r'walletType': 0, - r'walletType=': 1, - r'workchain': 0, - r'workchain=': 1, - r'custodians': 0, - r'details': 0, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'unconfirmedTransactions': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 16, - r'subscribeByAddress': 6, - r'subscribeByExistingWallet': 17, - r'appendSignatureToWalletV5R1Payload': 18, - r'findExistingWallets': 25, - r'getExistingWalletInfo': 6, - r'getWalletCustodians': 6, - }, - ), - ], - null, - null, - [ - prefix1.ProtoConnection, - prefix2.GqlConnection, - prefix3.JrpcConnection, - prefix4.LedgerConnection, - prefix5.Storage, - prefix6.GenericContract, - prefix7.TokenWallet, - prefix8.JettonWallet, - prefix9.TonWallet, - ], - 9, - { - r'==': (dynamic instance) => (x) => instance == x, - r'toString': (dynamic instance) => instance.toString, - r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, - r'hashCode': (dynamic instance) => instance.hashCode, - r'runtimeType': (dynamic instance) => instance.runtimeType, - r'init': (dynamic instance) => instance.init, - r'dispose': (dynamic instance) => instance.dispose, - r'instanceHash': (dynamic instance) => instance.instanceHash, - r'avoidCall': (dynamic instance) => instance.avoidCall, - r'post': (dynamic instance) => instance.post, - r'initializeMirror': (dynamic instance) => instance.initializeMirror, - r'connection': (dynamic instance) => instance.connection, - r'settings': (dynamic instance) => instance.settings, - r'type': (dynamic instance) => instance.type, - r'name': (dynamic instance) => instance.name, - r'group': (dynamic instance) => instance.group, - r'getPublicKey': (dynamic instance) => instance.getPublicKey, - r'sign': (dynamic instance) => instance.sign, - r'signTransaction': (dynamic instance) => instance.signTransaction, - r'get': (dynamic instance) => instance.get, - r'set': (dynamic instance) => instance.set, - r'setUnchecked': (dynamic instance) => instance.setUnchecked, - r'remove': (dynamic instance) => instance.remove, - r'removeUnchecked': (dynamic instance) => instance.removeUnchecked, - r'storage': (dynamic instance) => instance.storage, - r'getContractState': (dynamic instance) => instance.getContractState, - r'getPendingTransactions': (dynamic instance) => - instance.getPendingTransactions, - r'getPollingMethod': (dynamic instance) => instance.getPollingMethod, - r'executeTransactionLocally': (dynamic instance) => - instance.executeTransactionLocally, - r'estimateFees': (dynamic instance) => instance.estimateFees, - r'send': (dynamic instance) => instance.send, - r'refresh': (dynamic instance) => instance.refresh, - r'preloadTransactions': (dynamic instance) => - instance.preloadTransactions, - r'handleBlock': (dynamic instance) => instance.handleBlock, - r'onMessageSent': (dynamic instance) => instance.onMessageSent, - r'onMessageExpired': (dynamic instance) => instance.onMessageExpired, - r'onStateChanged': (dynamic instance) => instance.onStateChanged, - r'onTransactionsFound': (dynamic instance) => - instance.onTransactionsFound, - r'contract': (dynamic instance) => instance.contract, - r'transport': (dynamic instance) => instance.transport, - r'address': (dynamic instance) => instance.address, - r'contractState': (dynamic instance) => instance.contractState, - r'pendingTransactions': (dynamic instance) => - instance.pendingTransactions, - r'pollingMethod': (dynamic instance) => instance.pollingMethod, - r'fieldUpdatesStream': (dynamic instance) => instance.fieldUpdatesStream, - r'onMessageSentStream': (dynamic instance) => - instance.onMessageSentStream, - r'onMessageExpiredStream': (dynamic instance) => - instance.onMessageExpiredStream, - r'onStateChangedStream': (dynamic instance) => - instance.onStateChangedStream, - r'onTransactionsFoundStream': (dynamic instance) => - instance.onTransactionsFoundStream, - r'refreshDescription': (dynamic instance) => instance.refreshDescription, - r'estimateMinAttachedAmount': (dynamic instance) => - instance.estimateMinAttachedAmount, - r'prepareTransfer': (dynamic instance) => instance.prepareTransfer, - r'onBalanceChanged': (dynamic instance) => instance.onBalanceChanged, - r'wallet': (dynamic instance) => instance.wallet, - r'balance': (dynamic instance) => instance.balance, - r'rootTokenContract': (dynamic instance) => instance.rootTokenContract, - r'tokenAddress': (dynamic instance) => instance.tokenAddress, - r'owner': (dynamic instance) => instance.owner, - r'symbol': (dynamic instance) => instance.symbol, - r'currency': (dynamic instance) => instance.currency, - r'version': (dynamic instance) => instance.version, - r'moneyBalance': (dynamic instance) => instance.moneyBalance, - r'isTransactionsPreloaded': (dynamic instance) => - instance.isTransactionsPreloaded, - r'onBalanceChangedStream': (dynamic instance) => - instance.onBalanceChangedStream, - r'onMoneyBalanceChangedStream': (dynamic instance) => - instance.onMoneyBalanceChangedStream, - r'getUnconfirmedTransactions': (dynamic instance) => - instance.getUnconfirmedTransactions, - r'getCustodians': (dynamic instance) => instance.getCustodians, - r'prepareDeploy': (dynamic instance) => instance.prepareDeploy, - r'prepareDeployWithMultipleOwners': (dynamic instance) => - instance.prepareDeployWithMultipleOwners, - r'prepareWalletV5R1MessageBody': (dynamic instance) => - instance.prepareWalletV5R1MessageBody, - r'prepareNonexistWalletV5R1MessageBody': (dynamic instance) => - instance.prepareNonexistWalletV5R1MessageBody, - r'prepareConfirmTransaction': (dynamic instance) => - instance.prepareConfirmTransaction, - r'makeStateInit': (dynamic instance) => instance.makeStateInit, - r'getWalletV5R1Seqno': (dynamic instance) => instance.getWalletV5R1Seqno, - r'onDetailsChanged': (dynamic instance) => instance.onDetailsChanged, - r'onCustodiansChanged': (dynamic instance) => - instance.onCustodiansChanged, - r'onUnconfirmedTransactionsChanged': (dynamic instance) => - instance.onUnconfirmedTransactionsChanged, - r'publicKey': (dynamic instance) => instance.publicKey, - r'walletType': (dynamic instance) => instance.walletType, - r'workchain': (dynamic instance) => instance.workchain, - r'custodians': (dynamic instance) => instance.custodians, - r'details': (dynamic instance) => instance.details, - r'unconfirmedTransactions': (dynamic instance) => - instance.unconfirmedTransactions, - }, - { - r'connection=': (dynamic instance, value) => instance.connection = value, - r'storage=': (dynamic instance, value) => instance.storage = value, - r'contract=': (dynamic instance, value) => instance.contract = value, - r'address=': (dynamic instance, value) => instance.address = value, - r'wallet=': (dynamic instance, value) => instance.wallet = value, - r'balance=': (dynamic instance, value) => instance.balance = value, - r'tokenAddress=': (dynamic instance, value) => - instance.tokenAddress = value, - r'owner=': (dynamic instance, value) => instance.owner = value, - r'symbol=': (dynamic instance, value) => instance.symbol = value, - r'currency=': (dynamic instance, value) => instance.currency = value, - r'version=': (dynamic instance, value) => instance.version = value, - r'publicKey=': (dynamic instance, value) => instance.publicKey = value, - r'walletType=': (dynamic instance, value) => instance.walletType = value, - r'workchain=': (dynamic instance, value) => instance.workchain = value, - }, - null, - [ - const [ - 0, - 0, - const [#client, #settings, #name, #group], - ], - const [1, 0, null], - const [3, 0, null], - const [5, 0, null], - const [ - 0, - 0, - const [#get, #set, #setUnchecked, #remove, #removeUnchecked], - ], - const [ - 0, - 0, - const [#key, #value], - ], - const [ - 0, - 0, - const [#transport, #address, #preloadTransactions], - ], - const [ - 0, - 0, - const [#signedMessage, #options], - ], - const [ - 0, - 0, - const [#fromLt], - ], - const [ - 0, - 0, - const [#block], - ], - const [ - 0, - 0, - const [#transport, #owner, #rootTokenContract, #preloadTransactions], - ], - const [ - 0, - 0, - const [#destination, #amount, #notifyReceiver, #payload], - ], - const [ - 0, - 0, - const [ - #destination, - #amount, - #notifyReceiver, - #attachedAmount, - #payload, - #remainingGasTo, - ], - ], - const [1, 1, null], - const [ - 0, - 0, - const [#transport, #tokenRoot], - ], - const [ - 0, - 0, - const [ - #amount, - #destination, - #remainingGasTo, - #callbackValue, - #customPayload, - #callbackPayload, - #attachedAmount, - ], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletType], - ], - const [ - 0, - 0, - const [#transport, #existingWallet], - ], - const [ - 0, - 0, - const [#payload, #base64Signature], - ], - const [ - 0, - 0, - const [#expiration], - ], - const [ - 0, - 0, - const [#expiration, #custodians, #reqConfirms, #expirationTime], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #expiration, #params], - ], - const [ - 0, - 0, - const [ - #contractState, - #publicKey, - #expiration, - #params, - #isInternalFlow, - ], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #transactionId, #expiration], - ], - const [ - 0, - 0, - const [#signedMessage, #executionOptions], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletTypes], - ], - ], - ), -}; - -final _memberSymbolMap = null; - -void initializeReflectable() { - r.data = _data; - r.memberSymbolMap = _memberSymbolMap; -} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/storage.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/storage.dart index 5de5dbc9..d07d3dd6 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/storage.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/external/storage.dart @@ -1,27 +1,18 @@ import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart'; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart'; -import 'package:reflectable/mirrors.dart'; - -import 'storage.reflectable.dart'; typedef StorageGet = Future Function(String key); -typedef StorageSet = Future Function({ - required String key, - required String value, -}); +typedef StorageSet = + Future Function({required String key, required String value}); -typedef StorageSetUnchecked = void Function({ - required String key, - required String value, -}); +typedef StorageSetUnchecked = + void Function({required String key, required String value}); typedef StorageRemove = Future Function(String key); typedef StorageRemoveUnchecked = void Function(String key); -@reflector -class Storage extends RustToDartMirrorInterface { +class Storage { late StorageDartWrapper storage; final StorageGet _get; @@ -48,7 +39,11 @@ class Storage extends RustToDartMirrorInterface { final instance = Storage._(get, set, setUnchecked, remove, removeUnchecked); instance.storage = StorageDartWrapper( - instanceHash: instance.instanceHash, + onGet: instance.get, + onSet: instance.set, + onSetUnchecked: instance.setUnchecked, + onRemove: instance.remove, + onRemoveUnchecked: instance.removeUnchecked, ); return instance; @@ -64,7 +59,7 @@ class Storage extends RustToDartMirrorInterface { } /// Method to make set. It's called from rust - Future set({required String key, required String value}) async { + Future set(String key, String value) async { try { return _set(key: key, value: value); } catch (_) { @@ -73,14 +68,14 @@ class Storage extends RustToDartMirrorInterface { } /// Method to make setUnchecked. It's called from rust - void setUnchecked({required String key, required String value}) { + void setUnchecked(String key, String value) { try { _setUnchecked(key: key, value: value); } catch (_) {} } /// Method to make remove. It's called from rust - Future remove({required String key}) async { + Future remove(String key) async { try { return _remove(key); } catch (_) { @@ -89,23 +84,13 @@ class Storage extends RustToDartMirrorInterface { } /// Method to make removeUnchecked. It's called from rust - void removeUnchecked({required String key}) { + void removeUnchecked(String key) { try { _removeUnchecked(key); } catch (_) {} } - @override void dispose() { storage.innerStorage.dispose(); - super.dispose(); - } - - @override - InstanceMirror initializeMirror() { - initializeReflectable(); // auto-generated reflectable file - return reflector.reflect(this); } } - -void main() {} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/external/storage.reflectable.dart b/packages/flutter_nekoton_bridge/lib/nekoton/external/storage.reflectable.dart deleted file mode 100644 index bb7eb124..00000000 --- a/packages/flutter_nekoton_bridge/lib/nekoton/external/storage.reflectable.dart +++ /dev/null @@ -1,803 +0,0 @@ -// This file has been generated by the reflectable package. -// https://github.com/dart-lang/reflectable. -import 'dart:core'; -import 'package:flutter_nekoton_bridge/nekoton/core/generic_contract/generic_contract.dart' - as prefix6; -import 'package:flutter_nekoton_bridge/nekoton/core/jetton_wallet/jetton_wallet.dart' - as prefix8; -import 'package:flutter_nekoton_bridge/nekoton/core/token_wallet/token_wallet.dart' - as prefix7; -import 'package:flutter_nekoton_bridge/nekoton/core/ton_wallet/ton_wallet.dart' - as prefix9; -import 'package:flutter_nekoton_bridge/nekoton/external/gql_connection.dart' - as prefix2; -import 'package:flutter_nekoton_bridge/nekoton/external/jrpc_connection.dart' - as prefix4; -import 'package:flutter_nekoton_bridge/nekoton/external/ledger_connection.dart' - as prefix5; -import 'package:flutter_nekoton_bridge/nekoton/external/proto_connection.dart' - as prefix3; -import 'package:flutter_nekoton_bridge/rust_to_dart/reflector.dart' as prefix0; -import 'storage.dart' as prefix1; - -// ignore_for_file: camel_case_types -// ignore_for_file: implementation_imports -// ignore_for_file: prefer_adjacent_string_concatenation -// ignore_for_file: prefer_collection_literals -// ignore_for_file: unnecessary_const -// ignore_for_file: unused_import -// ignore_for_file: sdk_version_since - -import 'package:reflectable/mirrors.dart' as m; -import 'package:reflectable/src/reflectable_builder_based.dart' as r; -import 'package:reflectable/reflectable.dart' as r show Reflectable; - -final _data = { - const prefix0.Reflector(): r.ReflectorData( - [ - r.NonGenericClassMirrorImpl( - r'Storage', - r'.Storage', - 134217735, - 0, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix1.Storage.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'get': 1, - r'set': 2, - r'setUnchecked': 2, - r'remove': 2, - r'removeUnchecked': 2, - r'initializeMirror': 0, - r'storage': 0, - r'storage=': 1, - r'create': 0, - }, - ), - r.NonGenericClassMirrorImpl( - r'GqlConnection', - r'.GqlConnection', - 134217735, - 1, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix2.GqlConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 1, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 3, - }, - ), - r.NonGenericClassMirrorImpl( - r'ProtoConnection', - r'.ProtoConnection', - 134217735, - 2, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix3.ProtoConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 1, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 3, - }, - ), - r.NonGenericClassMirrorImpl( - r'JrpcConnection', - r'.JrpcConnection', - 134217735, - 3, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix4.JrpcConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'post': 1, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'settings': 0, - r'type': 0, - r'name': 0, - r'group': 0, - r'create': 3, - }, - ), - r.NonGenericClassMirrorImpl( - r'LedgerConnection', - r'.LedgerConnection', - 134217735, - 4, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'create': () => prefix5.LedgerConnection.create}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getPublicKey': 1, - r'sign': 4, - r'signTransaction': 5, - r'initializeMirror': 0, - r'connection': 0, - r'connection=': 1, - r'create': 1, - }, - ), - r.NonGenericClassMirrorImpl( - r'GenericContract', - r'.GenericContract', - 134217735, - 5, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - {r'subscribe': () => prefix6.GenericContract.subscribe}, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'executeTransactionLocally': 7, - r'estimateFees': 7, - r'send': 7, - r'refresh': 0, - r'preloadTransactions': 8, - r'handleBlock': 9, - r'onMessageSent': 1, - r'onMessageExpired': 1, - r'onStateChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 0, - r'contract': 0, - r'contract=': 1, - r'transport': 0, - r'address': 0, - r'address=': 1, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 6, - }, - ), - r.NonGenericClassMirrorImpl( - r'TokenWallet', - r'.TokenWallet', - 134217735, - 6, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix7.TokenWallet.subscribe, - r'getTokenWalletDetails': () => - prefix7.TokenWallet.getTokenWalletDetails, - r'getTokenRootDetailsFromTokenWallet': () => - prefix7.TokenWallet.getTokenRootDetailsFromTokenWallet, - r'getTokenRootDetails': () => prefix7.TokenWallet.getTokenRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 11, - r'prepareTransfer': 12, - r'refresh': 0, - r'preloadTransactions': 13, - r'handleBlock': 9, - r'onBalanceChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 1, - r'transport': 0, - r'balance': 0, - r'balance=': 1, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 1, - r'owner': 0, - r'owner=': 1, - r'symbol': 0, - r'symbol=': 1, - r'currency': 0, - r'currency=': 1, - r'version': 0, - r'version=': 1, - r'moneyBalance': 0, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onMoneyBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 10, - r'getTokenWalletDetails': 6, - r'getTokenRootDetailsFromTokenWallet': 6, - r'getTokenRootDetails': 14, - }, - ), - r.NonGenericClassMirrorImpl( - r'JettonWallet', - r'.JettonWallet', - 134217735, - 7, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix8.JettonWallet.subscribe, - r'getJettonWalletDetails': () => - prefix8.JettonWallet.getJettonWalletDetails, - r'getJettonRootDetailsFromJettonWallet': () => - prefix8.JettonWallet.getJettonRootDetailsFromJettonWallet, - r'getJettonRootDetails': () => - prefix8.JettonWallet.getJettonRootDetails, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'estimateMinAttachedAmount': 11, - r'prepareTransfer': 15, - r'refresh': 0, - r'preloadTransactions': 13, - r'handleBlock': 9, - r'onBalanceChanged': 1, - r'onTransactionsFound': 1, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 1, - r'transport': 0, - r'balance': 0, - r'balance=': 1, - r'rootTokenContract': 0, - r'tokenAddress': 0, - r'tokenAddress=': 1, - r'owner': 0, - r'owner=': 1, - r'isTransactionsPreloaded': 0, - r'contractState': 0, - r'fieldUpdatesStream': 0, - r'onBalanceChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 10, - r'getJettonWalletDetails': 6, - r'getJettonRootDetailsFromJettonWallet': 6, - r'getJettonRootDetails': 14, - }, - ), - r.NonGenericClassMirrorImpl( - r'TonWallet', - r'.TonWallet', - 134217735, - 8, - const prefix0.Reflector(), - const [-1], - null, - null, - -1, - { - r'subscribe': () => prefix9.TonWallet.subscribe, - r'subscribeByAddress': () => prefix9.TonWallet.subscribeByAddress, - r'subscribeByExistingWallet': () => - prefix9.TonWallet.subscribeByExistingWallet, - r'appendSignatureToWalletV5R1Payload': () => - prefix9.TonWallet.appendSignatureToWalletV5R1Payload, - r'findExistingWallets': () => prefix9.TonWallet.findExistingWallets, - r'getExistingWalletInfo': () => - prefix9.TonWallet.getExistingWalletInfo, - r'getWalletCustodians': () => prefix9.TonWallet.getWalletCustodians, - }, - {}, - {}, - -1, - -1, - const [-1], - null, - { - r'==': 1, - r'toString': 0, - r'noSuchMethod': 1, - r'hashCode': 0, - r'runtimeType': 0, - r'init': 0, - r'dispose': 0, - r'instanceHash': 0, - r'avoidCall': 0, - r'getContractState': 0, - r'getPendingTransactions': 0, - r'getPollingMethod': 0, - r'getUnconfirmedTransactions': 0, - r'getCustodians': 0, - r'prepareDeploy': 19, - r'prepareDeployWithMultipleOwners': 20, - r'prepareTransfer': 21, - r'prepareWalletV5R1MessageBody': 22, - r'prepareNonexistWalletV5R1MessageBody': 22, - r'prepareConfirmTransaction': 23, - r'estimateFees': 24, - r'send': 7, - r'refresh': 0, - r'preloadTransactions': 8, - r'handleBlock': 9, - r'makeStateInit': 0, - r'getWalletV5R1Seqno': 21, - r'onMessageSent': 1, - r'onMessageExpired': 1, - r'onStateChanged': 1, - r'onTransactionsFound': 1, - r'onDetailsChanged': 1, - r'onCustodiansChanged': 1, - r'onUnconfirmedTransactionsChanged': 1, - r'initializeMirror': 0, - r'wallet': 0, - r'wallet=': 1, - r'transport': 0, - r'publicKey': 0, - r'publicKey=': 1, - r'address': 0, - r'address=': 1, - r'walletType': 0, - r'walletType=': 1, - r'workchain': 0, - r'workchain=': 1, - r'custodians': 0, - r'details': 0, - r'contractState': 0, - r'pendingTransactions': 0, - r'pollingMethod': 0, - r'unconfirmedTransactions': 0, - r'fieldUpdatesStream': 0, - r'onMessageSentStream': 0, - r'onMessageExpiredStream': 0, - r'onStateChangedStream': 0, - r'onTransactionsFoundStream': 0, - r'refreshDescription': 0, - r'subscribe': 16, - r'subscribeByAddress': 6, - r'subscribeByExistingWallet': 17, - r'appendSignatureToWalletV5R1Payload': 18, - r'findExistingWallets': 25, - r'getExistingWalletInfo': 6, - r'getWalletCustodians': 6, - }, - ), - ], - null, - null, - [ - prefix1.Storage, - prefix2.GqlConnection, - prefix3.ProtoConnection, - prefix4.JrpcConnection, - prefix5.LedgerConnection, - prefix6.GenericContract, - prefix7.TokenWallet, - prefix8.JettonWallet, - prefix9.TonWallet, - ], - 9, - { - r'==': (dynamic instance) => (x) => instance == x, - r'toString': (dynamic instance) => instance.toString, - r'noSuchMethod': (dynamic instance) => instance.noSuchMethod, - r'hashCode': (dynamic instance) => instance.hashCode, - r'runtimeType': (dynamic instance) => instance.runtimeType, - r'init': (dynamic instance) => instance.init, - r'dispose': (dynamic instance) => instance.dispose, - r'instanceHash': (dynamic instance) => instance.instanceHash, - r'avoidCall': (dynamic instance) => instance.avoidCall, - r'get': (dynamic instance) => instance.get, - r'set': (dynamic instance) => instance.set, - r'setUnchecked': (dynamic instance) => instance.setUnchecked, - r'remove': (dynamic instance) => instance.remove, - r'removeUnchecked': (dynamic instance) => instance.removeUnchecked, - r'initializeMirror': (dynamic instance) => instance.initializeMirror, - r'storage': (dynamic instance) => instance.storage, - r'post': (dynamic instance) => instance.post, - r'connection': (dynamic instance) => instance.connection, - r'settings': (dynamic instance) => instance.settings, - r'type': (dynamic instance) => instance.type, - r'name': (dynamic instance) => instance.name, - r'group': (dynamic instance) => instance.group, - r'getPublicKey': (dynamic instance) => instance.getPublicKey, - r'sign': (dynamic instance) => instance.sign, - r'signTransaction': (dynamic instance) => instance.signTransaction, - r'getContractState': (dynamic instance) => instance.getContractState, - r'getPendingTransactions': (dynamic instance) => - instance.getPendingTransactions, - r'getPollingMethod': (dynamic instance) => instance.getPollingMethod, - r'executeTransactionLocally': (dynamic instance) => - instance.executeTransactionLocally, - r'estimateFees': (dynamic instance) => instance.estimateFees, - r'send': (dynamic instance) => instance.send, - r'refresh': (dynamic instance) => instance.refresh, - r'preloadTransactions': (dynamic instance) => - instance.preloadTransactions, - r'handleBlock': (dynamic instance) => instance.handleBlock, - r'onMessageSent': (dynamic instance) => instance.onMessageSent, - r'onMessageExpired': (dynamic instance) => instance.onMessageExpired, - r'onStateChanged': (dynamic instance) => instance.onStateChanged, - r'onTransactionsFound': (dynamic instance) => - instance.onTransactionsFound, - r'contract': (dynamic instance) => instance.contract, - r'transport': (dynamic instance) => instance.transport, - r'address': (dynamic instance) => instance.address, - r'contractState': (dynamic instance) => instance.contractState, - r'pendingTransactions': (dynamic instance) => - instance.pendingTransactions, - r'pollingMethod': (dynamic instance) => instance.pollingMethod, - r'fieldUpdatesStream': (dynamic instance) => instance.fieldUpdatesStream, - r'onMessageSentStream': (dynamic instance) => - instance.onMessageSentStream, - r'onMessageExpiredStream': (dynamic instance) => - instance.onMessageExpiredStream, - r'onStateChangedStream': (dynamic instance) => - instance.onStateChangedStream, - r'onTransactionsFoundStream': (dynamic instance) => - instance.onTransactionsFoundStream, - r'refreshDescription': (dynamic instance) => instance.refreshDescription, - r'estimateMinAttachedAmount': (dynamic instance) => - instance.estimateMinAttachedAmount, - r'prepareTransfer': (dynamic instance) => instance.prepareTransfer, - r'onBalanceChanged': (dynamic instance) => instance.onBalanceChanged, - r'wallet': (dynamic instance) => instance.wallet, - r'balance': (dynamic instance) => instance.balance, - r'rootTokenContract': (dynamic instance) => instance.rootTokenContract, - r'tokenAddress': (dynamic instance) => instance.tokenAddress, - r'owner': (dynamic instance) => instance.owner, - r'symbol': (dynamic instance) => instance.symbol, - r'currency': (dynamic instance) => instance.currency, - r'version': (dynamic instance) => instance.version, - r'moneyBalance': (dynamic instance) => instance.moneyBalance, - r'isTransactionsPreloaded': (dynamic instance) => - instance.isTransactionsPreloaded, - r'onBalanceChangedStream': (dynamic instance) => - instance.onBalanceChangedStream, - r'onMoneyBalanceChangedStream': (dynamic instance) => - instance.onMoneyBalanceChangedStream, - r'getUnconfirmedTransactions': (dynamic instance) => - instance.getUnconfirmedTransactions, - r'getCustodians': (dynamic instance) => instance.getCustodians, - r'prepareDeploy': (dynamic instance) => instance.prepareDeploy, - r'prepareDeployWithMultipleOwners': (dynamic instance) => - instance.prepareDeployWithMultipleOwners, - r'prepareWalletV5R1MessageBody': (dynamic instance) => - instance.prepareWalletV5R1MessageBody, - r'prepareNonexistWalletV5R1MessageBody': (dynamic instance) => - instance.prepareNonexistWalletV5R1MessageBody, - r'prepareConfirmTransaction': (dynamic instance) => - instance.prepareConfirmTransaction, - r'makeStateInit': (dynamic instance) => instance.makeStateInit, - r'getWalletV5R1Seqno': (dynamic instance) => instance.getWalletV5R1Seqno, - r'onDetailsChanged': (dynamic instance) => instance.onDetailsChanged, - r'onCustodiansChanged': (dynamic instance) => - instance.onCustodiansChanged, - r'onUnconfirmedTransactionsChanged': (dynamic instance) => - instance.onUnconfirmedTransactionsChanged, - r'publicKey': (dynamic instance) => instance.publicKey, - r'walletType': (dynamic instance) => instance.walletType, - r'workchain': (dynamic instance) => instance.workchain, - r'custodians': (dynamic instance) => instance.custodians, - r'details': (dynamic instance) => instance.details, - r'unconfirmedTransactions': (dynamic instance) => - instance.unconfirmedTransactions, - }, - { - r'storage=': (dynamic instance, value) => instance.storage = value, - r'connection=': (dynamic instance, value) => instance.connection = value, - r'contract=': (dynamic instance, value) => instance.contract = value, - r'address=': (dynamic instance, value) => instance.address = value, - r'wallet=': (dynamic instance, value) => instance.wallet = value, - r'balance=': (dynamic instance, value) => instance.balance = value, - r'tokenAddress=': (dynamic instance, value) => - instance.tokenAddress = value, - r'owner=': (dynamic instance, value) => instance.owner = value, - r'symbol=': (dynamic instance, value) => instance.symbol = value, - r'currency=': (dynamic instance, value) => instance.currency = value, - r'version=': (dynamic instance, value) => instance.version = value, - r'publicKey=': (dynamic instance, value) => instance.publicKey = value, - r'walletType=': (dynamic instance, value) => instance.walletType = value, - r'workchain=': (dynamic instance, value) => instance.workchain = value, - }, - null, - [ - const [ - 0, - 0, - const [#get, #set, #setUnchecked, #remove, #removeUnchecked], - ], - const [1, 0, null], - const [ - 0, - 0, - const [#key, #value], - ], - const [ - 0, - 0, - const [#client, #settings, #name, #group], - ], - const [3, 0, null], - const [5, 0, null], - const [ - 0, - 0, - const [#transport, #address, #preloadTransactions], - ], - const [ - 0, - 0, - const [#signedMessage, #options], - ], - const [ - 0, - 0, - const [#fromLt], - ], - const [ - 0, - 0, - const [#block], - ], - const [ - 0, - 0, - const [#transport, #owner, #rootTokenContract, #preloadTransactions], - ], - const [ - 0, - 0, - const [#destination, #amount, #notifyReceiver, #payload], - ], - const [ - 0, - 0, - const [ - #destination, - #amount, - #notifyReceiver, - #attachedAmount, - #payload, - #remainingGasTo, - ], - ], - const [1, 1, null], - const [ - 0, - 0, - const [#transport, #tokenRoot], - ], - const [ - 0, - 0, - const [ - #amount, - #destination, - #remainingGasTo, - #callbackValue, - #customPayload, - #callbackPayload, - #attachedAmount, - ], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletType], - ], - const [ - 0, - 0, - const [#transport, #existingWallet], - ], - const [ - 0, - 0, - const [#payload, #base64Signature], - ], - const [ - 0, - 0, - const [#expiration], - ], - const [ - 0, - 0, - const [#expiration, #custodians, #reqConfirms, #expirationTime], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #expiration, #params], - ], - const [ - 0, - 0, - const [ - #contractState, - #publicKey, - #expiration, - #params, - #isInternalFlow, - ], - ], - const [ - 0, - 0, - const [#contractState, #publicKey, #transactionId, #expiration], - ], - const [ - 0, - 0, - const [#signedMessage, #executionOptions], - ], - const [ - 0, - 0, - const [#transport, #workchainId, #publicKey, #walletTypes], - ], - ], - ), -}; - -final _memberSymbolMap = null; - -void initializeReflectable() { - r.data = _data; - r.memberSymbolMap = _memberSymbolMap; -} diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/abi.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/abi.dart index a8881bd9..09f8a7ee 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/abi.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/abi.dart @@ -270,12 +270,14 @@ TokensObject unpackFromCell({ required bool allowPartial, String? abiVersion, }) { - return jsonDecode(ntUnpackFromCell( - params: jsonEncode(params), - boc: boc, - allowPartial: allowPartial, - version: abiVersion, - )); + return jsonDecode( + ntUnpackFromCell( + params: jsonEncode(params), + boc: boc, + allowPartial: allowPartial, + version: abiVersion, + ), + ); } /// Pack address std smd or throw error @@ -284,21 +286,14 @@ String packStdSmcAddr({ required Address address, required bool base64Url, required bool bounceable, -}) => - ntPackStdSmcAddr( - addr: address.address, - base64Url: base64Url, - bounceable: bounceable, - ); - -String unpackStdSmcAddr({ - required String packed, - required bool base64Url, -}) => - ntUnpackStdSmcAddr( - packed: packed, - base64Url: base64Url, - ); +}) => ntPackStdSmcAddr( + addr: address.address, + base64Url: base64Url, + bounceable: bounceable, +); + +String unpackStdSmcAddr({required String packed, required bool base64Url}) => + ntUnpackStdSmcAddr(packed: packed, base64Url: base64Url); /// Return true if address is valid, false otherwise bool validateAddress(Address address) { @@ -339,10 +334,7 @@ PublicKey extractPublicKey(String boc) { /// Merge code and data to tvc base64 string and return (tvc, hash) /// or throw error -(String, String) mergeTvc({ - required String code, - required String data, -}) { +(String, String) mergeTvc({required String code, required String data}) { final res = ntMergeTvc(code: code, data: data); return (res[0], res[1]); @@ -356,10 +348,7 @@ PublicKey extractPublicKey(String boc) { } /// Set salt to code and return (tvc, hash) or throw error -(String, String) setCodeSalt({ - required String code, - required String salt, -}) { +(String, String) setCodeSalt({required String code, required String salt}) { final data = ntSetCodeSalt(code: code, salt: salt); return (data[0], data[1]); @@ -421,10 +410,7 @@ Future<(PublicKey?, Map)> unpackInitData({ required String contractAbi, required String data, }) async { - final result = await ntUnpackInitData( - contractAbi: contractAbi, - data: data, - ); + final result = await ntUnpackInitData(contractAbi: contractAbi, data: data); return ( result[0] == null ? null : PublicKey(publicKey: result[0]!), @@ -540,6 +526,5 @@ Address computeTonWalletAddress({ return Address(address: address); } -int getContractTypeNumber(WalletType walletType) => ntGetContractTypeNumber( - walletType: jsonEncode(walletType), - ); +int getContractTypeNumber(WalletType walletType) => + ntGetContractTypeNumber(walletType: jsonEncode(walletType)); diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/abi_param.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/abi_param.freezed.dart index b814e11a..d86b3028 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/abi_param.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/abi_param.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,186 +14,272 @@ T _$identity(T value) => value; /// @nodoc mixin _$AbiParam { - String get name; - String get type; - List? get components; - /// Create a copy of AbiParam - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $AbiParamCopyWith get copyWith => - _$AbiParamCopyWithImpl(this as AbiParam, _$identity); + String get name; String get type; List? get components; +/// Create a copy of AbiParam +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$AbiParamCopyWith get copyWith => _$AbiParamCopyWithImpl(this as AbiParam, _$identity); /// Serializes this AbiParam to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is AbiParam && - (identical(other.name, name) || other.name == name) && - (identical(other.type, type) || other.type == type) && - const DeepCollectionEquality() - .equals(other.components, components)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, name, type, const DeepCollectionEquality().hash(components)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is AbiParam&&(identical(other.name, name) || other.name == name)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.components, components)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,type,const DeepCollectionEquality().hash(components)); + +@override +String toString() { + return 'AbiParam(name: $name, type: $type, components: $components)'; +} + - @override - String toString() { - return 'AbiParam(name: $name, type: $type, components: $components)'; - } } /// @nodoc -abstract mixin class $AbiParamCopyWith<$Res> { - factory $AbiParamCopyWith(AbiParam value, $Res Function(AbiParam) _then) = - _$AbiParamCopyWithImpl; - @useResult - $Res call({String name, String type, List? components}); -} +abstract mixin class $AbiParamCopyWith<$Res> { + factory $AbiParamCopyWith(AbiParam value, $Res Function(AbiParam) _then) = _$AbiParamCopyWithImpl; +@useResult +$Res call({ + String name, String type, List? components +}); + + + +} /// @nodoc -class _$AbiParamCopyWithImpl<$Res> implements $AbiParamCopyWith<$Res> { +class _$AbiParamCopyWithImpl<$Res> + implements $AbiParamCopyWith<$Res> { _$AbiParamCopyWithImpl(this._self, this._then); final AbiParam _self; final $Res Function(AbiParam) _then; - /// Create a copy of AbiParam - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? name = null, - Object? type = null, - Object? components = freezed, - }) { - return _then(_self.copyWith( - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - type: null == type - ? _self.type - : type // ignore: cast_nullable_to_non_nullable - as String, - components: freezed == components - ? _self.components - : components // ignore: cast_nullable_to_non_nullable - as List?, - )); - } +/// Create a copy of AbiParam +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? type = null,Object? components = freezed,}) { + return _then(_self.copyWith( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable +as String,components: freezed == components ? _self.components : components // ignore: cast_nullable_to_non_nullable +as List?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [AbiParam]. +extension AbiParamPatterns on AbiParam { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _AbiParam value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _AbiParam() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _AbiParam value) $default,){ +final _that = this; +switch (_that) { +case _AbiParam(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _AbiParam value)? $default,){ +final _that = this; +switch (_that) { +case _AbiParam() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String name, String type, List? components)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _AbiParam() when $default != null: +return $default(_that.name,_that.type,_that.components);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String name, String type, List? components) $default,) {final _that = this; +switch (_that) { +case _AbiParam(): +return $default(_that.name,_that.type,_that.components);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String name, String type, List? components)? $default,) {final _that = this; +switch (_that) { +case _AbiParam() when $default != null: +return $default(_that.name,_that.type,_that.components);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _AbiParam implements AbiParam { - const _AbiParam( - {required this.name, - required this.type, - final List? components}) - : _components = components; - factory _AbiParam.fromJson(Map json) => - _$AbiParamFromJson(json); - - @override - final String name; - @override - final String type; - final List? _components; - @override - List? get components { - final value = _components; - if (value == null) return null; - if (_components is EqualUnmodifiableListView) return _components; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - - /// Create a copy of AbiParam - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$AbiParamCopyWith<_AbiParam> get copyWith => - __$AbiParamCopyWithImpl<_AbiParam>(this, _$identity); - - @override - Map toJson() { - return _$AbiParamToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _AbiParam && - (identical(other.name, name) || other.name == name) && - (identical(other.type, type) || other.type == type) && - const DeepCollectionEquality() - .equals(other._components, _components)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, name, type, - const DeepCollectionEquality().hash(_components)); - - @override - String toString() { - return 'AbiParam(name: $name, type: $type, components: $components)'; - } + const _AbiParam({required this.name, required this.type, final List? components}): _components = components; + factory _AbiParam.fromJson(Map json) => _$AbiParamFromJson(json); + +@override final String name; +@override final String type; + final List? _components; +@override List? get components { + final value = _components; + if (value == null) return null; + if (_components is EqualUnmodifiableListView) return _components; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); } -/// @nodoc -abstract mixin class _$AbiParamCopyWith<$Res> - implements $AbiParamCopyWith<$Res> { - factory _$AbiParamCopyWith(_AbiParam value, $Res Function(_AbiParam) _then) = - __$AbiParamCopyWithImpl; - @override - @useResult - $Res call({String name, String type, List? components}); + +/// Create a copy of AbiParam +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$AbiParamCopyWith<_AbiParam> get copyWith => __$AbiParamCopyWithImpl<_AbiParam>(this, _$identity); + +@override +Map toJson() { + return _$AbiParamToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _AbiParam&&(identical(other.name, name) || other.name == name)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other._components, _components)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,name,type,const DeepCollectionEquality().hash(_components)); + +@override +String toString() { + return 'AbiParam(name: $name, type: $type, components: $components)'; +} + + } /// @nodoc -class __$AbiParamCopyWithImpl<$Res> implements _$AbiParamCopyWith<$Res> { +abstract mixin class _$AbiParamCopyWith<$Res> implements $AbiParamCopyWith<$Res> { + factory _$AbiParamCopyWith(_AbiParam value, $Res Function(_AbiParam) _then) = __$AbiParamCopyWithImpl; +@override @useResult +$Res call({ + String name, String type, List? components +}); + + + + +} +/// @nodoc +class __$AbiParamCopyWithImpl<$Res> + implements _$AbiParamCopyWith<$Res> { __$AbiParamCopyWithImpl(this._self, this._then); final _AbiParam _self; final $Res Function(_AbiParam) _then; - /// Create a copy of AbiParam - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? name = null, - Object? type = null, - Object? components = freezed, - }) { - return _then(_AbiParam( - name: null == name - ? _self.name - : name // ignore: cast_nullable_to_non_nullable - as String, - type: null == type - ? _self.type - : type // ignore: cast_nullable_to_non_nullable - as String, - components: freezed == components - ? _self._components - : components // ignore: cast_nullable_to_non_nullable - as List?, - )); - } +/// Create a copy of AbiParam +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? type = null,Object? components = freezed,}) { + return _then(_AbiParam( +name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable +as String,components: freezed == components ? _self._components : components // ignore: cast_nullable_to_non_nullable +as List?, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/abi_param.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/abi_param.g.dart index 37d7424c..943171aa 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/abi_param.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/abi_param.g.dart @@ -7,15 +7,15 @@ part of 'abi_param.dart'; // ************************************************************************** _AbiParam _$AbiParamFromJson(Map json) => _AbiParam( - name: json['name'] as String, - type: json['type'] as String, - components: (json['components'] as List?) - ?.map((e) => AbiParam.fromJson(e as Map)) - .toList(), - ); + name: json['name'] as String, + type: json['type'] as String, + components: (json['components'] as List?) + ?.map((e) => AbiParam.fromJson(e as Map)) + .toList(), +); Map _$AbiParamToJson(_AbiParam instance) => { - 'name': instance.name, - 'type': instance.type, - 'components': instance.components?.map((e) => e.toJson()).toList(), - }; + 'name': instance.name, + 'type': instance.type, + 'components': instance.components?.map((e) => e.toJson()).toList(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_event.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_event.freezed.dart index 3dd95caa..275e82fb 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_event.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_event.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,141 +14,248 @@ T _$identity(T value) => value; /// @nodoc mixin _$DecodedEvent { - String get event; - TokensObject get data; - /// Create a copy of DecodedEvent - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DecodedEventCopyWith get copyWith => - _$DecodedEventCopyWithImpl( - this as DecodedEvent, _$identity); + String get event; TokensObject get data; +/// Create a copy of DecodedEvent +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DecodedEventCopyWith get copyWith => _$DecodedEventCopyWithImpl(this as DecodedEvent, _$identity); /// Serializes this DecodedEvent to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DecodedEvent && - (identical(other.event, event) || other.event == event) && - const DeepCollectionEquality().equals(other.data, data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, event, const DeepCollectionEquality().hash(data)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DecodedEvent&&(identical(other.event, event) || other.event == event)&&const DeepCollectionEquality().equals(other.data, data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,event,const DeepCollectionEquality().hash(data)); + +@override +String toString() { + return 'DecodedEvent(event: $event, data: $data)'; +} + - @override - String toString() { - return 'DecodedEvent(event: $event, data: $data)'; - } } /// @nodoc -abstract mixin class $DecodedEventCopyWith<$Res> { - factory $DecodedEventCopyWith( - DecodedEvent value, $Res Function(DecodedEvent) _then) = - _$DecodedEventCopyWithImpl; - @useResult - $Res call({String event, TokensObject data}); -} +abstract mixin class $DecodedEventCopyWith<$Res> { + factory $DecodedEventCopyWith(DecodedEvent value, $Res Function(DecodedEvent) _then) = _$DecodedEventCopyWithImpl; +@useResult +$Res call({ + String event, TokensObject data +}); + + + +} /// @nodoc -class _$DecodedEventCopyWithImpl<$Res> implements $DecodedEventCopyWith<$Res> { +class _$DecodedEventCopyWithImpl<$Res> + implements $DecodedEventCopyWith<$Res> { _$DecodedEventCopyWithImpl(this._self, this._then); final DecodedEvent _self; final $Res Function(DecodedEvent) _then; - /// Create a copy of DecodedEvent - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? event = null, - Object? data = null, - }) { - return _then(_self.copyWith( - event: null == event - ? _self.event - : event // ignore: cast_nullable_to_non_nullable - as String, - data: null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as TokensObject, - )); - } +/// Create a copy of DecodedEvent +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? event = null,Object? data = null,}) { + return _then(_self.copyWith( +event: null == event ? _self.event : event // ignore: cast_nullable_to_non_nullable +as String,data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as TokensObject, + )); +} + +} + + +/// Adds pattern-matching-related methods to [DecodedEvent]. +extension DecodedEventPatterns on DecodedEvent { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DecodedEvent value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DecodedEvent() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DecodedEvent value) $default,){ +final _that = this; +switch (_that) { +case _DecodedEvent(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DecodedEvent value)? $default,){ +final _that = this; +switch (_that) { +case _DecodedEvent() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String event, TokensObject data)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DecodedEvent() when $default != null: +return $default(_that.event,_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String event, TokensObject data) $default,) {final _that = this; +switch (_that) { +case _DecodedEvent(): +return $default(_that.event,_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String event, TokensObject data)? $default,) {final _that = this; +switch (_that) { +case _DecodedEvent() when $default != null: +return $default(_that.event,_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _DecodedEvent implements DecodedEvent { - const _DecodedEvent({required this.event, required final TokensObject data}) - : _data = data; - factory _DecodedEvent.fromJson(Map json) => - _$DecodedEventFromJson(json); - - @override - final String event; - final TokensObject _data; - @override - TokensObject get data { - if (_data is EqualUnmodifiableMapView) return _data; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_data); - } - - /// Create a copy of DecodedEvent - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DecodedEventCopyWith<_DecodedEvent> get copyWith => - __$DecodedEventCopyWithImpl<_DecodedEvent>(this, _$identity); - - @override - Map toJson() { - return _$DecodedEventToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DecodedEvent && - (identical(other.event, event) || other.event == event) && - const DeepCollectionEquality().equals(other._data, _data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, event, const DeepCollectionEquality().hash(_data)); - - @override - String toString() { - return 'DecodedEvent(event: $event, data: $data)'; - } + const _DecodedEvent({required this.event, required final TokensObject data}): _data = data; + factory _DecodedEvent.fromJson(Map json) => _$DecodedEventFromJson(json); + +@override final String event; + final TokensObject _data; +@override TokensObject get data { + if (_data is EqualUnmodifiableMapView) return _data; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_data); } -/// @nodoc -abstract mixin class _$DecodedEventCopyWith<$Res> - implements $DecodedEventCopyWith<$Res> { - factory _$DecodedEventCopyWith( - _DecodedEvent value, $Res Function(_DecodedEvent) _then) = - __$DecodedEventCopyWithImpl; - @override - @useResult - $Res call({String event, TokensObject data}); + +/// Create a copy of DecodedEvent +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DecodedEventCopyWith<_DecodedEvent> get copyWith => __$DecodedEventCopyWithImpl<_DecodedEvent>(this, _$identity); + +@override +Map toJson() { + return _$DecodedEventToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DecodedEvent&&(identical(other.event, event) || other.event == event)&&const DeepCollectionEquality().equals(other._data, _data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,event,const DeepCollectionEquality().hash(_data)); + +@override +String toString() { + return 'DecodedEvent(event: $event, data: $data)'; +} + + } +/// @nodoc +abstract mixin class _$DecodedEventCopyWith<$Res> implements $DecodedEventCopyWith<$Res> { + factory _$DecodedEventCopyWith(_DecodedEvent value, $Res Function(_DecodedEvent) _then) = __$DecodedEventCopyWithImpl; +@override @useResult +$Res call({ + String event, TokensObject data +}); + + + + +} /// @nodoc class __$DecodedEventCopyWithImpl<$Res> implements _$DecodedEventCopyWith<$Res> { @@ -158,25 +264,17 @@ class __$DecodedEventCopyWithImpl<$Res> final _DecodedEvent _self; final $Res Function(_DecodedEvent) _then; - /// Create a copy of DecodedEvent - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? event = null, - Object? data = null, - }) { - return _then(_DecodedEvent( - event: null == event - ? _self.event - : event // ignore: cast_nullable_to_non_nullable - as String, - data: null == data - ? _self._data - : data // ignore: cast_nullable_to_non_nullable - as TokensObject, - )); - } +/// Create a copy of DecodedEvent +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? event = null,Object? data = null,}) { + return _then(_DecodedEvent( +event: null == event ? _self.event : event // ignore: cast_nullable_to_non_nullable +as String,data: null == data ? _self._data : data // ignore: cast_nullable_to_non_nullable +as TokensObject, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_event.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_event.g.dart index 5a0fd34e..23a0c938 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_event.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_event.g.dart @@ -13,7 +13,4 @@ _DecodedEvent _$DecodedEventFromJson(Map json) => ); Map _$DecodedEventToJson(_DecodedEvent instance) => - { - 'event': instance.event, - 'data': instance.data, - }; + {'event': instance.event, 'data': instance.data}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_input.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_input.freezed.dart index 3a1f4792..0509306a 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_input.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_input.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,141 +14,248 @@ T _$identity(T value) => value; /// @nodoc mixin _$DecodedInput { - String get method; - TokensObject get input; - /// Create a copy of DecodedInput - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DecodedInputCopyWith get copyWith => - _$DecodedInputCopyWithImpl( - this as DecodedInput, _$identity); + String get method; TokensObject get input; +/// Create a copy of DecodedInput +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DecodedInputCopyWith get copyWith => _$DecodedInputCopyWithImpl(this as DecodedInput, _$identity); /// Serializes this DecodedInput to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DecodedInput && - (identical(other.method, method) || other.method == method) && - const DeepCollectionEquality().equals(other.input, input)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, method, const DeepCollectionEquality().hash(input)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DecodedInput&&(identical(other.method, method) || other.method == method)&&const DeepCollectionEquality().equals(other.input, input)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,method,const DeepCollectionEquality().hash(input)); + +@override +String toString() { + return 'DecodedInput(method: $method, input: $input)'; +} + - @override - String toString() { - return 'DecodedInput(method: $method, input: $input)'; - } } /// @nodoc -abstract mixin class $DecodedInputCopyWith<$Res> { - factory $DecodedInputCopyWith( - DecodedInput value, $Res Function(DecodedInput) _then) = - _$DecodedInputCopyWithImpl; - @useResult - $Res call({String method, TokensObject input}); -} +abstract mixin class $DecodedInputCopyWith<$Res> { + factory $DecodedInputCopyWith(DecodedInput value, $Res Function(DecodedInput) _then) = _$DecodedInputCopyWithImpl; +@useResult +$Res call({ + String method, TokensObject input +}); + + + +} /// @nodoc -class _$DecodedInputCopyWithImpl<$Res> implements $DecodedInputCopyWith<$Res> { +class _$DecodedInputCopyWithImpl<$Res> + implements $DecodedInputCopyWith<$Res> { _$DecodedInputCopyWithImpl(this._self, this._then); final DecodedInput _self; final $Res Function(DecodedInput) _then; - /// Create a copy of DecodedInput - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? method = null, - Object? input = null, - }) { - return _then(_self.copyWith( - method: null == method - ? _self.method - : method // ignore: cast_nullable_to_non_nullable - as String, - input: null == input - ? _self.input - : input // ignore: cast_nullable_to_non_nullable - as TokensObject, - )); - } +/// Create a copy of DecodedInput +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? method = null,Object? input = null,}) { + return _then(_self.copyWith( +method: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable +as String,input: null == input ? _self.input : input // ignore: cast_nullable_to_non_nullable +as TokensObject, + )); +} + +} + + +/// Adds pattern-matching-related methods to [DecodedInput]. +extension DecodedInputPatterns on DecodedInput { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DecodedInput value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DecodedInput() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DecodedInput value) $default,){ +final _that = this; +switch (_that) { +case _DecodedInput(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DecodedInput value)? $default,){ +final _that = this; +switch (_that) { +case _DecodedInput() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String method, TokensObject input)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DecodedInput() when $default != null: +return $default(_that.method,_that.input);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String method, TokensObject input) $default,) {final _that = this; +switch (_that) { +case _DecodedInput(): +return $default(_that.method,_that.input);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String method, TokensObject input)? $default,) {final _that = this; +switch (_that) { +case _DecodedInput() when $default != null: +return $default(_that.method,_that.input);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _DecodedInput implements DecodedInput { - const _DecodedInput({required this.method, required final TokensObject input}) - : _input = input; - factory _DecodedInput.fromJson(Map json) => - _$DecodedInputFromJson(json); - - @override - final String method; - final TokensObject _input; - @override - TokensObject get input { - if (_input is EqualUnmodifiableMapView) return _input; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_input); - } - - /// Create a copy of DecodedInput - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DecodedInputCopyWith<_DecodedInput> get copyWith => - __$DecodedInputCopyWithImpl<_DecodedInput>(this, _$identity); - - @override - Map toJson() { - return _$DecodedInputToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DecodedInput && - (identical(other.method, method) || other.method == method) && - const DeepCollectionEquality().equals(other._input, _input)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, method, const DeepCollectionEquality().hash(_input)); - - @override - String toString() { - return 'DecodedInput(method: $method, input: $input)'; - } + const _DecodedInput({required this.method, required final TokensObject input}): _input = input; + factory _DecodedInput.fromJson(Map json) => _$DecodedInputFromJson(json); + +@override final String method; + final TokensObject _input; +@override TokensObject get input { + if (_input is EqualUnmodifiableMapView) return _input; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_input); } -/// @nodoc -abstract mixin class _$DecodedInputCopyWith<$Res> - implements $DecodedInputCopyWith<$Res> { - factory _$DecodedInputCopyWith( - _DecodedInput value, $Res Function(_DecodedInput) _then) = - __$DecodedInputCopyWithImpl; - @override - @useResult - $Res call({String method, TokensObject input}); + +/// Create a copy of DecodedInput +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DecodedInputCopyWith<_DecodedInput> get copyWith => __$DecodedInputCopyWithImpl<_DecodedInput>(this, _$identity); + +@override +Map toJson() { + return _$DecodedInputToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DecodedInput&&(identical(other.method, method) || other.method == method)&&const DeepCollectionEquality().equals(other._input, _input)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,method,const DeepCollectionEquality().hash(_input)); + +@override +String toString() { + return 'DecodedInput(method: $method, input: $input)'; +} + + } +/// @nodoc +abstract mixin class _$DecodedInputCopyWith<$Res> implements $DecodedInputCopyWith<$Res> { + factory _$DecodedInputCopyWith(_DecodedInput value, $Res Function(_DecodedInput) _then) = __$DecodedInputCopyWithImpl; +@override @useResult +$Res call({ + String method, TokensObject input +}); + + + + +} /// @nodoc class __$DecodedInputCopyWithImpl<$Res> implements _$DecodedInputCopyWith<$Res> { @@ -158,25 +264,17 @@ class __$DecodedInputCopyWithImpl<$Res> final _DecodedInput _self; final $Res Function(_DecodedInput) _then; - /// Create a copy of DecodedInput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? method = null, - Object? input = null, - }) { - return _then(_DecodedInput( - method: null == method - ? _self.method - : method // ignore: cast_nullable_to_non_nullable - as String, - input: null == input - ? _self._input - : input // ignore: cast_nullable_to_non_nullable - as TokensObject, - )); - } +/// Create a copy of DecodedInput +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? method = null,Object? input = null,}) { + return _then(_DecodedInput( +method: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable +as String,input: null == input ? _self._input : input // ignore: cast_nullable_to_non_nullable +as TokensObject, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_input.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_input.g.dart index 98bb1322..d3ad6f32 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_input.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_input.g.dart @@ -13,7 +13,4 @@ _DecodedInput _$DecodedInputFromJson(Map json) => ); Map _$DecodedInputToJson(_DecodedInput instance) => - { - 'method': instance.method, - 'input': instance.input, - }; + {'method': instance.method, 'input': instance.input}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_output.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_output.freezed.dart index 1c72d1c3..56eccda3 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_output.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_output.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,49 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$DecodedOutput { - String get method; - TokensObject get output; - /// Create a copy of DecodedOutput - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DecodedOutputCopyWith get copyWith => - _$DecodedOutputCopyWithImpl( - this as DecodedOutput, _$identity); + String get method; TokensObject get output; +/// Create a copy of DecodedOutput +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DecodedOutputCopyWith get copyWith => _$DecodedOutputCopyWithImpl(this as DecodedOutput, _$identity); /// Serializes this DecodedOutput to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DecodedOutput && - (identical(other.method, method) || other.method == method) && - const DeepCollectionEquality().equals(other.output, output)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, method, const DeepCollectionEquality().hash(output)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DecodedOutput&&(identical(other.method, method) || other.method == method)&&const DeepCollectionEquality().equals(other.output, output)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,method,const DeepCollectionEquality().hash(output)); + +@override +String toString() { + return 'DecodedOutput(method: $method, output: $output)'; +} + - @override - String toString() { - return 'DecodedOutput(method: $method, output: $output)'; - } } /// @nodoc -abstract mixin class $DecodedOutputCopyWith<$Res> { - factory $DecodedOutputCopyWith( - DecodedOutput value, $Res Function(DecodedOutput) _then) = - _$DecodedOutputCopyWithImpl; - @useResult - $Res call({String method, TokensObject output}); -} +abstract mixin class $DecodedOutputCopyWith<$Res> { + factory $DecodedOutputCopyWith(DecodedOutput value, $Res Function(DecodedOutput) _then) = _$DecodedOutputCopyWithImpl; +@useResult +$Res call({ + String method, TokensObject output +}); + + + +} /// @nodoc class _$DecodedOutputCopyWithImpl<$Res> implements $DecodedOutputCopyWith<$Res> { @@ -66,92 +63,199 @@ class _$DecodedOutputCopyWithImpl<$Res> final DecodedOutput _self; final $Res Function(DecodedOutput) _then; - /// Create a copy of DecodedOutput - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? method = null, - Object? output = null, - }) { - return _then(_self.copyWith( - method: null == method - ? _self.method - : method // ignore: cast_nullable_to_non_nullable - as String, - output: null == output - ? _self.output - : output // ignore: cast_nullable_to_non_nullable - as TokensObject, - )); - } +/// Create a copy of DecodedOutput +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? method = null,Object? output = null,}) { + return _then(_self.copyWith( +method: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable +as String,output: null == output ? _self.output : output // ignore: cast_nullable_to_non_nullable +as TokensObject, + )); +} + +} + + +/// Adds pattern-matching-related methods to [DecodedOutput]. +extension DecodedOutputPatterns on DecodedOutput { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DecodedOutput value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DecodedOutput() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DecodedOutput value) $default,){ +final _that = this; +switch (_that) { +case _DecodedOutput(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DecodedOutput value)? $default,){ +final _that = this; +switch (_that) { +case _DecodedOutput() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String method, TokensObject output)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DecodedOutput() when $default != null: +return $default(_that.method,_that.output);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String method, TokensObject output) $default,) {final _that = this; +switch (_that) { +case _DecodedOutput(): +return $default(_that.method,_that.output);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String method, TokensObject output)? $default,) {final _that = this; +switch (_that) { +case _DecodedOutput() when $default != null: +return $default(_that.method,_that.output);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _DecodedOutput implements DecodedOutput { - const _DecodedOutput( - {required this.method, required final TokensObject output}) - : _output = output; - factory _DecodedOutput.fromJson(Map json) => - _$DecodedOutputFromJson(json); - - @override - final String method; - final TokensObject _output; - @override - TokensObject get output { - if (_output is EqualUnmodifiableMapView) return _output; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_output); - } - - /// Create a copy of DecodedOutput - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DecodedOutputCopyWith<_DecodedOutput> get copyWith => - __$DecodedOutputCopyWithImpl<_DecodedOutput>(this, _$identity); - - @override - Map toJson() { - return _$DecodedOutputToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DecodedOutput && - (identical(other.method, method) || other.method == method) && - const DeepCollectionEquality().equals(other._output, _output)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, method, const DeepCollectionEquality().hash(_output)); - - @override - String toString() { - return 'DecodedOutput(method: $method, output: $output)'; - } + const _DecodedOutput({required this.method, required final TokensObject output}): _output = output; + factory _DecodedOutput.fromJson(Map json) => _$DecodedOutputFromJson(json); + +@override final String method; + final TokensObject _output; +@override TokensObject get output { + if (_output is EqualUnmodifiableMapView) return _output; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_output); } -/// @nodoc -abstract mixin class _$DecodedOutputCopyWith<$Res> - implements $DecodedOutputCopyWith<$Res> { - factory _$DecodedOutputCopyWith( - _DecodedOutput value, $Res Function(_DecodedOutput) _then) = - __$DecodedOutputCopyWithImpl; - @override - @useResult - $Res call({String method, TokensObject output}); + +/// Create a copy of DecodedOutput +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DecodedOutputCopyWith<_DecodedOutput> get copyWith => __$DecodedOutputCopyWithImpl<_DecodedOutput>(this, _$identity); + +@override +Map toJson() { + return _$DecodedOutputToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DecodedOutput&&(identical(other.method, method) || other.method == method)&&const DeepCollectionEquality().equals(other._output, _output)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,method,const DeepCollectionEquality().hash(_output)); + +@override +String toString() { + return 'DecodedOutput(method: $method, output: $output)'; +} + + } +/// @nodoc +abstract mixin class _$DecodedOutputCopyWith<$Res> implements $DecodedOutputCopyWith<$Res> { + factory _$DecodedOutputCopyWith(_DecodedOutput value, $Res Function(_DecodedOutput) _then) = __$DecodedOutputCopyWithImpl; +@override @useResult +$Res call({ + String method, TokensObject output +}); + + + + +} /// @nodoc class __$DecodedOutputCopyWithImpl<$Res> implements _$DecodedOutputCopyWith<$Res> { @@ -160,25 +264,17 @@ class __$DecodedOutputCopyWithImpl<$Res> final _DecodedOutput _self; final $Res Function(_DecodedOutput) _then; - /// Create a copy of DecodedOutput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? method = null, - Object? output = null, - }) { - return _then(_DecodedOutput( - method: null == method - ? _self.method - : method // ignore: cast_nullable_to_non_nullable - as String, - output: null == output - ? _self._output - : output // ignore: cast_nullable_to_non_nullable - as TokensObject, - )); - } +/// Create a copy of DecodedOutput +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? method = null,Object? output = null,}) { + return _then(_DecodedOutput( +method: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable +as String,output: null == output ? _self._output : output // ignore: cast_nullable_to_non_nullable +as TokensObject, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_output.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_output.g.dart index f156a045..eeb09943 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_output.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_output.g.dart @@ -13,7 +13,4 @@ _DecodedOutput _$DecodedOutputFromJson(Map json) => ); Map _$DecodedOutputToJson(_DecodedOutput instance) => - { - 'method': instance.method, - 'output': instance.output, - }; + {'method': instance.method, 'output': instance.output}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_transaction.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_transaction.freezed.dart index 64d9548c..256e44bf 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_transaction.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_transaction.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,54 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$DecodedTransaction { - String get method; - TokensObject get input; - TokensObject get output; - - /// Create a copy of DecodedTransaction - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DecodedTransactionCopyWith get copyWith => - _$DecodedTransactionCopyWithImpl( - this as DecodedTransaction, _$identity); + + String get method; TokensObject get input; TokensObject get output; +/// Create a copy of DecodedTransaction +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DecodedTransactionCopyWith get copyWith => _$DecodedTransactionCopyWithImpl(this as DecodedTransaction, _$identity); /// Serializes this DecodedTransaction to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DecodedTransaction && - (identical(other.method, method) || other.method == method) && - const DeepCollectionEquality().equals(other.input, input) && - const DeepCollectionEquality().equals(other.output, output)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - method, - const DeepCollectionEquality().hash(input), - const DeepCollectionEquality().hash(output)); - - @override - String toString() { - return 'DecodedTransaction(method: $method, input: $input, output: $output)'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DecodedTransaction&&(identical(other.method, method) || other.method == method)&&const DeepCollectionEquality().equals(other.input, input)&&const DeepCollectionEquality().equals(other.output, output)); } -/// @nodoc -abstract mixin class $DecodedTransactionCopyWith<$Res> { - factory $DecodedTransactionCopyWith( - DecodedTransaction value, $Res Function(DecodedTransaction) _then) = - _$DecodedTransactionCopyWithImpl; - @useResult - $Res call({String method, TokensObject input, TokensObject output}); +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,method,const DeepCollectionEquality().hash(input),const DeepCollectionEquality().hash(output)); + +@override +String toString() { + return 'DecodedTransaction(method: $method, input: $input, output: $output)'; +} + + } +/// @nodoc +abstract mixin class $DecodedTransactionCopyWith<$Res> { + factory $DecodedTransactionCopyWith(DecodedTransaction value, $Res Function(DecodedTransaction) _then) = _$DecodedTransactionCopyWithImpl; +@useResult +$Res call({ + String method, TokensObject input, TokensObject output +}); + + + + +} /// @nodoc class _$DecodedTransactionCopyWithImpl<$Res> implements $DecodedTransactionCopyWith<$Res> { @@ -71,112 +63,207 @@ class _$DecodedTransactionCopyWithImpl<$Res> final DecodedTransaction _self; final $Res Function(DecodedTransaction) _then; - /// Create a copy of DecodedTransaction - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? method = null, - Object? input = null, - Object? output = null, - }) { - return _then(_self.copyWith( - method: null == method - ? _self.method - : method // ignore: cast_nullable_to_non_nullable - as String, - input: null == input - ? _self.input - : input // ignore: cast_nullable_to_non_nullable - as TokensObject, - output: null == output - ? _self.output - : output // ignore: cast_nullable_to_non_nullable - as TokensObject, - )); - } +/// Create a copy of DecodedTransaction +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? method = null,Object? input = null,Object? output = null,}) { + return _then(_self.copyWith( +method: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable +as String,input: null == input ? _self.input : input // ignore: cast_nullable_to_non_nullable +as TokensObject,output: null == output ? _self.output : output // ignore: cast_nullable_to_non_nullable +as TokensObject, + )); +} + +} + + +/// Adds pattern-matching-related methods to [DecodedTransaction]. +extension DecodedTransactionPatterns on DecodedTransaction { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DecodedTransaction value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DecodedTransaction() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DecodedTransaction value) $default,){ +final _that = this; +switch (_that) { +case _DecodedTransaction(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DecodedTransaction value)? $default,){ +final _that = this; +switch (_that) { +case _DecodedTransaction() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String method, TokensObject input, TokensObject output)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DecodedTransaction() when $default != null: +return $default(_that.method,_that.input,_that.output);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String method, TokensObject input, TokensObject output) $default,) {final _that = this; +switch (_that) { +case _DecodedTransaction(): +return $default(_that.method,_that.input,_that.output);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String method, TokensObject input, TokensObject output)? $default,) {final _that = this; +switch (_that) { +case _DecodedTransaction() when $default != null: +return $default(_that.method,_that.input,_that.output);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _DecodedTransaction implements DecodedTransaction { - const _DecodedTransaction( - {required this.method, - required final TokensObject input, - required final TokensObject output}) - : _input = input, - _output = output; - factory _DecodedTransaction.fromJson(Map json) => - _$DecodedTransactionFromJson(json); - - @override - final String method; - final TokensObject _input; - @override - TokensObject get input { - if (_input is EqualUnmodifiableMapView) return _input; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_input); - } - - final TokensObject _output; - @override - TokensObject get output { - if (_output is EqualUnmodifiableMapView) return _output; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_output); - } - - /// Create a copy of DecodedTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DecodedTransactionCopyWith<_DecodedTransaction> get copyWith => - __$DecodedTransactionCopyWithImpl<_DecodedTransaction>(this, _$identity); - - @override - Map toJson() { - return _$DecodedTransactionToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DecodedTransaction && - (identical(other.method, method) || other.method == method) && - const DeepCollectionEquality().equals(other._input, _input) && - const DeepCollectionEquality().equals(other._output, _output)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - method, - const DeepCollectionEquality().hash(_input), - const DeepCollectionEquality().hash(_output)); - - @override - String toString() { - return 'DecodedTransaction(method: $method, input: $input, output: $output)'; - } + const _DecodedTransaction({required this.method, required final TokensObject input, required final TokensObject output}): _input = input,_output = output; + factory _DecodedTransaction.fromJson(Map json) => _$DecodedTransactionFromJson(json); + +@override final String method; + final TokensObject _input; +@override TokensObject get input { + if (_input is EqualUnmodifiableMapView) return _input; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_input); } -/// @nodoc -abstract mixin class _$DecodedTransactionCopyWith<$Res> - implements $DecodedTransactionCopyWith<$Res> { - factory _$DecodedTransactionCopyWith( - _DecodedTransaction value, $Res Function(_DecodedTransaction) _then) = - __$DecodedTransactionCopyWithImpl; - @override - @useResult - $Res call({String method, TokensObject input, TokensObject output}); + final TokensObject _output; +@override TokensObject get output { + if (_output is EqualUnmodifiableMapView) return _output; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_output); +} + + +/// Create a copy of DecodedTransaction +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DecodedTransactionCopyWith<_DecodedTransaction> get copyWith => __$DecodedTransactionCopyWithImpl<_DecodedTransaction>(this, _$identity); + +@override +Map toJson() { + return _$DecodedTransactionToJson(this, ); } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DecodedTransaction&&(identical(other.method, method) || other.method == method)&&const DeepCollectionEquality().equals(other._input, _input)&&const DeepCollectionEquality().equals(other._output, _output)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,method,const DeepCollectionEquality().hash(_input),const DeepCollectionEquality().hash(_output)); + +@override +String toString() { + return 'DecodedTransaction(method: $method, input: $input, output: $output)'; +} + + +} + +/// @nodoc +abstract mixin class _$DecodedTransactionCopyWith<$Res> implements $DecodedTransactionCopyWith<$Res> { + factory _$DecodedTransactionCopyWith(_DecodedTransaction value, $Res Function(_DecodedTransaction) _then) = __$DecodedTransactionCopyWithImpl; +@override @useResult +$Res call({ + String method, TokensObject input, TokensObject output +}); + + + + +} /// @nodoc class __$DecodedTransactionCopyWithImpl<$Res> implements _$DecodedTransactionCopyWith<$Res> { @@ -185,30 +272,18 @@ class __$DecodedTransactionCopyWithImpl<$Res> final _DecodedTransaction _self; final $Res Function(_DecodedTransaction) _then; - /// Create a copy of DecodedTransaction - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? method = null, - Object? input = null, - Object? output = null, - }) { - return _then(_DecodedTransaction( - method: null == method - ? _self.method - : method // ignore: cast_nullable_to_non_nullable - as String, - input: null == input - ? _self._input - : input // ignore: cast_nullable_to_non_nullable - as TokensObject, - output: null == output - ? _self._output - : output // ignore: cast_nullable_to_non_nullable - as TokensObject, - )); - } +/// Create a copy of DecodedTransaction +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? method = null,Object? input = null,Object? output = null,}) { + return _then(_DecodedTransaction( +method: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable +as String,input: null == input ? _self._input : input // ignore: cast_nullable_to_non_nullable +as TokensObject,output: null == output ? _self._output : output // ignore: cast_nullable_to_non_nullable +as TokensObject, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_transaction_event.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_transaction_event.freezed.dart index a3fd37fd..b6a4a230 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_transaction_event.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_transaction_event.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,49 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$DecodedTransactionEvent { - String get event; - TokensObject get data; - /// Create a copy of DecodedTransactionEvent - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DecodedTransactionEventCopyWith get copyWith => - _$DecodedTransactionEventCopyWithImpl( - this as DecodedTransactionEvent, _$identity); + String get event; TokensObject get data; +/// Create a copy of DecodedTransactionEvent +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DecodedTransactionEventCopyWith get copyWith => _$DecodedTransactionEventCopyWithImpl(this as DecodedTransactionEvent, _$identity); /// Serializes this DecodedTransactionEvent to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DecodedTransactionEvent && - (identical(other.event, event) || other.event == event) && - const DeepCollectionEquality().equals(other.data, data)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, event, const DeepCollectionEquality().hash(data)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DecodedTransactionEvent&&(identical(other.event, event) || other.event == event)&&const DeepCollectionEquality().equals(other.data, data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,event,const DeepCollectionEquality().hash(data)); + +@override +String toString() { + return 'DecodedTransactionEvent(event: $event, data: $data)'; +} + - @override - String toString() { - return 'DecodedTransactionEvent(event: $event, data: $data)'; - } } /// @nodoc -abstract mixin class $DecodedTransactionEventCopyWith<$Res> { - factory $DecodedTransactionEventCopyWith(DecodedTransactionEvent value, - $Res Function(DecodedTransactionEvent) _then) = - _$DecodedTransactionEventCopyWithImpl; - @useResult - $Res call({String event, TokensObject data}); -} +abstract mixin class $DecodedTransactionEventCopyWith<$Res> { + factory $DecodedTransactionEventCopyWith(DecodedTransactionEvent value, $Res Function(DecodedTransactionEvent) _then) = _$DecodedTransactionEventCopyWithImpl; +@useResult +$Res call({ + String event, TokensObject data +}); + + + +} /// @nodoc class _$DecodedTransactionEventCopyWithImpl<$Res> implements $DecodedTransactionEventCopyWith<$Res> { @@ -66,93 +63,199 @@ class _$DecodedTransactionEventCopyWithImpl<$Res> final DecodedTransactionEvent _self; final $Res Function(DecodedTransactionEvent) _then; - /// Create a copy of DecodedTransactionEvent - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? event = null, - Object? data = null, - }) { - return _then(_self.copyWith( - event: null == event - ? _self.event - : event // ignore: cast_nullable_to_non_nullable - as String, - data: null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as TokensObject, - )); - } +/// Create a copy of DecodedTransactionEvent +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? event = null,Object? data = null,}) { + return _then(_self.copyWith( +event: null == event ? _self.event : event // ignore: cast_nullable_to_non_nullable +as String,data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as TokensObject, + )); +} + +} + + +/// Adds pattern-matching-related methods to [DecodedTransactionEvent]. +extension DecodedTransactionEventPatterns on DecodedTransactionEvent { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DecodedTransactionEvent value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DecodedTransactionEvent() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DecodedTransactionEvent value) $default,){ +final _that = this; +switch (_that) { +case _DecodedTransactionEvent(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DecodedTransactionEvent value)? $default,){ +final _that = this; +switch (_that) { +case _DecodedTransactionEvent() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String event, TokensObject data)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DecodedTransactionEvent() when $default != null: +return $default(_that.event,_that.data);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String event, TokensObject data) $default,) {final _that = this; +switch (_that) { +case _DecodedTransactionEvent(): +return $default(_that.event,_that.data);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String event, TokensObject data)? $default,) {final _that = this; +switch (_that) { +case _DecodedTransactionEvent() when $default != null: +return $default(_that.event,_that.data);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _DecodedTransactionEvent implements DecodedTransactionEvent { - const _DecodedTransactionEvent( - {required this.event, required final TokensObject data}) - : _data = data; - factory _DecodedTransactionEvent.fromJson(Map json) => - _$DecodedTransactionEventFromJson(json); - - @override - final String event; - final TokensObject _data; - @override - TokensObject get data { - if (_data is EqualUnmodifiableMapView) return _data; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_data); - } - - /// Create a copy of DecodedTransactionEvent - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DecodedTransactionEventCopyWith<_DecodedTransactionEvent> get copyWith => - __$DecodedTransactionEventCopyWithImpl<_DecodedTransactionEvent>( - this, _$identity); - - @override - Map toJson() { - return _$DecodedTransactionEventToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DecodedTransactionEvent && - (identical(other.event, event) || other.event == event) && - const DeepCollectionEquality().equals(other._data, _data)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, event, const DeepCollectionEquality().hash(_data)); - - @override - String toString() { - return 'DecodedTransactionEvent(event: $event, data: $data)'; - } + const _DecodedTransactionEvent({required this.event, required final TokensObject data}): _data = data; + factory _DecodedTransactionEvent.fromJson(Map json) => _$DecodedTransactionEventFromJson(json); + +@override final String event; + final TokensObject _data; +@override TokensObject get data { + if (_data is EqualUnmodifiableMapView) return _data; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_data); } -/// @nodoc -abstract mixin class _$DecodedTransactionEventCopyWith<$Res> - implements $DecodedTransactionEventCopyWith<$Res> { - factory _$DecodedTransactionEventCopyWith(_DecodedTransactionEvent value, - $Res Function(_DecodedTransactionEvent) _then) = - __$DecodedTransactionEventCopyWithImpl; - @override - @useResult - $Res call({String event, TokensObject data}); + +/// Create a copy of DecodedTransactionEvent +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DecodedTransactionEventCopyWith<_DecodedTransactionEvent> get copyWith => __$DecodedTransactionEventCopyWithImpl<_DecodedTransactionEvent>(this, _$identity); + +@override +Map toJson() { + return _$DecodedTransactionEventToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DecodedTransactionEvent&&(identical(other.event, event) || other.event == event)&&const DeepCollectionEquality().equals(other._data, _data)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,event,const DeepCollectionEquality().hash(_data)); + +@override +String toString() { + return 'DecodedTransactionEvent(event: $event, data: $data)'; +} + + } +/// @nodoc +abstract mixin class _$DecodedTransactionEventCopyWith<$Res> implements $DecodedTransactionEventCopyWith<$Res> { + factory _$DecodedTransactionEventCopyWith(_DecodedTransactionEvent value, $Res Function(_DecodedTransactionEvent) _then) = __$DecodedTransactionEventCopyWithImpl; +@override @useResult +$Res call({ + String event, TokensObject data +}); + + + + +} /// @nodoc class __$DecodedTransactionEventCopyWithImpl<$Res> implements _$DecodedTransactionEventCopyWith<$Res> { @@ -161,25 +264,17 @@ class __$DecodedTransactionEventCopyWithImpl<$Res> final _DecodedTransactionEvent _self; final $Res Function(_DecodedTransactionEvent) _then; - /// Create a copy of DecodedTransactionEvent - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? event = null, - Object? data = null, - }) { - return _then(_DecodedTransactionEvent( - event: null == event - ? _self.event - : event // ignore: cast_nullable_to_non_nullable - as String, - data: null == data - ? _self._data - : data // ignore: cast_nullable_to_non_nullable - as TokensObject, - )); - } +/// Create a copy of DecodedTransactionEvent +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? event = null,Object? data = null,}) { + return _then(_DecodedTransactionEvent( +event: null == event ? _self.event : event // ignore: cast_nullable_to_non_nullable +as String,data: null == data ? _self._data : data // ignore: cast_nullable_to_non_nullable +as TokensObject, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_transaction_event.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_transaction_event.g.dart index 28b67a83..0f65bbae 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_transaction_event.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/decoded_transaction_event.g.dart @@ -7,15 +7,12 @@ part of 'decoded_transaction_event.dart'; // ************************************************************************** _DecodedTransactionEvent _$DecodedTransactionEventFromJson( - Map json) => - _DecodedTransactionEvent( - event: json['event'] as String, - data: json['data'] as Map, - ); + Map json, +) => _DecodedTransactionEvent( + event: json['event'] as String, + data: json['data'] as Map, +); Map _$DecodedTransactionEventToJson( - _DecodedTransactionEvent instance) => - { - 'event': instance.event, - 'data': instance.data, - }; + _DecodedTransactionEvent instance, +) => {'event': instance.event, 'data': instance.data}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/execution_output.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/execution_output.freezed.dart index 10e7b698..080e786a 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/execution_output.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/execution_output.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,50 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$ExecutionOutput { - @JsonKey(includeIfNull: false) - TokensObject? get output; - int get code; - - /// Create a copy of ExecutionOutput - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $ExecutionOutputCopyWith get copyWith => - _$ExecutionOutputCopyWithImpl( - this as ExecutionOutput, _$identity); + +@JsonKey(includeIfNull: false) TokensObject? get output; int get code; +/// Create a copy of ExecutionOutput +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$ExecutionOutputCopyWith get copyWith => _$ExecutionOutputCopyWithImpl(this as ExecutionOutput, _$identity); /// Serializes this ExecutionOutput to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is ExecutionOutput && - const DeepCollectionEquality().equals(other.output, output) && - (identical(other.code, code) || other.code == code)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(output), code); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is ExecutionOutput&&const DeepCollectionEquality().equals(other.output, output)&&(identical(other.code, code) || other.code == code)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(output),code); - @override - String toString() { - return 'ExecutionOutput(output: $output, code: $code)'; - } +@override +String toString() { + return 'ExecutionOutput(output: $output, code: $code)'; } -/// @nodoc -abstract mixin class $ExecutionOutputCopyWith<$Res> { - factory $ExecutionOutputCopyWith( - ExecutionOutput value, $Res Function(ExecutionOutput) _then) = - _$ExecutionOutputCopyWithImpl; - @useResult - $Res call({@JsonKey(includeIfNull: false) TokensObject? output, int code}); + } +/// @nodoc +abstract mixin class $ExecutionOutputCopyWith<$Res> { + factory $ExecutionOutputCopyWith(ExecutionOutput value, $Res Function(ExecutionOutput) _then) = _$ExecutionOutputCopyWithImpl; +@useResult +$Res call({ +@JsonKey(includeIfNull: false) TokensObject? output, int code +}); + + + + +} /// @nodoc class _$ExecutionOutputCopyWithImpl<$Res> implements $ExecutionOutputCopyWith<$Res> { @@ -67,97 +63,201 @@ class _$ExecutionOutputCopyWithImpl<$Res> final ExecutionOutput _self; final $Res Function(ExecutionOutput) _then; - /// Create a copy of ExecutionOutput - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? output = freezed, - Object? code = null, - }) { - return _then(_self.copyWith( - output: freezed == output - ? _self.output - : output // ignore: cast_nullable_to_non_nullable - as TokensObject?, - code: null == code - ? _self.code - : code // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of ExecutionOutput +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? output = freezed,Object? code = null,}) { + return _then(_self.copyWith( +output: freezed == output ? _self.output : output // ignore: cast_nullable_to_non_nullable +as TokensObject?,code: null == code ? _self.code : code // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [ExecutionOutput]. +extension ExecutionOutputPatterns on ExecutionOutput { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _ExecutionOutput value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _ExecutionOutput() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _ExecutionOutput value) $default,){ +final _that = this; +switch (_that) { +case _ExecutionOutput(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _ExecutionOutput value)? $default,){ +final _that = this; +switch (_that) { +case _ExecutionOutput() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function(@JsonKey(includeIfNull: false) TokensObject? output, int code)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _ExecutionOutput() when $default != null: +return $default(_that.output,_that.code);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function(@JsonKey(includeIfNull: false) TokensObject? output, int code) $default,) {final _that = this; +switch (_that) { +case _ExecutionOutput(): +return $default(_that.output,_that.code);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function(@JsonKey(includeIfNull: false) TokensObject? output, int code)? $default,) {final _that = this; +switch (_that) { +case _ExecutionOutput() when $default != null: +return $default(_that.output,_that.code);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _ExecutionOutput implements ExecutionOutput { - const _ExecutionOutput( - {@JsonKey(includeIfNull: false) final TokensObject? output, - required this.code}) - : _output = output; - factory _ExecutionOutput.fromJson(Map json) => - _$ExecutionOutputFromJson(json); - - final TokensObject? _output; - @override - @JsonKey(includeIfNull: false) - TokensObject? get output { - final value = _output; - if (value == null) return null; - if (_output is EqualUnmodifiableMapView) return _output; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - - @override - final int code; - - /// Create a copy of ExecutionOutput - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$ExecutionOutputCopyWith<_ExecutionOutput> get copyWith => - __$ExecutionOutputCopyWithImpl<_ExecutionOutput>(this, _$identity); - - @override - Map toJson() { - return _$ExecutionOutputToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _ExecutionOutput && - const DeepCollectionEquality().equals(other._output, _output) && - (identical(other.code, code) || other.code == code)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_output), code); - - @override - String toString() { - return 'ExecutionOutput(output: $output, code: $code)'; - } + const _ExecutionOutput({@JsonKey(includeIfNull: false) final TokensObject? output, required this.code}): _output = output; + factory _ExecutionOutput.fromJson(Map json) => _$ExecutionOutputFromJson(json); + + final TokensObject? _output; +@override@JsonKey(includeIfNull: false) TokensObject? get output { + final value = _output; + if (value == null) return null; + if (_output is EqualUnmodifiableMapView) return _output; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); } -/// @nodoc -abstract mixin class _$ExecutionOutputCopyWith<$Res> - implements $ExecutionOutputCopyWith<$Res> { - factory _$ExecutionOutputCopyWith( - _ExecutionOutput value, $Res Function(_ExecutionOutput) _then) = - __$ExecutionOutputCopyWithImpl; - @override - @useResult - $Res call({@JsonKey(includeIfNull: false) TokensObject? output, int code}); +@override final int code; + +/// Create a copy of ExecutionOutput +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$ExecutionOutputCopyWith<_ExecutionOutput> get copyWith => __$ExecutionOutputCopyWithImpl<_ExecutionOutput>(this, _$identity); + +@override +Map toJson() { + return _$ExecutionOutputToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _ExecutionOutput&&const DeepCollectionEquality().equals(other._output, _output)&&(identical(other.code, code) || other.code == code)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_output),code); + +@override +String toString() { + return 'ExecutionOutput(output: $output, code: $code)'; +} + + } +/// @nodoc +abstract mixin class _$ExecutionOutputCopyWith<$Res> implements $ExecutionOutputCopyWith<$Res> { + factory _$ExecutionOutputCopyWith(_ExecutionOutput value, $Res Function(_ExecutionOutput) _then) = __$ExecutionOutputCopyWithImpl; +@override @useResult +$Res call({ +@JsonKey(includeIfNull: false) TokensObject? output, int code +}); + + + + +} /// @nodoc class __$ExecutionOutputCopyWithImpl<$Res> implements _$ExecutionOutputCopyWith<$Res> { @@ -166,25 +266,17 @@ class __$ExecutionOutputCopyWithImpl<$Res> final _ExecutionOutput _self; final $Res Function(_ExecutionOutput) _then; - /// Create a copy of ExecutionOutput - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? output = freezed, - Object? code = null, - }) { - return _then(_ExecutionOutput( - output: freezed == output - ? _self._output - : output // ignore: cast_nullable_to_non_nullable - as TokensObject?, - code: null == code - ? _self.code - : code // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of ExecutionOutput +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? output = freezed,Object? code = null,}) { + return _then(_ExecutionOutput( +output: freezed == output ? _self._output : output // ignore: cast_nullable_to_non_nullable +as TokensObject?,code: null == code ? _self.code : code // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/execution_output.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/execution_output.g.dart index 2935489c..62f1be7e 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/execution_output.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/execution_output.g.dart @@ -13,7 +13,4 @@ _ExecutionOutput _$ExecutionOutputFromJson(Map json) => ); Map _$ExecutionOutputToJson(_ExecutionOutput instance) => - { - if (instance.output case final value?) 'output': value, - 'code': instance.code, - }; + {'output': ?instance.output, 'code': instance.code}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/function_call.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/function_call.freezed.dart index b0632e2c..71d0c3fc 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/function_call.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/helpers/models/function_call.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,154 +14,250 @@ T _$identity(T value) => value; /// @nodoc mixin _$FunctionCall { - String get abi; - String get method; - TokensObject get params; - - /// Create a copy of FunctionCall - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $FunctionCallCopyWith get copyWith => - _$FunctionCallCopyWithImpl( - this as FunctionCall, _$identity); + + String get abi; String get method; TokensObject get params; +/// Create a copy of FunctionCall +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$FunctionCallCopyWith get copyWith => _$FunctionCallCopyWithImpl(this as FunctionCall, _$identity); /// Serializes this FunctionCall to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is FunctionCall && - (identical(other.abi, abi) || other.abi == abi) && - (identical(other.method, method) || other.method == method) && - const DeepCollectionEquality().equals(other.params, params)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, abi, method, const DeepCollectionEquality().hash(params)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is FunctionCall&&(identical(other.abi, abi) || other.abi == abi)&&(identical(other.method, method) || other.method == method)&&const DeepCollectionEquality().equals(other.params, params)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,abi,method,const DeepCollectionEquality().hash(params)); - @override - String toString() { - return 'FunctionCall(abi: $abi, method: $method, params: $params)'; - } +@override +String toString() { + return 'FunctionCall(abi: $abi, method: $method, params: $params)'; } -/// @nodoc -abstract mixin class $FunctionCallCopyWith<$Res> { - factory $FunctionCallCopyWith( - FunctionCall value, $Res Function(FunctionCall) _then) = - _$FunctionCallCopyWithImpl; - @useResult - $Res call({String abi, String method, TokensObject params}); + } /// @nodoc -class _$FunctionCallCopyWithImpl<$Res> implements $FunctionCallCopyWith<$Res> { +abstract mixin class $FunctionCallCopyWith<$Res> { + factory $FunctionCallCopyWith(FunctionCall value, $Res Function(FunctionCall) _then) = _$FunctionCallCopyWithImpl; +@useResult +$Res call({ + String abi, String method, TokensObject params +}); + + + + +} +/// @nodoc +class _$FunctionCallCopyWithImpl<$Res> + implements $FunctionCallCopyWith<$Res> { _$FunctionCallCopyWithImpl(this._self, this._then); final FunctionCall _self; final $Res Function(FunctionCall) _then; - /// Create a copy of FunctionCall - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? abi = null, - Object? method = null, - Object? params = null, - }) { - return _then(_self.copyWith( - abi: null == abi - ? _self.abi - : abi // ignore: cast_nullable_to_non_nullable - as String, - method: null == method - ? _self.method - : method // ignore: cast_nullable_to_non_nullable - as String, - params: null == params - ? _self.params - : params // ignore: cast_nullable_to_non_nullable - as TokensObject, - )); - } +/// Create a copy of FunctionCall +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? abi = null,Object? method = null,Object? params = null,}) { + return _then(_self.copyWith( +abi: null == abi ? _self.abi : abi // ignore: cast_nullable_to_non_nullable +as String,method: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable +as String,params: null == params ? _self.params : params // ignore: cast_nullable_to_non_nullable +as TokensObject, + )); +} + +} + + +/// Adds pattern-matching-related methods to [FunctionCall]. +extension FunctionCallPatterns on FunctionCall { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _FunctionCall value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _FunctionCall() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _FunctionCall value) $default,){ +final _that = this; +switch (_that) { +case _FunctionCall(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _FunctionCall value)? $default,){ +final _that = this; +switch (_that) { +case _FunctionCall() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String abi, String method, TokensObject params)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _FunctionCall() when $default != null: +return $default(_that.abi,_that.method,_that.params);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String abi, String method, TokensObject params) $default,) {final _that = this; +switch (_that) { +case _FunctionCall(): +return $default(_that.abi,_that.method,_that.params);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String abi, String method, TokensObject params)? $default,) {final _that = this; +switch (_that) { +case _FunctionCall() when $default != null: +return $default(_that.abi,_that.method,_that.params);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _FunctionCall implements FunctionCall { - const _FunctionCall( - {required this.abi, - required this.method, - required final TokensObject params}) - : _params = params; - factory _FunctionCall.fromJson(Map json) => - _$FunctionCallFromJson(json); - - @override - final String abi; - @override - final String method; - final TokensObject _params; - @override - TokensObject get params { - if (_params is EqualUnmodifiableMapView) return _params; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_params); - } - - /// Create a copy of FunctionCall - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$FunctionCallCopyWith<_FunctionCall> get copyWith => - __$FunctionCallCopyWithImpl<_FunctionCall>(this, _$identity); - - @override - Map toJson() { - return _$FunctionCallToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _FunctionCall && - (identical(other.abi, abi) || other.abi == abi) && - (identical(other.method, method) || other.method == method) && - const DeepCollectionEquality().equals(other._params, _params)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, abi, method, const DeepCollectionEquality().hash(_params)); - - @override - String toString() { - return 'FunctionCall(abi: $abi, method: $method, params: $params)'; - } + const _FunctionCall({required this.abi, required this.method, required final TokensObject params}): _params = params; + factory _FunctionCall.fromJson(Map json) => _$FunctionCallFromJson(json); + +@override final String abi; +@override final String method; + final TokensObject _params; +@override TokensObject get params { + if (_params is EqualUnmodifiableMapView) return _params; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_params); } -/// @nodoc -abstract mixin class _$FunctionCallCopyWith<$Res> - implements $FunctionCallCopyWith<$Res> { - factory _$FunctionCallCopyWith( - _FunctionCall value, $Res Function(_FunctionCall) _then) = - __$FunctionCallCopyWithImpl; - @override - @useResult - $Res call({String abi, String method, TokensObject params}); + +/// Create a copy of FunctionCall +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$FunctionCallCopyWith<_FunctionCall> get copyWith => __$FunctionCallCopyWithImpl<_FunctionCall>(this, _$identity); + +@override +Map toJson() { + return _$FunctionCallToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _FunctionCall&&(identical(other.abi, abi) || other.abi == abi)&&(identical(other.method, method) || other.method == method)&&const DeepCollectionEquality().equals(other._params, _params)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,abi,method,const DeepCollectionEquality().hash(_params)); + +@override +String toString() { + return 'FunctionCall(abi: $abi, method: $method, params: $params)'; +} + + } +/// @nodoc +abstract mixin class _$FunctionCallCopyWith<$Res> implements $FunctionCallCopyWith<$Res> { + factory _$FunctionCallCopyWith(_FunctionCall value, $Res Function(_FunctionCall) _then) = __$FunctionCallCopyWithImpl; +@override @useResult +$Res call({ + String abi, String method, TokensObject params +}); + + + + +} /// @nodoc class __$FunctionCallCopyWithImpl<$Res> implements _$FunctionCallCopyWith<$Res> { @@ -171,30 +266,18 @@ class __$FunctionCallCopyWithImpl<$Res> final _FunctionCall _self; final $Res Function(_FunctionCall) _then; - /// Create a copy of FunctionCall - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? abi = null, - Object? method = null, - Object? params = null, - }) { - return _then(_FunctionCall( - abi: null == abi - ? _self.abi - : abi // ignore: cast_nullable_to_non_nullable - as String, - method: null == method - ? _self.method - : method // ignore: cast_nullable_to_non_nullable - as String, - params: null == params - ? _self._params - : params // ignore: cast_nullable_to_non_nullable - as TokensObject, - )); - } +/// Create a copy of FunctionCall +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? abi = null,Object? method = null,Object? params = null,}) { + return _then(_FunctionCall( +abi: null == abi ? _self.abi : abi // ignore: cast_nullable_to_non_nullable +as String,method: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable +as String,params: null == params ? _self._params : params // ignore: cast_nullable_to_non_nullable +as TokensObject, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/transport/gql_transport.dart b/packages/flutter_nekoton_bridge/lib/nekoton/transport/gql_transport.dart index f9e613c5..d6ed8148 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/transport/gql_transport.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/transport/gql_transport.dart @@ -27,18 +27,19 @@ class GqlTransport extends Transport { instance.networkId = await instance.getNetworkId(); - instance.connectionParamsHash = - getHash('gql:${gqlConnection.settings.endpoints.join(',')}'); + instance.connectionParamsHash = getHash( + 'gql:${gqlConnection.settings.endpoints.join(',')}', + ); return instance; } @override Future dispose() => mutex.protectWrite(() async { - transport.innerTransport.dispose(); - gqlConnection.dispose(); - _disposed = true; - }); + transport.innerTransport.dispose(); + gqlConnection.dispose(); + _disposed = true; + }); @override Future getAccountsByCodeHash({ @@ -73,8 +74,9 @@ class GqlTransport extends Transport { if (_disposed) throw TransportCallAfterDisposeError(); return mutex.protectRead(() async { - final res = - await transport.getFullContractState(address: address.address); + final res = await transport.getFullContractState( + address: address.address, + ); return res == null ? null : FullContractState.fromJson(jsonDecode(res)); }); } @@ -180,11 +182,13 @@ class GqlTransport extends Transport { }) { if (_disposed) throw TransportCallAfterDisposeError(); - return mutex.protectRead(() => transport.waitForNextBlock( - currentBlockId: currentBlockId, - address: address.address, - timeout: BigInt.from(timeout.inMilliseconds), - )); + return mutex.protectRead( + () => transport.waitForNextBlock( + currentBlockId: currentBlockId, + address: address.address, + timeout: BigInt.from(timeout.inMilliseconds), + ), + ); } @override @@ -207,14 +211,17 @@ class GqlTransport extends Transport { return mutex.protectRead(() async { final encoded = await transport.simulateTransactionTree( - signedMessage: jsonEncode(signedMessage), - ignoredComputePhaseCodes: ignoredComputePhaseCodes, - ignoredActionPhaseCodes: ignoredActionPhaseCodes); + signedMessage: jsonEncode(signedMessage), + ignoredComputePhaseCodes: ignoredComputePhaseCodes, + ignoredActionPhaseCodes: ignoredActionPhaseCodes, + ); final decoded = jsonDecode(encoded) as List; return decoded - .map((e) => - TxTreeSimulationErrorItem.fromJson(e as Map)) + .map( + (e) => + TxTreeSimulationErrorItem.fromJson(e as Map), + ) .toList(); }); } diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/transport/jrpc_transport.dart b/packages/flutter_nekoton_bridge/lib/nekoton/transport/jrpc_transport.dart index 6c070d4f..92000d87 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/transport/jrpc_transport.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/transport/jrpc_transport.dart @@ -27,18 +27,19 @@ class JrpcTransport extends Transport { instance.networkId = await instance.getNetworkId(); - instance.connectionParamsHash = - getHash('jrpc:${jrpcConnection.settings.endpoint}'); + instance.connectionParamsHash = getHash( + 'jrpc:${jrpcConnection.settings.endpoint}', + ); return instance; } @override Future dispose() => mutex.protectWrite(() async { - transport.innerTransport.dispose(); - jrpcConnection.dispose(); - _disposed = true; - }); + transport.innerTransport.dispose(); + jrpcConnection.dispose(); + _disposed = true; + }); @override Future getAccountsByCodeHash({ @@ -73,8 +74,9 @@ class JrpcTransport extends Transport { if (_disposed) throw TransportCallAfterDisposeError(); return mutex.protectRead(() async { - final res = - await transport.getFullContractState(address: address.address); + final res = await transport.getFullContractState( + address: address.address, + ); return res == null ? null : FullContractState.fromJson(jsonDecode(res)); }); } @@ -176,14 +178,17 @@ class JrpcTransport extends Transport { return mutex.protectRead(() async { final encoded = await transport.simulateTransactionTree( - signedMessage: jsonEncode(signedMessage), - ignoredComputePhaseCodes: ignoredComputePhaseCodes, - ignoredActionPhaseCodes: ignoredActionPhaseCodes); + signedMessage: jsonEncode(signedMessage), + ignoredComputePhaseCodes: ignoredComputePhaseCodes, + ignoredActionPhaseCodes: ignoredActionPhaseCodes, + ); final decoded = jsonDecode(encoded) as List; return decoded - .map((e) => - TxTreeSimulationErrorItem.fromJson(e as Map)) + .map( + (e) => + TxTreeSimulationErrorItem.fromJson(e as Map), + ) .toList(); }); } diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/fee_factors.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/fee_factors.freezed.dart index 1e5cc98d..d6854b2a 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/fee_factors.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/fee_factors.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,163 +14,261 @@ T _$identity(T value) => value; /// @nodoc mixin _$FeeFactors { - int get storageFeeFactor; - int get gasFeeFactor; - /// Create a copy of FeeFactors - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $FeeFactorsCopyWith get copyWith => - _$FeeFactorsCopyWithImpl(this as FeeFactors, _$identity); + int get storageFeeFactor; int get gasFeeFactor; +/// Create a copy of FeeFactors +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$FeeFactorsCopyWith get copyWith => _$FeeFactorsCopyWithImpl(this as FeeFactors, _$identity); /// Serializes this FeeFactors to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is FeeFactors && - (identical(other.storageFeeFactor, storageFeeFactor) || - other.storageFeeFactor == storageFeeFactor) && - (identical(other.gasFeeFactor, gasFeeFactor) || - other.gasFeeFactor == gasFeeFactor)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, storageFeeFactor, gasFeeFactor); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is FeeFactors&&(identical(other.storageFeeFactor, storageFeeFactor) || other.storageFeeFactor == storageFeeFactor)&&(identical(other.gasFeeFactor, gasFeeFactor) || other.gasFeeFactor == gasFeeFactor)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,storageFeeFactor,gasFeeFactor); - @override - String toString() { - return 'FeeFactors(storageFeeFactor: $storageFeeFactor, gasFeeFactor: $gasFeeFactor)'; - } +@override +String toString() { + return 'FeeFactors(storageFeeFactor: $storageFeeFactor, gasFeeFactor: $gasFeeFactor)'; } -/// @nodoc -abstract mixin class $FeeFactorsCopyWith<$Res> { - factory $FeeFactorsCopyWith( - FeeFactors value, $Res Function(FeeFactors) _then) = - _$FeeFactorsCopyWithImpl; - @useResult - $Res call({int storageFeeFactor, int gasFeeFactor}); + } /// @nodoc -class _$FeeFactorsCopyWithImpl<$Res> implements $FeeFactorsCopyWith<$Res> { +abstract mixin class $FeeFactorsCopyWith<$Res> { + factory $FeeFactorsCopyWith(FeeFactors value, $Res Function(FeeFactors) _then) = _$FeeFactorsCopyWithImpl; +@useResult +$Res call({ + int storageFeeFactor, int gasFeeFactor +}); + + + + +} +/// @nodoc +class _$FeeFactorsCopyWithImpl<$Res> + implements $FeeFactorsCopyWith<$Res> { _$FeeFactorsCopyWithImpl(this._self, this._then); final FeeFactors _self; final $Res Function(FeeFactors) _then; - /// Create a copy of FeeFactors - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? storageFeeFactor = null, - Object? gasFeeFactor = null, - }) { - return _then(_self.copyWith( - storageFeeFactor: null == storageFeeFactor - ? _self.storageFeeFactor - : storageFeeFactor // ignore: cast_nullable_to_non_nullable - as int, - gasFeeFactor: null == gasFeeFactor - ? _self.gasFeeFactor - : gasFeeFactor // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of FeeFactors +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? storageFeeFactor = null,Object? gasFeeFactor = null,}) { + return _then(_self.copyWith( +storageFeeFactor: null == storageFeeFactor ? _self.storageFeeFactor : storageFeeFactor // ignore: cast_nullable_to_non_nullable +as int,gasFeeFactor: null == gasFeeFactor ? _self.gasFeeFactor : gasFeeFactor // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [FeeFactors]. +extension FeeFactorsPatterns on FeeFactors { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _FeeFactors value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _FeeFactors() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _FeeFactors value) $default,){ +final _that = this; +switch (_that) { +case _FeeFactors(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _FeeFactors value)? $default,){ +final _that = this; +switch (_that) { +case _FeeFactors() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int storageFeeFactor, int gasFeeFactor)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _FeeFactors() when $default != null: +return $default(_that.storageFeeFactor,_that.gasFeeFactor);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int storageFeeFactor, int gasFeeFactor) $default,) {final _that = this; +switch (_that) { +case _FeeFactors(): +return $default(_that.storageFeeFactor,_that.gasFeeFactor);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int storageFeeFactor, int gasFeeFactor)? $default,) {final _that = this; +switch (_that) { +case _FeeFactors() when $default != null: +return $default(_that.storageFeeFactor,_that.gasFeeFactor);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _FeeFactors implements FeeFactors { - const _FeeFactors( - {required this.storageFeeFactor, required this.gasFeeFactor}); - factory _FeeFactors.fromJson(Map json) => - _$FeeFactorsFromJson(json); - - @override - final int storageFeeFactor; - @override - final int gasFeeFactor; - - /// Create a copy of FeeFactors - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$FeeFactorsCopyWith<_FeeFactors> get copyWith => - __$FeeFactorsCopyWithImpl<_FeeFactors>(this, _$identity); - - @override - Map toJson() { - return _$FeeFactorsToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _FeeFactors && - (identical(other.storageFeeFactor, storageFeeFactor) || - other.storageFeeFactor == storageFeeFactor) && - (identical(other.gasFeeFactor, gasFeeFactor) || - other.gasFeeFactor == gasFeeFactor)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, storageFeeFactor, gasFeeFactor); - - @override - String toString() { - return 'FeeFactors(storageFeeFactor: $storageFeeFactor, gasFeeFactor: $gasFeeFactor)'; - } + const _FeeFactors({required this.storageFeeFactor, required this.gasFeeFactor}); + factory _FeeFactors.fromJson(Map json) => _$FeeFactorsFromJson(json); + +@override final int storageFeeFactor; +@override final int gasFeeFactor; + +/// Create a copy of FeeFactors +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$FeeFactorsCopyWith<_FeeFactors> get copyWith => __$FeeFactorsCopyWithImpl<_FeeFactors>(this, _$identity); + +@override +Map toJson() { + return _$FeeFactorsToJson(this, ); } -/// @nodoc -abstract mixin class _$FeeFactorsCopyWith<$Res> - implements $FeeFactorsCopyWith<$Res> { - factory _$FeeFactorsCopyWith( - _FeeFactors value, $Res Function(_FeeFactors) _then) = - __$FeeFactorsCopyWithImpl; - @override - @useResult - $Res call({int storageFeeFactor, int gasFeeFactor}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _FeeFactors&&(identical(other.storageFeeFactor, storageFeeFactor) || other.storageFeeFactor == storageFeeFactor)&&(identical(other.gasFeeFactor, gasFeeFactor) || other.gasFeeFactor == gasFeeFactor)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,storageFeeFactor,gasFeeFactor); + +@override +String toString() { + return 'FeeFactors(storageFeeFactor: $storageFeeFactor, gasFeeFactor: $gasFeeFactor)'; +} + + } /// @nodoc -class __$FeeFactorsCopyWithImpl<$Res> implements _$FeeFactorsCopyWith<$Res> { +abstract mixin class _$FeeFactorsCopyWith<$Res> implements $FeeFactorsCopyWith<$Res> { + factory _$FeeFactorsCopyWith(_FeeFactors value, $Res Function(_FeeFactors) _then) = __$FeeFactorsCopyWithImpl; +@override @useResult +$Res call({ + int storageFeeFactor, int gasFeeFactor +}); + + + + +} +/// @nodoc +class __$FeeFactorsCopyWithImpl<$Res> + implements _$FeeFactorsCopyWith<$Res> { __$FeeFactorsCopyWithImpl(this._self, this._then); final _FeeFactors _self; final $Res Function(_FeeFactors) _then; - /// Create a copy of FeeFactors - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? storageFeeFactor = null, - Object? gasFeeFactor = null, - }) { - return _then(_FeeFactors( - storageFeeFactor: null == storageFeeFactor - ? _self.storageFeeFactor - : storageFeeFactor // ignore: cast_nullable_to_non_nullable - as int, - gasFeeFactor: null == gasFeeFactor - ? _self.gasFeeFactor - : gasFeeFactor // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of FeeFactors +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? storageFeeFactor = null,Object? gasFeeFactor = null,}) { + return _then(_FeeFactors( +storageFeeFactor: null == storageFeeFactor ? _self.storageFeeFactor : storageFeeFactor // ignore: cast_nullable_to_non_nullable +as int,gasFeeFactor: null == gasFeeFactor ? _self.gasFeeFactor : gasFeeFactor // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/fee_factors.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/fee_factors.g.dart index 1d04e16c..434e0f60 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/fee_factors.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/fee_factors.g.dart @@ -7,9 +7,9 @@ part of 'fee_factors.dart'; // ************************************************************************** _FeeFactors _$FeeFactorsFromJson(Map json) => _FeeFactors( - storageFeeFactor: (json['storageFeeFactor'] as num).toInt(), - gasFeeFactor: (json['gasFeeFactor'] as num).toInt(), - ); + storageFeeFactor: (json['storageFeeFactor'] as num).toInt(), + gasFeeFactor: (json['gasFeeFactor'] as num).toInt(), +); Map _$FeeFactorsToJson(_FeeFactors instance) => { diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error.freezed.dart index dd415fe4..db2cefee 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,48 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TxTreeSimulationError { - TxTreeSimulationErrorType get type; - num? get code; - /// Create a copy of TxTreeSimulationError - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TxTreeSimulationErrorCopyWith get copyWith => - _$TxTreeSimulationErrorCopyWithImpl( - this as TxTreeSimulationError, _$identity); + TxTreeSimulationErrorType get type; num? get code; +/// Create a copy of TxTreeSimulationError +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TxTreeSimulationErrorCopyWith get copyWith => _$TxTreeSimulationErrorCopyWithImpl(this as TxTreeSimulationError, _$identity); /// Serializes this TxTreeSimulationError to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TxTreeSimulationError && - (identical(other.type, type) || other.type == type) && - (identical(other.code, code) || other.code == code)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, type, code); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TxTreeSimulationError&&(identical(other.type, type) || other.type == type)&&(identical(other.code, code) || other.code == code)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,type,code); - @override - String toString() { - return 'TxTreeSimulationError(type: $type, code: $code)'; - } +@override +String toString() { + return 'TxTreeSimulationError(type: $type, code: $code)'; } -/// @nodoc -abstract mixin class $TxTreeSimulationErrorCopyWith<$Res> { - factory $TxTreeSimulationErrorCopyWith(TxTreeSimulationError value, - $Res Function(TxTreeSimulationError) _then) = - _$TxTreeSimulationErrorCopyWithImpl; - @useResult - $Res call({TxTreeSimulationErrorType type, num? code}); + } +/// @nodoc +abstract mixin class $TxTreeSimulationErrorCopyWith<$Res> { + factory $TxTreeSimulationErrorCopyWith(TxTreeSimulationError value, $Res Function(TxTreeSimulationError) _then) = _$TxTreeSimulationErrorCopyWithImpl; +@useResult +$Res call({ + TxTreeSimulationErrorType type, num? code +}); + + + + +} /// @nodoc class _$TxTreeSimulationErrorCopyWithImpl<$Res> implements $TxTreeSimulationErrorCopyWith<$Res> { @@ -65,85 +63,193 @@ class _$TxTreeSimulationErrorCopyWithImpl<$Res> final TxTreeSimulationError _self; final $Res Function(TxTreeSimulationError) _then; - /// Create a copy of TxTreeSimulationError - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? type = null, - Object? code = freezed, - }) { - return _then(_self.copyWith( - type: null == type - ? _self.type - : type // ignore: cast_nullable_to_non_nullable - as TxTreeSimulationErrorType, - code: freezed == code - ? _self.code - : code // ignore: cast_nullable_to_non_nullable - as num?, - )); - } +/// Create a copy of TxTreeSimulationError +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? type = null,Object? code = freezed,}) { + return _then(_self.copyWith( +type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable +as TxTreeSimulationErrorType,code: freezed == code ? _self.code : code // ignore: cast_nullable_to_non_nullable +as num?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [TxTreeSimulationError]. +extension TxTreeSimulationErrorPatterns on TxTreeSimulationError { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TxTreeSimulationError value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TxTreeSimulationError() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TxTreeSimulationError value) $default,){ +final _that = this; +switch (_that) { +case _TxTreeSimulationError(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TxTreeSimulationError value)? $default,){ +final _that = this; +switch (_that) { +case _TxTreeSimulationError() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( TxTreeSimulationErrorType type, num? code)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TxTreeSimulationError() when $default != null: +return $default(_that.type,_that.code);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( TxTreeSimulationErrorType type, num? code) $default,) {final _that = this; +switch (_that) { +case _TxTreeSimulationError(): +return $default(_that.type,_that.code);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( TxTreeSimulationErrorType type, num? code)? $default,) {final _that = this; +switch (_that) { +case _TxTreeSimulationError() when $default != null: +return $default(_that.type,_that.code);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _TxTreeSimulationError extends TxTreeSimulationError { - const _TxTreeSimulationError({required this.type, this.code}) : super._(); - factory _TxTreeSimulationError.fromJson(Map json) => - _$TxTreeSimulationErrorFromJson(json); - - @override - final TxTreeSimulationErrorType type; - @override - final num? code; - - /// Create a copy of TxTreeSimulationError - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TxTreeSimulationErrorCopyWith<_TxTreeSimulationError> get copyWith => - __$TxTreeSimulationErrorCopyWithImpl<_TxTreeSimulationError>( - this, _$identity); - - @override - Map toJson() { - return _$TxTreeSimulationErrorToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TxTreeSimulationError && - (identical(other.type, type) || other.type == type) && - (identical(other.code, code) || other.code == code)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, type, code); - - @override - String toString() { - return 'TxTreeSimulationError(type: $type, code: $code)'; - } + const _TxTreeSimulationError({required this.type, this.code}): super._(); + factory _TxTreeSimulationError.fromJson(Map json) => _$TxTreeSimulationErrorFromJson(json); + +@override final TxTreeSimulationErrorType type; +@override final num? code; + +/// Create a copy of TxTreeSimulationError +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TxTreeSimulationErrorCopyWith<_TxTreeSimulationError> get copyWith => __$TxTreeSimulationErrorCopyWithImpl<_TxTreeSimulationError>(this, _$identity); + +@override +Map toJson() { + return _$TxTreeSimulationErrorToJson(this, ); } -/// @nodoc -abstract mixin class _$TxTreeSimulationErrorCopyWith<$Res> - implements $TxTreeSimulationErrorCopyWith<$Res> { - factory _$TxTreeSimulationErrorCopyWith(_TxTreeSimulationError value, - $Res Function(_TxTreeSimulationError) _then) = - __$TxTreeSimulationErrorCopyWithImpl; - @override - @useResult - $Res call({TxTreeSimulationErrorType type, num? code}); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TxTreeSimulationError&&(identical(other.type, type) || other.type == type)&&(identical(other.code, code) || other.code == code)); } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,type,code); + +@override +String toString() { + return 'TxTreeSimulationError(type: $type, code: $code)'; +} + + +} + +/// @nodoc +abstract mixin class _$TxTreeSimulationErrorCopyWith<$Res> implements $TxTreeSimulationErrorCopyWith<$Res> { + factory _$TxTreeSimulationErrorCopyWith(_TxTreeSimulationError value, $Res Function(_TxTreeSimulationError) _then) = __$TxTreeSimulationErrorCopyWithImpl; +@override @useResult +$Res call({ + TxTreeSimulationErrorType type, num? code +}); + + + + +} /// @nodoc class __$TxTreeSimulationErrorCopyWithImpl<$Res> implements _$TxTreeSimulationErrorCopyWith<$Res> { @@ -152,25 +258,17 @@ class __$TxTreeSimulationErrorCopyWithImpl<$Res> final _TxTreeSimulationError _self; final $Res Function(_TxTreeSimulationError) _then; - /// Create a copy of TxTreeSimulationError - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? type = null, - Object? code = freezed, - }) { - return _then(_TxTreeSimulationError( - type: null == type - ? _self.type - : type // ignore: cast_nullable_to_non_nullable - as TxTreeSimulationErrorType, - code: freezed == code - ? _self.code - : code // ignore: cast_nullable_to_non_nullable - as num?, - )); - } +/// Create a copy of TxTreeSimulationError +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? type = null,Object? code = freezed,}) { + return _then(_TxTreeSimulationError( +type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable +as TxTreeSimulationErrorType,code: freezed == code ? _self.code : code // ignore: cast_nullable_to_non_nullable +as num?, + )); +} + + } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error.g.dart index 109aaf10..232ebff1 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error.g.dart @@ -7,18 +7,18 @@ part of 'tx_tree_simulation_error.dart'; // ************************************************************************** _TxTreeSimulationError _$TxTreeSimulationErrorFromJson( - Map json) => - _TxTreeSimulationError( - type: $enumDecode(_$TxTreeSimulationErrorTypeEnumMap, json['type']), - code: json['code'] as num?, - ); + Map json, +) => _TxTreeSimulationError( + type: $enumDecode(_$TxTreeSimulationErrorTypeEnumMap, json['type']), + code: json['code'] as num?, +); Map _$TxTreeSimulationErrorToJson( - _TxTreeSimulationError instance) => - { - 'type': _$TxTreeSimulationErrorTypeEnumMap[instance.type]!, - 'code': instance.code, - }; + _TxTreeSimulationError instance, +) => { + 'type': _$TxTreeSimulationErrorTypeEnumMap[instance.type]!, + 'code': instance.code, +}; const _$TxTreeSimulationErrorTypeEnumMap = { TxTreeSimulationErrorType.computePhase: 'compute_phase', diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error_item.freezed.dart b/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error_item.freezed.dart index 22a627c1..137594d4 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error_item.freezed.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error_item.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,51 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$TxTreeSimulationErrorItem { - Address get address; - TxTreeSimulationError get error; - /// Create a copy of TxTreeSimulationErrorItem - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TxTreeSimulationErrorItemCopyWith get copyWith => - _$TxTreeSimulationErrorItemCopyWithImpl( - this as TxTreeSimulationErrorItem, _$identity); + Address get address; TxTreeSimulationError get error; +/// Create a copy of TxTreeSimulationErrorItem +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TxTreeSimulationErrorItemCopyWith get copyWith => _$TxTreeSimulationErrorItemCopyWithImpl(this as TxTreeSimulationErrorItem, _$identity); /// Serializes this TxTreeSimulationErrorItem to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TxTreeSimulationErrorItem && - (identical(other.address, address) || other.address == address) && - (identical(other.error, error) || other.error == error)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, address, error); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TxTreeSimulationErrorItem&&(identical(other.address, address) || other.address == address)&&(identical(other.error, error) || other.error == error)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,address,error); - @override - String toString() { - return 'TxTreeSimulationErrorItem(address: $address, error: $error)'; - } +@override +String toString() { + return 'TxTreeSimulationErrorItem(address: $address, error: $error)'; } -/// @nodoc -abstract mixin class $TxTreeSimulationErrorItemCopyWith<$Res> { - factory $TxTreeSimulationErrorItemCopyWith(TxTreeSimulationErrorItem value, - $Res Function(TxTreeSimulationErrorItem) _then) = - _$TxTreeSimulationErrorItemCopyWithImpl; - @useResult - $Res call({Address address, TxTreeSimulationError error}); - $AddressCopyWith<$Res> get address; - $TxTreeSimulationErrorCopyWith<$Res> get error; } +/// @nodoc +abstract mixin class $TxTreeSimulationErrorItemCopyWith<$Res> { + factory $TxTreeSimulationErrorItemCopyWith(TxTreeSimulationErrorItem value, $Res Function(TxTreeSimulationErrorItem) _then) = _$TxTreeSimulationErrorItemCopyWithImpl; +@useResult +$Res call({ + Address address, TxTreeSimulationError error +}); + + +$AddressCopyWith<$Res> get address;$TxTreeSimulationErrorCopyWith<$Res> get error; + +} /// @nodoc class _$TxTreeSimulationErrorItemCopyWithImpl<$Res> implements $TxTreeSimulationErrorItemCopyWith<$Res> { @@ -68,112 +63,211 @@ class _$TxTreeSimulationErrorItemCopyWithImpl<$Res> final TxTreeSimulationErrorItem _self; final $Res Function(TxTreeSimulationErrorItem) _then; - /// Create a copy of TxTreeSimulationErrorItem - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? address = null, - Object? error = null, - }) { - return _then(_self.copyWith( - address: null == address - ? _self.address - : address // ignore: cast_nullable_to_non_nullable - as Address, - error: null == error - ? _self.error - : error // ignore: cast_nullable_to_non_nullable - as TxTreeSimulationError, - )); - } - - /// Create a copy of TxTreeSimulationErrorItem - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get address { - return $AddressCopyWith<$Res>(_self.address, (value) { - return _then(_self.copyWith(address: value)); - }); - } - - /// Create a copy of TxTreeSimulationErrorItem - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TxTreeSimulationErrorCopyWith<$Res> get error { - return $TxTreeSimulationErrorCopyWith<$Res>(_self.error, (value) { - return _then(_self.copyWith(error: value)); - }); - } +/// Create a copy of TxTreeSimulationErrorItem +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? address = null,Object? error = null,}) { + return _then(_self.copyWith( +address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as Address,error: null == error ? _self.error : error // ignore: cast_nullable_to_non_nullable +as TxTreeSimulationError, + )); +} +/// Create a copy of TxTreeSimulationErrorItem +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get address { + + return $AddressCopyWith<$Res>(_self.address, (value) { + return _then(_self.copyWith(address: value)); + }); +}/// Create a copy of TxTreeSimulationErrorItem +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TxTreeSimulationErrorCopyWith<$Res> get error { + + return $TxTreeSimulationErrorCopyWith<$Res>(_self.error, (value) { + return _then(_self.copyWith(error: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [TxTreeSimulationErrorItem]. +extension TxTreeSimulationErrorItemPatterns on TxTreeSimulationErrorItem { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TxTreeSimulationErrorItem value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TxTreeSimulationErrorItem() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TxTreeSimulationErrorItem value) $default,){ +final _that = this; +switch (_that) { +case _TxTreeSimulationErrorItem(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TxTreeSimulationErrorItem value)? $default,){ +final _that = this; +switch (_that) { +case _TxTreeSimulationErrorItem() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Address address, TxTreeSimulationError error)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TxTreeSimulationErrorItem() when $default != null: +return $default(_that.address,_that.error);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Address address, TxTreeSimulationError error) $default,) {final _that = this; +switch (_that) { +case _TxTreeSimulationErrorItem(): +return $default(_that.address,_that.error);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Address address, TxTreeSimulationError error)? $default,) {final _that = this; +switch (_that) { +case _TxTreeSimulationErrorItem() when $default != null: +return $default(_that.address,_that.error);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _TxTreeSimulationErrorItem extends TxTreeSimulationErrorItem { - const _TxTreeSimulationErrorItem({required this.address, required this.error}) - : super._(); - factory _TxTreeSimulationErrorItem.fromJson(Map json) => - _$TxTreeSimulationErrorItemFromJson(json); - - @override - final Address address; - @override - final TxTreeSimulationError error; - - /// Create a copy of TxTreeSimulationErrorItem - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TxTreeSimulationErrorItemCopyWith<_TxTreeSimulationErrorItem> - get copyWith => - __$TxTreeSimulationErrorItemCopyWithImpl<_TxTreeSimulationErrorItem>( - this, _$identity); - - @override - Map toJson() { - return _$TxTreeSimulationErrorItemToJson( - this, - ); - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TxTreeSimulationErrorItem && - (identical(other.address, address) || other.address == address) && - (identical(other.error, error) || other.error == error)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, address, error); - - @override - String toString() { - return 'TxTreeSimulationErrorItem(address: $address, error: $error)'; - } + const _TxTreeSimulationErrorItem({required this.address, required this.error}): super._(); + factory _TxTreeSimulationErrorItem.fromJson(Map json) => _$TxTreeSimulationErrorItemFromJson(json); + +@override final Address address; +@override final TxTreeSimulationError error; + +/// Create a copy of TxTreeSimulationErrorItem +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TxTreeSimulationErrorItemCopyWith<_TxTreeSimulationErrorItem> get copyWith => __$TxTreeSimulationErrorItemCopyWithImpl<_TxTreeSimulationErrorItem>(this, _$identity); + +@override +Map toJson() { + return _$TxTreeSimulationErrorItemToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TxTreeSimulationErrorItem&&(identical(other.address, address) || other.address == address)&&(identical(other.error, error) || other.error == error)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,address,error); + +@override +String toString() { + return 'TxTreeSimulationErrorItem(address: $address, error: $error)'; } -/// @nodoc -abstract mixin class _$TxTreeSimulationErrorItemCopyWith<$Res> - implements $TxTreeSimulationErrorItemCopyWith<$Res> { - factory _$TxTreeSimulationErrorItemCopyWith(_TxTreeSimulationErrorItem value, - $Res Function(_TxTreeSimulationErrorItem) _then) = - __$TxTreeSimulationErrorItemCopyWithImpl; - @override - @useResult - $Res call({Address address, TxTreeSimulationError error}); - @override - $AddressCopyWith<$Res> get address; - @override - $TxTreeSimulationErrorCopyWith<$Res> get error; } +/// @nodoc +abstract mixin class _$TxTreeSimulationErrorItemCopyWith<$Res> implements $TxTreeSimulationErrorItemCopyWith<$Res> { + factory _$TxTreeSimulationErrorItemCopyWith(_TxTreeSimulationErrorItem value, $Res Function(_TxTreeSimulationErrorItem) _then) = __$TxTreeSimulationErrorItemCopyWithImpl; +@override @useResult +$Res call({ + Address address, TxTreeSimulationError error +}); + + +@override $AddressCopyWith<$Res> get address;@override $TxTreeSimulationErrorCopyWith<$Res> get error; + +} /// @nodoc class __$TxTreeSimulationErrorItemCopyWithImpl<$Res> implements _$TxTreeSimulationErrorItemCopyWith<$Res> { @@ -182,45 +276,35 @@ class __$TxTreeSimulationErrorItemCopyWithImpl<$Res> final _TxTreeSimulationErrorItem _self; final $Res Function(_TxTreeSimulationErrorItem) _then; - /// Create a copy of TxTreeSimulationErrorItem - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? address = null, - Object? error = null, - }) { - return _then(_TxTreeSimulationErrorItem( - address: null == address - ? _self.address - : address // ignore: cast_nullable_to_non_nullable - as Address, - error: null == error - ? _self.error - : error // ignore: cast_nullable_to_non_nullable - as TxTreeSimulationError, - )); - } - - /// Create a copy of TxTreeSimulationErrorItem - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AddressCopyWith<$Res> get address { - return $AddressCopyWith<$Res>(_self.address, (value) { - return _then(_self.copyWith(address: value)); - }); - } - - /// Create a copy of TxTreeSimulationErrorItem - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TxTreeSimulationErrorCopyWith<$Res> get error { - return $TxTreeSimulationErrorCopyWith<$Res>(_self.error, (value) { - return _then(_self.copyWith(error: value)); - }); - } +/// Create a copy of TxTreeSimulationErrorItem +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? address = null,Object? error = null,}) { + return _then(_TxTreeSimulationErrorItem( +address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as Address,error: null == error ? _self.error : error // ignore: cast_nullable_to_non_nullable +as TxTreeSimulationError, + )); +} + +/// Create a copy of TxTreeSimulationErrorItem +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res> get address { + + return $AddressCopyWith<$Res>(_self.address, (value) { + return _then(_self.copyWith(address: value)); + }); +}/// Create a copy of TxTreeSimulationErrorItem +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TxTreeSimulationErrorCopyWith<$Res> get error { + + return $TxTreeSimulationErrorCopyWith<$Res>(_self.error, (value) { + return _then(_self.copyWith(error: value)); + }); +} } // dart format on diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error_item.g.dart b/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error_item.g.dart index 1ea5604f..d07b52fd 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error_item.g.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/transport/models/tx_tree_simulation_error_item.g.dart @@ -7,16 +7,15 @@ part of 'tx_tree_simulation_error_item.dart'; // ************************************************************************** _TxTreeSimulationErrorItem _$TxTreeSimulationErrorItemFromJson( - Map json) => - _TxTreeSimulationErrorItem( - address: Address.fromJson(json['address'] as String), - error: - TxTreeSimulationError.fromJson(json['error'] as Map), - ); + Map json, +) => _TxTreeSimulationErrorItem( + address: Address.fromJson(json['address'] as String), + error: TxTreeSimulationError.fromJson(json['error'] as Map), +); Map _$TxTreeSimulationErrorItemToJson( - _TxTreeSimulationErrorItem instance) => - { - 'address': instance.address.toJson(), - 'error': instance.error.toJson(), - }; + _TxTreeSimulationErrorItem instance, +) => { + 'address': instance.address.toJson(), + 'error': instance.error.toJson(), +}; diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/transport/proto_transport.dart b/packages/flutter_nekoton_bridge/lib/nekoton/transport/proto_transport.dart index 2a2de0c5..33c514b8 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/transport/proto_transport.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/transport/proto_transport.dart @@ -27,18 +27,19 @@ class ProtoTransport extends Transport { instance.networkId = await instance.getNetworkId(); - instance.connectionParamsHash = - getHash('proto:${protoConnection.settings.endpoint}'); + instance.connectionParamsHash = getHash( + 'proto:${protoConnection.settings.endpoint}', + ); return instance; } @override Future dispose() => mutex.protectWrite(() async { - transport.innerTransport.dispose(); - protoConnection.dispose(); - _disposed = true; - }); + transport.innerTransport.dispose(); + protoConnection.dispose(); + _disposed = true; + }); @override Future getAccountsByCodeHash({ @@ -176,14 +177,17 @@ class ProtoTransport extends Transport { return mutex.protectRead(() async { final encoded = await transport.simulateTransactionTree( - signedMessage: jsonEncode(signedMessage), - ignoredComputePhaseCodes: ignoredComputePhaseCodes, - ignoredActionPhaseCodes: ignoredActionPhaseCodes); + signedMessage: jsonEncode(signedMessage), + ignoredComputePhaseCodes: ignoredComputePhaseCodes, + ignoredActionPhaseCodes: ignoredActionPhaseCodes, + ); final decoded = jsonDecode(encoded) as List; return decoded - .map((e) => - TxTreeSimulationErrorItem.fromJson(e as Map)) + .map( + (e) => + TxTreeSimulationErrorItem.fromJson(e as Map), + ) .toList(); }); } diff --git a/packages/flutter_nekoton_bridge/lib/nekoton/utils.dart b/packages/flutter_nekoton_bridge/lib/nekoton/utils.dart index 9f209efb..eb3bec99 100644 --- a/packages/flutter_nekoton_bridge/lib/nekoton/utils.dart +++ b/packages/flutter_nekoton_bridge/lib/nekoton/utils.dart @@ -20,11 +20,11 @@ class _DateTimeJsonConverter extends JsonConverter { /// Get name of KeySigner, same as in rust side extension KeySignerName on lib.KeySigner { String get name => switch (this) { - lib.KeySigner_Encrypted() => 'EncryptedKeySigner', - lib.KeySigner_Derived() => 'DerivedKeySigner', - lib.KeySigner_Ledger() => 'LedgerKeySigner', - _ => '', - }; + lib.KeySigner_Encrypted() => 'EncryptedKeySigner', + lib.KeySigner_Derived() => 'DerivedKeySigner', + lib.KeySigner_Ledger() => 'LedgerKeySigner', + _ => '', + }; } /// Get hash of String diff --git a/packages/flutter_nekoton_bridge/lib/rust_to_dart/reflector.dart b/packages/flutter_nekoton_bridge/lib/rust_to_dart/reflector.dart deleted file mode 100644 index 3374717a..00000000 --- a/packages/flutter_nekoton_bridge/lib/rust_to_dart/reflector.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:reflectable/reflectable.dart'; - -/// Annotate with this class to enable reflection. -class Reflector extends Reflectable { - const Reflector() - : super(invokingCapability); // Request the capability to invoke methods. -} - -/// Use this as annotation for your class to generate reflectable interface. -/// Example: -/// ``` -/// @reflector -/// class MyClass {} -/// ``` -const reflector = Reflector(); diff --git a/packages/flutter_nekoton_bridge/lib/rust_to_dart/rust_to_dart_caller.dart b/packages/flutter_nekoton_bridge/lib/rust_to_dart/rust_to_dart_caller.dart deleted file mode 100644 index 811dd2d4..00000000 --- a/packages/flutter_nekoton_bridge/lib/rust_to_dart/rust_to_dart_caller.dart +++ /dev/null @@ -1,95 +0,0 @@ -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:reflectable/reflectable.dart'; -import 'package:uuid/uuid.dart'; - -/// Class that is used to unify calls from rust to dart for any types and count of instances. -class RustToDartCaller { - static RustToDartCaller instance = RustToDartCaller._(); - - RustToDartCaller._(); - - /// Key - is unique hash that could be used to identify any object instance. - final instances = {}; - - Object? invoke( - String instanceHash, - String memberName, - List positionalArguments, [ - Map? namedArguments, - ]) { - if (instances[instanceHash] == null) { - throw Exception( - "Can't call $memberName() function because no any object is registered for $instanceHash", - ); - } - return instances[instanceHash]! - .init() - .invoke(memberName, positionalArguments, namedArguments); - } - - /// Register some class to be able to listen calls from rust - void registerInstance(RustToDartMirrorInterface instance) { - instances[instance.instanceHash] = instance; - } - - /// Unregister some class from listening calls from rust. - void unregisterInstance(RustToDartMirrorInterface instance) { - instances.remove(instance.instanceHash); - } - - /// Drop all registered instances, used only for tests. - @visibleForTesting - void reInitCaller() => instances.clear(); -} - -/// Used for mirror hash generating -const _uuid = Uuid(); - -/// Mirroring interface for classes that is used with [RustToDartCaller] to specify which instance -/// should invoke calls from rust by [instanceHash]. -abstract class RustToDartMirrorInterface { - /// [overrideInstanceHash] can be used in tests to set specified value. - RustToDartMirrorInterface([String? overrideInstanceHash]) - : instanceHash = overrideInstanceHash ?? _uuid.v4() { - RustToDartCaller.instance.registerInstance(this); - } - - final String instanceHash; - - InstanceMirror? _mirror; - - /// This is a helper field, that allows objects that can invoke Rust-Dart-Rust - /// calls to be disposed and avoid errors when rust object was disposed, but - /// RustToDartCaller called actions on dart object that then calls rust methods - /// on disposed objects. - /// - /// Typically, this mixin should be used on classes like TonWallet or - /// TokenWallet, because they have subscriptions from rust. - bool _disposed = false; - - /// If this flag is true, then all calls from dart to rust should be avoided. - /// Typically, this method should be used in methods like updateData that makes - /// calls to rust. - bool get avoidCall => _disposed; - - InstanceMirror init() { - return _mirror ??= initializeMirror(); - } - - /// Free memory from of class in caller - @mustCallSuper - void dispose() { - _disposed = true; - RustToDartCaller.instance.unregisterInstance(this); - } - - /// Initialize mirror instance inside of instance of any class. - /// Typical usage: - /// ``` - /// InstanceMirror initializeMirror() { - /// initializeReflectable(); // auto-generated reflectable file - /// return reflector.reflect(this); - /// } - ///```dart - InstanceMirror initializeMirror(); -} diff --git a/packages/flutter_nekoton_bridge/pubspec.yaml b/packages/flutter_nekoton_bridge/pubspec.yaml index fb17607c..d49e79c1 100644 --- a/packages/flutter_nekoton_bridge/pubspec.yaml +++ b/packages/flutter_nekoton_bridge/pubspec.yaml @@ -1,39 +1,37 @@ name: flutter_nekoton_bridge description: Flutter Nekoton bridge. -version: 3.6.0 +version: 4.0.0-dev.2 homepage: https://github.com/broxus/nekoton_bridge.git repository: https://github.com/broxus/nekoton_bridge.git +resolution: workspace environment: - sdk: '>=3.5.0 <4.0.0' - flutter: '>=3.24.0' + sdk: '>=3.9.0 <4.0.0' + flutter: '>=3.35.0' dependencies: flutter: sdk: flutter plugin_platform_interface: ^2.1.8 rxdart: ^0.28.0 - reflectable: ^4.0.10 - money2_fixer: ^3.0.0 - money2: ^5.4.0 - nekoton_bridge: ^3.6.0 - freezed_annotation: '>=3.0.0 <3.1.0' + money2: ^6.0.0 + nekoton_bridge: ^4.0.0-dev.2 + freezed_annotation: ^3.1.0 json_annotation: ^4.9.0 - # for generating mirror hash - uuid: ^4.5.1 crypto: ^3.0.6 mutex: ^3.1.0 + dev_dependencies: ffi: ^2.1.3 ffigen: ^19.0.0 flutter_test: sdk: flutter - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 integration_test: sdk: flutter mocktail: ^1.0.4 build_runner: ^2.4.13 - freezed: '>=3.0.0 <3.1.0' + freezed: ^3.1.0 json_serializable: ^6.9.0 # For information on the generic Dart part of this file, see the diff --git a/packages/flutter_nekoton_bridge/pubspec_overrides.yaml b/packages/flutter_nekoton_bridge/pubspec_overrides.yaml deleted file mode 100644 index c77891f8..00000000 --- a/packages/flutter_nekoton_bridge/pubspec_overrides.yaml +++ /dev/null @@ -1,3 +0,0 @@ -dependency_overrides: - nekoton_bridge: - path: ../nekoton_bridge diff --git a/packages/flutter_nekoton_bridge/test/money2_test.dart b/packages/flutter_nekoton_bridge/test/money2_test.dart deleted file mode 100644 index f95bea60..00000000 --- a/packages/flutter_nekoton_bridge/test/money2_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -import 'package:flutter_nekoton_bridge/flutter_nekoton_bridge.dart'; -import 'package:flutter_test/flutter_test.dart'; - -void main() { - test('test default currency formatting', () { - final everWithDefaultFormatting = - Currency.create('EVER', 9, symbol: 'EVER'); - expect( - MoneyFixer.parseWithCurrencyImproved('2.0', everWithDefaultFormatting) - .formatImproved(), - 'EVER2.00', - reason: 'Failed default formatting'); - }); - - test('test custom currency formatting', () { - final everWithDefaultFormatting = - Currency.create('EVER', 9, symbol: 'EVER', pattern: '0.000000000 S'); - expect( - MoneyFixer.parseWithCurrencyImproved('2.0', everWithDefaultFormatting) - .formatImproved(), - '2.000000000 EVER', - reason: 'Failed custom formatting'); - }); - - test('test custom currency formatting 2', () { - final everWithDefaultFormatting = - Currency.create('EVER', 9, symbol: 'EVER', pattern: '0.000000000 S'); - expect( - MoneyFixer.parseWithCurrencyImproved('2.01', everWithDefaultFormatting) - .formatImproved(), - '2.010000000 EVER', - reason: 'Failed custom formatting'); - }); - - test('test custom currency formatting 3 (trim zeros)', () { - final everWithDefaultFormatting = - Currency.create('EVER', 9, symbol: 'EVER', pattern: '0.######### S'); - expect( - MoneyFixer.parseWithCurrencyImproved('2.01', everWithDefaultFormatting) - .formatImproved(), - '2.01 EVER', - reason: 'Failed custom formatting'); - }); - - test('test custom explicit formatting', () { - final everWithDefaultFormatting = - Currency.create('EVER', 9, symbol: 'EVER', pattern: '0.######### S'); - expect( - MoneyFixer.parseWithCurrencyImproved('2.01', everWithDefaultFormatting) - .formatImproved(pattern: 'S 0.#########'), - 'EVER 2.01', - reason: 'Failed custom formatting'); - }); -} diff --git a/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/additional_assets_test.dart b/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/additional_assets_test.dart index bdbf2872..9b2f29bc 100644 --- a/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/additional_assets_test.dart +++ b/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/additional_assets_test.dart @@ -13,15 +13,9 @@ void main() { ]; const dePoolAssetList = [ - DePoolAsset( - address: Address(address: '9:pyTeANohiWvOLqsO'), - ), - DePoolAsset( - address: Address(address: '89:aQIekoZFCvYSeeaG'), - ), - DePoolAsset( - address: Address(address: '-45:JiSztqWPxAAuUMlh'), - ), + DePoolAsset(address: Address(address: '9:pyTeANohiWvOLqsO')), + DePoolAsset(address: Address(address: '89:aQIekoZFCvYSeeaG')), + DePoolAsset(address: Address(address: '-45:JiSztqWPxAAuUMlh')), ]; test('To JSON', () { @@ -33,13 +27,13 @@ void main() { expect(c.toJson(), { 'token_wallets': [ {'root_token_contract': '-5:LzHYUqLraWbOrZtw'}, - {'root_token_contract': '345:AzFuPzrUAqPCvNjV'} + {'root_token_contract': '345:AzFuPzrUAqPCvNjV'}, ], 'depools': [ {'address': '9:pyTeANohiWvOLqsO'}, {'address': '89:aQIekoZFCvYSeeaG'}, - {'address': '-45:JiSztqWPxAAuUMlh'} - ] + {'address': '-45:JiSztqWPxAAuUMlh'}, + ], }); }); @@ -53,13 +47,13 @@ void main() { AdditionalAssets.fromJson({ 'token_wallets': [ {'root_token_contract': '-5:LzHYUqLraWbOrZtw'}, - {'root_token_contract': '345:AzFuPzrUAqPCvNjV'} + {'root_token_contract': '345:AzFuPzrUAqPCvNjV'}, ], 'depools': [ {'address': '9:pyTeANohiWvOLqsO'}, {'address': '89:aQIekoZFCvYSeeaG'}, - {'address': '-45:JiSztqWPxAAuUMlh'} - ] + {'address': '-45:JiSztqWPxAAuUMlh'}, + ], }), c, ); diff --git a/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/assets_list_test.dart b/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/assets_list_test.dart index 7d5ef7da..10320180 100644 --- a/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/assets_list_test.dart +++ b/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/assets_list_test.dart @@ -13,15 +13,9 @@ void main() { ]; const dePoolAssetList0 = [ - DePoolAsset( - address: Address(address: '9:pyTeANohiWvOLqsO'), - ), - DePoolAsset( - address: Address(address: '89:aQIekoZFCvYSeeaG'), - ), - DePoolAsset( - address: Address(address: '-45:JiSztqWPxAAuUMlh'), - ), + DePoolAsset(address: Address(address: '9:pyTeANohiWvOLqsO')), + DePoolAsset(address: Address(address: '89:aQIekoZFCvYSeeaG')), + DePoolAsset(address: Address(address: '-45:JiSztqWPxAAuUMlh')), ]; const tokenWalletAssetList1 = [ @@ -34,15 +28,9 @@ void main() { ]; const dePoolAssetList1 = [ - DePoolAsset( - address: Address(address: '3:QJPealSOQrFpSaiZ'), - ), - DePoolAsset( - address: Address(address: '93:YRDoefjFTXNDGjWm'), - ), - DePoolAsset( - address: Address(address: '0:wkpUlpwfJCsBklVC'), - ), + DePoolAsset(address: Address(address: '3:QJPealSOQrFpSaiZ')), + DePoolAsset(address: Address(address: '93:YRDoefjFTXNDGjWm')), + DePoolAsset(address: Address(address: '0:wkpUlpwfJCsBklVC')), ]; const additionalAssetMap = { @@ -74,29 +62,29 @@ void main() { 'tonWallet': { 'address': '-433:gXCqcUblpodjtWig', 'publicKey': 'IQDMeSJFNvOXBmBq', - 'contract': {'type': 'everWallet'} + 'contract': {'type': 'everWallet'}, }, 'additionalAssets': { 'RlWnkY': { 'token_wallets': [ {'root_token_contract': '-5:LzHYUqLraWbOrZtw'}, - {'root_token_contract': '345:AzFuPzrUAqPCvNjV'} + {'root_token_contract': '345:AzFuPzrUAqPCvNjV'}, ], 'depools': [ {'address': '9:pyTeANohiWvOLqsO'}, {'address': '89:aQIekoZFCvYSeeaG'}, - {'address': '-45:JiSztqWPxAAuUMlh'} - ] + {'address': '-45:JiSztqWPxAAuUMlh'}, + ], }, 'BKgEid': { 'token_wallets': [ {'root_token_contract': '4:TNpfMkeFbdPkrxLp'}, - {'root_token_contract': '35:EkqWbxWeqcpSVnhW'} + {'root_token_contract': '35:EkqWbxWeqcpSVnhW'}, ], 'depools': [ {'address': '3:QJPealSOQrFpSaiZ'}, {'address': '93:YRDoefjFTXNDGjWm'}, - {'address': '0:wkpUlpwfJCsBklVC'} + {'address': '0:wkpUlpwfJCsBklVC'}, ], }, }, @@ -111,40 +99,38 @@ void main() { ); expect( - AssetsList.fromJson( - { - 'name': 'ZtnFdxRqdHLuYTmH', - 'tonWallet': { - 'address': '-433:gXCqcUblpodjtWig', - 'publicKey': 'IQDMeSJFNvOXBmBq', - 'contract': {'type': 'everWallet'} + AssetsList.fromJson({ + 'name': 'ZtnFdxRqdHLuYTmH', + 'tonWallet': { + 'address': '-433:gXCqcUblpodjtWig', + 'publicKey': 'IQDMeSJFNvOXBmBq', + 'contract': {'type': 'everWallet'}, + }, + 'additionalAssets': { + 'RlWnkY': { + 'token_wallets': [ + {'root_token_contract': '-5:LzHYUqLraWbOrZtw'}, + {'root_token_contract': '345:AzFuPzrUAqPCvNjV'}, + ], + 'depools': [ + {'address': '9:pyTeANohiWvOLqsO'}, + {'address': '89:aQIekoZFCvYSeeaG'}, + {'address': '-45:JiSztqWPxAAuUMlh'}, + ], }, - 'additionalAssets': { - 'RlWnkY': { - 'token_wallets': [ - {'root_token_contract': '-5:LzHYUqLraWbOrZtw'}, - {'root_token_contract': '345:AzFuPzrUAqPCvNjV'} - ], - 'depools': [ - {'address': '9:pyTeANohiWvOLqsO'}, - {'address': '89:aQIekoZFCvYSeeaG'}, - {'address': '-45:JiSztqWPxAAuUMlh'} - ] - }, - 'BKgEid': { - 'token_wallets': [ - {'root_token_contract': '4:TNpfMkeFbdPkrxLp'}, - {'root_token_contract': '35:EkqWbxWeqcpSVnhW'} - ], - 'depools': [ - {'address': '3:QJPealSOQrFpSaiZ'}, - {'address': '93:YRDoefjFTXNDGjWm'}, - {'address': '0:wkpUlpwfJCsBklVC'} - ], - }, + 'BKgEid': { + 'token_wallets': [ + {'root_token_contract': '4:TNpfMkeFbdPkrxLp'}, + {'root_token_contract': '35:EkqWbxWeqcpSVnhW'}, + ], + 'depools': [ + {'address': '3:QJPealSOQrFpSaiZ'}, + {'address': '93:YRDoefjFTXNDGjWm'}, + {'address': '0:wkpUlpwfJCsBklVC'}, + ], }, }, - ), + }), c, ); }); diff --git a/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/depool_asset.dart_test.dart b/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/depool_asset.dart_test.dart index aaa76865..6f2d0d2b 100644 --- a/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/depool_asset.dart_test.dart +++ b/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/depool_asset.dart_test.dart @@ -6,26 +6,15 @@ void main() { const address = Address(address: '-42:CbxctPqURTNR'); test('To JSON', () { - const c = DePoolAsset( - address: address, - ); + const c = DePoolAsset(address: address); - expect(c.toJson(), { - 'address': address.address, - }); + expect(c.toJson(), {'address': address.address}); }); test('From JSON', () { - const c = DePoolAsset( - address: address, - ); + const c = DePoolAsset(address: address); - expect( - DePoolAsset.fromJson({ - 'address': address.address, - }), - c, - ); + expect(DePoolAsset.fromJson({'address': address.address}), c); }); }); } diff --git a/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/wallet_type_test.dart b/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/wallet_type_test.dart index a91e7844..13a70a68 100644 --- a/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/wallet_type_test.dart +++ b/packages/flutter_nekoton_bridge/test/nekoton/core/accounts_storage/models/wallet_type_test.dart @@ -12,18 +12,11 @@ void main() { const WalletType.multisig(MultisigType.safeMultisigWallet24h).toJson(), {'data': 'SafeMultisigWallet24h', 'type': 'multisig'}, ); - expect( - const WalletType.walletV3().toJson(), - {'type': 'walletV3'}, - ); - expect( - const WalletType.highloadWalletV2().toJson(), - {'type': 'highloadWalletV2'}, - ); - expect( - const WalletType.everWallet().toJson(), - {'type': 'everWallet'}, - ); + expect(const WalletType.walletV3().toJson(), {'type': 'walletV3'}); + expect(const WalletType.highloadWalletV2().toJson(), { + 'type': 'highloadWalletV2', + }); + expect(const WalletType.everWallet().toJson(), {'type': 'everWallet'}); }); test('From JSON', () { @@ -32,8 +25,10 @@ void main() { const WalletType.multisig(MultisigType.safeMultisigWallet), ); expect( - WalletType.fromJson( - {'data': 'SafeMultisigWallet24h', 'type': 'multisig'}), + WalletType.fromJson({ + 'data': 'SafeMultisigWallet24h', + 'type': 'multisig', + }), const WalletType.multisig(MultisigType.safeMultisigWallet24h), ); expect( diff --git a/packages/flutter_nekoton_bridge/test/nekoton/core/models/public_key_test.dart b/packages/flutter_nekoton_bridge/test/nekoton/core/models/public_key_test.dart index 5572a808..c41d504d 100644 --- a/packages/flutter_nekoton_bridge/test/nekoton/core/models/public_key_test.dart +++ b/packages/flutter_nekoton_bridge/test/nekoton/core/models/public_key_test.dart @@ -17,10 +17,7 @@ void main() { }); test('operator ==', () { - expect( - const PublicKey(publicKey: a1), - const PublicKey(publicKey: a1), - ); + expect(const PublicKey(publicKey: a1), const PublicKey(publicKey: a1)); expect( const PublicKey(publicKey: a1), isNot(const PublicKey(publicKey: a2)), diff --git a/packages/nekoton_bridge/CHANGELOG.md b/packages/nekoton_bridge/CHANGELOG.md index ecf7d6a1..f8fa9b62 100644 --- a/packages/nekoton_bridge/CHANGELOG.md +++ b/packages/nekoton_bridge/CHANGELOG.md @@ -1,3 +1,20 @@ +## 4.0.0-dev.2 + + - **FEAT**: add support for libraries in local execution and getter functions. + - **FEAT**: add `remainingGasTo` parameter to `prepareTransfer` method in `TokenWallet`. + - **FEAT**: add WalletV5R1 specific methods. + +## 4.0.0-dev.1 + +> Note: This release has breaking changes. + + - **BREAKING** **CHORE**: sdk >=3.9.0; flutter >=3.35.0. + +## 4.0.0-dev.0 + +> Note: This release has breaking changes. + + - **BREAKING** **CHORE**: remove `reflectable`. ([30e7a3d3](https://github.com/broxus/nekoton_bridge/commit/30e7a3d3885096004327fa1ddb9ee67eb2c298ef)) ## 3.6.0 - **FEAT**: add support for libraries in local execution and getter functions. ([79f1f4c2](https://github.com/broxus/nekoton_bridge/commit/79f1f4c2a26a5e70f21122c5d197c030be974870)) diff --git a/packages/nekoton_bridge/bin/merger.dart b/packages/nekoton_bridge/bin/merger.dart index 67991b70..8bf869b9 100644 --- a/packages/nekoton_bridge/bin/merger.dart +++ b/packages/nekoton_bridge/bin/merger.dart @@ -10,8 +10,9 @@ final importsReg = RegExp('.*use (?:.*?|\n)*?;'); final cratesInSingleLineSpaceReg = RegExp(r', \w+::'); /// RegExp to parse all sub modules and direct imports from brackets { .. } -final subCratesParserReg = - RegExp(r'((\w+::)+({.+}|\w+(,|)))|(\w+( \w+)*[^\w+::\w+])'); +final subCratesParserReg = RegExp( + r'((\w+::)+({.+}|\w+(,|)))|(\w+( \w+)*[^\w+::\w+])', +); /// This runs automatically in the beginning of build.rs script /// [Directory.current] must be /nekoton_bridge/rust @@ -32,7 +33,9 @@ void main() async { final content = entry.readAsStringSync(); /// Collect structure of imports - importsReg.allMatches(content).forEach( + importsReg + .allMatches(content) + .forEach( (importMatch) => parseSingleImport( content.substring(importMatch.start, importMatch.end), crates, @@ -50,13 +53,11 @@ void main() async { .replaceAll('\n\n', '\n'); final srcPath = RegExp('src.*').firstMatch(entry.path); - contentBuffer.write( - ''' + contentBuffer.write(''' ///---------------------------- /// CONTENT OF ${entry.path.substring(srcPath!.start, srcPath.end)} ///----------------------------\n -''', - ); +'''); contentBuffer.write('$pureContent\n'); } } @@ -82,8 +83,12 @@ void main() async { /// `pub use crate::nekoton_wrapper::{MnemonicType, dict}; void parseSingleImport(String importFull, Map crates) { final importStr = importFull.replaceAll(RegExp('.*use '), ''); - parseImports(importStr, crates, - isRoot: true, isRootPublic: importFull.startsWith('pub')); + parseImports( + importStr, + crates, + isRoot: true, + isRootPublic: importFull.startsWith('pub'), + ); } /// Convert resulted [hierarchy] to single string with all nested sub-modules. @@ -134,15 +139,18 @@ void parseImports( } // pure name line nekoton_wrapper or models_api - final moduleName = - croppedCrate.substring(0, croppedCrate.indexOf('::')).trim(); + final moduleName = croppedCrate + .substring(0, croppedCrate.indexOf('::')) + .trim(); // skip *api files because they will be merged if (moduleName.endsWith('api')) return; if (!hierarchy.containsKey(moduleName)) { - hierarchy[moduleName] = - ModuleHierarchy(moduleName: moduleName, isRoot: isRoot); + hierarchy[moduleName] = ModuleHierarchy( + moduleName: moduleName, + isRoot: isRoot, + ); } /// Works only for root @@ -174,9 +182,9 @@ void parseImports( // iterate over sub-blocks and direct imports, group 1 is blocks, group 3 is direct imports subCratesParserReg.allMatches(croppedCrate).forEach((match) { if (match.group(5) != null) { - hierarchy[moduleName]! - .directImports - .add(match.group(5)!.trim().replaceAll(',', '')); + hierarchy[moduleName]!.directImports.add( + match.group(5)!.trim().replaceAll(',', ''), + ); } else if (match.group(1) != null) { final cratesGroup = match.group(1)!; // If there are some glued crates in one line, we should split it @@ -185,8 +193,10 @@ void parseImports( /// Iterate over all 'crate spaces' and run parser for each of them cratesInSingleLineSpaceReg.allMatches(cratesGroup).forEach((crate) { - final crateStr = - cratesGroup.substring(startOfCrate, crate.start + 1); + final crateStr = cratesGroup.substring( + startOfCrate, + crate.start + 1, + ); startOfCrate = crate.start + 2; parseImports(crateStr, hierarchy[moduleName]!.subModules); }); diff --git a/packages/nekoton_bridge/lib/src/api/merged.dart b/packages/nekoton_bridge/lib/src/api/merged.dart index 428ae13d..17fbe9a0 100644 --- a/packages/nekoton_bridge/lib/src/api/merged.dart +++ b/packages/nekoton_bridge/lib/src/api/merged.dart @@ -1,44 +1,45 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import import '../frb_generated.dart'; +import '../lib.dart'; import '../nekoton_wrapper/core/keystore/models.dart'; import '../nekoton_wrapper/crypto/models.dart'; -import '../utils/caller.dart'; import '../utils/logger.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'merged.freezed.dart'; // These functions are ignored because they are not marked as `pub`: `get_connection`, `get_connection`, `get_connection`, `get_connection`, `get_storage`, `map_keystore_builder` -// These types are ignored because they are neither used by any `pub` functions nor (for structs and enums) marked `#[frb(unignore)]`: `GenericContractSubscriptionHandlerImpl`, `GqlConnectionImpl`, `JettonWalletSubscriptionHandlerImpl`, `JrpcConnectionImpl`, `ProtoConnectionImpl`, `ProviderMessage`, `ProviderTransaction`, `TokenWalletSubscriptionHandlerImpl`, `TonWalletSubscriptionHandlerImpl` +// These types are ignored because they are neither used by any `pub` functions nor (for structs and enums) marked `#[frb(unignore)]`: `ProviderMessage`, `ProviderTransaction` // These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `get_public_key`, `get`, `is_local`, `on_balance_changed`, `on_balance_changed`, `on_custodians_changed`, `on_details_changed`, `on_message_expired`, `on_message_expired`, `on_message_sent`, `on_message_sent`, `on_state_changed`, `on_state_changed`, `on_transactions_found`, `on_transactions_found`, `on_transactions_found`, `on_transactions_found`, `on_unconfirmed_transactions_changed`, `post`, `post`, `post`, `remove_unchecked`, `remove`, `set_unchecked`, `set`, `sign_transaction`, `sign` -// These functions are ignored (category: IgnoreBecauseNotAllowedOwner): `my_format` ///---------------------------- /// CONTENT OF src/nekoton_wrapper/crypto/crypto_api.rs ///---------------------------- /// Check signature by publicKey and data -Future ntVerifySignature( - {required String publicKey, - required String data, - required String signature, - int? signatureId}) => - NekotonBridge.instance.api.crateApiMergedNtVerifySignature( - publicKey: publicKey, - data: data, - signature: signature, - signatureId: signatureId); +Future ntVerifySignature({ + required String publicKey, + required String data, + required String signature, + int? signatureId, +}) => NekotonBridge.instance.api.crateApiMergedNtVerifySignature( + publicKey: publicKey, + data: data, + signature: signature, + signatureId: signatureId, +); ///---------------------------- /// CONTENT OF src/nekoton_wrapper/crypto/mnemonic/mnemonic_api.rs ///---------------------------- /// Generate seed phrase by specified mnemonic type GeneratedKeyG ntGenerateKey({required MnemonicType accountType}) => - NekotonBridge.instance.api - .crateApiMergedNtGenerateKey(accountType: accountType); + NekotonBridge.instance.api.crateApiMergedNtGenerateKey( + accountType: accountType, + ); /// Get hints for input part of word of seed phrase to get possible words /// input: acco @@ -49,10 +50,13 @@ List ntGetHints({required String input}) => /// Generate public and secret keys from seed phrase and mnemonic type /// Returns json {'public': '...', 'secret': '...'} /// or throws Exception -String ntDeriveFromPhrase( - {required String phrase, required MnemonicType mnemonicType}) => - NekotonBridge.instance.api.crateApiMergedNtDeriveFromPhrase( - phrase: phrase, mnemonicType: mnemonicType); +String ntDeriveFromPhrase({ + required String phrase, + required MnemonicType mnemonicType, +}) => NekotonBridge.instance.api.crateApiMergedNtDeriveFromPhrase( + phrase: phrase, + mnemonicType: mnemonicType, +); ///---------------------------- /// CONTENT OF src/nekoton_wrapper/helpers/abi_api.rs @@ -66,150 +70,172 @@ bool ntCheckPublicKey({required String publicKey}) => NekotonBridge.instance.api /// Return json-encoded ExecutionOutput or throws error. /// /// input - is json-encoded AbiToken -Future ntRunLocal( - {required String accountStuffBoc, - required String contractAbi, - required String methodId, - required String input, - required bool responsible, - required Map libraries, - int? signatureId}) => - NekotonBridge.instance.api.crateApiMergedNtRunLocal( - accountStuffBoc: accountStuffBoc, - contractAbi: contractAbi, - methodId: methodId, - input: input, - responsible: responsible, - libraries: libraries, - signatureId: signatureId); - -Future ntRunLocalWithLibs( - {required ArcTransportBoxTrait transport, - required String accountStuffBoc, - required String contractAbi, - required String methodId, - required String input, - required bool responsible, - required Map libraries, - required int retryCount, - int? signatureId}) => - NekotonBridge.instance.api.crateApiMergedNtRunLocalWithLibs( - transport: transport, - accountStuffBoc: accountStuffBoc, - contractAbi: contractAbi, - methodId: methodId, - input: input, - responsible: responsible, - libraries: libraries, - retryCount: retryCount, - signatureId: signatureId); +Future ntRunLocal({ + required String accountStuffBoc, + required String contractAbi, + required String methodId, + required String input, + required bool responsible, + required Map libraries, + int? signatureId, +}) => NekotonBridge.instance.api.crateApiMergedNtRunLocal( + accountStuffBoc: accountStuffBoc, + contractAbi: contractAbi, + methodId: methodId, + input: input, + responsible: responsible, + libraries: libraries, + signatureId: signatureId, +); + +Future ntRunLocalWithLibs({ + required ArcTransportBoxTrait transport, + required String accountStuffBoc, + required String contractAbi, + required String methodId, + required String input, + required bool responsible, + required Map libraries, + required int retryCount, + int? signatureId, +}) => NekotonBridge.instance.api.crateApiMergedNtRunLocalWithLibs( + transport: transport, + accountStuffBoc: accountStuffBoc, + contractAbi: contractAbi, + methodId: methodId, + input: input, + responsible: responsible, + libraries: libraries, + retryCount: retryCount, + signatureId: signatureId, +); /// Get address of tvc and contract_abi. /// Returns list of [address, boc of state_init, hash] or throws error -Future> ntGetExpectedAddress( - {required String tvc, - required String contractAbi, - required int workchainId, - String? publicKey, - required String initData}) => - NekotonBridge.instance.api.crateApiMergedNtGetExpectedAddress( - tvc: tvc, - contractAbi: contractAbi, - workchainId: workchainId, - publicKey: publicKey, - initData: initData); +Future> ntGetExpectedAddress({ + required String tvc, + required String contractAbi, + required int workchainId, + String? publicKey, + required String initData, +}) => NekotonBridge.instance.api.crateApiMergedNtGetExpectedAddress( + tvc: tvc, + contractAbi: contractAbi, + workchainId: workchainId, + publicKey: publicKey, + initData: initData, +); /// Returns base64-encoded body that was encoded or throws error -Future ntEncodeInternalInput( - {required String contractAbi, - required String method, - required String input}) => - NekotonBridge.instance.api.crateApiMergedNtEncodeInternalInput( - contractAbi: contractAbi, method: method, input: input); +Future ntEncodeInternalInput({ + required String contractAbi, + required String method, + required String input, +}) => NekotonBridge.instance.api.crateApiMergedNtEncodeInternalInput( + contractAbi: contractAbi, + method: method, + input: input, +); /// Returns json-encoded SignedMessage from nekoton or throws error /// timeout - milliseconds -Future ntCreateExternalMessageWithoutSignature( - {required String dst, - required String contractAbi, - required String method, - String? stateInit, - required String input, - required int timeout}) => - NekotonBridge.instance.api - .crateApiMergedNtCreateExternalMessageWithoutSignature( - dst: dst, - contractAbi: contractAbi, - method: method, - stateInit: stateInit, - input: input, - timeout: timeout); +Future ntCreateExternalMessageWithoutSignature({ + required String dst, + required String contractAbi, + required String method, + String? stateInit, + required String input, + required int timeout, +}) => NekotonBridge.instance.api + .crateApiMergedNtCreateExternalMessageWithoutSignature( + dst: dst, + contractAbi: contractAbi, + method: method, + stateInit: stateInit, + input: input, + timeout: timeout, + ); /// Create external unsigned message that can be listened and handled or throws error /// timeout - milliseconds -Future ntCreateExternalMessage( - {required String dst, - required String contractAbi, - required String method, - String? stateInit, - required String input, - required String publicKey, - required int timeout}) => - NekotonBridge.instance.api.crateApiMergedNtCreateExternalMessage( - dst: dst, - contractAbi: contractAbi, - method: method, - stateInit: stateInit, - input: input, - publicKey: publicKey, - timeout: timeout); +Future ntCreateExternalMessage({ + required String dst, + required String contractAbi, + required String method, + String? stateInit, + required String input, + required String publicKey, + required int timeout, +}) => NekotonBridge.instance.api.crateApiMergedNtCreateExternalMessage( + dst: dst, + contractAbi: contractAbi, + method: method, + stateInit: stateInit, + input: input, + publicKey: publicKey, + timeout: timeout, +); /// Parse payload and return optional json-encoded KnownPayload or throws error -String? ntParseKnownPayload({required String payload}) => - NekotonBridge.instance.api - .crateApiMergedNtParseKnownPayload(payload: payload); +String? ntParseKnownPayload({required String payload}) => NekotonBridge + .instance + .api + .crateApiMergedNtParseKnownPayload(payload: payload); /// Decode input data and return json-encoded DecodedInput or throws error -Future ntDecodeInput( - {required String messageBody, - required String contractAbi, - String? method, - required bool internal}) => - NekotonBridge.instance.api.crateApiMergedNtDecodeInput( - messageBody: messageBody, - contractAbi: contractAbi, - method: method, - internal: internal); +Future ntDecodeInput({ + required String messageBody, + required String contractAbi, + String? method, + required bool internal, +}) => NekotonBridge.instance.api.crateApiMergedNtDecodeInput( + messageBody: messageBody, + contractAbi: contractAbi, + method: method, + internal: internal, +); /// Decode input data and return json-encoded DecodedEvent or throws error -Future ntDecodeEvent( - {required String messageBody, - required String contractAbi, - String? event}) => - NekotonBridge.instance.api.crateApiMergedNtDecodeEvent( - messageBody: messageBody, contractAbi: contractAbi, event: event); +Future ntDecodeEvent({ + required String messageBody, + required String contractAbi, + String? event, +}) => NekotonBridge.instance.api.crateApiMergedNtDecodeEvent( + messageBody: messageBody, + contractAbi: contractAbi, + event: event, +); /// Decode output data and return json-encoded DecodedOutput or throws error -Future ntDecodeOutput( - {required String messageBody, - required String contractAbi, - String? method}) => - NekotonBridge.instance.api.crateApiMergedNtDecodeOutput( - messageBody: messageBody, contractAbi: contractAbi, method: method); +Future ntDecodeOutput({ + required String messageBody, + required String contractAbi, + String? method, +}) => NekotonBridge.instance.api.crateApiMergedNtDecodeOutput( + messageBody: messageBody, + contractAbi: contractAbi, + method: method, +); /// Decode transaction and return json-encoded DecodedTransaction or throws error -Future ntDecodeTransaction( - {required String transaction, - required String contractAbi, - String? method}) => - NekotonBridge.instance.api.crateApiMergedNtDecodeTransaction( - transaction: transaction, contractAbi: contractAbi, method: method); +Future ntDecodeTransaction({ + required String transaction, + required String contractAbi, + String? method, +}) => NekotonBridge.instance.api.crateApiMergedNtDecodeTransaction( + transaction: transaction, + contractAbi: contractAbi, + method: method, +); /// Decode events of transaction and return json-encoded list of DecodedEvent or throws error -Future ntDecodeTransactionEvents( - {required String transaction, required String contractAbi}) => - NekotonBridge.instance.api.crateApiMergedNtDecodeTransactionEvents( - transaction: transaction, contractAbi: contractAbi); +Future ntDecodeTransactionEvents({ + required String transaction, + required String contractAbi, +}) => NekotonBridge.instance.api.crateApiMergedNtDecodeTransactionEvents( + transaction: transaction, + contractAbi: contractAbi, +); /// Returns hash of decoded boc or throws error String ntGetBocHash({required String boc}) => @@ -217,34 +243,48 @@ String ntGetBocHash({required String boc}) => /// Return base64 encoded bytes of tokens or throws error /// returns [tvc, hash] -List ntPackIntoCell( - {required String params, required String tokens, String? version}) => - NekotonBridge.instance.api.crateApiMergedNtPackIntoCell( - params: params, tokens: tokens, version: version); +List ntPackIntoCell({ + required String params, + required String tokens, + String? version, +}) => NekotonBridge.instance.api.crateApiMergedNtPackIntoCell( + params: params, + tokens: tokens, + version: version, +); /// Parse list of params and return json-encoded Tokens or throws error -String ntUnpackFromCell( - {required String params, - required String boc, - required bool allowPartial, - String? version}) => - NekotonBridge.instance.api.crateApiMergedNtUnpackFromCell( - params: params, boc: boc, allowPartial: allowPartial, version: version); +String ntUnpackFromCell({ + required String params, + required String boc, + required bool allowPartial, + String? version, +}) => NekotonBridge.instance.api.crateApiMergedNtUnpackFromCell( + params: params, + boc: boc, + allowPartial: allowPartial, + version: version, +); /// Pack address std smd or throw error /// Returns new packed address as string -String ntPackStdSmcAddr( - {required String addr, - required bool base64Url, - required bool bounceable}) => - NekotonBridge.instance.api.crateApiMergedNtPackStdSmcAddr( - addr: addr, base64Url: base64Url, bounceable: bounceable); +String ntPackStdSmcAddr({ + required String addr, + required bool base64Url, + required bool bounceable, +}) => NekotonBridge.instance.api.crateApiMergedNtPackStdSmcAddr( + addr: addr, + base64Url: base64Url, + bounceable: bounceable, +); /// Unpack address std smd or throw error. /// Returns json-encoded MsgAddressInt String ntUnpackStdSmcAddr({required String packed, required bool base64Url}) => - NekotonBridge.instance.api - .crateApiMergedNtUnpackStdSmcAddr(packed: packed, base64Url: base64Url); + NekotonBridge.instance.api.crateApiMergedNtUnpackStdSmcAddr( + packed: packed, + base64Url: base64Url, + ); /// Return true if address is valid, false otherwise bool ntValidateAddress({required String address}) => NekotonBridge.instance.api @@ -254,12 +294,15 @@ bool ntValidateAddress({required String address}) => NekotonBridge.instance.api String ntRepackAddress({required String address}) => NekotonBridge.instance.api.crateApiMergedNtRepackAddress(address: address); -String ntPackAddress( - {required String address, - required bool isUrlSafe, - required bool bounceable}) => - NekotonBridge.instance.api.crateApiMergedNtPackAddress( - address: address, isUrlSafe: isUrlSafe, bounceable: bounceable); +String ntPackAddress({ + required String address, + required bool isUrlSafe, + required bool bounceable, +}) => NekotonBridge.instance.api.crateApiMergedNtPackAddress( + address: address, + isUrlSafe: isUrlSafe, + bounceable: bounceable, +); /// Extract public key from boc and return it or throw error String ntExtractPublicKey({required String boc}) => @@ -283,8 +326,10 @@ List ntSplitTvc({required String tvc}) => /// Set salt to code and return base64-encoded string or throw error /// returns [tvc, hash] List ntSetCodeSalt({required String code, required String salt}) => - NekotonBridge.instance.api - .crateApiMergedNtSetCodeSalt(code: code, salt: salt); + NekotonBridge.instance.api.crateApiMergedNtSetCodeSalt( + code: code, + salt: salt, + ); /// Get salt from code if possible and return base64-encoded salt or throw error String? ntGetCodeSalt({required String code}) => @@ -298,224 +343,169 @@ String? ntGetCodeSalt({required String code}) => /// Returns [boc, transaction] if everything is ok or /// [error_code] if transaction failed /// or throws error -Future> ntExecuteLocal( - {required String config, - required String account, - required String message, - required int utime, - required bool disableSignatureCheck, - String? overwriteBalance, - int? globalId}) => - NekotonBridge.instance.api.crateApiMergedNtExecuteLocal( - config: config, - account: account, - message: message, - utime: utime, - disableSignatureCheck: disableSignatureCheck, - overwriteBalance: overwriteBalance, - globalId: globalId); +Future> ntExecuteLocal({ + required String config, + required String account, + required String message, + required int utime, + required bool disableSignatureCheck, + String? overwriteBalance, + int? globalId, +}) => NekotonBridge.instance.api.crateApiMergedNtExecuteLocal( + config: config, + account: account, + message: message, + utime: utime, + disableSignatureCheck: disableSignatureCheck, + overwriteBalance: overwriteBalance, + globalId: globalId, +); /// Unpack data by contract. /// Returns [option publicKey, json-encoded Map] or throw error -Future> ntUnpackInitData( - {required String contractAbi, required String data}) => - NekotonBridge.instance.api - .crateApiMergedNtUnpackInitData(contractAbi: contractAbi, data: data); +Future> ntUnpackInitData({ + required String contractAbi, + required String data, +}) => NekotonBridge.instance.api.crateApiMergedNtUnpackInitData( + contractAbi: contractAbi, + data: data, +); /// Unpack contract fields. /// Returns optional json-encoded Map or throw error -Future ntUnpackContractFields( - {required String contractAbi, - required String boc, - required bool allowPartial}) => - NekotonBridge.instance.api.crateApiMergedNtUnpackContractFields( - contractAbi: contractAbi, boc: boc, allowPartial: allowPartial); +Future ntUnpackContractFields({ + required String contractAbi, + required String boc, + required bool allowPartial, +}) => NekotonBridge.instance.api.crateApiMergedNtUnpackContractFields( + contractAbi: contractAbi, + boc: boc, + allowPartial: allowPartial, +); /// Returns json-encoded SignedMessage or throws error /// dst - destination address /// timeout - milliseconds -Future ntCreateRawExternalMessage( - {required String dst, - String? stateInit, - String? body, - required int timeout}) => - NekotonBridge.instance.api.crateApiMergedNtCreateRawExternalMessage( - dst: dst, stateInit: stateInit, body: body, timeout: timeout); +Future ntCreateRawExternalMessage({ + required String dst, + String? stateInit, + String? body, + required int timeout, +}) => NekotonBridge.instance.api.crateApiMergedNtCreateRawExternalMessage( + dst: dst, + stateInit: stateInit, + body: body, + timeout: timeout, +); /// Returns base-64 encoded Message or throws error /// src - address of sender /// dst - address of destination /// body - base64-encoded data -Future ntEncodeInternalMessage( - {String? src, - required String dst, - required bool bounce, - String? stateInit, - String? body, - required String amount, - bool? bounced}) => - NekotonBridge.instance.api.crateApiMergedNtEncodeInternalMessage( - src: src, - dst: dst, - bounce: bounce, - stateInit: stateInit, - body: body, - amount: amount, - bounced: bounced); +Future ntEncodeInternalMessage({ + String? src, + required String dst, + required bool bounce, + String? stateInit, + String? body, + required String amount, + bool? bounced, +}) => NekotonBridge.instance.api.crateApiMergedNtEncodeInternalMessage( + src: src, + dst: dst, + bounce: bounce, + stateInit: stateInit, + body: body, + amount: amount, + bounced: bounced, +); /// Returns base-64 encoded Account or throws error -Future ntMakeFullAccountBoc({String? accountStuffBoc}) => - NekotonBridge.instance.api - .crateApiMergedNtMakeFullAccountBoc(accountStuffBoc: accountStuffBoc); +Future ntMakeFullAccountBoc({String? accountStuffBoc}) => NekotonBridge + .instance + .api + .crateApiMergedNtMakeFullAccountBoc(accountStuffBoc: accountStuffBoc); /// Returns optional json-encoded FullContractState or throws error /// account - base64-encoded boc after execute_local Future ntParseFullAccountBoc({required String account}) => - NekotonBridge.instance.api - .crateApiMergedNtParseFullAccountBoc(account: account); - -Future ntComputeStorageFee( - {required String config, - required String account, - required int utime, - required bool isMasterchain}) => - NekotonBridge.instance.api.crateApiMergedNtComputeStorageFee( - config: config, - account: account, - utime: utime, - isMasterchain: isMasterchain); + NekotonBridge.instance.api.crateApiMergedNtParseFullAccountBoc( + account: account, + ); + +Future ntComputeStorageFee({ + required String config, + required String account, + required int utime, + required bool isMasterchain, +}) => NekotonBridge.instance.api.crateApiMergedNtComputeStorageFee( + config: config, + account: account, + utime: utime, + isMasterchain: isMasterchain, +); String ntEncodeComment({required String comment, required bool plain}) => - NekotonBridge.instance.api - .crateApiMergedNtEncodeComment(comment: comment, plain: plain); + NekotonBridge.instance.api.crateApiMergedNtEncodeComment( + comment: comment, + plain: plain, + ); /// Run getter. /// Return json-encoded VmGetterOutput or throws error. /// /// input - is json-encoded AbiToken -Future ntRunGetter( - {required String accountStuffBoc, - required String contractAbi, - required String methodId, - required String input, - required Map libraries, - int? signatureId}) => - NekotonBridge.instance.api.crateApiMergedNtRunGetter( - accountStuffBoc: accountStuffBoc, - contractAbi: contractAbi, - methodId: methodId, - input: input, - libraries: libraries, - signatureId: signatureId); - -String ntComputeTonWalletAddress( - {required String publicKey, - required String walletType, - required int workchain}) => - NekotonBridge.instance.api.crateApiMergedNtComputeTonWalletAddress( - publicKey: publicKey, walletType: walletType, workchain: workchain); - -int ntGetContractTypeNumber({required String walletType}) => - NekotonBridge.instance.api - .crateApiMergedNtGetContractTypeNumber(walletType: walletType); - -///---------------------------- -/// CONTENT OF src/utils/tests_api.rs -///---------------------------- -Future testLoggerInfo({required String string}) => - NekotonBridge.instance.api.crateApiMergedTestLoggerInfo(string: string); - -Future testLoggerDebug({required String string}) => - NekotonBridge.instance.api.crateApiMergedTestLoggerDebug(string: string); - -Future testLoggerWarn({required String string}) => - NekotonBridge.instance.api.crateApiMergedTestLoggerWarn(string: string); - -Future testLoggerError({required String string}) => - NekotonBridge.instance.api.crateApiMergedTestLoggerError(string: string); - -Future testLoggerPanic({required String string}) => - NekotonBridge.instance.api.crateApiMergedTestLoggerPanic(string: string); - -Future testCallerCallTest0Async( - {required String string, required bool needResult}) => - NekotonBridge.instance.api.crateApiMergedTestCallerCallTest0Async( - string: string, needResult: needResult); - -DynamicValue testCallerCallTest0Sync( - {required String string, required bool needResult}) => - NekotonBridge.instance.api.crateApiMergedTestCallerCallTest0Sync( - string: string, needResult: needResult); - -Future testCallerCallTest1Async( - {required String string, required bool needResult}) => - NekotonBridge.instance.api.crateApiMergedTestCallerCallTest1Async( - string: string, needResult: needResult); +Future ntRunGetter({ + required String accountStuffBoc, + required String contractAbi, + required String methodId, + required String input, + required Map libraries, + int? signatureId, +}) => NekotonBridge.instance.api.crateApiMergedNtRunGetter( + accountStuffBoc: accountStuffBoc, + contractAbi: contractAbi, + methodId: methodId, + input: input, + libraries: libraries, + signatureId: signatureId, +); + +String ntComputeTonWalletAddress({ + required String publicKey, + required String walletType, + required int workchain, +}) => NekotonBridge.instance.api.crateApiMergedNtComputeTonWalletAddress( + publicKey: publicKey, + walletType: walletType, + workchain: workchain, +); + +int ntGetContractTypeNumber({required String walletType}) => NekotonBridge + .instance + .api + .crateApiMergedNtGetContractTypeNumber(walletType: walletType); ///---------------------------- /// CONTENT OF src/utils/api.rs ///---------------------------- /// Init utils -Future initLogger( - {required LogLevel level, required bool mobileLogger}) => - NekotonBridge.instance.api - .crateApiMergedInitLogger(level: level, mobileLogger: mobileLogger); +Future initLogger({ + required LogLevel level, + required bool mobileLogger, +}) => NekotonBridge.instance.api.crateApiMergedInitLogger( + level: level, + mobileLogger: mobileLogger, +); /// Create log stream Stream createLogStream() => NekotonBridge.instance.api.crateApiMergedCreateLogStream(); -/// Init caller -Stream initCaller() => - NekotonBridge.instance.api.crateApiMergedInitCaller(); - -/// Callback functions for returning Dart method result -void callSendResult({required String id, required DynamicValue value}) => - NekotonBridge.instance.api - .crateApiMergedCallSendResult(id: id, value: value); - /// Set clock offset in milliseconds Future setClockOffset({required PlatformInt64 offsetMs}) => NekotonBridge.instance.api.crateApiMergedSetClockOffset(offsetMs: offsetMs); -Future simpleLog({required String string}) => - NekotonBridge.instance.api.crateApiMergedSimpleLog(string: string); - -Future simplePanic() => - NekotonBridge.instance.api.crateApiMergedSimplePanic(); - -int simpleAdderSync({required int a, required int b}) => - NekotonBridge.instance.api.crateApiMergedSimpleAdderSync(a: a, b: b); - -Future simpleAdder({required int a, required int b}) => - NekotonBridge.instance.api.crateApiMergedSimpleAdder(a: a, b: b); - -Future stubDv() => - NekotonBridge.instance.api.crateApiMergedStubDv(); - -Future stubDcs() => - NekotonBridge.instance.api.crateApiMergedStubDcs(); - -Future simpleCallDart() => - NekotonBridge.instance.api.crateApiMergedSimpleCallDart(); - -Future stubCallDart({required DartCallStub stub}) => - NekotonBridge.instance.api.crateApiMergedStubCallDart(stub: stub); - -Future simpleCallFunc0({required bool needResult}) => - NekotonBridge.instance.api - .crateApiMergedSimpleCallFunc0(needResult: needResult); - -Future simpleCallFunc1({required bool needResult}) => - NekotonBridge.instance.api - .crateApiMergedSimpleCallFunc1(needResult: needResult); - -Future simpleCallFunc2() => - NekotonBridge.instance.api.crateApiMergedSimpleCallFunc2(); - -Future simpleCallFunc3() => - NekotonBridge.instance.api.crateApiMergedSimpleCallFunc3(); - // Rust type: RustOpaqueNom> abstract class ArcAccountsStorageBoxTrait implements RustOpaqueInterface {} @@ -555,8 +545,161 @@ abstract class ArcTransportBoxTrait implements RustOpaqueInterface {} // Rust type: RustOpaqueNom> abstract class ArcUnsignedMessageBoxTrait implements RustOpaqueInterface {} -abstract class MyFormat { - Future myFormat(); +// Rust type: RustOpaqueNom> +abstract class GenericContractSubscriptionHandlerImpl + implements RustOpaqueInterface { + ArcFnStringDartFnFuture get onMessageExpired; + + ArcFnStringDartFnFuture get onMessageSent; + + ArcFnStringDartFnFuture get onStateChanged; + + ArcFnStringDartFnFuture get onTransactionsFound; + + set onMessageExpired(ArcFnStringDartFnFuture onMessageExpired); + + set onMessageSent(ArcFnStringDartFnFuture onMessageSent); + + set onStateChanged(ArcFnStringDartFnFuture onStateChanged); + + set onTransactionsFound(ArcFnStringDartFnFuture onTransactionsFound); +} + +// Rust type: RustOpaqueNom> +abstract class GqlConnectionImpl implements RustOpaqueInterface { + bool get isLocal; + + ArcFnStringDartFnFutureString get onPost; + + set isLocal(bool isLocal); + + set onPost(ArcFnStringDartFnFutureString onPost); +} + +// Rust type: RustOpaqueNom> +abstract class JettonWalletSubscriptionHandlerImpl + implements RustOpaqueInterface { + ArcFnStringDartFnFuture get onBalanceChanged; + + ArcFnStringDartFnFuture get onTransactionsFound; + + set onBalanceChanged(ArcFnStringDartFnFuture onBalanceChanged); + + set onTransactionsFound(ArcFnStringDartFnFuture onTransactionsFound); +} + +// Rust type: RustOpaqueNom> +abstract class JrpcConnectionImpl implements RustOpaqueInterface { + ArcFnStringDartFnFutureString get onPost; + + set onPost(ArcFnStringDartFnFutureString onPost); +} + +// Rust type: RustOpaqueNom> +abstract class LedgerConnectionImpl implements RustOpaqueInterface { + ArcFnU16DartFnFutureVecU8 get onGetPublicKey; + + ArcFnU16OptionI32VecU8DartFnFutureVecU8 get onSign; + + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 get onSignTransaction; + + set onGetPublicKey(ArcFnU16DartFnFutureVecU8 onGetPublicKey); + + set onSign(ArcFnU16OptionI32VecU8DartFnFutureVecU8 onSign); + + set onSignTransaction( + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 onSignTransaction, + ); +} + +// Rust type: RustOpaqueNom> +abstract class ProtoConnectionImpl implements RustOpaqueInterface { + ArcFnVecU8DartFnFutureVecU8 get onPost; + + set onPost(ArcFnVecU8DartFnFutureVecU8 onPost); +} + +// Rust type: RustOpaqueNom> +abstract class StorageImpl implements RustOpaqueInterface { + ArcFnStringDartFnFutureOptionString get onGet; + + ArcFnStringDartFnFuture get onRemove; + + ArcFnStringDartFnFuture get onRemoveUnchecked; + + ArcFnStringStringDartFnFuture get onSet; + + ArcFnStringStringDartFnFuture get onSetUnchecked; + + set onGet(ArcFnStringDartFnFutureOptionString onGet); + + set onRemove(ArcFnStringDartFnFuture onRemove); + + set onRemoveUnchecked(ArcFnStringDartFnFuture onRemoveUnchecked); + + set onSet(ArcFnStringStringDartFnFuture onSet); + + set onSetUnchecked(ArcFnStringStringDartFnFuture onSetUnchecked); + + // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. + static Future newInstance({ + required ArcFnStringDartFnFutureOptionString onGet, + required ArcFnStringStringDartFnFuture onSet, + required ArcFnStringStringDartFnFuture onSetUnchecked, + required ArcFnStringDartFnFuture onRemove, + required ArcFnStringDartFnFuture onRemoveUnchecked, + }) => NekotonBridge.instance.api.crateApiMergedStorageImplNew( + onGet: onGet, + onSet: onSet, + onSetUnchecked: onSetUnchecked, + onRemove: onRemove, + onRemoveUnchecked: onRemoveUnchecked, + ); +} + +// Rust type: RustOpaqueNom> +abstract class TokenWalletSubscriptionHandlerImpl + implements RustOpaqueInterface { + ArcFnStringDartFnFuture get onBalanceChanged; + + ArcFnStringDartFnFuture get onTransactionsFound; + + set onBalanceChanged(ArcFnStringDartFnFuture onBalanceChanged); + + set onTransactionsFound(ArcFnStringDartFnFuture onTransactionsFound); +} + +// Rust type: RustOpaqueNom> +abstract class TonWalletSubscriptionHandlerImpl implements RustOpaqueInterface { + ArcFnStringDartFnFuture get onCustodiansChanged; + + ArcFnStringDartFnFuture get onDetailsChanged; + + ArcFnStringDartFnFuture get onMessageExpired; + + ArcFnStringDartFnFuture get onMessageSent; + + ArcFnStringDartFnFuture get onStateChanged; + + ArcFnStringDartFnFuture get onTransactionsFound; + + ArcFnStringDartFnFuture get onUnconfirmedTransactionsChanged; + + set onCustodiansChanged(ArcFnStringDartFnFuture onCustodiansChanged); + + set onDetailsChanged(ArcFnStringDartFnFuture onDetailsChanged); + + set onMessageExpired(ArcFnStringDartFnFuture onMessageExpired); + + set onMessageSent(ArcFnStringDartFnFuture onMessageSent); + + set onStateChanged(ArcFnStringDartFnFuture onStateChanged); + + set onTransactionsFound(ArcFnStringDartFnFuture onTransactionsFound); + + set onUnconfirmedTransactionsChanged( + ArcFnStringDartFnFuture onUnconfirmedTransactionsChanged, + ); } ///---------------------------- @@ -566,23 +709,25 @@ abstract class MyFormat { class AccountsStorageImpl { final ArcAccountsStorageBoxTrait innerStorage; - const AccountsStorageImpl({ - required this.innerStorage, - }); + const AccountsStorageImpl({required this.innerStorage}); /// Add new account to storage and return its instance. /// account - json-encoded AccountToAdd. /// Return json-encoded AssetsList or throw error. Future addAccount({required String account}) => NekotonBridge.instance.api.crateApiMergedAccountsStorageImplAddAccount( - that: this, account: account); + that: this, + account: account, + ); /// Add list of new accounts to storage and return it instances. /// account - json-encoded list of AccountToAdd. /// Return json-encoded list of AssetsList or throw error. Future addAccounts({required String accounts}) => NekotonBridge.instance.api.crateApiMergedAccountsStorageImplAddAccounts( - that: this, accounts: accounts); + that: this, + accounts: accounts, + ); /// Add token wallet signature to account (add new token to account aka enable it via slider). /// account_address - address of account @@ -590,16 +735,17 @@ class AccountsStorageImpl { /// connection info /// root_token_contract - address of token in blockchain. /// Return updated AssetsList or throw error. - Future addTokenWallet( - {required String accountAddress, - required String networkGroup, - required String rootTokenContract}) => - NekotonBridge.instance.api - .crateApiMergedAccountsStorageImplAddTokenWallet( - that: this, - accountAddress: accountAddress, - networkGroup: networkGroup, - rootTokenContract: rootTokenContract); + Future addTokenWallet({ + required String accountAddress, + required String networkGroup, + required String rootTokenContract, + }) => NekotonBridge.instance.api + .crateApiMergedAccountsStorageImplAddTokenWallet( + that: this, + accountAddress: accountAddress, + networkGroup: networkGroup, + rootTokenContract: rootTokenContract, + ); /// Add token wallets signatures to account (add new tokens to account aka enable it via slider). /// account_address - address of account @@ -607,51 +753,49 @@ class AccountsStorageImpl { /// connection info /// root_token_contracts - list of addresses of tokens in blockchain. /// Return true or throw error. - Future addTokenWallets( - {required String accountAddress, - required String networkGroup, - required List rootTokenContracts}) => - NekotonBridge.instance.api - .crateApiMergedAccountsStorageImplAddTokenWallets( - that: this, - accountAddress: accountAddress, - networkGroup: networkGroup, - rootTokenContracts: rootTokenContracts); + Future addTokenWallets({ + required String accountAddress, + required String networkGroup, + required List rootTokenContracts, + }) => NekotonBridge.instance.api + .crateApiMergedAccountsStorageImplAddTokenWallets( + that: this, + accountAddress: accountAddress, + networkGroup: networkGroup, + rootTokenContracts: rootTokenContracts, + ); /// Clear storage and remove all data. /// Returns true or throw error - Future clear() => - NekotonBridge.instance.api.crateApiMergedAccountsStorageImplClear( - that: this, - ); + Future clear() => NekotonBridge.instance.api + .crateApiMergedAccountsStorageImplClear(that: this); /// Get list of accounts. /// Returns json-encoded List of AssetsList or throw error - Future getEntries() => - NekotonBridge.instance.api.crateApiMergedAccountsStorageImplGetEntries( - that: this, - ); + Future getEntries() => NekotonBridge.instance.api + .crateApiMergedAccountsStorageImplGetEntries(that: this); // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. /// Create AccountsStorage or throw error - static Future newInstance( - {required StorageDartWrapper storage}) => - NekotonBridge.instance.api - .crateApiMergedAccountsStorageImplNew(storage: storage); + static Future newInstance({ + required StorageDartWrapper storage, + }) => NekotonBridge.instance.api.crateApiMergedAccountsStorageImplNew( + storage: storage, + ); /// Reload storage and read all data again. /// Returns true or throw error. - Future reload() => - NekotonBridge.instance.api.crateApiMergedAccountsStorageImplReload( - that: this, - ); + Future reload() => NekotonBridge.instance.api + .crateApiMergedAccountsStorageImplReload(that: this); /// Remove account from storage and return its instance if it was removed. /// account_address - address of account /// Return json-encoded AssetsList that was removed or null or throw error. Future removeAccount({required String accountAddress}) => NekotonBridge.instance.api.crateApiMergedAccountsStorageImplRemoveAccount( - that: this, accountAddress: accountAddress); + that: this, + accountAddress: accountAddress, + ); /// Remove list of account from storage and return it instances if it were removed. /// account_addresses - list of addresses of accounts. @@ -659,7 +803,9 @@ class AccountsStorageImpl { Future removeAccounts({required List accountAddresses}) => NekotonBridge.instance.api .crateApiMergedAccountsStorageImplRemoveAccounts( - that: this, accountAddresses: accountAddresses); + that: this, + accountAddresses: accountAddresses, + ); /// Remove token wallet signature from account (remove token from account aka disable it via slider). /// account_address - address of account @@ -667,16 +813,17 @@ class AccountsStorageImpl { /// connection info /// root_token_contract - address of token in blockchain. /// Return updated AssetsList or throw error. - Future removeTokenWallet( - {required String accountAddress, - required String networkGroup, - required String rootTokenContract}) => - NekotonBridge.instance.api - .crateApiMergedAccountsStorageImplRemoveTokenWallet( - that: this, - accountAddress: accountAddress, - networkGroup: networkGroup, - rootTokenContract: rootTokenContract); + Future removeTokenWallet({ + required String accountAddress, + required String networkGroup, + required String rootTokenContract, + }) => NekotonBridge.instance.api + .crateApiMergedAccountsStorageImplRemoveTokenWallet( + that: this, + accountAddress: accountAddress, + networkGroup: networkGroup, + rootTokenContract: rootTokenContract, + ); /// Remove token wallets signatures from account (remove tokens from account aka disable it via slider). /// account_address - address of account @@ -684,30 +831,37 @@ class AccountsStorageImpl { /// connection info /// root_token_contracts - list of addresses of tokens in blockchain. /// Return true or throw error. - Future removeTokenWallets( - {required String accountAddress, - required String networkGroup, - required List rootTokenContracts}) => - NekotonBridge.instance.api - .crateApiMergedAccountsStorageImplRemoveTokenWallets( - that: this, - accountAddress: accountAddress, - networkGroup: networkGroup, - rootTokenContracts: rootTokenContracts); + Future removeTokenWallets({ + required String accountAddress, + required String networkGroup, + required List rootTokenContracts, + }) => NekotonBridge.instance.api + .crateApiMergedAccountsStorageImplRemoveTokenWallets( + that: this, + accountAddress: accountAddress, + networkGroup: networkGroup, + rootTokenContracts: rootTokenContracts, + ); /// Rename existed account and return its renamed instance. /// account_address - address of account /// name - new name of account /// Return json-encoded AssetsList or throw error. - Future renameAccount( - {required String accountAddress, required String name}) => + Future renameAccount({ + required String accountAddress, + required String name, + }) => NekotonBridge.instance.api.crateApiMergedAccountsStorageImplRenameAccount( - that: this, accountAddress: accountAddress, name: name); + that: this, + accountAddress: accountAddress, + name: name, + ); /// Check if data is correct for storage. - static Future verifyData({required String data}) => - NekotonBridge.instance.api - .crateApiMergedAccountsStorageImplVerifyData(data: data); + static Future verifyData({required String data}) => NekotonBridge + .instance + .api + .crateApiMergedAccountsStorageImplVerifyData(data: data); @override int get hashCode => innerStorage.hashCode; @@ -720,11 +874,7 @@ class AccountsStorageImpl { innerStorage == other.innerStorage; } -enum Bip39Entropy { - bits128, - bits256, - ; -} +enum Bip39Entropy { bits128, bits256 } /// Mirror struct of Bip39MnemonicData class Bip39MnemonicData { @@ -751,53 +901,14 @@ class Bip39MnemonicData { entropy == other.entropy; } -enum Bip39Path { - ever, - ton, - ; -} - -class CallerTestClass { - final String instanceHash; - final int value; - - const CallerTestClass({ - required this.instanceHash, - required this.value, - }); - - Future callSomeFunc() => - NekotonBridge.instance.api.crateApiMergedCallerTestClassCallSomeFunc( - that: this, - ); - - // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - static Future newInstance( - {required String instanceHash, required int value}) => - NekotonBridge.instance.api.crateApiMergedCallerTestClassNew( - instanceHash: instanceHash, value: value); - - @override - int get hashCode => instanceHash.hashCode ^ value.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is CallerTestClass && - runtimeType == other.runtimeType && - instanceHash == other.instanceHash && - value == other.value; -} +enum Bip39Path { ever, ton } /// Wrapper struct above GeneratedKey with suitable type for generation class GeneratedKeyG { final List words; final MnemonicType accountType; - const GeneratedKeyG({ - required this.words, - required this.accountType, - }); + const GeneratedKeyG({required this.words, required this.accountType}); @override int get hashCode => words.hashCode ^ accountType.hashCode; @@ -817,96 +928,106 @@ class GeneratedKeyG { class GenericContractDartWrapper { final ArcGenericContractBoxTrait innerContract; - const GenericContractDartWrapper({ - required this.innerContract, - }); + const GenericContractDartWrapper({required this.innerContract}); /// Get address of contract. Future address() => NekotonBridge.instance.api - .crateApiMergedGenericContractDartWrapperAddress( - that: this, - ); + .crateApiMergedGenericContractDartWrapperAddress(that: this); /// Get json-encoded ContractState or throw error. Future contractState() => NekotonBridge.instance.api - .crateApiMergedGenericContractDartWrapperContractState( - that: this, - ); + .crateApiMergedGenericContractDartWrapperContractState(that: this); /// Calculate fees for transaction. /// signed_message - json-encoded SignedMessage. /// Returns fees as string representation of u128 or throw error. - Future estimateFees({required String signedMessage}) => - NekotonBridge.instance.api - .crateApiMergedGenericContractDartWrapperEstimateFees( - that: this, signedMessage: signedMessage); + Future estimateFees({required String signedMessage}) => NekotonBridge + .instance + .api + .crateApiMergedGenericContractDartWrapperEstimateFees( + that: this, + signedMessage: signedMessage, + ); /// Execute transaction locally and return its instance. /// signed_message - json-encoded SignedMessage /// options - additional info for execution /// Return json-encoded Transaction or throw error. - Future executeTransactionLocally( - {required String signedMessage, required String options}) => - NekotonBridge.instance.api - .crateApiMergedGenericContractDartWrapperExecuteTransactionLocally( - that: this, signedMessage: signedMessage, options: options); + Future executeTransactionLocally({ + required String signedMessage, + required String options, + }) => NekotonBridge.instance.api + .crateApiMergedGenericContractDartWrapperExecuteTransactionLocally( + that: this, + signedMessage: signedMessage, + options: options, + ); /// Handle block of blockchain. /// block - base64-encoded Block. /// Return true or throw error. - Future handleBlock({required String block}) => - NekotonBridge.instance.api - .crateApiMergedGenericContractDartWrapperHandleBlock( - that: this, block: block); + Future handleBlock({required String block}) => NekotonBridge + .instance + .api + .crateApiMergedGenericContractDartWrapperHandleBlock( + that: this, + block: block, + ); /// Get list of json-encoded PendingTransaction or throw error. Future pendingTransactions() => NekotonBridge.instance.api - .crateApiMergedGenericContractDartWrapperPendingTransactions( - that: this, - ); + .crateApiMergedGenericContractDartWrapperPendingTransactions(that: this); /// Get PollingMethod of contract or throw error. Future pollingMethod() => NekotonBridge.instance.api - .crateApiMergedGenericContractDartWrapperPollingMethod( - that: this, - ); + .crateApiMergedGenericContractDartWrapperPollingMethod(that: this); /// Preload transactions of contract. /// from_lt - offset for loading data, string representation of u64 /// Returns true or throw error. - Future preloadTransactions({required String fromLt}) => - NekotonBridge.instance.api - .crateApiMergedGenericContractDartWrapperPreloadTransactions( - that: this, fromLt: fromLt); + Future preloadTransactions({required String fromLt}) => NekotonBridge + .instance + .api + .crateApiMergedGenericContractDartWrapperPreloadTransactions( + that: this, + fromLt: fromLt, + ); /// Refresh contract and update its data. /// Returns true or throw error. Future refresh() => NekotonBridge.instance.api - .crateApiMergedGenericContractDartWrapperRefresh( - that: this, - ); + .crateApiMergedGenericContractDartWrapperRefresh(that: this); /// Send message to blockchain and receive transaction of send. /// signed_message - json-encoded SignedMessage. /// Returns json-encoded PendingTransaction or throw error. Future send({required String signedMessage}) => NekotonBridge.instance.api.crateApiMergedGenericContractDartWrapperSend( - that: this, signedMessage: signedMessage); + that: this, + signedMessage: signedMessage, + ); /// Create GenericContract by subscribing to its instance. /// address - address of contract /// preload_transactions - if transactions must be loaded during creation - static Future subscribe( - {required String instanceHash, - required String address, - required bool preloadTransactions, - required ArcTransportBoxTrait transport}) => - NekotonBridge.instance.api - .crateApiMergedGenericContractDartWrapperSubscribe( - instanceHash: instanceHash, - address: address, - preloadTransactions: preloadTransactions, - transport: transport); + static Future subscribe({ + required String address, + required bool preloadTransactions, + required ArcTransportBoxTrait transport, + required FutureOr Function(String) onMessageSent, + required FutureOr Function(String) onMessageExpired, + required FutureOr Function(String) onStateChanged, + required FutureOr Function(String) onTransactionsFound, + }) => NekotonBridge.instance.api + .crateApiMergedGenericContractDartWrapperSubscribe( + address: address, + preloadTransactions: preloadTransactions, + transport: transport, + onMessageSent: onMessageSent, + onMessageExpired: onMessageExpired, + onStateChanged: onStateChanged, + onTransactionsFound: onTransactionsFound, + ); @override int get hashCode => innerContract.hashCode; @@ -926,14 +1047,15 @@ class GenericContractDartWrapper { class GqlConnectionDartWrapper { final ArcGqlConnectionBoxTrait innerConnection; - const GqlConnectionDartWrapper.raw({ - required this.innerConnection, - }); + const GqlConnectionDartWrapper.raw({required this.innerConnection}); - factory GqlConnectionDartWrapper( - {required bool isLocal, required String instanceHash}) => - NekotonBridge.instance.api.crateApiMergedGqlConnectionDartWrapperNew( - isLocal: isLocal, instanceHash: instanceHash); + factory GqlConnectionDartWrapper({ + required bool isLocal, + required FutureOr Function(String) onPost, + }) => NekotonBridge.instance.api.crateApiMergedGqlConnectionDartWrapperNew( + isLocal: isLocal, + onPost: onPost, + ); @override int get hashCode => innerConnection.hashCode; @@ -951,21 +1073,20 @@ class GqlConnectionDartWrapper { class GqlTransportImpl { final ArcTransportBoxTrait innerTransport; - const GqlTransportImpl.raw({ - required this.innerTransport, - }); + const GqlTransportImpl.raw({required this.innerTransport}); /// Get list of accounts by code hash. Returns json-encoded AccountsList or throw error - Future getAccountsByCodeHash( - {required String codeHash, - required int limit, - String? continuation}) => - NekotonBridge.instance.api - .crateApiMergedGqlTransportImplGetAccountsByCodeHash( - that: this, - codeHash: codeHash, - limit: limit, - continuation: continuation); + Future getAccountsByCodeHash({ + required String codeHash, + required int limit, + String? continuation, + }) => NekotonBridge.instance.api + .crateApiMergedGqlTransportImplGetAccountsByCodeHash( + that: this, + codeHash: codeHash, + limit: limit, + continuation: continuation, + ); /// Get transport block by id and return base64 encoded block or throw error Future getBlock({required String id}) => NekotonBridge.instance.api @@ -973,89 +1094,110 @@ class GqlTransportImpl { /// Get config of transport. /// Returns json-encoded BlockchainConfigDef or throw error - Future getBlockchainConfig({required bool force}) => - NekotonBridge.instance.api - .crateApiMergedGqlTransportImplGetBlockchainConfig( - that: this, force: force); + Future getBlockchainConfig({required bool force}) => NekotonBridge + .instance + .api + .crateApiMergedGqlTransportImplGetBlockchainConfig( + that: this, + force: force, + ); /// Get contract state of address and return json-encoded RawContractState or throw error Future getContractState({required String address}) => NekotonBridge.instance.api.crateApiMergedGqlTransportImplGetContractState( - that: this, address: address); + that: this, + address: address, + ); /// Call get_dst_transaction of nekoton's transport and /// return option json-encoded RawTransaction or throw error Future getDstTransaction({required String messageHash}) => NekotonBridge.instance.api .crateApiMergedGqlTransportImplGetDstTransaction( - that: this, messageHash: messageHash); + that: this, + messageHash: messageHash, + ); Future getFeeFactors({required bool isMasterchain}) => NekotonBridge.instance.api.crateApiMergedGqlTransportImplGetFeeFactors( - that: this, isMasterchain: isMasterchain); + that: this, + isMasterchain: isMasterchain, + ); /// Get full contract state of address and return json-encoded FullContractState or throw error Future getFullContractState({required String address}) => NekotonBridge.instance.api .crateApiMergedGqlTransportImplGetFullContractState( - that: this, address: address); + that: this, + address: address, + ); /// Get latest block by address and return it or throw error Future getLatestBlock({required String address}) => NekotonBridge.instance.api.crateApiMergedGqlTransportImplGetLatestBlock( - that: this, address: address); - - /// Get id of network or throw error - Future getNetworkId() => - NekotonBridge.instance.api.crateApiMergedGqlTransportImplGetNetworkId( that: this, + address: address, ); + /// Get id of network or throw error + Future getNetworkId() => NekotonBridge.instance.api + .crateApiMergedGqlTransportImplGetNetworkId(that: this); + /// Get transport signature id and return it or throw error - Future getSignatureId() => - NekotonBridge.instance.api.crateApiMergedGqlTransportImplGetSignatureId( - that: this, - ); + Future getSignatureId() => NekotonBridge.instance.api + .crateApiMergedGqlTransportImplGetSignatureId(that: this); /// Get single transaction by its hash. /// Return json-encoded Transaction or throw error - Future getTransaction({required String hash}) => - NekotonBridge.instance.api - .crateApiMergedGqlTransportImplGetTransaction(that: this, hash: hash); + Future getTransaction({required String hash}) => NekotonBridge + .instance + .api + .crateApiMergedGqlTransportImplGetTransaction(that: this, hash: hash); /// Get list of transactions by address. /// Return json-encoded TransactionsList or throw error - Future getTransactions( - {required String address, String? fromLt, required int count}) => + Future getTransactions({ + required String address, + String? fromLt, + required int count, + }) => NekotonBridge.instance.api.crateApiMergedGqlTransportImplGetTransactions( - that: this, address: address, fromLt: fromLt, count: count); + that: this, + address: address, + fromLt: fromLt, + count: count, + ); factory GqlTransportImpl({required GqlConnectionDartWrapper gqlConnection}) => - NekotonBridge.instance.api - .crateApiMergedGqlTransportImplNew(gqlConnection: gqlConnection); + NekotonBridge.instance.api.crateApiMergedGqlTransportImplNew( + gqlConnection: gqlConnection, + ); - Future simulateTransactionTree( - {required String signedMessage, - required List ignoredComputePhaseCodes, - required List ignoredActionPhaseCodes}) => - NekotonBridge.instance.api - .crateApiMergedGqlTransportImplSimulateTransactionTree( - that: this, - signedMessage: signedMessage, - ignoredComputePhaseCodes: ignoredComputePhaseCodes, - ignoredActionPhaseCodes: ignoredActionPhaseCodes); + Future simulateTransactionTree({ + required String signedMessage, + required List ignoredComputePhaseCodes, + required List ignoredActionPhaseCodes, + }) => NekotonBridge.instance.api + .crateApiMergedGqlTransportImplSimulateTransactionTree( + that: this, + signedMessage: signedMessage, + ignoredComputePhaseCodes: ignoredComputePhaseCodes, + ignoredActionPhaseCodes: ignoredActionPhaseCodes, + ); /// Wait until next block will come to blockchain and return its id or throw error /// timeout - in milliseconds - Future waitForNextBlock( - {required String currentBlockId, - required String address, - required BigInt timeout}) => + Future waitForNextBlock({ + required String currentBlockId, + required String address, + required BigInt timeout, + }) => NekotonBridge.instance.api.crateApiMergedGqlTransportImplWaitForNextBlock( - that: this, - currentBlockId: currentBlockId, - address: address, - timeout: timeout); + that: this, + currentBlockId: currentBlockId, + address: address, + timeout: timeout, + ); @override int get hashCode => innerTransport.hashCode; @@ -1074,55 +1216,53 @@ class GqlTransportImpl { class JettonWalletDartWrapper { final ArcJettonWalletBoxTrait innerWallet; - const JettonWalletDartWrapper({ - required this.innerWallet, - }); + const JettonWalletDartWrapper({required this.innerWallet}); /// Get address of wallet. - Future address() => - NekotonBridge.instance.api.crateApiMergedJettonWalletDartWrapperAddress( - that: this, - ); + Future address() => NekotonBridge.instance.api + .crateApiMergedJettonWalletDartWrapperAddress(that: this); /// Get balance of wallet. /// Return string representation of rust BigUInt - Future balance() => - NekotonBridge.instance.api.crateApiMergedJettonWalletDartWrapperBalance( - that: this, - ); + Future balance() => NekotonBridge.instance.api + .crateApiMergedJettonWalletDartWrapperBalance(that: this); /// Get json-encoded ContractState or throw error. Future contractState() => NekotonBridge.instance.api - .crateApiMergedJettonWalletDartWrapperContractState( - that: this, - ); + .crateApiMergedJettonWalletDartWrapperContractState(that: this); Future estimateMinAttachedAmount({required String destination}) => NekotonBridge.instance.api .crateApiMergedJettonWalletDartWrapperEstimateMinAttachedAmount( - that: this, destination: destination); + that: this, + destination: destination, + ); /// Get details about root contract by address of JettonWallet /// Return json-encoded RootJettonContractDetails /// or throw error. - static Future getJettonRootDetails( - {required ArcTransportBoxTrait transport, - required String tokenRootAddress}) => - NekotonBridge.instance.api - .crateApiMergedJettonWalletDartWrapperGetJettonRootDetails( - transport: transport, tokenRootAddress: tokenRootAddress); + static Future getJettonRootDetails({ + required ArcTransportBoxTrait transport, + required String tokenRootAddress, + }) => NekotonBridge.instance.api + .crateApiMergedJettonWalletDartWrapperGetJettonRootDetails( + transport: transport, + tokenRootAddress: tokenRootAddress, + ); /// Get details about root contract by address of JettonWallet /// Return json-encoded list with 2 positions: /// 0: Address of root contract /// 1: RootJettonContractDetails of root contract /// or throw error. - static Future getJettonRootDetailsFromJettonWallet( - {required ArcTransportBoxTrait transport, - required String tokenWalletAddress}) => - NekotonBridge.instance.api - .crateApiMergedJettonWalletDartWrapperGetJettonRootDetailsFromJettonWallet( - transport: transport, tokenWalletAddress: tokenWalletAddress); + static Future getJettonRootDetailsFromJettonWallet({ + required ArcTransportBoxTrait transport, + required String tokenWalletAddress, + }) => NekotonBridge.instance.api + .crateApiMergedJettonWalletDartWrapperGetJettonRootDetailsFromJettonWallet( + transport: transport, + tokenWalletAddress: tokenWalletAddress, + ); /// Get details about token wallet by address of wallet /// address - address of wallet @@ -1130,33 +1270,40 @@ class JettonWalletDartWrapper { /// 0: JettonWalletDetails /// 1: RootJettonContractDetails /// or throw error - static Future getJettonWalletDetails( - {required ArcTransportBoxTrait transport, required String address}) => - NekotonBridge.instance.api - .crateApiMergedJettonWalletDartWrapperGetJettonWalletDetails( - transport: transport, address: address); + static Future getJettonWalletDetails({ + required ArcTransportBoxTrait transport, + required String address, + }) => NekotonBridge.instance.api + .crateApiMergedJettonWalletDartWrapperGetJettonWalletDetails( + transport: transport, + address: address, + ); /// Handle block of blockchain. /// block - base64-encoded Block. /// Return true or throw error. - Future handleBlock({required String block}) => - NekotonBridge.instance.api - .crateApiMergedJettonWalletDartWrapperHandleBlock( - that: this, block: block); - - /// Get address of owner of wallet. - Future owner() => - NekotonBridge.instance.api.crateApiMergedJettonWalletDartWrapperOwner( + Future handleBlock({required String block}) => NekotonBridge + .instance + .api + .crateApiMergedJettonWalletDartWrapperHandleBlock( that: this, + block: block, ); + /// Get address of owner of wallet. + Future owner() => NekotonBridge.instance.api + .crateApiMergedJettonWalletDartWrapperOwner(that: this); + /// Preload transactions of wallet. /// from_lt - offset for loading data, string representation of u64 /// Returns true or throw error. - Future preloadTransactions({required String fromLt}) => - NekotonBridge.instance.api - .crateApiMergedJettonWalletDartWrapperPreloadTransactions( - that: this, fromLt: fromLt); + Future preloadTransactions({required String fromLt}) => NekotonBridge + .instance + .api + .crateApiMergedJettonWalletDartWrapperPreloadTransactions( + that: this, + fromLt: fromLt, + ); /// Prepare transferring tokens from this wallet to other. /// destination - address of account that should receive token @@ -1166,47 +1313,50 @@ class JettonWalletDartWrapper { /// attached_amount - string representation of rust u64, default 400000000. How many native tokens /// should be attached to transfer. /// Return json-encoded InternalMessage or throw error. - Future prepareTransfer( - {required String amount, - required String destination, - required String remainingGasTo, - String? customPayload, - required String callbackValue, - String? callbackPayload, - String? attachedAmount}) => - NekotonBridge.instance.api - .crateApiMergedJettonWalletDartWrapperPrepareTransfer( - that: this, - amount: amount, - destination: destination, - remainingGasTo: remainingGasTo, - customPayload: customPayload, - callbackValue: callbackValue, - callbackPayload: callbackPayload, - attachedAmount: attachedAmount); + Future prepareTransfer({ + required String amount, + required String destination, + required String remainingGasTo, + String? customPayload, + required String callbackValue, + String? callbackPayload, + String? attachedAmount, + }) => NekotonBridge.instance.api + .crateApiMergedJettonWalletDartWrapperPrepareTransfer( + that: this, + amount: amount, + destination: destination, + remainingGasTo: remainingGasTo, + customPayload: customPayload, + callbackValue: callbackValue, + callbackPayload: callbackPayload, + attachedAmount: attachedAmount, + ); /// Refresh wallet and update its data. /// Returns true or throw error. - Future refresh() => - NekotonBridge.instance.api.crateApiMergedJettonWalletDartWrapperRefresh( - that: this, - ); + Future refresh() => NekotonBridge.instance.api + .crateApiMergedJettonWalletDartWrapperRefresh(that: this); /// Create JettonWallet by subscribing to its instance. /// owner - address of account that is owner of wallet /// root_token_contract - address of contract in blockchain - static Future subscribe( - {required String instanceHash, - required String owner, - required String rootTokenContract, - required ArcTransportBoxTrait transport, - required bool preloadTransactions}) => + static Future subscribe({ + required String owner, + required String rootTokenContract, + required ArcTransportBoxTrait transport, + required bool preloadTransactions, + required FutureOr Function(String) onBalanceChanged, + required FutureOr Function(String) onTransactionsFound, + }) => NekotonBridge.instance.api.crateApiMergedJettonWalletDartWrapperSubscribe( - instanceHash: instanceHash, - owner: owner, - rootTokenContract: rootTokenContract, - transport: transport, - preloadTransactions: preloadTransactions); + owner: owner, + rootTokenContract: rootTokenContract, + transport: transport, + preloadTransactions: preloadTransactions, + onBalanceChanged: onBalanceChanged, + onTransactionsFound: onTransactionsFound, + ); @override int get hashCode => innerWallet.hashCode; @@ -1226,13 +1376,13 @@ class JettonWalletDartWrapper { class JrpcConnectionDartWrapper { final ArcJrpcConnectionBoxTrait innerConnection; - const JrpcConnectionDartWrapper.raw({ - required this.innerConnection, - }); + const JrpcConnectionDartWrapper.raw({required this.innerConnection}); - factory JrpcConnectionDartWrapper({required String instanceHash}) => - NekotonBridge.instance.api.crateApiMergedJrpcConnectionDartWrapperNew( - instanceHash: instanceHash); + factory JrpcConnectionDartWrapper({ + required FutureOr Function(String) onPost, + }) => NekotonBridge.instance.api.crateApiMergedJrpcConnectionDartWrapperNew( + onPost: onPost, + ); @override int get hashCode => innerConnection.hashCode; @@ -1253,92 +1403,109 @@ class JrpcConnectionDartWrapper { class JrpcTransportImpl { final ArcTransportBoxTrait innerTransport; - const JrpcTransportImpl.raw({ - required this.innerTransport, - }); + const JrpcTransportImpl.raw({required this.innerTransport}); /// Get list of accounts by code hash. Returns json-encoded AccountsList or throw error - Future getAccountsByCodeHash( - {required String codeHash, - required int limit, - String? continuation}) => - NekotonBridge.instance.api - .crateApiMergedJrpcTransportImplGetAccountsByCodeHash( - that: this, - codeHash: codeHash, - limit: limit, - continuation: continuation); + Future getAccountsByCodeHash({ + required String codeHash, + required int limit, + String? continuation, + }) => NekotonBridge.instance.api + .crateApiMergedJrpcTransportImplGetAccountsByCodeHash( + that: this, + codeHash: codeHash, + limit: limit, + continuation: continuation, + ); /// Get config of transport. /// Returns json-encoded BlockchainConfigDef or throw error - Future getBlockchainConfig({required bool force}) => - NekotonBridge.instance.api - .crateApiMergedJrpcTransportImplGetBlockchainConfig( - that: this, force: force); + Future getBlockchainConfig({required bool force}) => NekotonBridge + .instance + .api + .crateApiMergedJrpcTransportImplGetBlockchainConfig( + that: this, + force: force, + ); /// Get contract state of address and return json-encoded RawContractState or throw error - Future getContractState({required String address}) => - NekotonBridge.instance.api - .crateApiMergedJrpcTransportImplGetContractState( - that: this, address: address); + Future getContractState({required String address}) => NekotonBridge + .instance + .api + .crateApiMergedJrpcTransportImplGetContractState( + that: this, + address: address, + ); /// Call get_dst_transaction of nekoton's transport and /// return option json-encoded RawTransaction or throw error Future getDstTransaction({required String messageHash}) => NekotonBridge.instance.api .crateApiMergedJrpcTransportImplGetDstTransaction( - that: this, messageHash: messageHash); + that: this, + messageHash: messageHash, + ); Future getFeeFactors({required bool isMasterchain}) => NekotonBridge.instance.api.crateApiMergedJrpcTransportImplGetFeeFactors( - that: this, isMasterchain: isMasterchain); + that: this, + isMasterchain: isMasterchain, + ); /// Get full contract state of address and return json-encoded FullContractState or throw error Future getFullContractState({required String address}) => NekotonBridge.instance.api .crateApiMergedJrpcTransportImplGetFullContractState( - that: this, address: address); + that: this, + address: address, + ); /// Get id of network or throw error - Future getNetworkId() => - NekotonBridge.instance.api.crateApiMergedJrpcTransportImplGetNetworkId( - that: this, - ); + Future getNetworkId() => NekotonBridge.instance.api + .crateApiMergedJrpcTransportImplGetNetworkId(that: this); /// Get transport signature id and return it or throw error - Future getSignatureId() => - NekotonBridge.instance.api.crateApiMergedJrpcTransportImplGetSignatureId( - that: this, - ); + Future getSignatureId() => NekotonBridge.instance.api + .crateApiMergedJrpcTransportImplGetSignatureId(that: this); /// Get single transaction by its hash. /// Return json-encoded Transaction or throw error Future getTransaction({required String hash}) => NekotonBridge - .instance.api + .instance + .api .crateApiMergedJrpcTransportImplGetTransaction(that: this, hash: hash); /// Get list of transactions by address. /// Return json-encoded TransactionsList or throw error - Future getTransactions( - {required String address, String? fromLt, required int count}) => + Future getTransactions({ + required String address, + String? fromLt, + required int count, + }) => NekotonBridge.instance.api.crateApiMergedJrpcTransportImplGetTransactions( - that: this, address: address, fromLt: fromLt, count: count); - - factory JrpcTransportImpl( - {required JrpcConnectionDartWrapper jrpcConnection}) => - NekotonBridge.instance.api - .crateApiMergedJrpcTransportImplNew(jrpcConnection: jrpcConnection); + that: this, + address: address, + fromLt: fromLt, + count: count, + ); - Future simulateTransactionTree( - {required String signedMessage, - required List ignoredComputePhaseCodes, - required List ignoredActionPhaseCodes}) => - NekotonBridge.instance.api - .crateApiMergedJrpcTransportImplSimulateTransactionTree( - that: this, - signedMessage: signedMessage, - ignoredComputePhaseCodes: ignoredComputePhaseCodes, - ignoredActionPhaseCodes: ignoredActionPhaseCodes); + factory JrpcTransportImpl({ + required JrpcConnectionDartWrapper jrpcConnection, + }) => NekotonBridge.instance.api.crateApiMergedJrpcTransportImplNew( + jrpcConnection: jrpcConnection, + ); + + Future simulateTransactionTree({ + required String signedMessage, + required List ignoredComputePhaseCodes, + required List ignoredActionPhaseCodes, + }) => NekotonBridge.instance.api + .crateApiMergedJrpcTransportImplSimulateTransactionTree( + that: this, + signedMessage: signedMessage, + ignoredComputePhaseCodes: ignoredComputePhaseCodes, + ignoredActionPhaseCodes: ignoredActionPhaseCodes, + ); @override int get hashCode => innerTransport.hashCode; @@ -1357,40 +1524,46 @@ class JrpcTransportImpl { class KeystoreDartWrapper { final ArcKeyStoreApiBoxTrait innerKeystore; - const KeystoreDartWrapper({ - required this.innerKeystore, - }); + const KeystoreDartWrapper({required this.innerKeystore}); /// Insert new key in keystore. Returns json-encoded KeystoreEntry or throw error. /// input - json-encoded action specified for signer eg EncryptedKeyCreateInput or /// DerivedKeyCreateInput or LedgerKeyCreateInput Future addKey({required KeySigner signer, required String input}) => NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperAddKey( - that: this, signer: signer, input: input); + that: this, + signer: signer, + input: input, + ); /// Method same as add_key but allows add multiple keys at time. /// Returns json-encoded list of KeyStoreEntry or throw error. /// input - json-encoded list of inputs, same as in add_key method Future addKeys({required KeySigner signer, required String input}) => NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperAddKeys( - that: this, signer: signer, input: input); - - /// Clear KeyStore and remove all entries and all sensitive data. - Future clearKeystore() => - NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperClearKeystore( that: this, + signer: signer, + input: input, ); + /// Clear KeyStore and remove all entries and all sensitive data. + Future clearKeystore() => NekotonBridge.instance.api + .crateApiMergedKeystoreDartWrapperClearKeystore(that: this); + /// Decrypt json-encoded EncryptedData in data. /// input - json-encoded action for signer eg EncryptedKeyPassword or DerivedKeyPassword or /// LedgerSignInput. /// Returns base64-encoded data or throw error. - Future decrypt( - {required KeySigner signer, - required String data, - required String input}) => - NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperDecrypt( - that: this, signer: signer, data: data, input: input); + Future decrypt({ + required KeySigner signer, + required String data, + required String input, + }) => NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperDecrypt( + that: this, + signer: signer, + data: data, + input: input, + ); /// Encrypt data with specified algorithm and input specified for signer eg EncryptedKeyPassword /// or DerivedKeyPassword or LedgerSignInput. @@ -1399,143 +1572,168 @@ class KeystoreDartWrapper { /// public_keys - list of keys that is used for encryption. /// /// Returns json-encoded list of EncryptedData or throw error. - Future encrypt( - {required KeySigner signer, - required String data, - required List publicKeys, - required String algorithm, - required String input}) => - NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperEncrypt( - that: this, - signer: signer, - data: data, - publicKeys: publicKeys, - algorithm: algorithm, - input: input); + Future encrypt({ + required KeySigner signer, + required String data, + required List publicKeys, + required String algorithm, + required String input, + }) => NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperEncrypt( + that: this, + signer: signer, + data: data, + publicKeys: publicKeys, + algorithm: algorithm, + input: input, + ); /// Export key and get its seed phrase and mnemonic type. /// THIS METHOD DO NOT WORK for LEDGER. /// Returns json-encoded EncryptedKeyExportSeedOutput or DerivedKeyExportOutput or throw error - Future exportSeed( - {required KeySigner signer, required String input}) => - NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperExportSeed( - that: this, signer: signer, input: input); + Future exportSeed({ + required KeySigner signer, + required String input, + }) => NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperExportSeed( + that: this, + signer: signer, + input: input, + ); /// Get list of json-encoded KeyStoreEntry or throw error - Future getEntries() => - NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperGetEntries( - that: this, - ); + Future getEntries() => NekotonBridge.instance.api + .crateApiMergedKeystoreDartWrapperGetEntries(that: this); /// Return list of public keys specified for signer or throw error. /// input - json-encoded action specified for signer eg EncryptedKeyGetPublicKeys or /// DerivedKeyGetPublicKeys or LedgerKeyGetPublicKeys - Future> getPublicKeys( - {required KeySigner signer, required String input}) => + Future> getPublicKeys({ + required KeySigner signer, + required String input, + }) => NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperGetPublicKeys( - that: this, signer: signer, input: input); + that: this, + signer: signer, + input: input, + ); /// Check if password cached for specified public_key. /// duration - timestamp in milliseconds of expiring key. /// Returns true/false or throw error. - Future isPasswordCached( - {required String publicKey, required BigInt duration}) => - NekotonBridge.instance.api - .crateApiMergedKeystoreDartWrapperIsPasswordCached( - that: this, publicKey: publicKey, duration: duration); + Future isPasswordCached({ + required String publicKey, + required BigInt duration, + }) => NekotonBridge.instance.api + .crateApiMergedKeystoreDartWrapperIsPasswordCached( + that: this, + publicKey: publicKey, + duration: duration, + ); // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. /// Create KeyStore or throw error - static Future newInstance( - {required StorageDartWrapper storage, - required List signers, - LedgerConnectionDartWrapper? ledgerConnection}) => - NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperNew( - storage: storage, - signers: signers, - ledgerConnection: ledgerConnection); + static Future newInstance({ + required StorageDartWrapper storage, + required List signers, + LedgerConnectionDartWrapper? ledgerConnection, + }) => NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperNew( + storage: storage, + signers: signers, + ledgerConnection: ledgerConnection, + ); /// Try to reload all stored data. Future reloadKeystore() => NekotonBridge.instance.api - .crateApiMergedKeystoreDartWrapperReloadKeystore( - that: this, - ); + .crateApiMergedKeystoreDartWrapperReloadKeystore(that: this); /// Remove public key from KeyStore and return json-encoded KeyStoreEntry if it was removed. Future removeKey({required String publicKey}) => NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperRemoveKey( - that: this, publicKey: publicKey); + that: this, + publicKey: publicKey, + ); /// Remove list of public key from KeyStore and return json-encoded list of KeyStoreEntry's /// that were removed or throw error. Future removeKeys({required List publicKeys}) => NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperRemoveKeys( - that: this, publicKeys: publicKeys); + that: this, + publicKeys: publicKeys, + ); /// Sign data and return base64-encoded signature or throw error. /// input - json-encoded action for signer eg EncryptedKeyPassword or DerivedKeyPassword or /// LedgerSignInput. /// signature_id - id of transport /// message - unsigned message that should be signed. - Future sign( - {required KeySigner signer, - required UnsignedMessageImpl message, - required String input, - int? signatureId}) => - NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperSign( - that: this, - signer: signer, - message: message, - input: input, - signatureId: signatureId); + Future sign({ + required KeySigner signer, + required UnsignedMessageImpl message, + required String input, + int? signatureId, + }) => NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperSign( + that: this, + signer: signer, + message: message, + input: input, + signatureId: signatureId, + ); /// Same method as sign. /// data - base64-encoded string. /// Return SignedData or throw error. - Future signData( - {required KeySigner signer, - required String data, - required String input, - int? signatureId}) => - NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperSignData( - that: this, - signer: signer, - data: data, - input: input, - signatureId: signatureId); + Future signData({ + required KeySigner signer, + required String data, + required String input, + int? signatureId, + }) => NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperSignData( + that: this, + signer: signer, + data: data, + input: input, + signatureId: signatureId, + ); /// Same method as sign. /// data - base64-encoded string. /// Return SignedDataRaw or throw error. - Future signDataRaw( - {required KeySigner signer, - required String data, - required String input, - int? signatureId}) => - NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperSignDataRaw( - that: this, - signer: signer, - data: data, - input: input, - signatureId: signatureId); + Future signDataRaw({ + required KeySigner signer, + required String data, + required String input, + int? signatureId, + }) => NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperSignDataRaw( + that: this, + signer: signer, + data: data, + input: input, + signatureId: signatureId, + ); /// Update key data. /// Returns updated json-encoded KeyStoreEntry or throw error. /// input - json-encoded action specified for signer eg EncryptedKeyUpdateParams or /// DerivedKeyUpdateParams or LedgerUpdateKeyInput - Future updateKey( - {required KeySigner signer, required String input}) => - NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperUpdateKey( - that: this, signer: signer, input: input); + Future updateKey({ + required KeySigner signer, + required String input, + }) => NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperUpdateKey( + that: this, + signer: signer, + input: input, + ); /// Verify if data is valid with specified signers and connection or not. /// Return true/false or throw error. - static Future verifyData( - {required List signers, - LedgerConnectionDartWrapper? ledgerConnection, - required String data}) => - NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperVerifyData( - signers: signers, ledgerConnection: ledgerConnection, data: data); + static Future verifyData({ + required List signers, + LedgerConnectionDartWrapper? ledgerConnection, + required String data, + }) => NekotonBridge.instance.api.crateApiMergedKeystoreDartWrapperVerifyData( + signers: signers, + ledgerConnection: ledgerConnection, + data: data, + ); @override int get hashCode => innerKeystore.hashCode; @@ -1582,13 +1780,18 @@ class LatestBlock { class LedgerConnectionDartWrapper { final ArcLedgerConnectionBoxTrait innerConnection; - const LedgerConnectionDartWrapper.raw({ - required this.innerConnection, - }); + const LedgerConnectionDartWrapper.raw({required this.innerConnection}); - factory LedgerConnectionDartWrapper({required String instanceHash}) => - NekotonBridge.instance.api.crateApiMergedLedgerConnectionDartWrapperNew( - instanceHash: instanceHash); + factory LedgerConnectionDartWrapper({ + required FutureOr Function(int) onGetPublicKey, + required FutureOr Function(int, int?, Uint8List) onSign, + required FutureOr Function(int, int, int?, Uint8List, String) + onSignTransaction, + }) => NekotonBridge.instance.api.crateApiMergedLedgerConnectionDartWrapperNew( + onGetPublicKey: onGetPublicKey, + onSign: onSign, + onSignTransaction: onSignTransaction, + ); @override int get hashCode => innerConnection.hashCode; @@ -1601,62 +1804,13 @@ class LedgerConnectionDartWrapper { innerConnection == other.innerConnection; } -/// Implementation of nekoton's LedgerConnection -class LedgerConnectionImpl { - final String instanceHash; - - const LedgerConnectionImpl.raw({ - required this.instanceHash, - }); - - factory LedgerConnectionImpl({required String instanceHash}) => - NekotonBridge.instance.api - .crateApiMergedLedgerConnectionImplNew(instanceHash: instanceHash); - - @override - int get hashCode => instanceHash.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LedgerConnectionImpl && - runtimeType == other.runtimeType && - instanceHash == other.instanceHash; -} - @freezed sealed class MnemonicType with _$MnemonicType { const MnemonicType._(); const factory MnemonicType.legacy() = MnemonicType_Legacy; - const factory MnemonicType.bip39( - Bip39MnemonicData field0, - ) = MnemonicType_Bip39; -} - -class MyClass { - final int val; - - const MyClass({ - required this.val, - }); - - Future myFormat() => - NekotonBridge.instance.api.crateApiMergedMyClassMyFormat( - that: this, - ); - - // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - static Future newInstance({required int a}) => - NekotonBridge.instance.api.crateApiMergedMyClassNew(a: a); - - @override - int get hashCode => val.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is MyClass && runtimeType == other.runtimeType && val == other.val; + const factory MnemonicType.bip39(Bip39MnemonicData field0) = + MnemonicType_Bip39; } ///---------------------------- @@ -1670,7 +1824,6 @@ enum PollingMethod { /// Block-walking for GQL or fast refresh for ADNL. /// Used when there are some pending transactions reliable, - ; } ///---------------------------- @@ -1680,13 +1833,13 @@ enum PollingMethod { class ProtoConnectionDartWrapper { final ArcProtoConnectionBoxTrait innerConnection; - const ProtoConnectionDartWrapper.raw({ - required this.innerConnection, - }); + const ProtoConnectionDartWrapper.raw({required this.innerConnection}); - factory ProtoConnectionDartWrapper({required String instanceHash}) => - NekotonBridge.instance.api.crateApiMergedProtoConnectionDartWrapperNew( - instanceHash: instanceHash); + factory ProtoConnectionDartWrapper({ + required FutureOr Function(Uint8List) onPost, + }) => NekotonBridge.instance.api.crateApiMergedProtoConnectionDartWrapperNew( + onPost: onPost, + ); @override int get hashCode => innerConnection.hashCode; @@ -1707,93 +1860,109 @@ class ProtoConnectionDartWrapper { class ProtoTransportImpl { final ArcTransportBoxTrait innerTransport; - const ProtoTransportImpl.raw({ - required this.innerTransport, - }); + const ProtoTransportImpl.raw({required this.innerTransport}); /// Get list of accounts by code hash. Returns json-encoded AccountsList or throw error - Future getAccountsByCodeHash( - {required String codeHash, - required int limit, - String? continuation}) => - NekotonBridge.instance.api - .crateApiMergedProtoTransportImplGetAccountsByCodeHash( - that: this, - codeHash: codeHash, - limit: limit, - continuation: continuation); + Future getAccountsByCodeHash({ + required String codeHash, + required int limit, + String? continuation, + }) => NekotonBridge.instance.api + .crateApiMergedProtoTransportImplGetAccountsByCodeHash( + that: this, + codeHash: codeHash, + limit: limit, + continuation: continuation, + ); /// Get config of transport. /// Returns json-encoded BlockchainConfigDef or throw error - Future getBlockchainConfig({required bool force}) => - NekotonBridge.instance.api - .crateApiMergedProtoTransportImplGetBlockchainConfig( - that: this, force: force); + Future getBlockchainConfig({required bool force}) => NekotonBridge + .instance + .api + .crateApiMergedProtoTransportImplGetBlockchainConfig( + that: this, + force: force, + ); /// Get contract state of address and return json-encoded RawContractState or throw error - Future getContractState({required String address}) => - NekotonBridge.instance.api - .crateApiMergedProtoTransportImplGetContractState( - that: this, address: address); + Future getContractState({required String address}) => NekotonBridge + .instance + .api + .crateApiMergedProtoTransportImplGetContractState( + that: this, + address: address, + ); /// Call get_dst_transaction of nekoton's transport and /// return option json-encoded RawTransaction or throw error Future getDstTransaction({required String messageHash}) => NekotonBridge.instance.api .crateApiMergedProtoTransportImplGetDstTransaction( - that: this, messageHash: messageHash); + that: this, + messageHash: messageHash, + ); Future getFeeFactors({required bool isMasterchain}) => NekotonBridge.instance.api.crateApiMergedProtoTransportImplGetFeeFactors( - that: this, isMasterchain: isMasterchain); + that: this, + isMasterchain: isMasterchain, + ); /// Get full contract state of address and return json-encoded FullContractState or throw error Future getFullContractState({required String address}) => NekotonBridge.instance.api .crateApiMergedProtoTransportImplGetFullContractState( - that: this, address: address); + that: this, + address: address, + ); /// Get id of network or throw error - Future getNetworkId() => - NekotonBridge.instance.api.crateApiMergedProtoTransportImplGetNetworkId( - that: this, - ); + Future getNetworkId() => NekotonBridge.instance.api + .crateApiMergedProtoTransportImplGetNetworkId(that: this); /// Get transport signature id and return it or throw error - Future getSignatureId() => - NekotonBridge.instance.api.crateApiMergedProtoTransportImplGetSignatureId( - that: this, - ); + Future getSignatureId() => NekotonBridge.instance.api + .crateApiMergedProtoTransportImplGetSignatureId(that: this); /// Get single transaction by its hash. /// Return json-encoded Transaction or throw error Future getTransaction({required String hash}) => NekotonBridge - .instance.api + .instance + .api .crateApiMergedProtoTransportImplGetTransaction(that: this, hash: hash); /// Get list of transactions by address. /// Return json-encoded TransactionsList or throw error - Future getTransactions( - {required String address, String? fromLt, required int count}) => - NekotonBridge.instance.api - .crateApiMergedProtoTransportImplGetTransactions( - that: this, address: address, fromLt: fromLt, count: count); - - factory ProtoTransportImpl( - {required ProtoConnectionDartWrapper protoConnection}) => - NekotonBridge.instance.api.crateApiMergedProtoTransportImplNew( - protoConnection: protoConnection); - - Future simulateTransactionTree( - {required String signedMessage, - required List ignoredComputePhaseCodes, - required List ignoredActionPhaseCodes}) => - NekotonBridge.instance.api - .crateApiMergedProtoTransportImplSimulateTransactionTree( - that: this, - signedMessage: signedMessage, - ignoredComputePhaseCodes: ignoredComputePhaseCodes, - ignoredActionPhaseCodes: ignoredActionPhaseCodes); + Future getTransactions({ + required String address, + String? fromLt, + required int count, + }) => NekotonBridge.instance.api + .crateApiMergedProtoTransportImplGetTransactions( + that: this, + address: address, + fromLt: fromLt, + count: count, + ); + + factory ProtoTransportImpl({ + required ProtoConnectionDartWrapper protoConnection, + }) => NekotonBridge.instance.api.crateApiMergedProtoTransportImplNew( + protoConnection: protoConnection, + ); + + Future simulateTransactionTree({ + required String signedMessage, + required List ignoredComputePhaseCodes, + required List ignoredActionPhaseCodes, + }) => NekotonBridge.instance.api + .crateApiMergedProtoTransportImplSimulateTransactionTree( + that: this, + signedMessage: signedMessage, + ignoredComputePhaseCodes: ignoredComputePhaseCodes, + ignoredActionPhaseCodes: ignoredActionPhaseCodes, + ); @override int get hashCode => innerTransport.hashCode; @@ -1813,13 +1982,21 @@ class ProtoTransportImpl { class StorageDartWrapper { final ArcStorageBoxTrait innerStorage; - const StorageDartWrapper.raw({ - required this.innerStorage, - }); - - factory StorageDartWrapper({required String instanceHash}) => - NekotonBridge.instance.api - .crateApiMergedStorageDartWrapperNew(instanceHash: instanceHash); + const StorageDartWrapper.raw({required this.innerStorage}); + + factory StorageDartWrapper({ + required FutureOr Function(String) onGet, + required FutureOr Function(String, String) onSet, + required FutureOr Function(String, String) onSetUnchecked, + required FutureOr Function(String) onRemove, + required FutureOr Function(String) onRemoveUnchecked, + }) => NekotonBridge.instance.api.crateApiMergedStorageDartWrapperNew( + onGet: onGet, + onSet: onSet, + onSetUnchecked: onSetUnchecked, + onRemove: onRemove, + onRemoveUnchecked: onRemoveUnchecked, + ); @override int get hashCode => innerStorage.hashCode; @@ -1832,93 +2009,66 @@ class StorageDartWrapper { innerStorage == other.innerStorage; } -/// Implementation of nekoton's Storage -class StorageImpl { - final String instanceHash; - - const StorageImpl({ - required this.instanceHash, - }); - - // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - static Future newInstance({required String instanceHash}) => - NekotonBridge.instance.api - .crateApiMergedStorageImplNew(instanceHash: instanceHash); - - @override - int get hashCode => instanceHash.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is StorageImpl && - runtimeType == other.runtimeType && - instanceHash == other.instanceHash; -} - ///---------------------------- /// CONTENT OF src/nekoton_wrapper/core/token_wallet/token_wallet_api.rs ///---------------------------- class TokenWalletDartWrapper { final ArcTokenWalletBoxTrait innerWallet; - const TokenWalletDartWrapper({ - required this.innerWallet, - }); + const TokenWalletDartWrapper({required this.innerWallet}); /// Get address of wallet. - Future address() => - NekotonBridge.instance.api.crateApiMergedTokenWalletDartWrapperAddress( - that: this, - ); + Future address() => NekotonBridge.instance.api + .crateApiMergedTokenWalletDartWrapperAddress(that: this); /// Get balance of wallet. /// Return string representation of rust BigUInt - Future balance() => - NekotonBridge.instance.api.crateApiMergedTokenWalletDartWrapperBalance( - that: this, - ); + Future balance() => NekotonBridge.instance.api + .crateApiMergedTokenWalletDartWrapperBalance(that: this); /// Get json-encoded ContractState or throw error. Future contractState() => NekotonBridge.instance.api - .crateApiMergedTokenWalletDartWrapperContractState( + .crateApiMergedTokenWalletDartWrapperContractState(that: this); + + Future estimateMinAttachedAmount({ + required String destination, + required String amount, + required bool notifyReceiver, + String? payload, + }) => NekotonBridge.instance.api + .crateApiMergedTokenWalletDartWrapperEstimateMinAttachedAmount( that: this, + destination: destination, + amount: amount, + notifyReceiver: notifyReceiver, + payload: payload, ); - Future estimateMinAttachedAmount( - {required String destination, - required String amount, - required bool notifyReceiver, - String? payload}) => - NekotonBridge.instance.api - .crateApiMergedTokenWalletDartWrapperEstimateMinAttachedAmount( - that: this, - destination: destination, - amount: amount, - notifyReceiver: notifyReceiver, - payload: payload); - /// Get details about root contract by address of TokenWallet /// Return json-encoded RootTokenContractDetails /// or throw error. - static Future getTokenRootDetails( - {required ArcTransportBoxTrait transport, - required String tokenRootAddress}) => - NekotonBridge.instance.api - .crateApiMergedTokenWalletDartWrapperGetTokenRootDetails( - transport: transport, tokenRootAddress: tokenRootAddress); + static Future getTokenRootDetails({ + required ArcTransportBoxTrait transport, + required String tokenRootAddress, + }) => NekotonBridge.instance.api + .crateApiMergedTokenWalletDartWrapperGetTokenRootDetails( + transport: transport, + tokenRootAddress: tokenRootAddress, + ); /// Get details about root contract by address of TokenWallet /// Return json-encoded list with 2 positions: /// 0: Address of root contract /// 1: RootTokenContractDetails of root contract /// or throw error. - static Future getTokenRootDetailsFromTokenWallet( - {required ArcTransportBoxTrait transport, - required String tokenWalletAddress}) => - NekotonBridge.instance.api - .crateApiMergedTokenWalletDartWrapperGetTokenRootDetailsFromTokenWallet( - transport: transport, tokenWalletAddress: tokenWalletAddress); + static Future getTokenRootDetailsFromTokenWallet({ + required ArcTransportBoxTrait transport, + required String tokenWalletAddress, + }) => NekotonBridge.instance.api + .crateApiMergedTokenWalletDartWrapperGetTokenRootDetailsFromTokenWallet( + transport: transport, + tokenWalletAddress: tokenWalletAddress, + ); /// Get details about token wallet by address of wallet /// address - address of wallet @@ -1926,33 +2076,40 @@ class TokenWalletDartWrapper { /// 0: TokenWalletDetails /// 1: RootTokenContractDetails /// or throw error - static Future getTokenWalletDetails( - {required ArcTransportBoxTrait transport, required String address}) => - NekotonBridge.instance.api - .crateApiMergedTokenWalletDartWrapperGetTokenWalletDetails( - transport: transport, address: address); + static Future getTokenWalletDetails({ + required ArcTransportBoxTrait transport, + required String address, + }) => NekotonBridge.instance.api + .crateApiMergedTokenWalletDartWrapperGetTokenWalletDetails( + transport: transport, + address: address, + ); /// Handle block of blockchain. /// block - base64-encoded Block. /// Return true or throw error. - Future handleBlock({required String block}) => - NekotonBridge.instance.api - .crateApiMergedTokenWalletDartWrapperHandleBlock( - that: this, block: block); - - /// Get address of owner of wallet. - Future owner() => - NekotonBridge.instance.api.crateApiMergedTokenWalletDartWrapperOwner( + Future handleBlock({required String block}) => NekotonBridge + .instance + .api + .crateApiMergedTokenWalletDartWrapperHandleBlock( that: this, + block: block, ); + /// Get address of owner of wallet. + Future owner() => NekotonBridge.instance.api + .crateApiMergedTokenWalletDartWrapperOwner(that: this); + /// Preload transactions of wallet. /// from_lt - offset for loading data, string representation of u64 /// Returns true or throw error. - Future preloadTransactions({required String fromLt}) => - NekotonBridge.instance.api - .crateApiMergedTokenWalletDartWrapperPreloadTransactions( - that: this, fromLt: fromLt); + Future preloadTransactions({required String fromLt}) => NekotonBridge + .instance + .api + .crateApiMergedTokenWalletDartWrapperPreloadTransactions( + that: this, + fromLt: fromLt, + ); /// Prepare transferring tokens from this wallet to other. /// destination - address of account that should receive token @@ -1962,58 +2119,57 @@ class TokenWalletDartWrapper { /// attached_amount - string representation of rust u64, default 400000000. How many native tokens /// should be attached to transfer. /// Return json-encoded InternalMessage or throw error. - Future prepareTransfer( - {required String destination, - required String amount, - required bool notifyReceiver, - String? attachedAmount, - String? payload, - String? remainingGasTo}) => - NekotonBridge.instance.api - .crateApiMergedTokenWalletDartWrapperPrepareTransfer( - that: this, - destination: destination, - amount: amount, - notifyReceiver: notifyReceiver, - attachedAmount: attachedAmount, - payload: payload, - remainingGasTo: remainingGasTo); + Future prepareTransfer({ + required String destination, + required String amount, + required bool notifyReceiver, + String? attachedAmount, + String? payload, + String? remainingGasTo, + }) => NekotonBridge.instance.api + .crateApiMergedTokenWalletDartWrapperPrepareTransfer( + that: this, + destination: destination, + amount: amount, + notifyReceiver: notifyReceiver, + attachedAmount: attachedAmount, + payload: payload, + remainingGasTo: remainingGasTo, + ); /// Refresh wallet and update its data. /// Returns true or throw error. - Future refresh() => - NekotonBridge.instance.api.crateApiMergedTokenWalletDartWrapperRefresh( - that: this, - ); + Future refresh() => NekotonBridge.instance.api + .crateApiMergedTokenWalletDartWrapperRefresh(that: this); /// Create TokenWallet by subscribing to its instance. /// owner - address of account that is owner of wallet /// root_token_contract - address of contract in blockchain - static Future subscribe( - {required String instanceHash, - required String owner, - required String rootTokenContract, - required ArcTransportBoxTrait transport, - required bool preloadTransactions}) => + static Future subscribe({ + required String owner, + required String rootTokenContract, + required ArcTransportBoxTrait transport, + required bool preloadTransactions, + required FutureOr Function(String) onBalanceChanged, + required FutureOr Function(String) onTransactionsFound, + }) => NekotonBridge.instance.api.crateApiMergedTokenWalletDartWrapperSubscribe( - instanceHash: instanceHash, - owner: owner, - rootTokenContract: rootTokenContract, - transport: transport, - preloadTransactions: preloadTransactions); + owner: owner, + rootTokenContract: rootTokenContract, + transport: transport, + preloadTransactions: preloadTransactions, + onBalanceChanged: onBalanceChanged, + onTransactionsFound: onTransactionsFound, + ); /// Get symbol of contract of wallet. /// Return json-encoded Symbol or throw error - Future symbol() => - NekotonBridge.instance.api.crateApiMergedTokenWalletDartWrapperSymbol( - that: this, - ); + Future symbol() => NekotonBridge.instance.api + .crateApiMergedTokenWalletDartWrapperSymbol(that: this); /// Get json-encoded TokenWalletVersion or throw error. - Future version() => - NekotonBridge.instance.api.crateApiMergedTokenWalletDartWrapperVersion( - that: this, - ); + Future version() => NekotonBridge.instance.api + .crateApiMergedTokenWalletDartWrapperVersion(that: this); @override int get hashCode => innerWallet.hashCode; @@ -2029,123 +2185,126 @@ class TokenWalletDartWrapper { class TonWalletDartWrapper { final ArcTonWalletBoxTrait innerWallet; - const TonWalletDartWrapper({ - required this.innerWallet, - }); + const TonWalletDartWrapper({required this.innerWallet}); /// Get address of wallet. - Future address() => - NekotonBridge.instance.api.crateApiMergedTonWalletDartWrapperAddress( - that: this, + Future address() => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperAddress(that: this); + + static Future appendSignatureToWalletV5R1Payload({ + required String payload, + required String base64Signature, + }) => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperAppendSignatureToWalletV5R1Payload( + payload: payload, + base64Signature: base64Signature, ); - static Future appendSignatureToWalletV5R1Payload( - {required String payload, required String base64Signature}) => - NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperAppendSignatureToWalletV5R1Payload( - payload: payload, base64Signature: base64Signature); - /// Get json-encoded ContractState or throw error. Future contractState() => NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperContractState( - that: this, - ); + .crateApiMergedTonWalletDartWrapperContractState(that: this); /// Get optional list of custodians. /// Returns list of public keys. - Future?> custodians() => - NekotonBridge.instance.api.crateApiMergedTonWalletDartWrapperCustodians( - that: this, - ); + Future?> custodians() => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperCustodians(that: this); /// Get json-encoded TonWalletDetails or throw error. - Future details() => - NekotonBridge.instance.api.crateApiMergedTonWalletDartWrapperDetails( - that: this, - ); + Future details() => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperDetails(that: this); /// Calculate fees for transaction. /// signed_message - json-encoded SignedMessage. /// execution_options - json-encoded ExecutionOptions. /// Returns fees as string representation of u128 or throw error. - Future estimateFees( - {required String signedMessage, String? executionOptions}) => + Future estimateFees({ + required String signedMessage, + String? executionOptions, + }) => NekotonBridge.instance.api.crateApiMergedTonWalletDartWrapperEstimateFees( - that: this, - signedMessage: signedMessage, - executionOptions: executionOptions); + that: this, + signedMessage: signedMessage, + executionOptions: executionOptions, + ); /// Find list of wallets of public_key and return them. /// wallet_types - json-encoded list of WalletType. /// public_key - key of account where wallets must be found. /// Return json-encoded list of ExistingWalletInfo or throw error. - static Future findExistingWallets( - {required ArcTransportBoxTrait transport, - required String publicKey, - required int workchainId, - required String walletTypes}) => - NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperFindExistingWallets( - transport: transport, - publicKey: publicKey, - workchainId: workchainId, - walletTypes: walletTypes); + static Future findExistingWallets({ + required ArcTransportBoxTrait transport, + required String publicKey, + required int workchainId, + required String walletTypes, + }) => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperFindExistingWallets( + transport: transport, + publicKey: publicKey, + workchainId: workchainId, + walletTypes: walletTypes, + ); /// Get list of custodians of account by address. /// Return list of public keys or throw error. - static Future> getCustodians( - {required ArcTransportBoxTrait transport, required String address}) => - NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperGetCustodians( - transport: transport, address: address); + static Future> getCustodians({ + required ArcTransportBoxTrait transport, + required String address, + }) => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperGetCustodians( + transport: transport, + address: address, + ); /// Get information of account by its address. /// Return json-encoded ExistingWalletInfo or throw error. - static Future getExistingWalletInfo( - {required ArcTransportBoxTrait transport, required String address}) => - NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperGetExistingWalletInfo( - transport: transport, address: address); + static Future getExistingWalletInfo({ + required ArcTransportBoxTrait transport, + required String address, + }) => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperGetExistingWalletInfo( + transport: transport, + address: address, + ); - Future getWalletV5R1Seqno( - {required String rawCurrentState, required String publicKey}) => - NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperGetWalletV5R1Seqno( - that: this, - rawCurrentState: rawCurrentState, - publicKey: publicKey); + Future getWalletV5R1Seqno({ + required String rawCurrentState, + required String publicKey, + }) => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperGetWalletV5R1Seqno( + that: this, + rawCurrentState: rawCurrentState, + publicKey: publicKey, + ); /// Handle block of blockchain. /// block - base64-encoded Block. /// Return true or throw error. Future handleBlock({required String block}) => NekotonBridge - .instance.api + .instance + .api .crateApiMergedTonWalletDartWrapperHandleBlock(that: this, block: block); Future makeStateInit() => NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperMakeStateInit( - that: this, - ); + .crateApiMergedTonWalletDartWrapperMakeStateInit(that: this); /// Get list of json-encoded PendingTransaction or throw error. Future pendingTransactions() => NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperPendingTransactions( - that: this, - ); + .crateApiMergedTonWalletDartWrapperPendingTransactions(that: this); /// Get PollingMethod of wallet or throw error. Future pollingMethod() => NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperPollingMethod( - that: this, - ); + .crateApiMergedTonWalletDartWrapperPollingMethod(that: this); /// Preload transactions of wallet. /// from_lt - offset for loading data, string representation of u64 /// Returns true or throw error. - Future preloadTransactions({required String fromLt}) => - NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperPreloadTransactions( - that: this, fromLt: fromLt); + Future preloadTransactions({required String fromLt}) => NekotonBridge + .instance + .api + .crateApiMergedTonWalletDartWrapperPreloadTransactions( + that: this, + fromLt: fromLt, + ); /// Prepare transaction for confirmation. /// contract_state - json-encoded RawContractState @@ -2153,18 +2312,19 @@ class TonWalletDartWrapper { /// transaction_id - id of transaction. /// expiration - json-encoded Expiration /// Returns UnsignedMessage or throw error. - Future prepareConfirmTransaction( - {required String contractState, - required String publicKey, - required String transactionId, - required String expiration}) => - NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperPrepareConfirmTransaction( - that: this, - contractState: contractState, - publicKey: publicKey, - transactionId: transactionId, - expiration: expiration); + Future prepareConfirmTransaction({ + required String contractState, + required String publicKey, + required String transactionId, + required String expiration, + }) => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperPrepareConfirmTransaction( + that: this, + contractState: contractState, + publicKey: publicKey, + transactionId: transactionId, + expiration: expiration, + ); /// Prepare TonWallet for deploy action. /// expiration - json-encoded Expiration. @@ -2172,36 +2332,40 @@ class TonWalletDartWrapper { Future prepareDeploy({required String expiration}) => NekotonBridge.instance.api .crateApiMergedTonWalletDartWrapperPrepareDeploy( - that: this, expiration: expiration); + that: this, + expiration: expiration, + ); /// Prepare TonWallet for deploy actions if wallet is multisig. /// expiration - json-encoded Expiration. /// custodians - list of public keys of custodians. /// req_confirms - count of required confirmations from 1 to custodians count /// Returns UnsignedMessage or throw error. - Future prepareDeployWithMultipleOwners( - {required String expiration, - required List custodians, - required int reqConfirms, - int? expirationTime}) => - NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperPrepareDeployWithMultipleOwners( - that: this, - expiration: expiration, - custodians: custodians, - reqConfirms: reqConfirms, - expirationTime: expirationTime); - - Future<(String, String)> prepareNonexistWalletV5R1MessageBody( - {required String expiration, - required String params, - required bool isInternalFlow}) => - NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperPrepareNonexistWalletV5R1MessageBody( - that: this, - expiration: expiration, - params: params, - isInternalFlow: isInternalFlow); + Future prepareDeployWithMultipleOwners({ + required String expiration, + required List custodians, + required int reqConfirms, + int? expirationTime, + }) => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperPrepareDeployWithMultipleOwners( + that: this, + expiration: expiration, + custodians: custodians, + reqConfirms: reqConfirms, + expirationTime: expirationTime, + ); + + Future<(String, String)> prepareNonexistWalletV5R1MessageBody({ + required String expiration, + required String params, + required bool isInternalFlow, + }) => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperPrepareNonexistWalletV5R1MessageBody( + that: this, + expiration: expiration, + params: params, + isInternalFlow: isInternalFlow, + ); /// Prepare transferring tokens from this wallet to other. /// contract_state - json-encoded RawContractState @@ -2209,111 +2373,144 @@ class TonWalletDartWrapper { /// expiration - json-encoded Expiration /// params - json-encoded list of TonWalletTransferParams /// Returns UnsignedMessage or throw error. - Future prepareTransfer( - {required String contractState, - required String publicKey, - required String expiration, - required String params}) => - NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperPrepareTransfer( - that: this, - contractState: contractState, - publicKey: publicKey, - expiration: expiration, - params: params); + Future prepareTransfer({ + required String contractState, + required String publicKey, + required String expiration, + required String params, + }) => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperPrepareTransfer( + that: this, + contractState: contractState, + publicKey: publicKey, + expiration: expiration, + params: params, + ); /// Returns (hash, payload) - Future<(String, String)> prepareWalletV5R1MessageBody( - {required String contractState, - required String publicKey, - required String expiration, - required String params, - required bool isInternalFlow}) => - NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperPrepareWalletV5R1MessageBody( - that: this, - contractState: contractState, - publicKey: publicKey, - expiration: expiration, - params: params, - isInternalFlow: isInternalFlow); - - /// Get public key of wallet. - Future publicKey() => - NekotonBridge.instance.api.crateApiMergedTonWalletDartWrapperPublicKey( + Future<(String, String)> prepareWalletV5R1MessageBody({ + required String contractState, + required String publicKey, + required String expiration, + required String params, + required bool isInternalFlow, + }) => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperPrepareWalletV5R1MessageBody( that: this, + contractState: contractState, + publicKey: publicKey, + expiration: expiration, + params: params, + isInternalFlow: isInternalFlow, ); + /// Get public key of wallet. + Future publicKey() => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperPublicKey(that: this); + /// Refresh wallet and update its data. /// Returns true or throw error. - Future refresh() => - NekotonBridge.instance.api.crateApiMergedTonWalletDartWrapperRefresh( - that: this, - ); + Future refresh() => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperRefresh(that: this); /// Send message to blockchain and receive transaction of send. /// signed_message - json-encoded SignedMessage. /// Returns json-encoded PendingTransaction or throw error. Future send({required String signedMessage}) => NekotonBridge.instance.api.crateApiMergedTonWalletDartWrapperSend( - that: this, signedMessage: signedMessage); + that: this, + signedMessage: signedMessage, + ); /// Create TonWallet by subscribing to its instance by public_key. /// wallet_type - is json-encoded WalletType. /// public_key - is string representation of key - static Future subscribe( - {required String instanceHash, - required int workchainId, - required String publicKey, - required String walletType, - required ArcTransportBoxTrait transport}) => - NekotonBridge.instance.api.crateApiMergedTonWalletDartWrapperSubscribe( - instanceHash: instanceHash, - workchainId: workchainId, - publicKey: publicKey, - walletType: walletType, - transport: transport); + static Future subscribe({ + required int workchainId, + required String publicKey, + required String walletType, + required ArcTransportBoxTrait transport, + required FutureOr Function(String) onMessageSent, + required FutureOr Function(String) onMessageExpired, + required FutureOr Function(String) onStateChanged, + required FutureOr Function(String) onTransactionsFound, + required FutureOr Function(String) onDetailsChanged, + required FutureOr Function(String) onCustodiansChanged, + required FutureOr Function(String) onUnconfirmedTransactionsChanged, + }) => NekotonBridge.instance.api.crateApiMergedTonWalletDartWrapperSubscribe( + workchainId: workchainId, + publicKey: publicKey, + walletType: walletType, + transport: transport, + onMessageSent: onMessageSent, + onMessageExpired: onMessageExpired, + onStateChanged: onStateChanged, + onTransactionsFound: onTransactionsFound, + onDetailsChanged: onDetailsChanged, + onCustodiansChanged: onCustodiansChanged, + onUnconfirmedTransactionsChanged: onUnconfirmedTransactionsChanged, + ); /// Create TonWallet by subscribing to its instance by address of wallet. - static Future subscribeByAddress( - {required String instanceHash, - required String address, - required ArcTransportBoxTrait transport}) => - NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperSubscribeByAddress( - instanceHash: instanceHash, - address: address, - transport: transport); + static Future subscribeByAddress({ + required String address, + required ArcTransportBoxTrait transport, + required FutureOr Function(String) onMessageSent, + required FutureOr Function(String) onMessageExpired, + required FutureOr Function(String) onStateChanged, + required FutureOr Function(String) onTransactionsFound, + required FutureOr Function(String) onDetailsChanged, + required FutureOr Function(String) onCustodiansChanged, + required FutureOr Function(String) onUnconfirmedTransactionsChanged, + }) => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperSubscribeByAddress( + address: address, + transport: transport, + onMessageSent: onMessageSent, + onMessageExpired: onMessageExpired, + onStateChanged: onStateChanged, + onTransactionsFound: onTransactionsFound, + onDetailsChanged: onDetailsChanged, + onCustodiansChanged: onCustodiansChanged, + onUnconfirmedTransactionsChanged: onUnconfirmedTransactionsChanged, + ); /// Create TonWallet by subscribing to its instance by existed instance. /// existing_wallet - json-encoded ExistingWalletInfo. - static Future subscribeByExisting( - {required String instanceHash, - required String existingWallet, - required ArcTransportBoxTrait transport}) => - NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperSubscribeByExisting( - instanceHash: instanceHash, - existingWallet: existingWallet, - transport: transport); + static Future subscribeByExisting({ + required String existingWallet, + required ArcTransportBoxTrait transport, + required FutureOr Function(String) onMessageSent, + required FutureOr Function(String) onMessageExpired, + required FutureOr Function(String) onStateChanged, + required FutureOr Function(String) onTransactionsFound, + required FutureOr Function(String) onDetailsChanged, + required FutureOr Function(String) onCustodiansChanged, + required FutureOr Function(String) onUnconfirmedTransactionsChanged, + }) => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperSubscribeByExisting( + existingWallet: existingWallet, + transport: transport, + onMessageSent: onMessageSent, + onMessageExpired: onMessageExpired, + onStateChanged: onStateChanged, + onTransactionsFound: onTransactionsFound, + onDetailsChanged: onDetailsChanged, + onCustodiansChanged: onCustodiansChanged, + onUnconfirmedTransactionsChanged: onUnconfirmedTransactionsChanged, + ); /// Get json-encoded list of MultisigPendingTransaction or throw error. Future unconfirmedTransactions() => NekotonBridge.instance.api - .crateApiMergedTonWalletDartWrapperUnconfirmedTransactions( - that: this, - ); + .crateApiMergedTonWalletDartWrapperUnconfirmedTransactions(that: this); /// Get json-encoded WalletType or throw error. - Future walletType() => - NekotonBridge.instance.api.crateApiMergedTonWalletDartWrapperWalletType( - that: this, - ); + Future walletType() => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperWalletType(that: this); /// Get workchain of wallet. - Future workchain() => - NekotonBridge.instance.api.crateApiMergedTonWalletDartWrapperWorkchain( - that: this, - ); + Future workchain() => NekotonBridge.instance.api + .crateApiMergedTonWalletDartWrapperWorkchain(that: this); @override int get hashCode => innerWallet.hashCode; @@ -2330,27 +2527,19 @@ class TonWalletDartWrapper { class UnsignedMessageImpl { final ArcUnsignedMessageBoxTrait innerMessage; - const UnsignedMessageImpl({ - required this.innerMessage, - }); + const UnsignedMessageImpl({required this.innerMessage}); /// Return current expiration timestamp of UnsignedMessage /// Returns secondsSinceEpoch - Future expireAt() => - NekotonBridge.instance.api.crateApiMergedUnsignedMessageImplExpireAt( - that: this, - ); + Future expireAt() => NekotonBridge.instance.api + .crateApiMergedUnsignedMessageImplExpireAt(that: this); /// Returns base64 encoded hash string of UnsignedMessage - Future hash() => - NekotonBridge.instance.api.crateApiMergedUnsignedMessageImplHash( - that: this, - ); + Future hash() => NekotonBridge.instance.api + .crateApiMergedUnsignedMessageImplHash(that: this); Future refreshTimeout() => NekotonBridge.instance.api - .crateApiMergedUnsignedMessageImplRefreshTimeout( - that: this, - ); + .crateApiMergedUnsignedMessageImplRefreshTimeout(that: this); /// Sign message with signature and return json-encoded SignedMessage. /// signature receives from KeyStore.sign where data is UnsignedMessage.hash @@ -2358,10 +2547,8 @@ class UnsignedMessageImpl { .crateApiMergedUnsignedMessageImplSign(that: this, signature: signature); /// Sign message with fake signature and return json-encoded SignedMessage or throws error - Future signFake() => - NekotonBridge.instance.api.crateApiMergedUnsignedMessageImplSignFake( - that: this, - ); + Future signFake() => NekotonBridge.instance.api + .crateApiMergedUnsignedMessageImplSignFake(that: this); @override int get hashCode => innerMessage.hashCode; diff --git a/packages/nekoton_bridge/lib/src/api/merged.freezed.dart b/packages/nekoton_bridge/lib/src/api/merged.freezed.dart index e72ad28c..70ebeb92 100644 --- a/packages/nekoton_bridge/lib/src/api/merged.freezed.dart +++ b/packages/nekoton_bridge/lib/src/api/merged.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,90 +11,244 @@ part of 'merged.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$MnemonicType { - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is MnemonicType); - } - @override - int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'MnemonicType()'; - } + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MnemonicType); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'MnemonicType()'; +} + + } /// @nodoc -class $MnemonicTypeCopyWith<$Res> { - $MnemonicTypeCopyWith(MnemonicType _, $Res Function(MnemonicType) __); +class $MnemonicTypeCopyWith<$Res> { +$MnemonicTypeCopyWith(MnemonicType _, $Res Function(MnemonicType) __); +} + + +/// Adds pattern-matching-related methods to [MnemonicType]. +extension MnemonicTypePatterns on MnemonicType { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( MnemonicType_Legacy value)? legacy,TResult Function( MnemonicType_Bip39 value)? bip39,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case MnemonicType_Legacy() when legacy != null: +return legacy(_that);case MnemonicType_Bip39() when bip39 != null: +return bip39(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( MnemonicType_Legacy value) legacy,required TResult Function( MnemonicType_Bip39 value) bip39,}){ +final _that = this; +switch (_that) { +case MnemonicType_Legacy(): +return legacy(_that);case MnemonicType_Bip39(): +return bip39(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( MnemonicType_Legacy value)? legacy,TResult? Function( MnemonicType_Bip39 value)? bip39,}){ +final _that = this; +switch (_that) { +case MnemonicType_Legacy() when legacy != null: +return legacy(_that);case MnemonicType_Bip39() when bip39 != null: +return bip39(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function()? legacy,TResult Function( Bip39MnemonicData field0)? bip39,required TResult orElse(),}) {final _that = this; +switch (_that) { +case MnemonicType_Legacy() when legacy != null: +return legacy();case MnemonicType_Bip39() when bip39 != null: +return bip39(_that.field0);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function() legacy,required TResult Function( Bip39MnemonicData field0) bip39,}) {final _that = this; +switch (_that) { +case MnemonicType_Legacy(): +return legacy();case MnemonicType_Bip39(): +return bip39(_that.field0);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function()? legacy,TResult? Function( Bip39MnemonicData field0)? bip39,}) {final _that = this; +switch (_that) { +case MnemonicType_Legacy() when legacy != null: +return legacy();case MnemonicType_Bip39() when bip39 != null: +return bip39(_that.field0);case _: + return null; + +} +} + } /// @nodoc + class MnemonicType_Legacy extends MnemonicType { - const MnemonicType_Legacy() : super._(); + const MnemonicType_Legacy(): super._(); + + - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is MnemonicType_Legacy); - } - @override - int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'MnemonicType.legacy()'; - } + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MnemonicType_Legacy); } + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'MnemonicType.legacy()'; +} + + +} + + + + /// @nodoc + class MnemonicType_Bip39 extends MnemonicType { - const MnemonicType_Bip39(this.field0) : super._(); + const MnemonicType_Bip39(this.field0): super._(); + - final Bip39MnemonicData field0; + final Bip39MnemonicData field0; - /// Create a copy of MnemonicType - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $MnemonicType_Bip39CopyWith get copyWith => - _$MnemonicType_Bip39CopyWithImpl(this, _$identity); +/// Create a copy of MnemonicType +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$MnemonicType_Bip39CopyWith get copyWith => _$MnemonicType_Bip39CopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is MnemonicType_Bip39 && - (identical(other.field0, field0) || other.field0 == field0)); - } - @override - int get hashCode => Object.hash(runtimeType, field0); - @override - String toString() { - return 'MnemonicType.bip39(field0: $field0)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MnemonicType_Bip39&&(identical(other.field0, field0) || other.field0 == field0)); } -/// @nodoc -abstract mixin class $MnemonicType_Bip39CopyWith<$Res> - implements $MnemonicTypeCopyWith<$Res> { - factory $MnemonicType_Bip39CopyWith( - MnemonicType_Bip39 value, $Res Function(MnemonicType_Bip39) _then) = - _$MnemonicType_Bip39CopyWithImpl; - @useResult - $Res call({Bip39MnemonicData field0}); + +@override +int get hashCode => Object.hash(runtimeType,field0); + +@override +String toString() { + return 'MnemonicType.bip39(field0: $field0)'; } + +} + +/// @nodoc +abstract mixin class $MnemonicType_Bip39CopyWith<$Res> implements $MnemonicTypeCopyWith<$Res> { + factory $MnemonicType_Bip39CopyWith(MnemonicType_Bip39 value, $Res Function(MnemonicType_Bip39) _then) = _$MnemonicType_Bip39CopyWithImpl; +@useResult +$Res call({ + Bip39MnemonicData field0 +}); + + + + +} /// @nodoc class _$MnemonicType_Bip39CopyWithImpl<$Res> implements $MnemonicType_Bip39CopyWith<$Res> { @@ -104,19 +257,16 @@ class _$MnemonicType_Bip39CopyWithImpl<$Res> final MnemonicType_Bip39 _self; final $Res Function(MnemonicType_Bip39) _then; - /// Create a copy of MnemonicType - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? field0 = null, - }) { - return _then(MnemonicType_Bip39( - null == field0 - ? _self.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as Bip39MnemonicData, - )); - } +/// Create a copy of MnemonicType +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) { + return _then(MnemonicType_Bip39( +null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable +as Bip39MnemonicData, + )); +} + + } // dart format on diff --git a/packages/nekoton_bridge/lib/src/frb_generated.dart b/packages/nekoton_bridge/lib/src/frb_generated.dart index a2d3e316..a1899562 100644 --- a/packages/nekoton_bridge/lib/src/frb_generated.dart +++ b/packages/nekoton_bridge/lib/src/frb_generated.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field @@ -9,15 +9,20 @@ import 'dart:convert'; import 'frb_generated.dart'; import 'frb_generated.io.dart' if (dart.library.js_interop) 'frb_generated.web.dart'; +import 'lib.dart'; import 'nekoton_wrapper/core/keystore/models.dart'; import 'nekoton_wrapper/crypto/models.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'utils/caller.dart'; import 'utils/logger.dart'; /// Main entrypoint of the Rust API -class NekotonBridge extends BaseEntrypoint { +class NekotonBridge + extends + BaseEntrypoint< + NekotonBridgeApi, + NekotonBridgeApiImpl, + NekotonBridgeWire + > { @internal static final instance = NekotonBridge._(); @@ -28,22 +33,20 @@ class NekotonBridge extends BaseEntrypoint - get apiImplConstructor => NekotonBridgeApiImpl.new; + get apiImplConstructor => NekotonBridgeApiImpl.new; @override WireConstructor get wireConstructor => @@ -68,8204 +71,14309 @@ class NekotonBridge extends BaseEntrypoint '2.10.0'; + String get codegenVersion => '2.11.1'; @override - int get rustContentHash => 1332520111; + int get rustContentHash => 1704458980; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( - stem: 'flutter_nekoton_bridge', - ioDirectory: 'rust/target/release/', - webPrefix: 'pkg/', - ); + stem: 'flutter_nekoton_bridge', + ioDirectory: 'rust/target/release/', + webPrefix: 'pkg/', + ); } abstract class NekotonBridgeApi extends BaseApi { - Future crateApiMergedAccountsStorageImplAddAccount( - {required AccountsStorageImpl that, required String account}); + ArcFnStringDartFnFuture + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnMessageExpired({ + required GenericContractSubscriptionHandlerImpl that, + }); - Future crateApiMergedAccountsStorageImplAddAccounts( - {required AccountsStorageImpl that, required String accounts}); + ArcFnStringDartFnFuture + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnMessageSent({ + required GenericContractSubscriptionHandlerImpl that, + }); - Future crateApiMergedAccountsStorageImplAddTokenWallet( - {required AccountsStorageImpl that, - required String accountAddress, - required String networkGroup, - required String rootTokenContract}); + ArcFnStringDartFnFuture + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnStateChanged({ + required GenericContractSubscriptionHandlerImpl that, + }); - Future crateApiMergedAccountsStorageImplAddTokenWallets( - {required AccountsStorageImpl that, - required String accountAddress, - required String networkGroup, - required List rootTokenContracts}); + ArcFnStringDartFnFuture + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnTransactionsFound({ + required GenericContractSubscriptionHandlerImpl that, + }); - Future crateApiMergedAccountsStorageImplClear( - {required AccountsStorageImpl that}); + void + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnMessageExpired({ + required GenericContractSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onMessageExpired, + }); - Future crateApiMergedAccountsStorageImplGetEntries( - {required AccountsStorageImpl that}); + void + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnMessageSent({ + required GenericContractSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onMessageSent, + }); - Future crateApiMergedAccountsStorageImplNew( - {required StorageDartWrapper storage}); + void + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnStateChanged({ + required GenericContractSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onStateChanged, + }); - Future crateApiMergedAccountsStorageImplReload( - {required AccountsStorageImpl that}); + void + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnTransactionsFound({ + required GenericContractSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onTransactionsFound, + }); - Future crateApiMergedAccountsStorageImplRemoveAccount( - {required AccountsStorageImpl that, required String accountAddress}); + bool crateApiMergedGqlConnectionImplAutoAccessorGetIsLocal({ + required GqlConnectionImpl that, + }); - Future crateApiMergedAccountsStorageImplRemoveAccounts( - {required AccountsStorageImpl that, - required List accountAddresses}); + ArcFnStringDartFnFutureString + crateApiMergedGqlConnectionImplAutoAccessorGetOnPost({ + required GqlConnectionImpl that, + }); - Future crateApiMergedAccountsStorageImplRemoveTokenWallet( - {required AccountsStorageImpl that, - required String accountAddress, - required String networkGroup, - required String rootTokenContract}); + void crateApiMergedGqlConnectionImplAutoAccessorSetIsLocal({ + required GqlConnectionImpl that, + required bool isLocal, + }); - Future crateApiMergedAccountsStorageImplRemoveTokenWallets( - {required AccountsStorageImpl that, - required String accountAddress, - required String networkGroup, - required List rootTokenContracts}); + void crateApiMergedGqlConnectionImplAutoAccessorSetOnPost({ + required GqlConnectionImpl that, + required ArcFnStringDartFnFutureString onPost, + }); - Future crateApiMergedAccountsStorageImplRenameAccount( - {required AccountsStorageImpl that, - required String accountAddress, - required String name}); + ArcFnStringDartFnFuture + crateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorGetOnBalanceChanged({ + required JettonWalletSubscriptionHandlerImpl that, + }); - Future crateApiMergedAccountsStorageImplVerifyData( - {required String data}); + ArcFnStringDartFnFuture + crateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFound({ + required JettonWalletSubscriptionHandlerImpl that, + }); - void crateApiMergedCallSendResult( - {required String id, required DynamicValue value}); + void + crateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorSetOnBalanceChanged({ + required JettonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onBalanceChanged, + }); - Future crateApiMergedCallerTestClassCallSomeFunc( - {required CallerTestClass that}); + void + crateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFound({ + required JettonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onTransactionsFound, + }); - Future crateApiMergedCallerTestClassNew( - {required String instanceHash, required int value}); + ArcFnStringDartFnFutureString + crateApiMergedJrpcConnectionImplAutoAccessorGetOnPost({ + required JrpcConnectionImpl that, + }); - Stream crateApiMergedCreateLogStream(); + void crateApiMergedJrpcConnectionImplAutoAccessorSetOnPost({ + required JrpcConnectionImpl that, + required ArcFnStringDartFnFutureString onPost, + }); - Future crateApiMergedGenericContractDartWrapperAddress( - {required GenericContractDartWrapper that}); + ArcFnU16DartFnFutureVecU8 + crateApiMergedLedgerConnectionImplAutoAccessorGetOnGetPublicKey({ + required LedgerConnectionImpl that, + }); - Future crateApiMergedGenericContractDartWrapperContractState( - {required GenericContractDartWrapper that}); + ArcFnU16OptionI32VecU8DartFnFutureVecU8 + crateApiMergedLedgerConnectionImplAutoAccessorGetOnSign({ + required LedgerConnectionImpl that, + }); - Future crateApiMergedGenericContractDartWrapperEstimateFees( - {required GenericContractDartWrapper that, - required String signedMessage}); + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + crateApiMergedLedgerConnectionImplAutoAccessorGetOnSignTransaction({ + required LedgerConnectionImpl that, + }); - Future - crateApiMergedGenericContractDartWrapperExecuteTransactionLocally( - {required GenericContractDartWrapper that, - required String signedMessage, - required String options}); + void crateApiMergedLedgerConnectionImplAutoAccessorSetOnGetPublicKey({ + required LedgerConnectionImpl that, + required ArcFnU16DartFnFutureVecU8 onGetPublicKey, + }); - Future crateApiMergedGenericContractDartWrapperHandleBlock( - {required GenericContractDartWrapper that, required String block}); + void crateApiMergedLedgerConnectionImplAutoAccessorSetOnSign({ + required LedgerConnectionImpl that, + required ArcFnU16OptionI32VecU8DartFnFutureVecU8 onSign, + }); - Future crateApiMergedGenericContractDartWrapperPendingTransactions( - {required GenericContractDartWrapper that}); + void crateApiMergedLedgerConnectionImplAutoAccessorSetOnSignTransaction({ + required LedgerConnectionImpl that, + required ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 onSignTransaction, + }); - Future crateApiMergedGenericContractDartWrapperPollingMethod( - {required GenericContractDartWrapper that}); + ArcFnVecU8DartFnFutureVecU8 + crateApiMergedProtoConnectionImplAutoAccessorGetOnPost({ + required ProtoConnectionImpl that, + }); - Future crateApiMergedGenericContractDartWrapperPreloadTransactions( - {required GenericContractDartWrapper that, required String fromLt}); + void crateApiMergedProtoConnectionImplAutoAccessorSetOnPost({ + required ProtoConnectionImpl that, + required ArcFnVecU8DartFnFutureVecU8 onPost, + }); - Future crateApiMergedGenericContractDartWrapperRefresh( - {required GenericContractDartWrapper that}); + ArcFnStringDartFnFutureOptionString + crateApiMergedStorageImplAutoAccessorGetOnGet({required StorageImpl that}); - Future crateApiMergedGenericContractDartWrapperSend( - {required GenericContractDartWrapper that, - required String signedMessage}); + ArcFnStringDartFnFuture crateApiMergedStorageImplAutoAccessorGetOnRemove({ + required StorageImpl that, + }); - Future - crateApiMergedGenericContractDartWrapperSubscribe( - {required String instanceHash, - required String address, - required bool preloadTransactions, - required ArcTransportBoxTrait transport}); + ArcFnStringDartFnFuture + crateApiMergedStorageImplAutoAccessorGetOnRemoveUnchecked({ + required StorageImpl that, + }); - GqlConnectionDartWrapper crateApiMergedGqlConnectionDartWrapperNew( - {required bool isLocal, required String instanceHash}); + ArcFnStringStringDartFnFuture crateApiMergedStorageImplAutoAccessorGetOnSet({ + required StorageImpl that, + }); - Future crateApiMergedGqlTransportImplGetAccountsByCodeHash( - {required GqlTransportImpl that, - required String codeHash, - required int limit, - String? continuation}); + ArcFnStringStringDartFnFuture + crateApiMergedStorageImplAutoAccessorGetOnSetUnchecked({ + required StorageImpl that, + }); - Future crateApiMergedGqlTransportImplGetBlock( - {required GqlTransportImpl that, required String id}); + void crateApiMergedStorageImplAutoAccessorSetOnGet({ + required StorageImpl that, + required ArcFnStringDartFnFutureOptionString onGet, + }); - Future crateApiMergedGqlTransportImplGetBlockchainConfig( - {required GqlTransportImpl that, required bool force}); + void crateApiMergedStorageImplAutoAccessorSetOnRemove({ + required StorageImpl that, + required ArcFnStringDartFnFuture onRemove, + }); - Future crateApiMergedGqlTransportImplGetContractState( - {required GqlTransportImpl that, required String address}); + void crateApiMergedStorageImplAutoAccessorSetOnRemoveUnchecked({ + required StorageImpl that, + required ArcFnStringDartFnFuture onRemoveUnchecked, + }); - Future crateApiMergedGqlTransportImplGetDstTransaction( - {required GqlTransportImpl that, required String messageHash}); + void crateApiMergedStorageImplAutoAccessorSetOnSet({ + required StorageImpl that, + required ArcFnStringStringDartFnFuture onSet, + }); - Future crateApiMergedGqlTransportImplGetFeeFactors( - {required GqlTransportImpl that, required bool isMasterchain}); + void crateApiMergedStorageImplAutoAccessorSetOnSetUnchecked({ + required StorageImpl that, + required ArcFnStringStringDartFnFuture onSetUnchecked, + }); - Future crateApiMergedGqlTransportImplGetFullContractState( - {required GqlTransportImpl that, required String address}); + Future crateApiMergedStorageImplNew({ + required ArcFnStringDartFnFutureOptionString onGet, + required ArcFnStringStringDartFnFuture onSet, + required ArcFnStringStringDartFnFuture onSetUnchecked, + required ArcFnStringDartFnFuture onRemove, + required ArcFnStringDartFnFuture onRemoveUnchecked, + }); - Future crateApiMergedGqlTransportImplGetLatestBlock( - {required GqlTransportImpl that, required String address}); + ArcFnStringDartFnFuture + crateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorGetOnBalanceChanged({ + required TokenWalletSubscriptionHandlerImpl that, + }); - Future crateApiMergedGqlTransportImplGetNetworkId( - {required GqlTransportImpl that}); + ArcFnStringDartFnFuture + crateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFound({ + required TokenWalletSubscriptionHandlerImpl that, + }); - Future crateApiMergedGqlTransportImplGetSignatureId( - {required GqlTransportImpl that}); + void + crateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorSetOnBalanceChanged({ + required TokenWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onBalanceChanged, + }); - Future crateApiMergedGqlTransportImplGetTransaction( - {required GqlTransportImpl that, required String hash}); + void + crateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFound({ + required TokenWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onTransactionsFound, + }); - Future crateApiMergedGqlTransportImplGetTransactions( - {required GqlTransportImpl that, - required String address, - String? fromLt, - required int count}); + ArcFnStringDartFnFuture + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnCustodiansChanged({ + required TonWalletSubscriptionHandlerImpl that, + }); - GqlTransportImpl crateApiMergedGqlTransportImplNew( - {required GqlConnectionDartWrapper gqlConnection}); + ArcFnStringDartFnFuture + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnDetailsChanged({ + required TonWalletSubscriptionHandlerImpl that, + }); - Future crateApiMergedGqlTransportImplSimulateTransactionTree( - {required GqlTransportImpl that, - required String signedMessage, - required List ignoredComputePhaseCodes, - required List ignoredActionPhaseCodes}); + ArcFnStringDartFnFuture + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnMessageExpired({ + required TonWalletSubscriptionHandlerImpl that, + }); - Future crateApiMergedGqlTransportImplWaitForNextBlock( - {required GqlTransportImpl that, - required String currentBlockId, - required String address, - required BigInt timeout}); + ArcFnStringDartFnFuture + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnMessageSent({ + required TonWalletSubscriptionHandlerImpl that, + }); - Stream crateApiMergedInitCaller(); + ArcFnStringDartFnFuture + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnStateChanged({ + required TonWalletSubscriptionHandlerImpl that, + }); - Future crateApiMergedInitLogger( - {required LogLevel level, required bool mobileLogger}); + ArcFnStringDartFnFuture + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFound({ + required TonWalletSubscriptionHandlerImpl that, + }); - Future crateApiMergedJettonWalletDartWrapperAddress( - {required JettonWalletDartWrapper that}); + ArcFnStringDartFnFuture + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnUnconfirmedTransactionsChanged({ + required TonWalletSubscriptionHandlerImpl that, + }); - Future crateApiMergedJettonWalletDartWrapperBalance( - {required JettonWalletDartWrapper that}); + void + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnCustodiansChanged({ + required TonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onCustodiansChanged, + }); - Future crateApiMergedJettonWalletDartWrapperContractState( - {required JettonWalletDartWrapper that}); + void + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnDetailsChanged({ + required TonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onDetailsChanged, + }); - Future crateApiMergedJettonWalletDartWrapperEstimateMinAttachedAmount( - {required JettonWalletDartWrapper that, required String destination}); + void + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnMessageExpired({ + required TonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onMessageExpired, + }); - Future crateApiMergedJettonWalletDartWrapperGetJettonRootDetails( - {required ArcTransportBoxTrait transport, - required String tokenRootAddress}); + void + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnMessageSent({ + required TonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onMessageSent, + }); - Future - crateApiMergedJettonWalletDartWrapperGetJettonRootDetailsFromJettonWallet( - {required ArcTransportBoxTrait transport, - required String tokenWalletAddress}); + void + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnStateChanged({ + required TonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onStateChanged, + }); - Future crateApiMergedJettonWalletDartWrapperGetJettonWalletDetails( - {required ArcTransportBoxTrait transport, required String address}); + void + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFound({ + required TonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onTransactionsFound, + }); - Future crateApiMergedJettonWalletDartWrapperHandleBlock( - {required JettonWalletDartWrapper that, required String block}); + void + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnUnconfirmedTransactionsChanged({ + required TonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onUnconfirmedTransactionsChanged, + }); - Future crateApiMergedJettonWalletDartWrapperOwner( - {required JettonWalletDartWrapper that}); + Future crateApiMergedAccountsStorageImplAddAccount({ + required AccountsStorageImpl that, + required String account, + }); - Future crateApiMergedJettonWalletDartWrapperPreloadTransactions( - {required JettonWalletDartWrapper that, required String fromLt}); + Future crateApiMergedAccountsStorageImplAddAccounts({ + required AccountsStorageImpl that, + required String accounts, + }); - Future crateApiMergedJettonWalletDartWrapperPrepareTransfer( - {required JettonWalletDartWrapper that, - required String amount, - required String destination, - required String remainingGasTo, - String? customPayload, - required String callbackValue, - String? callbackPayload, - String? attachedAmount}); + Future crateApiMergedAccountsStorageImplAddTokenWallet({ + required AccountsStorageImpl that, + required String accountAddress, + required String networkGroup, + required String rootTokenContract, + }); - Future crateApiMergedJettonWalletDartWrapperRefresh( - {required JettonWalletDartWrapper that}); + Future crateApiMergedAccountsStorageImplAddTokenWallets({ + required AccountsStorageImpl that, + required String accountAddress, + required String networkGroup, + required List rootTokenContracts, + }); - Future - crateApiMergedJettonWalletDartWrapperSubscribe( - {required String instanceHash, - required String owner, - required String rootTokenContract, - required ArcTransportBoxTrait transport, - required bool preloadTransactions}); - - JrpcConnectionDartWrapper crateApiMergedJrpcConnectionDartWrapperNew( - {required String instanceHash}); - - Future crateApiMergedJrpcTransportImplGetAccountsByCodeHash( - {required JrpcTransportImpl that, - required String codeHash, - required int limit, - String? continuation}); - - Future crateApiMergedJrpcTransportImplGetBlockchainConfig( - {required JrpcTransportImpl that, required bool force}); - - Future crateApiMergedJrpcTransportImplGetContractState( - {required JrpcTransportImpl that, required String address}); - - Future crateApiMergedJrpcTransportImplGetDstTransaction( - {required JrpcTransportImpl that, required String messageHash}); - - Future crateApiMergedJrpcTransportImplGetFeeFactors( - {required JrpcTransportImpl that, required bool isMasterchain}); - - Future crateApiMergedJrpcTransportImplGetFullContractState( - {required JrpcTransportImpl that, required String address}); - - Future crateApiMergedJrpcTransportImplGetNetworkId( - {required JrpcTransportImpl that}); - - Future crateApiMergedJrpcTransportImplGetSignatureId( - {required JrpcTransportImpl that}); - - Future crateApiMergedJrpcTransportImplGetTransaction( - {required JrpcTransportImpl that, required String hash}); - - Future crateApiMergedJrpcTransportImplGetTransactions( - {required JrpcTransportImpl that, - required String address, - String? fromLt, - required int count}); - - JrpcTransportImpl crateApiMergedJrpcTransportImplNew( - {required JrpcConnectionDartWrapper jrpcConnection}); - - Future crateApiMergedJrpcTransportImplSimulateTransactionTree( - {required JrpcTransportImpl that, - required String signedMessage, - required List ignoredComputePhaseCodes, - required List ignoredActionPhaseCodes}); - - Future crateApiMergedKeystoreDartWrapperAddKey( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String input}); - - Future crateApiMergedKeystoreDartWrapperAddKeys( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String input}); - - Future crateApiMergedKeystoreDartWrapperClearKeystore( - {required KeystoreDartWrapper that}); - - Future crateApiMergedKeystoreDartWrapperDecrypt( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String data, - required String input}); - - Future crateApiMergedKeystoreDartWrapperEncrypt( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String data, - required List publicKeys, - required String algorithm, - required String input}); - - Future crateApiMergedKeystoreDartWrapperExportSeed( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String input}); - - Future crateApiMergedKeystoreDartWrapperGetEntries( - {required KeystoreDartWrapper that}); - - Future> crateApiMergedKeystoreDartWrapperGetPublicKeys( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String input}); - - Future crateApiMergedKeystoreDartWrapperIsPasswordCached( - {required KeystoreDartWrapper that, - required String publicKey, - required BigInt duration}); - - Future crateApiMergedKeystoreDartWrapperNew( - {required StorageDartWrapper storage, - required List signers, - LedgerConnectionDartWrapper? ledgerConnection}); - - Future crateApiMergedKeystoreDartWrapperReloadKeystore( - {required KeystoreDartWrapper that}); - - Future crateApiMergedKeystoreDartWrapperRemoveKey( - {required KeystoreDartWrapper that, required String publicKey}); - - Future crateApiMergedKeystoreDartWrapperRemoveKeys( - {required KeystoreDartWrapper that, required List publicKeys}); - - Future crateApiMergedKeystoreDartWrapperSign( - {required KeystoreDartWrapper that, - required KeySigner signer, - required UnsignedMessageImpl message, - required String input, - int? signatureId}); - - Future crateApiMergedKeystoreDartWrapperSignData( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String data, - required String input, - int? signatureId}); - - Future crateApiMergedKeystoreDartWrapperSignDataRaw( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String data, - required String input, - int? signatureId}); - - Future crateApiMergedKeystoreDartWrapperUpdateKey( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String input}); - - Future crateApiMergedKeystoreDartWrapperVerifyData( - {required List signers, - LedgerConnectionDartWrapper? ledgerConnection, - required String data}); - - LedgerConnectionDartWrapper crateApiMergedLedgerConnectionDartWrapperNew( - {required String instanceHash}); - - LedgerConnectionImpl crateApiMergedLedgerConnectionImplNew( - {required String instanceHash}); - - Future crateApiMergedMyClassMyFormat({required MyClass that}); - - Future crateApiMergedMyClassNew({required int a}); + Future crateApiMergedAccountsStorageImplClear({ + required AccountsStorageImpl that, + }); - bool crateApiMergedNtCheckPublicKey({required String publicKey}); + Future crateApiMergedAccountsStorageImplGetEntries({ + required AccountsStorageImpl that, + }); - List crateApiMergedNtCodeToTvc({required String code}); + Future crateApiMergedAccountsStorageImplNew({ + required StorageDartWrapper storage, + }); - Future crateApiMergedNtComputeStorageFee( - {required String config, - required String account, - required int utime, - required bool isMasterchain}); - - String crateApiMergedNtComputeTonWalletAddress( - {required String publicKey, - required String walletType, - required int workchain}); - - Future crateApiMergedNtCreateExternalMessage( - {required String dst, - required String contractAbi, - required String method, - String? stateInit, - required String input, - required String publicKey, - required int timeout}); - - Future crateApiMergedNtCreateExternalMessageWithoutSignature( - {required String dst, - required String contractAbi, - required String method, - String? stateInit, - required String input, - required int timeout}); - - Future crateApiMergedNtCreateRawExternalMessage( - {required String dst, - String? stateInit, - String? body, - required int timeout}); - - Future crateApiMergedNtDecodeEvent( - {required String messageBody, - required String contractAbi, - String? event}); - - Future crateApiMergedNtDecodeInput( - {required String messageBody, - required String contractAbi, - String? method, - required bool internal}); - - Future crateApiMergedNtDecodeOutput( - {required String messageBody, - required String contractAbi, - String? method}); - - Future crateApiMergedNtDecodeTransaction( - {required String transaction, - required String contractAbi, - String? method}); - - Future crateApiMergedNtDecodeTransactionEvents( - {required String transaction, required String contractAbi}); - - String crateApiMergedNtDeriveFromPhrase( - {required String phrase, required MnemonicType mnemonicType}); - - String crateApiMergedNtEncodeComment( - {required String comment, required bool plain}); - - Future crateApiMergedNtEncodeInternalInput( - {required String contractAbi, - required String method, - required String input}); - - Future crateApiMergedNtEncodeInternalMessage( - {String? src, - required String dst, - required bool bounce, - String? stateInit, - String? body, - required String amount, - bool? bounced}); - - Future> crateApiMergedNtExecuteLocal( - {required String config, - required String account, - required String message, - required int utime, - required bool disableSignatureCheck, - String? overwriteBalance, - int? globalId}); + Future crateApiMergedAccountsStorageImplReload({ + required AccountsStorageImpl that, + }); - String crateApiMergedNtExtractPublicKey({required String boc}); + Future crateApiMergedAccountsStorageImplRemoveAccount({ + required AccountsStorageImpl that, + required String accountAddress, + }); - GeneratedKeyG crateApiMergedNtGenerateKey( - {required MnemonicType accountType}); + Future crateApiMergedAccountsStorageImplRemoveAccounts({ + required AccountsStorageImpl that, + required List accountAddresses, + }); - String crateApiMergedNtGetBocHash({required String boc}); + Future crateApiMergedAccountsStorageImplRemoveTokenWallet({ + required AccountsStorageImpl that, + required String accountAddress, + required String networkGroup, + required String rootTokenContract, + }); - String? crateApiMergedNtGetCodeSalt({required String code}); + Future crateApiMergedAccountsStorageImplRemoveTokenWallets({ + required AccountsStorageImpl that, + required String accountAddress, + required String networkGroup, + required List rootTokenContracts, + }); - int crateApiMergedNtGetContractTypeNumber({required String walletType}); + Future crateApiMergedAccountsStorageImplRenameAccount({ + required AccountsStorageImpl that, + required String accountAddress, + required String name, + }); - Future> crateApiMergedNtGetExpectedAddress( - {required String tvc, - required String contractAbi, - required int workchainId, - String? publicKey, - required String initData}); + Future crateApiMergedAccountsStorageImplVerifyData({ + required String data, + }); - List crateApiMergedNtGetHints({required String input}); + Stream crateApiMergedCreateLogStream(); - Future crateApiMergedNtMakeFullAccountBoc({String? accountStuffBoc}); + Future crateApiMergedGenericContractDartWrapperAddress({ + required GenericContractDartWrapper that, + }); - List crateApiMergedNtMergeTvc( - {required String code, required String data}); + Future crateApiMergedGenericContractDartWrapperContractState({ + required GenericContractDartWrapper that, + }); - String crateApiMergedNtPackAddress( - {required String address, - required bool isUrlSafe, - required bool bounceable}); + Future crateApiMergedGenericContractDartWrapperEstimateFees({ + required GenericContractDartWrapper that, + required String signedMessage, + }); - List crateApiMergedNtPackIntoCell( - {required String params, required String tokens, String? version}); + Future + crateApiMergedGenericContractDartWrapperExecuteTransactionLocally({ + required GenericContractDartWrapper that, + required String signedMessage, + required String options, + }); - String crateApiMergedNtPackStdSmcAddr( - {required String addr, - required bool base64Url, - required bool bounceable}); + Future crateApiMergedGenericContractDartWrapperHandleBlock({ + required GenericContractDartWrapper that, + required String block, + }); - Future crateApiMergedNtParseFullAccountBoc( - {required String account}); + Future crateApiMergedGenericContractDartWrapperPendingTransactions({ + required GenericContractDartWrapper that, + }); - String? crateApiMergedNtParseKnownPayload({required String payload}); + Future crateApiMergedGenericContractDartWrapperPollingMethod({ + required GenericContractDartWrapper that, + }); - String crateApiMergedNtRepackAddress({required String address}); + Future crateApiMergedGenericContractDartWrapperPreloadTransactions({ + required GenericContractDartWrapper that, + required String fromLt, + }); - Future crateApiMergedNtRunGetter( - {required String accountStuffBoc, - required String contractAbi, - required String methodId, - required String input, - required Map libraries, - int? signatureId}); - - Future crateApiMergedNtRunLocal( - {required String accountStuffBoc, - required String contractAbi, - required String methodId, - required String input, - required bool responsible, - required Map libraries, - int? signatureId}); - - Future crateApiMergedNtRunLocalWithLibs( - {required ArcTransportBoxTrait transport, - required String accountStuffBoc, - required String contractAbi, - required String methodId, - required String input, - required bool responsible, - required Map libraries, - required int retryCount, - int? signatureId}); - - List crateApiMergedNtSetCodeSalt( - {required String code, required String salt}); + Future crateApiMergedGenericContractDartWrapperRefresh({ + required GenericContractDartWrapper that, + }); - List crateApiMergedNtSplitTvc({required String tvc}); + Future crateApiMergedGenericContractDartWrapperSend({ + required GenericContractDartWrapper that, + required String signedMessage, + }); - Future crateApiMergedNtUnpackContractFields( - {required String contractAbi, - required String boc, - required bool allowPartial}); + Future + crateApiMergedGenericContractDartWrapperSubscribe({ + required String address, + required bool preloadTransactions, + required ArcTransportBoxTrait transport, + required FutureOr Function(String) onMessageSent, + required FutureOr Function(String) onMessageExpired, + required FutureOr Function(String) onStateChanged, + required FutureOr Function(String) onTransactionsFound, + }); - String crateApiMergedNtUnpackFromCell( - {required String params, - required String boc, - required bool allowPartial, - String? version}); + GqlConnectionDartWrapper crateApiMergedGqlConnectionDartWrapperNew({ + required bool isLocal, + required FutureOr Function(String) onPost, + }); - Future> crateApiMergedNtUnpackInitData( - {required String contractAbi, required String data}); + Future crateApiMergedGqlTransportImplGetAccountsByCodeHash({ + required GqlTransportImpl that, + required String codeHash, + required int limit, + String? continuation, + }); - String crateApiMergedNtUnpackStdSmcAddr( - {required String packed, required bool base64Url}); + Future crateApiMergedGqlTransportImplGetBlock({ + required GqlTransportImpl that, + required String id, + }); - bool crateApiMergedNtValidateAddress({required String address}); + Future crateApiMergedGqlTransportImplGetBlockchainConfig({ + required GqlTransportImpl that, + required bool force, + }); - Future crateApiMergedNtVerifySignature( - {required String publicKey, - required String data, - required String signature, - int? signatureId}); + Future crateApiMergedGqlTransportImplGetContractState({ + required GqlTransportImpl that, + required String address, + }); - ProtoConnectionDartWrapper crateApiMergedProtoConnectionDartWrapperNew( - {required String instanceHash}); + Future crateApiMergedGqlTransportImplGetDstTransaction({ + required GqlTransportImpl that, + required String messageHash, + }); - Future crateApiMergedProtoTransportImplGetAccountsByCodeHash( - {required ProtoTransportImpl that, - required String codeHash, - required int limit, - String? continuation}); + Future crateApiMergedGqlTransportImplGetFeeFactors({ + required GqlTransportImpl that, + required bool isMasterchain, + }); - Future crateApiMergedProtoTransportImplGetBlockchainConfig( - {required ProtoTransportImpl that, required bool force}); + Future crateApiMergedGqlTransportImplGetFullContractState({ + required GqlTransportImpl that, + required String address, + }); - Future crateApiMergedProtoTransportImplGetContractState( - {required ProtoTransportImpl that, required String address}); + Future crateApiMergedGqlTransportImplGetLatestBlock({ + required GqlTransportImpl that, + required String address, + }); - Future crateApiMergedProtoTransportImplGetDstTransaction( - {required ProtoTransportImpl that, required String messageHash}); + Future crateApiMergedGqlTransportImplGetNetworkId({ + required GqlTransportImpl that, + }); - Future crateApiMergedProtoTransportImplGetFeeFactors( - {required ProtoTransportImpl that, required bool isMasterchain}); + Future crateApiMergedGqlTransportImplGetSignatureId({ + required GqlTransportImpl that, + }); - Future crateApiMergedProtoTransportImplGetFullContractState( - {required ProtoTransportImpl that, required String address}); + Future crateApiMergedGqlTransportImplGetTransaction({ + required GqlTransportImpl that, + required String hash, + }); - Future crateApiMergedProtoTransportImplGetNetworkId( - {required ProtoTransportImpl that}); + Future crateApiMergedGqlTransportImplGetTransactions({ + required GqlTransportImpl that, + required String address, + String? fromLt, + required int count, + }); - Future crateApiMergedProtoTransportImplGetSignatureId( - {required ProtoTransportImpl that}); + GqlTransportImpl crateApiMergedGqlTransportImplNew({ + required GqlConnectionDartWrapper gqlConnection, + }); - Future crateApiMergedProtoTransportImplGetTransaction( - {required ProtoTransportImpl that, required String hash}); + Future crateApiMergedGqlTransportImplSimulateTransactionTree({ + required GqlTransportImpl that, + required String signedMessage, + required List ignoredComputePhaseCodes, + required List ignoredActionPhaseCodes, + }); - Future crateApiMergedProtoTransportImplGetTransactions( - {required ProtoTransportImpl that, - required String address, - String? fromLt, - required int count}); + Future crateApiMergedGqlTransportImplWaitForNextBlock({ + required GqlTransportImpl that, + required String currentBlockId, + required String address, + required BigInt timeout, + }); - ProtoTransportImpl crateApiMergedProtoTransportImplNew( - {required ProtoConnectionDartWrapper protoConnection}); + Future crateApiMergedInitLogger({ + required LogLevel level, + required bool mobileLogger, + }); - Future crateApiMergedProtoTransportImplSimulateTransactionTree( - {required ProtoTransportImpl that, - required String signedMessage, - required List ignoredComputePhaseCodes, - required List ignoredActionPhaseCodes}); + Future crateApiMergedJettonWalletDartWrapperAddress({ + required JettonWalletDartWrapper that, + }); - Future crateApiMergedSetClockOffset({required PlatformInt64 offsetMs}); + Future crateApiMergedJettonWalletDartWrapperBalance({ + required JettonWalletDartWrapper that, + }); - Future crateApiMergedSimpleAdder({required int a, required int b}); + Future crateApiMergedJettonWalletDartWrapperContractState({ + required JettonWalletDartWrapper that, + }); - int crateApiMergedSimpleAdderSync({required int a, required int b}); + Future + crateApiMergedJettonWalletDartWrapperEstimateMinAttachedAmount({ + required JettonWalletDartWrapper that, + required String destination, + }); - Future crateApiMergedSimpleCallDart(); + Future crateApiMergedJettonWalletDartWrapperGetJettonRootDetails({ + required ArcTransportBoxTrait transport, + required String tokenRootAddress, + }); - Future crateApiMergedSimpleCallFunc0({required bool needResult}); + Future + crateApiMergedJettonWalletDartWrapperGetJettonRootDetailsFromJettonWallet({ + required ArcTransportBoxTrait transport, + required String tokenWalletAddress, + }); - Future crateApiMergedSimpleCallFunc1({required bool needResult}); + Future crateApiMergedJettonWalletDartWrapperGetJettonWalletDetails({ + required ArcTransportBoxTrait transport, + required String address, + }); - Future crateApiMergedSimpleCallFunc2(); + Future crateApiMergedJettonWalletDartWrapperHandleBlock({ + required JettonWalletDartWrapper that, + required String block, + }); - Future crateApiMergedSimpleCallFunc3(); + Future crateApiMergedJettonWalletDartWrapperOwner({ + required JettonWalletDartWrapper that, + }); - Future crateApiMergedSimpleLog({required String string}); + Future crateApiMergedJettonWalletDartWrapperPreloadTransactions({ + required JettonWalletDartWrapper that, + required String fromLt, + }); - Future crateApiMergedSimplePanic(); + Future crateApiMergedJettonWalletDartWrapperPrepareTransfer({ + required JettonWalletDartWrapper that, + required String amount, + required String destination, + required String remainingGasTo, + String? customPayload, + required String callbackValue, + String? callbackPayload, + String? attachedAmount, + }); - StorageDartWrapper crateApiMergedStorageDartWrapperNew( - {required String instanceHash}); + Future crateApiMergedJettonWalletDartWrapperRefresh({ + required JettonWalletDartWrapper that, + }); - Future crateApiMergedStorageImplNew( - {required String instanceHash}); + Future + crateApiMergedJettonWalletDartWrapperSubscribe({ + required String owner, + required String rootTokenContract, + required ArcTransportBoxTrait transport, + required bool preloadTransactions, + required FutureOr Function(String) onBalanceChanged, + required FutureOr Function(String) onTransactionsFound, + }); - Future crateApiMergedStubCallDart({required DartCallStub stub}); + JrpcConnectionDartWrapper crateApiMergedJrpcConnectionDartWrapperNew({ + required FutureOr Function(String) onPost, + }); - Future crateApiMergedStubDcs(); + Future crateApiMergedJrpcTransportImplGetAccountsByCodeHash({ + required JrpcTransportImpl that, + required String codeHash, + required int limit, + String? continuation, + }); - Future crateApiMergedStubDv(); + Future crateApiMergedJrpcTransportImplGetBlockchainConfig({ + required JrpcTransportImpl that, + required bool force, + }); - Future crateApiMergedTestCallerCallTest0Async( - {required String string, required bool needResult}); + Future crateApiMergedJrpcTransportImplGetContractState({ + required JrpcTransportImpl that, + required String address, + }); - DynamicValue crateApiMergedTestCallerCallTest0Sync( - {required String string, required bool needResult}); + Future crateApiMergedJrpcTransportImplGetDstTransaction({ + required JrpcTransportImpl that, + required String messageHash, + }); - Future crateApiMergedTestCallerCallTest1Async( - {required String string, required bool needResult}); + Future crateApiMergedJrpcTransportImplGetFeeFactors({ + required JrpcTransportImpl that, + required bool isMasterchain, + }); - Future crateApiMergedTestLoggerDebug({required String string}); + Future crateApiMergedJrpcTransportImplGetFullContractState({ + required JrpcTransportImpl that, + required String address, + }); - Future crateApiMergedTestLoggerError({required String string}); + Future crateApiMergedJrpcTransportImplGetNetworkId({ + required JrpcTransportImpl that, + }); - Future crateApiMergedTestLoggerInfo({required String string}); + Future crateApiMergedJrpcTransportImplGetSignatureId({ + required JrpcTransportImpl that, + }); - Future crateApiMergedTestLoggerPanic({required String string}); + Future crateApiMergedJrpcTransportImplGetTransaction({ + required JrpcTransportImpl that, + required String hash, + }); - Future crateApiMergedTestLoggerWarn({required String string}); + Future crateApiMergedJrpcTransportImplGetTransactions({ + required JrpcTransportImpl that, + required String address, + String? fromLt, + required int count, + }); - Future crateApiMergedTokenWalletDartWrapperAddress( - {required TokenWalletDartWrapper that}); + JrpcTransportImpl crateApiMergedJrpcTransportImplNew({ + required JrpcConnectionDartWrapper jrpcConnection, + }); - Future crateApiMergedTokenWalletDartWrapperBalance( - {required TokenWalletDartWrapper that}); + Future crateApiMergedJrpcTransportImplSimulateTransactionTree({ + required JrpcTransportImpl that, + required String signedMessage, + required List ignoredComputePhaseCodes, + required List ignoredActionPhaseCodes, + }); - Future crateApiMergedTokenWalletDartWrapperContractState( - {required TokenWalletDartWrapper that}); + Future crateApiMergedKeystoreDartWrapperAddKey({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String input, + }); - Future crateApiMergedTokenWalletDartWrapperEstimateMinAttachedAmount( - {required TokenWalletDartWrapper that, - required String destination, - required String amount, - required bool notifyReceiver, - String? payload}); + Future crateApiMergedKeystoreDartWrapperAddKeys({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String input, + }); - Future crateApiMergedTokenWalletDartWrapperGetTokenRootDetails( - {required ArcTransportBoxTrait transport, - required String tokenRootAddress}); + Future crateApiMergedKeystoreDartWrapperClearKeystore({ + required KeystoreDartWrapper that, + }); - Future - crateApiMergedTokenWalletDartWrapperGetTokenRootDetailsFromTokenWallet( - {required ArcTransportBoxTrait transport, - required String tokenWalletAddress}); + Future crateApiMergedKeystoreDartWrapperDecrypt({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String data, + required String input, + }); - Future crateApiMergedTokenWalletDartWrapperGetTokenWalletDetails( - {required ArcTransportBoxTrait transport, required String address}); + Future crateApiMergedKeystoreDartWrapperEncrypt({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String data, + required List publicKeys, + required String algorithm, + required String input, + }); - Future crateApiMergedTokenWalletDartWrapperHandleBlock( - {required TokenWalletDartWrapper that, required String block}); + Future crateApiMergedKeystoreDartWrapperExportSeed({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String input, + }); - Future crateApiMergedTokenWalletDartWrapperOwner( - {required TokenWalletDartWrapper that}); + Future crateApiMergedKeystoreDartWrapperGetEntries({ + required KeystoreDartWrapper that, + }); - Future crateApiMergedTokenWalletDartWrapperPreloadTransactions( - {required TokenWalletDartWrapper that, required String fromLt}); + Future> crateApiMergedKeystoreDartWrapperGetPublicKeys({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String input, + }); - Future crateApiMergedTokenWalletDartWrapperPrepareTransfer( - {required TokenWalletDartWrapper that, - required String destination, - required String amount, - required bool notifyReceiver, - String? attachedAmount, - String? payload, - String? remainingGasTo}); + Future crateApiMergedKeystoreDartWrapperIsPasswordCached({ + required KeystoreDartWrapper that, + required String publicKey, + required BigInt duration, + }); - Future crateApiMergedTokenWalletDartWrapperRefresh( - {required TokenWalletDartWrapper that}); + Future crateApiMergedKeystoreDartWrapperNew({ + required StorageDartWrapper storage, + required List signers, + LedgerConnectionDartWrapper? ledgerConnection, + }); - Future crateApiMergedTokenWalletDartWrapperSubscribe( - {required String instanceHash, - required String owner, - required String rootTokenContract, - required ArcTransportBoxTrait transport, - required bool preloadTransactions}); + Future crateApiMergedKeystoreDartWrapperReloadKeystore({ + required KeystoreDartWrapper that, + }); - Future crateApiMergedTokenWalletDartWrapperSymbol( - {required TokenWalletDartWrapper that}); + Future crateApiMergedKeystoreDartWrapperRemoveKey({ + required KeystoreDartWrapper that, + required String publicKey, + }); - Future crateApiMergedTokenWalletDartWrapperVersion( - {required TokenWalletDartWrapper that}); + Future crateApiMergedKeystoreDartWrapperRemoveKeys({ + required KeystoreDartWrapper that, + required List publicKeys, + }); - Future crateApiMergedTonWalletDartWrapperAddress( - {required TonWalletDartWrapper that}); + Future crateApiMergedKeystoreDartWrapperSign({ + required KeystoreDartWrapper that, + required KeySigner signer, + required UnsignedMessageImpl message, + required String input, + int? signatureId, + }); - Future - crateApiMergedTonWalletDartWrapperAppendSignatureToWalletV5R1Payload( - {required String payload, required String base64Signature}); + Future crateApiMergedKeystoreDartWrapperSignData({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String data, + required String input, + int? signatureId, + }); - Future crateApiMergedTonWalletDartWrapperContractState( - {required TonWalletDartWrapper that}); + Future crateApiMergedKeystoreDartWrapperSignDataRaw({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String data, + required String input, + int? signatureId, + }); - Future?> crateApiMergedTonWalletDartWrapperCustodians( - {required TonWalletDartWrapper that}); + Future crateApiMergedKeystoreDartWrapperUpdateKey({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String input, + }); - Future crateApiMergedTonWalletDartWrapperDetails( - {required TonWalletDartWrapper that}); + Future crateApiMergedKeystoreDartWrapperVerifyData({ + required List signers, + LedgerConnectionDartWrapper? ledgerConnection, + required String data, + }); - Future crateApiMergedTonWalletDartWrapperEstimateFees( - {required TonWalletDartWrapper that, - required String signedMessage, - String? executionOptions}); + LedgerConnectionDartWrapper crateApiMergedLedgerConnectionDartWrapperNew({ + required FutureOr Function(int) onGetPublicKey, + required FutureOr Function(int, int?, Uint8List) onSign, + required FutureOr Function(int, int, int?, Uint8List, String) + onSignTransaction, + }); - Future crateApiMergedTonWalletDartWrapperFindExistingWallets( - {required ArcTransportBoxTrait transport, - required String publicKey, - required int workchainId, - required String walletTypes}); + bool crateApiMergedNtCheckPublicKey({required String publicKey}); - Future> crateApiMergedTonWalletDartWrapperGetCustodians( - {required ArcTransportBoxTrait transport, required String address}); + List crateApiMergedNtCodeToTvc({required String code}); - Future crateApiMergedTonWalletDartWrapperGetExistingWalletInfo( - {required ArcTransportBoxTrait transport, required String address}); + Future crateApiMergedNtComputeStorageFee({ + required String config, + required String account, + required int utime, + required bool isMasterchain, + }); - Future crateApiMergedTonWalletDartWrapperGetWalletV5R1Seqno( - {required TonWalletDartWrapper that, - required String rawCurrentState, - required String publicKey}); + String crateApiMergedNtComputeTonWalletAddress({ + required String publicKey, + required String walletType, + required int workchain, + }); - Future crateApiMergedTonWalletDartWrapperHandleBlock( - {required TonWalletDartWrapper that, required String block}); + Future crateApiMergedNtCreateExternalMessage({ + required String dst, + required String contractAbi, + required String method, + String? stateInit, + required String input, + required String publicKey, + required int timeout, + }); - Future crateApiMergedTonWalletDartWrapperMakeStateInit( - {required TonWalletDartWrapper that}); + Future crateApiMergedNtCreateExternalMessageWithoutSignature({ + required String dst, + required String contractAbi, + required String method, + String? stateInit, + required String input, + required int timeout, + }); - Future crateApiMergedTonWalletDartWrapperPendingTransactions( - {required TonWalletDartWrapper that}); + Future crateApiMergedNtCreateRawExternalMessage({ + required String dst, + String? stateInit, + String? body, + required int timeout, + }); - Future crateApiMergedTonWalletDartWrapperPollingMethod( - {required TonWalletDartWrapper that}); + Future crateApiMergedNtDecodeEvent({ + required String messageBody, + required String contractAbi, + String? event, + }); - Future crateApiMergedTonWalletDartWrapperPreloadTransactions( - {required TonWalletDartWrapper that, required String fromLt}); + Future crateApiMergedNtDecodeInput({ + required String messageBody, + required String contractAbi, + String? method, + required bool internal, + }); - Future - crateApiMergedTonWalletDartWrapperPrepareConfirmTransaction( - {required TonWalletDartWrapper that, - required String contractState, - required String publicKey, - required String transactionId, - required String expiration}); + Future crateApiMergedNtDecodeOutput({ + required String messageBody, + required String contractAbi, + String? method, + }); - Future crateApiMergedTonWalletDartWrapperPrepareDeploy( - {required TonWalletDartWrapper that, required String expiration}); + Future crateApiMergedNtDecodeTransaction({ + required String transaction, + required String contractAbi, + String? method, + }); - Future - crateApiMergedTonWalletDartWrapperPrepareDeployWithMultipleOwners( - {required TonWalletDartWrapper that, - required String expiration, - required List custodians, - required int reqConfirms, - int? expirationTime}); + Future crateApiMergedNtDecodeTransactionEvents({ + required String transaction, + required String contractAbi, + }); - Future<(String, String)> - crateApiMergedTonWalletDartWrapperPrepareNonexistWalletV5R1MessageBody( - {required TonWalletDartWrapper that, - required String expiration, - required String params, - required bool isInternalFlow}); - - Future crateApiMergedTonWalletDartWrapperPrepareTransfer( - {required TonWalletDartWrapper that, - required String contractState, - required String publicKey, - required String expiration, - required String params}); + String crateApiMergedNtDeriveFromPhrase({ + required String phrase, + required MnemonicType mnemonicType, + }); - Future<(String, String)> - crateApiMergedTonWalletDartWrapperPrepareWalletV5R1MessageBody( - {required TonWalletDartWrapper that, - required String contractState, - required String publicKey, - required String expiration, - required String params, - required bool isInternalFlow}); - - Future crateApiMergedTonWalletDartWrapperPublicKey( - {required TonWalletDartWrapper that}); - - Future crateApiMergedTonWalletDartWrapperRefresh( - {required TonWalletDartWrapper that}); - - Future crateApiMergedTonWalletDartWrapperSend( - {required TonWalletDartWrapper that, required String signedMessage}); - - Future crateApiMergedTonWalletDartWrapperSubscribe( - {required String instanceHash, - required int workchainId, - required String publicKey, - required String walletType, - required ArcTransportBoxTrait transport}); + String crateApiMergedNtEncodeComment({ + required String comment, + required bool plain, + }); - Future - crateApiMergedTonWalletDartWrapperSubscribeByAddress( - {required String instanceHash, - required String address, - required ArcTransportBoxTrait transport}); + Future crateApiMergedNtEncodeInternalInput({ + required String contractAbi, + required String method, + required String input, + }); - Future - crateApiMergedTonWalletDartWrapperSubscribeByExisting( - {required String instanceHash, - required String existingWallet, - required ArcTransportBoxTrait transport}); + Future crateApiMergedNtEncodeInternalMessage({ + String? src, + required String dst, + required bool bounce, + String? stateInit, + String? body, + required String amount, + bool? bounced, + }); - Future crateApiMergedTonWalletDartWrapperUnconfirmedTransactions( - {required TonWalletDartWrapper that}); + Future> crateApiMergedNtExecuteLocal({ + required String config, + required String account, + required String message, + required int utime, + required bool disableSignatureCheck, + String? overwriteBalance, + int? globalId, + }); - Future crateApiMergedTonWalletDartWrapperWalletType( - {required TonWalletDartWrapper that}); + String crateApiMergedNtExtractPublicKey({required String boc}); - Future crateApiMergedTonWalletDartWrapperWorkchain( - {required TonWalletDartWrapper that}); + GeneratedKeyG crateApiMergedNtGenerateKey({ + required MnemonicType accountType, + }); - Future crateApiMergedUnsignedMessageImplExpireAt( - {required UnsignedMessageImpl that}); + String crateApiMergedNtGetBocHash({required String boc}); - Future crateApiMergedUnsignedMessageImplHash( - {required UnsignedMessageImpl that}); + String? crateApiMergedNtGetCodeSalt({required String code}); - Future crateApiMergedUnsignedMessageImplRefreshTimeout( - {required UnsignedMessageImpl that}); + int crateApiMergedNtGetContractTypeNumber({required String walletType}); - Future crateApiMergedUnsignedMessageImplSign( - {required UnsignedMessageImpl that, required String signature}); + Future> crateApiMergedNtGetExpectedAddress({ + required String tvc, + required String contractAbi, + required int workchainId, + String? publicKey, + required String initData, + }); - Future crateApiMergedUnsignedMessageImplSignFake( - {required UnsignedMessageImpl that}); + List crateApiMergedNtGetHints({required String input}); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcAccountsStorageBoxTrait; + Future crateApiMergedNtMakeFullAccountBoc({String? accountStuffBoc}); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcAccountsStorageBoxTrait; + List crateApiMergedNtMergeTvc({ + required String code, + required String data, + }); - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcAccountsStorageBoxTraitPtr; + String crateApiMergedNtPackAddress({ + required String address, + required bool isUrlSafe, + required bool bounceable, + }); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcGenericContractBoxTrait; + List crateApiMergedNtPackIntoCell({ + required String params, + required String tokens, + String? version, + }); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcGenericContractBoxTrait; + String crateApiMergedNtPackStdSmcAddr({ + required String addr, + required bool base64Url, + required bool bounceable, + }); - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcGenericContractBoxTraitPtr; + Future crateApiMergedNtParseFullAccountBoc({ + required String account, + }); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcGqlConnectionBoxTrait; + String? crateApiMergedNtParseKnownPayload({required String payload}); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcGqlConnectionBoxTrait; + String crateApiMergedNtRepackAddress({required String address}); - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcGqlConnectionBoxTraitPtr; + Future crateApiMergedNtRunGetter({ + required String accountStuffBoc, + required String contractAbi, + required String methodId, + required String input, + required Map libraries, + int? signatureId, + }); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcJettonWalletBoxTrait; + Future crateApiMergedNtRunLocal({ + required String accountStuffBoc, + required String contractAbi, + required String methodId, + required String input, + required bool responsible, + required Map libraries, + int? signatureId, + }); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcJettonWalletBoxTrait; + Future crateApiMergedNtRunLocalWithLibs({ + required ArcTransportBoxTrait transport, + required String accountStuffBoc, + required String contractAbi, + required String methodId, + required String input, + required bool responsible, + required Map libraries, + required int retryCount, + int? signatureId, + }); - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcJettonWalletBoxTraitPtr; + List crateApiMergedNtSetCodeSalt({ + required String code, + required String salt, + }); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcJrpcConnectionBoxTrait; + List crateApiMergedNtSplitTvc({required String tvc}); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcJrpcConnectionBoxTrait; + Future crateApiMergedNtUnpackContractFields({ + required String contractAbi, + required String boc, + required bool allowPartial, + }); - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcJrpcConnectionBoxTraitPtr; + String crateApiMergedNtUnpackFromCell({ + required String params, + required String boc, + required bool allowPartial, + String? version, + }); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcKeyStoreApiBoxTrait; + Future> crateApiMergedNtUnpackInitData({ + required String contractAbi, + required String data, + }); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcKeyStoreApiBoxTrait; + String crateApiMergedNtUnpackStdSmcAddr({ + required String packed, + required bool base64Url, + }); - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcKeyStoreApiBoxTraitPtr; + bool crateApiMergedNtValidateAddress({required String address}); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcLedgerConnectionBoxTrait; + Future crateApiMergedNtVerifySignature({ + required String publicKey, + required String data, + required String signature, + int? signatureId, + }); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcLedgerConnectionBoxTrait; + ProtoConnectionDartWrapper crateApiMergedProtoConnectionDartWrapperNew({ + required FutureOr Function(Uint8List) onPost, + }); - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcLedgerConnectionBoxTraitPtr; + Future crateApiMergedProtoTransportImplGetAccountsByCodeHash({ + required ProtoTransportImpl that, + required String codeHash, + required int limit, + String? continuation, + }); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcProtoConnectionBoxTrait; + Future crateApiMergedProtoTransportImplGetBlockchainConfig({ + required ProtoTransportImpl that, + required bool force, + }); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcProtoConnectionBoxTrait; + Future crateApiMergedProtoTransportImplGetContractState({ + required ProtoTransportImpl that, + required String address, + }); - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcProtoConnectionBoxTraitPtr; + Future crateApiMergedProtoTransportImplGetDstTransaction({ + required ProtoTransportImpl that, + required String messageHash, + }); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcStorageBoxTrait; + Future crateApiMergedProtoTransportImplGetFeeFactors({ + required ProtoTransportImpl that, + required bool isMasterchain, + }); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcStorageBoxTrait; + Future crateApiMergedProtoTransportImplGetFullContractState({ + required ProtoTransportImpl that, + required String address, + }); - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcStorageBoxTraitPtr; + Future crateApiMergedProtoTransportImplGetNetworkId({ + required ProtoTransportImpl that, + }); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcTokenWalletBoxTrait; + Future crateApiMergedProtoTransportImplGetSignatureId({ + required ProtoTransportImpl that, + }); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcTokenWalletBoxTrait; + Future crateApiMergedProtoTransportImplGetTransaction({ + required ProtoTransportImpl that, + required String hash, + }); - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcTokenWalletBoxTraitPtr; + Future crateApiMergedProtoTransportImplGetTransactions({ + required ProtoTransportImpl that, + required String address, + String? fromLt, + required int count, + }); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcTonWalletBoxTrait; + ProtoTransportImpl crateApiMergedProtoTransportImplNew({ + required ProtoConnectionDartWrapper protoConnection, + }); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcTonWalletBoxTrait; + Future crateApiMergedProtoTransportImplSimulateTransactionTree({ + required ProtoTransportImpl that, + required String signedMessage, + required List ignoredComputePhaseCodes, + required List ignoredActionPhaseCodes, + }); - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcTonWalletBoxTraitPtr; + Future crateApiMergedSetClockOffset({required PlatformInt64 offsetMs}); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcTransportBoxTrait; + StorageDartWrapper crateApiMergedStorageDartWrapperNew({ + required FutureOr Function(String) onGet, + required FutureOr Function(String, String) onSet, + required FutureOr Function(String, String) onSetUnchecked, + required FutureOr Function(String) onRemove, + required FutureOr Function(String) onRemoveUnchecked, + }); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcTransportBoxTrait; + Future crateApiMergedTokenWalletDartWrapperAddress({ + required TokenWalletDartWrapper that, + }); - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcTransportBoxTraitPtr; + Future crateApiMergedTokenWalletDartWrapperBalance({ + required TokenWalletDartWrapper that, + }); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcUnsignedMessageBoxTrait; + Future crateApiMergedTokenWalletDartWrapperContractState({ + required TokenWalletDartWrapper that, + }); - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcUnsignedMessageBoxTrait; + Future crateApiMergedTokenWalletDartWrapperEstimateMinAttachedAmount({ + required TokenWalletDartWrapper that, + required String destination, + required String amount, + required bool notifyReceiver, + String? payload, + }); - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcUnsignedMessageBoxTraitPtr; -} + Future crateApiMergedTokenWalletDartWrapperGetTokenRootDetails({ + required ArcTransportBoxTrait transport, + required String tokenRootAddress, + }); -class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform - implements NekotonBridgeApi { - NekotonBridgeApiImpl({ - required super.handler, - required super.wire, - required super.generalizedFrbRustBinding, - required super.portManager, + Future + crateApiMergedTokenWalletDartWrapperGetTokenRootDetailsFromTokenWallet({ + required ArcTransportBoxTrait transport, + required String tokenWalletAddress, }); - @override - Future crateApiMergedAccountsStorageImplAddAccount( - {required AccountsStorageImpl that, required String account}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); - var arg1 = cst_encode_String(account); - return wire.wire__crate__api__merged__accounts_storage_impl_add_account( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedAccountsStorageImplAddAccountConstMeta, - argValues: [that, account], - apiImpl: this, - )); - } + Future crateApiMergedTokenWalletDartWrapperGetTokenWalletDetails({ + required ArcTransportBoxTrait transport, + required String address, + }); - TaskConstMeta get kCrateApiMergedAccountsStorageImplAddAccountConstMeta => - const TaskConstMeta( - debugName: "accounts_storage_impl_add_account", - argNames: ["that", "account"], - ); + Future crateApiMergedTokenWalletDartWrapperHandleBlock({ + required TokenWalletDartWrapper that, + required String block, + }); - @override - Future crateApiMergedAccountsStorageImplAddAccounts( - {required AccountsStorageImpl that, required String accounts}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); - var arg1 = cst_encode_String(accounts); - return wire - .wire__crate__api__merged__accounts_storage_impl_add_accounts( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedAccountsStorageImplAddAccountsConstMeta, - argValues: [that, accounts], - apiImpl: this, - )); - } + Future crateApiMergedTokenWalletDartWrapperOwner({ + required TokenWalletDartWrapper that, + }); - TaskConstMeta get kCrateApiMergedAccountsStorageImplAddAccountsConstMeta => - const TaskConstMeta( - debugName: "accounts_storage_impl_add_accounts", - argNames: ["that", "accounts"], - ); + Future crateApiMergedTokenWalletDartWrapperPreloadTransactions({ + required TokenWalletDartWrapper that, + required String fromLt, + }); - @override - Future crateApiMergedAccountsStorageImplAddTokenWallet( - {required AccountsStorageImpl that, - required String accountAddress, - required String networkGroup, - required String rootTokenContract}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); - var arg1 = cst_encode_String(accountAddress); - var arg2 = cst_encode_String(networkGroup); - var arg3 = cst_encode_String(rootTokenContract); - return wire - .wire__crate__api__merged__accounts_storage_impl_add_token_wallet( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedAccountsStorageImplAddTokenWalletConstMeta, - argValues: [that, accountAddress, networkGroup, rootTokenContract], - apiImpl: this, - )); - } + Future crateApiMergedTokenWalletDartWrapperPrepareTransfer({ + required TokenWalletDartWrapper that, + required String destination, + required String amount, + required bool notifyReceiver, + String? attachedAmount, + String? payload, + String? remainingGasTo, + }); - TaskConstMeta get kCrateApiMergedAccountsStorageImplAddTokenWalletConstMeta => - const TaskConstMeta( - debugName: "accounts_storage_impl_add_token_wallet", - argNames: [ - "that", - "accountAddress", - "networkGroup", - "rootTokenContract" - ], - ); + Future crateApiMergedTokenWalletDartWrapperRefresh({ + required TokenWalletDartWrapper that, + }); - @override - Future crateApiMergedAccountsStorageImplAddTokenWallets( - {required AccountsStorageImpl that, - required String accountAddress, - required String networkGroup, - required List rootTokenContracts}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); - var arg1 = cst_encode_String(accountAddress); - var arg2 = cst_encode_String(networkGroup); - var arg3 = cst_encode_list_String(rootTokenContracts); - return wire - .wire__crate__api__merged__accounts_storage_impl_add_token_wallets( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedAccountsStorageImplAddTokenWalletsConstMeta, - argValues: [that, accountAddress, networkGroup, rootTokenContracts], - apiImpl: this, - )); - } + Future crateApiMergedTokenWalletDartWrapperSubscribe({ + required String owner, + required String rootTokenContract, + required ArcTransportBoxTrait transport, + required bool preloadTransactions, + required FutureOr Function(String) onBalanceChanged, + required FutureOr Function(String) onTransactionsFound, + }); - TaskConstMeta - get kCrateApiMergedAccountsStorageImplAddTokenWalletsConstMeta => - const TaskConstMeta( - debugName: "accounts_storage_impl_add_token_wallets", - argNames: [ - "that", - "accountAddress", - "networkGroup", - "rootTokenContracts" - ], - ); + Future crateApiMergedTokenWalletDartWrapperSymbol({ + required TokenWalletDartWrapper that, + }); - @override - Future crateApiMergedAccountsStorageImplClear( - {required AccountsStorageImpl that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); - return wire.wire__crate__api__merged__accounts_storage_impl_clear( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedAccountsStorageImplClearConstMeta, - argValues: [that], - apiImpl: this, - )); - } + Future crateApiMergedTokenWalletDartWrapperVersion({ + required TokenWalletDartWrapper that, + }); - TaskConstMeta get kCrateApiMergedAccountsStorageImplClearConstMeta => - const TaskConstMeta( - debugName: "accounts_storage_impl_clear", - argNames: ["that"], - ); + Future crateApiMergedTonWalletDartWrapperAddress({ + required TonWalletDartWrapper that, + }); - @override - Future crateApiMergedAccountsStorageImplGetEntries( - {required AccountsStorageImpl that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); - return wire.wire__crate__api__merged__accounts_storage_impl_get_entries( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedAccountsStorageImplGetEntriesConstMeta, - argValues: [that], - apiImpl: this, - )); - } + Future + crateApiMergedTonWalletDartWrapperAppendSignatureToWalletV5R1Payload({ + required String payload, + required String base64Signature, + }); - TaskConstMeta get kCrateApiMergedAccountsStorageImplGetEntriesConstMeta => - const TaskConstMeta( - debugName: "accounts_storage_impl_get_entries", - argNames: ["that"], - ); + Future crateApiMergedTonWalletDartWrapperContractState({ + required TonWalletDartWrapper that, + }); - @override - Future crateApiMergedAccountsStorageImplNew( - {required StorageDartWrapper storage}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_storage_dart_wrapper(storage); - return wire.wire__crate__api__merged__accounts_storage_impl_new( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_accounts_storage_impl, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedAccountsStorageImplNewConstMeta, - argValues: [storage], - apiImpl: this, - )); - } + Future?> crateApiMergedTonWalletDartWrapperCustodians({ + required TonWalletDartWrapper that, + }); - TaskConstMeta get kCrateApiMergedAccountsStorageImplNewConstMeta => - const TaskConstMeta( - debugName: "accounts_storage_impl_new", - argNames: ["storage"], - ); + Future crateApiMergedTonWalletDartWrapperDetails({ + required TonWalletDartWrapper that, + }); - @override - Future crateApiMergedAccountsStorageImplReload( - {required AccountsStorageImpl that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); - return wire.wire__crate__api__merged__accounts_storage_impl_reload( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedAccountsStorageImplReloadConstMeta, - argValues: [that], - apiImpl: this, - )); - } + Future crateApiMergedTonWalletDartWrapperEstimateFees({ + required TonWalletDartWrapper that, + required String signedMessage, + String? executionOptions, + }); - TaskConstMeta get kCrateApiMergedAccountsStorageImplReloadConstMeta => - const TaskConstMeta( - debugName: "accounts_storage_impl_reload", - argNames: ["that"], - ); + Future crateApiMergedTonWalletDartWrapperFindExistingWallets({ + required ArcTransportBoxTrait transport, + required String publicKey, + required int workchainId, + required String walletTypes, + }); - @override - Future crateApiMergedAccountsStorageImplRemoveAccount( - {required AccountsStorageImpl that, required String accountAddress}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); - var arg1 = cst_encode_String(accountAddress); - return wire - .wire__crate__api__merged__accounts_storage_impl_remove_account( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedAccountsStorageImplRemoveAccountConstMeta, - argValues: [that, accountAddress], - apiImpl: this, - )); - } + Future> crateApiMergedTonWalletDartWrapperGetCustodians({ + required ArcTransportBoxTrait transport, + required String address, + }); - TaskConstMeta get kCrateApiMergedAccountsStorageImplRemoveAccountConstMeta => - const TaskConstMeta( - debugName: "accounts_storage_impl_remove_account", - argNames: ["that", "accountAddress"], - ); + Future crateApiMergedTonWalletDartWrapperGetExistingWalletInfo({ + required ArcTransportBoxTrait transport, + required String address, + }); - @override - Future crateApiMergedAccountsStorageImplRemoveAccounts( - {required AccountsStorageImpl that, - required List accountAddresses}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); - var arg1 = cst_encode_list_String(accountAddresses); - return wire - .wire__crate__api__merged__accounts_storage_impl_remove_accounts( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedAccountsStorageImplRemoveAccountsConstMeta, - argValues: [that, accountAddresses], - apiImpl: this, - )); - } + Future crateApiMergedTonWalletDartWrapperGetWalletV5R1Seqno({ + required TonWalletDartWrapper that, + required String rawCurrentState, + required String publicKey, + }); - TaskConstMeta get kCrateApiMergedAccountsStorageImplRemoveAccountsConstMeta => - const TaskConstMeta( - debugName: "accounts_storage_impl_remove_accounts", - argNames: ["that", "accountAddresses"], - ); + Future crateApiMergedTonWalletDartWrapperHandleBlock({ + required TonWalletDartWrapper that, + required String block, + }); - @override - Future crateApiMergedAccountsStorageImplRemoveTokenWallet( - {required AccountsStorageImpl that, - required String accountAddress, - required String networkGroup, - required String rootTokenContract}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); - var arg1 = cst_encode_String(accountAddress); - var arg2 = cst_encode_String(networkGroup); - var arg3 = cst_encode_String(rootTokenContract); - return wire - .wire__crate__api__merged__accounts_storage_impl_remove_token_wallet( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedAccountsStorageImplRemoveTokenWalletConstMeta, - argValues: [that, accountAddress, networkGroup, rootTokenContract], - apiImpl: this, - )); - } + Future crateApiMergedTonWalletDartWrapperMakeStateInit({ + required TonWalletDartWrapper that, + }); - TaskConstMeta - get kCrateApiMergedAccountsStorageImplRemoveTokenWalletConstMeta => - const TaskConstMeta( - debugName: "accounts_storage_impl_remove_token_wallet", - argNames: [ - "that", - "accountAddress", - "networkGroup", - "rootTokenContract" - ], - ); + Future crateApiMergedTonWalletDartWrapperPendingTransactions({ + required TonWalletDartWrapper that, + }); - @override - Future crateApiMergedAccountsStorageImplRemoveTokenWallets( - {required AccountsStorageImpl that, - required String accountAddress, - required String networkGroup, - required List rootTokenContracts}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); - var arg1 = cst_encode_String(accountAddress); - var arg2 = cst_encode_String(networkGroup); - var arg3 = cst_encode_list_String(rootTokenContracts); - return wire - .wire__crate__api__merged__accounts_storage_impl_remove_token_wallets( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedAccountsStorageImplRemoveTokenWalletsConstMeta, - argValues: [that, accountAddress, networkGroup, rootTokenContracts], - apiImpl: this, - )); - } + Future crateApiMergedTonWalletDartWrapperPollingMethod({ + required TonWalletDartWrapper that, + }); - TaskConstMeta - get kCrateApiMergedAccountsStorageImplRemoveTokenWalletsConstMeta => - const TaskConstMeta( - debugName: "accounts_storage_impl_remove_token_wallets", - argNames: [ - "that", - "accountAddress", - "networkGroup", - "rootTokenContracts" - ], - ); + Future crateApiMergedTonWalletDartWrapperPreloadTransactions({ + required TonWalletDartWrapper that, + required String fromLt, + }); - @override - Future crateApiMergedAccountsStorageImplRenameAccount( - {required AccountsStorageImpl that, - required String accountAddress, - required String name}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); - var arg1 = cst_encode_String(accountAddress); - var arg2 = cst_encode_String(name); - return wire - .wire__crate__api__merged__accounts_storage_impl_rename_account( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedAccountsStorageImplRenameAccountConstMeta, - argValues: [that, accountAddress, name], - apiImpl: this, - )); - } + Future + crateApiMergedTonWalletDartWrapperPrepareConfirmTransaction({ + required TonWalletDartWrapper that, + required String contractState, + required String publicKey, + required String transactionId, + required String expiration, + }); - TaskConstMeta get kCrateApiMergedAccountsStorageImplRenameAccountConstMeta => - const TaskConstMeta( - debugName: "accounts_storage_impl_rename_account", - argNames: ["that", "accountAddress", "name"], - ); + Future crateApiMergedTonWalletDartWrapperPrepareDeploy({ + required TonWalletDartWrapper that, + required String expiration, + }); - @override - Future crateApiMergedAccountsStorageImplVerifyData( - {required String data}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(data); - return wire.wire__crate__api__merged__accounts_storage_impl_verify_data( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: null, - ), - constMeta: kCrateApiMergedAccountsStorageImplVerifyDataConstMeta, - argValues: [data], - apiImpl: this, - )); - } + Future + crateApiMergedTonWalletDartWrapperPrepareDeployWithMultipleOwners({ + required TonWalletDartWrapper that, + required String expiration, + required List custodians, + required int reqConfirms, + int? expirationTime, + }); - TaskConstMeta get kCrateApiMergedAccountsStorageImplVerifyDataConstMeta => - const TaskConstMeta( - debugName: "accounts_storage_impl_verify_data", - argNames: ["data"], - ); + Future<(String, String)> + crateApiMergedTonWalletDartWrapperPrepareNonexistWalletV5R1MessageBody({ + required TonWalletDartWrapper that, + required String expiration, + required String params, + required bool isInternalFlow, + }); - @override - void crateApiMergedCallSendResult( - {required String id, required DynamicValue value}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(id); - var arg1 = cst_encode_box_autoadd_dynamic_value(value); - return wire.wire__crate__api__merged__call_send_result(arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, - ), - constMeta: kCrateApiMergedCallSendResultConstMeta, - argValues: [id, value], - apiImpl: this, - )); - } + Future + crateApiMergedTonWalletDartWrapperPrepareTransfer({ + required TonWalletDartWrapper that, + required String contractState, + required String publicKey, + required String expiration, + required String params, + }); - TaskConstMeta get kCrateApiMergedCallSendResultConstMeta => - const TaskConstMeta( - debugName: "call_send_result", - argNames: ["id", "value"], - ); + Future<(String, String)> + crateApiMergedTonWalletDartWrapperPrepareWalletV5R1MessageBody({ + required TonWalletDartWrapper that, + required String contractState, + required String publicKey, + required String expiration, + required String params, + required bool isInternalFlow, + }); - @override - Future crateApiMergedCallerTestClassCallSomeFunc( - {required CallerTestClass that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_caller_test_class(that); - return wire.wire__crate__api__merged__caller_test_class_call_some_func( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, - ), - constMeta: kCrateApiMergedCallerTestClassCallSomeFuncConstMeta, - argValues: [that], - apiImpl: this, - )); - } + Future crateApiMergedTonWalletDartWrapperPublicKey({ + required TonWalletDartWrapper that, + }); - TaskConstMeta get kCrateApiMergedCallerTestClassCallSomeFuncConstMeta => - const TaskConstMeta( - debugName: "caller_test_class_call_some_func", - argNames: ["that"], - ); + Future crateApiMergedTonWalletDartWrapperRefresh({ + required TonWalletDartWrapper that, + }); - @override - Future crateApiMergedCallerTestClassNew( - {required String instanceHash, required int value}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(instanceHash); - var arg1 = cst_encode_i_32(value); - return wire.wire__crate__api__merged__caller_test_class_new( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_caller_test_class, - decodeErrorData: null, - ), - constMeta: kCrateApiMergedCallerTestClassNewConstMeta, - argValues: [instanceHash, value], - apiImpl: this, - )); - } + Future crateApiMergedTonWalletDartWrapperSend({ + required TonWalletDartWrapper that, + required String signedMessage, + }); - TaskConstMeta get kCrateApiMergedCallerTestClassNewConstMeta => - const TaskConstMeta( - debugName: "caller_test_class_new", - argNames: ["instanceHash", "value"], - ); + Future crateApiMergedTonWalletDartWrapperSubscribe({ + required int workchainId, + required String publicKey, + required String walletType, + required ArcTransportBoxTrait transport, + required FutureOr Function(String) onMessageSent, + required FutureOr Function(String) onMessageExpired, + required FutureOr Function(String) onStateChanged, + required FutureOr Function(String) onTransactionsFound, + required FutureOr Function(String) onDetailsChanged, + required FutureOr Function(String) onCustodiansChanged, + required FutureOr Function(String) onUnconfirmedTransactionsChanged, + }); - @override - Stream crateApiMergedCreateLogStream() { - final s = RustStreamSink(); - unawaited(handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_StreamSink_log_entry_Dco(s); - return wire.wire__crate__api__merged__create_log_stream(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, - ), - constMeta: kCrateApiMergedCreateLogStreamConstMeta, - argValues: [s], - apiImpl: this, - ))); - return s.stream; - } + Future + crateApiMergedTonWalletDartWrapperSubscribeByAddress({ + required String address, + required ArcTransportBoxTrait transport, + required FutureOr Function(String) onMessageSent, + required FutureOr Function(String) onMessageExpired, + required FutureOr Function(String) onStateChanged, + required FutureOr Function(String) onTransactionsFound, + required FutureOr Function(String) onDetailsChanged, + required FutureOr Function(String) onCustodiansChanged, + required FutureOr Function(String) onUnconfirmedTransactionsChanged, + }); - TaskConstMeta get kCrateApiMergedCreateLogStreamConstMeta => - const TaskConstMeta( - debugName: "create_log_stream", - argNames: ["s"], - ); + Future + crateApiMergedTonWalletDartWrapperSubscribeByExisting({ + required String existingWallet, + required ArcTransportBoxTrait transport, + required FutureOr Function(String) onMessageSent, + required FutureOr Function(String) onMessageExpired, + required FutureOr Function(String) onStateChanged, + required FutureOr Function(String) onTransactionsFound, + required FutureOr Function(String) onDetailsChanged, + required FutureOr Function(String) onCustodiansChanged, + required FutureOr Function(String) onUnconfirmedTransactionsChanged, + }); - @override - Future crateApiMergedGenericContractDartWrapperAddress( - {required GenericContractDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); - return wire - .wire__crate__api__merged__generic_contract_dart_wrapper_address( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kCrateApiMergedGenericContractDartWrapperAddressConstMeta, - argValues: [that], - apiImpl: this, - )); - } + Future crateApiMergedTonWalletDartWrapperUnconfirmedTransactions({ + required TonWalletDartWrapper that, + }); - TaskConstMeta get kCrateApiMergedGenericContractDartWrapperAddressConstMeta => - const TaskConstMeta( - debugName: "generic_contract_dart_wrapper_address", - argNames: ["that"], - ); + Future crateApiMergedTonWalletDartWrapperWalletType({ + required TonWalletDartWrapper that, + }); - @override - Future crateApiMergedGenericContractDartWrapperContractState( - {required GenericContractDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); - return wire - .wire__crate__api__merged__generic_contract_dart_wrapper_contract_state( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedGenericContractDartWrapperContractStateConstMeta, - argValues: [that], - apiImpl: this, - )); - } + Future crateApiMergedTonWalletDartWrapperWorkchain({ + required TonWalletDartWrapper that, + }); - TaskConstMeta - get kCrateApiMergedGenericContractDartWrapperContractStateConstMeta => - const TaskConstMeta( - debugName: "generic_contract_dart_wrapper_contract_state", - argNames: ["that"], - ); + Future crateApiMergedUnsignedMessageImplExpireAt({ + required UnsignedMessageImpl that, + }); - @override - Future crateApiMergedGenericContractDartWrapperEstimateFees( - {required GenericContractDartWrapper that, - required String signedMessage}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); - var arg1 = cst_encode_String(signedMessage); - return wire - .wire__crate__api__merged__generic_contract_dart_wrapper_estimate_fees( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedGenericContractDartWrapperEstimateFeesConstMeta, - argValues: [that, signedMessage], - apiImpl: this, - )); - } + Future crateApiMergedUnsignedMessageImplHash({ + required UnsignedMessageImpl that, + }); - TaskConstMeta - get kCrateApiMergedGenericContractDartWrapperEstimateFeesConstMeta => - const TaskConstMeta( - debugName: "generic_contract_dart_wrapper_estimate_fees", - argNames: ["that", "signedMessage"], - ); + Future crateApiMergedUnsignedMessageImplRefreshTimeout({ + required UnsignedMessageImpl that, + }); - @override - Future - crateApiMergedGenericContractDartWrapperExecuteTransactionLocally( - {required GenericContractDartWrapper that, - required String signedMessage, - required String options}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); - var arg1 = cst_encode_String(signedMessage); - var arg2 = cst_encode_String(options); - return wire - .wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locally( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedGenericContractDartWrapperExecuteTransactionLocallyConstMeta, - argValues: [that, signedMessage, options], - apiImpl: this, - )); - } + Future crateApiMergedUnsignedMessageImplSign({ + required UnsignedMessageImpl that, + required String signature, + }); - TaskConstMeta - get kCrateApiMergedGenericContractDartWrapperExecuteTransactionLocallyConstMeta => - const TaskConstMeta( - debugName: - "generic_contract_dart_wrapper_execute_transaction_locally", - argNames: ["that", "signedMessage", "options"], - ); + Future crateApiMergedUnsignedMessageImplSignFake({ + required UnsignedMessageImpl that, + }); - @override - Future crateApiMergedGenericContractDartWrapperHandleBlock( - {required GenericContractDartWrapper that, required String block}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); - var arg1 = cst_encode_String(block); - return wire - .wire__crate__api__merged__generic_contract_dart_wrapper_handle_block( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedGenericContractDartWrapperHandleBlockConstMeta, - argValues: [that, block], - apiImpl: this, - )); - } + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcAccountsStorageBoxTrait; - TaskConstMeta - get kCrateApiMergedGenericContractDartWrapperHandleBlockConstMeta => - const TaskConstMeta( - debugName: "generic_contract_dart_wrapper_handle_block", - argNames: ["that", "block"], - ); + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcAccountsStorageBoxTrait; - @override - Future crateApiMergedGenericContractDartWrapperPendingTransactions( - {required GenericContractDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); - return wire - .wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactions( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedGenericContractDartWrapperPendingTransactionsConstMeta, - argValues: [that], - apiImpl: this, - )); - } + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcAccountsStorageBoxTraitPtr; - TaskConstMeta - get kCrateApiMergedGenericContractDartWrapperPendingTransactionsConstMeta => - const TaskConstMeta( - debugName: "generic_contract_dart_wrapper_pending_transactions", - argNames: ["that"], - ); + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcGenericContractBoxTrait; - @override - Future crateApiMergedGenericContractDartWrapperPollingMethod( - {required GenericContractDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); - return wire - .wire__crate__api__merged__generic_contract_dart_wrapper_polling_method( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_polling_method, - decodeErrorData: null, - ), - constMeta: - kCrateApiMergedGenericContractDartWrapperPollingMethodConstMeta, - argValues: [that], - apiImpl: this, - )); - } + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcGenericContractBoxTrait; - TaskConstMeta - get kCrateApiMergedGenericContractDartWrapperPollingMethodConstMeta => - const TaskConstMeta( - debugName: "generic_contract_dart_wrapper_polling_method", - argNames: ["that"], - ); + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcGenericContractBoxTraitPtr; - @override - Future crateApiMergedGenericContractDartWrapperPreloadTransactions( - {required GenericContractDartWrapper that, required String fromLt}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); - var arg1 = cst_encode_String(fromLt); - return wire - .wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactions( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedGenericContractDartWrapperPreloadTransactionsConstMeta, - argValues: [that, fromLt], - apiImpl: this, - )); - } + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcGqlConnectionBoxTrait; - TaskConstMeta - get kCrateApiMergedGenericContractDartWrapperPreloadTransactionsConstMeta => - const TaskConstMeta( - debugName: "generic_contract_dart_wrapper_preload_transactions", - argNames: ["that", "fromLt"], - ); + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcGqlConnectionBoxTrait; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcGqlConnectionBoxTraitPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcJettonWalletBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcJettonWalletBoxTrait; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcJettonWalletBoxTraitPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcJrpcConnectionBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcJrpcConnectionBoxTrait; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcJrpcConnectionBoxTraitPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcKeyStoreApiBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcKeyStoreApiBoxTrait; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcKeyStoreApiBoxTraitPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcLedgerConnectionBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcLedgerConnectionBoxTrait; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcLedgerConnectionBoxTraitPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcProtoConnectionBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcProtoConnectionBoxTrait; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcProtoConnectionBoxTraitPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcStorageBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcStorageBoxTrait; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcStorageBoxTraitPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcTokenWalletBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcTokenWalletBoxTrait; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcTokenWalletBoxTraitPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcTonWalletBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcTonWalletBoxTrait; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcTonWalletBoxTraitPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcTransportBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcTransportBoxTrait; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcTransportBoxTraitPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcUnsignedMessageBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcUnsignedMessageBoxTrait; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcUnsignedMessageBoxTraitPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnStringDartFnFutureOptionString; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnStringDartFnFutureOptionString; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnStringDartFnFutureOptionStringPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnStringDartFnFuture; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnStringDartFnFuture; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnStringDartFnFuturePtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnStringDartFnFutureString; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnStringDartFnFutureString; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnStringDartFnFutureStringPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnStringStringDartFnFuture; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnStringStringDartFnFuture; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnStringStringDartFnFuturePtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnVecU8DartFnFutureVecU8; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnVecU8DartFnFutureVecU8; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnVecU8DartFnFutureVecU8Ptr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnU16DartFnFutureVecU8; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnU16DartFnFutureVecU8; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnU16DartFnFutureVecU8Ptr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnU16OptionI32VecU8DartFnFutureVecU8; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnU16OptionI32VecU8DartFnFutureVecU8; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnU16OptionI32VecU8DartFnFutureVecU8Ptr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Ptr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_GenericContractSubscriptionHandlerImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_GenericContractSubscriptionHandlerImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_GenericContractSubscriptionHandlerImplPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_GqlConnectionImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_GqlConnectionImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_GqlConnectionImplPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_JettonWalletSubscriptionHandlerImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_JettonWalletSubscriptionHandlerImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_JettonWalletSubscriptionHandlerImplPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_JrpcConnectionImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_JrpcConnectionImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_JrpcConnectionImplPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_LedgerConnectionImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_LedgerConnectionImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_LedgerConnectionImplPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ProtoConnectionImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ProtoConnectionImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ProtoConnectionImplPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_StorageImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_StorageImpl; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_StorageImplPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_TokenWalletSubscriptionHandlerImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_TokenWalletSubscriptionHandlerImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_TokenWalletSubscriptionHandlerImplPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_TonWalletSubscriptionHandlerImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_TonWalletSubscriptionHandlerImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_TonWalletSubscriptionHandlerImplPtr; +} + +class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform + implements NekotonBridgeApi { + NekotonBridgeApiImpl({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); @override - Future crateApiMergedGenericContractDartWrapperRefresh( - {required GenericContractDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); - return wire - .wire__crate__api__merged__generic_contract_dart_wrapper_refresh( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, + ArcFnStringDartFnFuture + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnMessageExpired({ + required GenericContractSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_expired( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnMessageExpiredConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedGenericContractDartWrapperRefreshConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedGenericContractDartWrapperRefreshConstMeta => + TaskConstMeta + get kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnMessageExpiredConstMeta => const TaskConstMeta( - debugName: "generic_contract_dart_wrapper_refresh", + debugName: + "GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_expired", argNames: ["that"], ); @override - Future crateApiMergedGenericContractDartWrapperSend( - {required GenericContractDartWrapper that, - required String signedMessage}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); - var arg1 = cst_encode_String(signedMessage); - return wire - .wire__crate__api__merged__generic_contract_dart_wrapper_send( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + ArcFnStringDartFnFuture + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnMessageSent({ + required GenericContractSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_sent( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnMessageSentConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedGenericContractDartWrapperSendConstMeta, - argValues: [that, signedMessage], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedGenericContractDartWrapperSendConstMeta => + TaskConstMeta + get kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnMessageSentConstMeta => const TaskConstMeta( - debugName: "generic_contract_dart_wrapper_send", - argNames: ["that", "signedMessage"], + debugName: + "GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_sent", + argNames: ["that"], ); @override - Future - crateApiMergedGenericContractDartWrapperSubscribe( - {required String instanceHash, - required String address, - required bool preloadTransactions, - required ArcTransportBoxTrait transport}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(instanceHash); - var arg1 = cst_encode_String(address); - var arg2 = cst_encode_bool(preloadTransactions); - var arg3 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - return wire - .wire__crate__api__merged__generic_contract_dart_wrapper_subscribe( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_generic_contract_dart_wrapper, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedGenericContractDartWrapperSubscribeConstMeta, - argValues: [instanceHash, address, preloadTransactions, transport], - apiImpl: this, - )); + ArcFnStringDartFnFuture + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnStateChanged({ + required GenericContractSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_state_changed( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnStateChangedConstMeta, + argValues: [that], + apiImpl: this, + ), + ); } TaskConstMeta - get kCrateApiMergedGenericContractDartWrapperSubscribeConstMeta => - const TaskConstMeta( - debugName: "generic_contract_dart_wrapper_subscribe", - argNames: [ - "instanceHash", - "address", - "preloadTransactions", - "transport" - ], - ); + get kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnStateChangedConstMeta => + const TaskConstMeta( + debugName: + "GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_state_changed", + argNames: ["that"], + ); @override - GqlConnectionDartWrapper crateApiMergedGqlConnectionDartWrapperNew( - {required bool isLocal, required String instanceHash}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_bool(isLocal); - var arg1 = cst_encode_String(instanceHash); - return wire.wire__crate__api__merged__gql_connection_dart_wrapper_new( - arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_gql_connection_dart_wrapper, - decodeErrorData: null, + ArcFnStringDartFnFuture + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnTransactionsFound({ + required GenericContractSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnTransactionsFoundConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedGqlConnectionDartWrapperNewConstMeta, - argValues: [isLocal, instanceHash], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiMergedGqlConnectionDartWrapperNewConstMeta => - const TaskConstMeta( - debugName: "gql_connection_dart_wrapper_new", - argNames: ["isLocal", "instanceHash"], - ); - - @override - Future crateApiMergedGqlTransportImplGetAccountsByCodeHash( - {required GqlTransportImpl that, - required String codeHash, - required int limit, - String? continuation}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); - var arg1 = cst_encode_String(codeHash); - var arg2 = cst_encode_u_8(limit); - var arg3 = cst_encode_opt_String(continuation); - return wire - .wire__crate__api__merged__gql_transport_impl_get_accounts_by_code_hash( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedGqlTransportImplGetAccountsByCodeHashConstMeta, - argValues: [that, codeHash, limit, continuation], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedGqlTransportImplGetAccountsByCodeHashConstMeta => - const TaskConstMeta( - debugName: "gql_transport_impl_get_accounts_by_code_hash", - argNames: ["that", "codeHash", "limit", "continuation"], - ); + get kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnTransactionsFoundConstMeta => + const TaskConstMeta( + debugName: + "GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found", + argNames: ["that"], + ); @override - Future crateApiMergedGqlTransportImplGetBlock( - {required GqlTransportImpl that, required String id}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); - var arg1 = cst_encode_String(id); - return wire.wire__crate__api__merged__gql_transport_impl_get_block( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + void + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnMessageExpired({ + required GenericContractSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onMessageExpired, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onMessageExpired, + ); + return wire + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_expired( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnMessageExpiredConstMeta, + argValues: [that, onMessageExpired], + apiImpl: this, ), - constMeta: kCrateApiMergedGqlTransportImplGetBlockConstMeta, - argValues: [that, id], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedGqlTransportImplGetBlockConstMeta => + TaskConstMeta + get kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnMessageExpiredConstMeta => const TaskConstMeta( - debugName: "gql_transport_impl_get_block", - argNames: ["that", "id"], + debugName: + "GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_expired", + argNames: ["that", "onMessageExpired"], ); @override - Future crateApiMergedGqlTransportImplGetBlockchainConfig( - {required GqlTransportImpl that, required bool force}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); - var arg1 = cst_encode_bool(force); - return wire - .wire__crate__api__merged__gql_transport_impl_get_blockchain_config( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + void + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnMessageSent({ + required GenericContractSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onMessageSent, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onMessageSent, + ); + return wire + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_sent( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnMessageSentConstMeta, + argValues: [that, onMessageSent], + apiImpl: this, ), - constMeta: kCrateApiMergedGqlTransportImplGetBlockchainConfigConstMeta, - argValues: [that, force], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedGqlTransportImplGetBlockchainConfigConstMeta => - const TaskConstMeta( - debugName: "gql_transport_impl_get_blockchain_config", - argNames: ["that", "force"], - ); + get kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnMessageSentConstMeta => + const TaskConstMeta( + debugName: + "GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_sent", + argNames: ["that", "onMessageSent"], + ); @override - Future crateApiMergedGqlTransportImplGetContractState( - {required GqlTransportImpl that, required String address}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); - var arg1 = cst_encode_String(address); - return wire - .wire__crate__api__merged__gql_transport_impl_get_contract_state( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + void + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnStateChanged({ + required GenericContractSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onStateChanged, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onStateChanged, + ); + return wire + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_state_changed( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnStateChangedConstMeta, + argValues: [that, onStateChanged], + apiImpl: this, ), - constMeta: kCrateApiMergedGqlTransportImplGetContractStateConstMeta, - argValues: [that, address], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedGqlTransportImplGetContractStateConstMeta => + TaskConstMeta + get kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnStateChangedConstMeta => const TaskConstMeta( - debugName: "gql_transport_impl_get_contract_state", - argNames: ["that", "address"], + debugName: + "GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_state_changed", + argNames: ["that", "onStateChanged"], ); @override - Future crateApiMergedGqlTransportImplGetDstTransaction( - {required GqlTransportImpl that, required String messageHash}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); - var arg1 = cst_encode_String(messageHash); - return wire - .wire__crate__api__merged__gql_transport_impl_get_dst_transaction( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: dco_decode_AnyhowException, + void + crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnTransactionsFound({ + required GenericContractSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onTransactionsFound, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onTransactionsFound, + ); + return wire + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnTransactionsFoundConstMeta, + argValues: [that, onTransactionsFound], + apiImpl: this, ), - constMeta: kCrateApiMergedGqlTransportImplGetDstTransactionConstMeta, - argValues: [that, messageHash], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedGqlTransportImplGetDstTransactionConstMeta => + TaskConstMeta + get kCrateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnTransactionsFoundConstMeta => const TaskConstMeta( - debugName: "gql_transport_impl_get_dst_transaction", - argNames: ["that", "messageHash"], + debugName: + "GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found", + argNames: ["that", "onTransactionsFound"], ); @override - Future crateApiMergedGqlTransportImplGetFeeFactors( - {required GqlTransportImpl that, required bool isMasterchain}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); - var arg1 = cst_encode_bool(isMasterchain); - return wire - .wire__crate__api__merged__gql_transport_impl_get_fee_factors( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + bool crateApiMergedGqlConnectionImplAutoAccessorGetIsLocal({ + required GqlConnectionImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + that, + ); + return wire + .wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_is_local( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedGqlConnectionImplAutoAccessorGetIsLocalConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedGqlTransportImplGetFeeFactorsConstMeta, - argValues: [that, isMasterchain], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedGqlTransportImplGetFeeFactorsConstMeta => + TaskConstMeta + get kCrateApiMergedGqlConnectionImplAutoAccessorGetIsLocalConstMeta => const TaskConstMeta( - debugName: "gql_transport_impl_get_fee_factors", - argNames: ["that", "isMasterchain"], + debugName: "GqlConnectionImpl_auto_accessor_get_is_local", + argNames: ["that"], ); @override - Future crateApiMergedGqlTransportImplGetFullContractState( - {required GqlTransportImpl that, required String address}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); - var arg1 = cst_encode_String(address); - return wire - .wire__crate__api__merged__gql_transport_impl_get_full_contract_state( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: dco_decode_AnyhowException, + ArcFnStringDartFnFutureString + crateApiMergedGqlConnectionImplAutoAccessorGetOnPost({ + required GqlConnectionImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + that, + ); + return wire + .wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_on_post( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedGqlConnectionImplAutoAccessorGetOnPostConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedGqlTransportImplGetFullContractStateConstMeta, - argValues: [that, address], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedGqlTransportImplGetFullContractStateConstMeta => - const TaskConstMeta( - debugName: "gql_transport_impl_get_full_contract_state", - argNames: ["that", "address"], - ); + get kCrateApiMergedGqlConnectionImplAutoAccessorGetOnPostConstMeta => + const TaskConstMeta( + debugName: "GqlConnectionImpl_auto_accessor_get_on_post", + argNames: ["that"], + ); @override - Future crateApiMergedGqlTransportImplGetLatestBlock( - {required GqlTransportImpl that, required String address}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); - var arg1 = cst_encode_String(address); - return wire - .wire__crate__api__merged__gql_transport_impl_get_latest_block( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_latest_block, - decodeErrorData: dco_decode_AnyhowException, + void crateApiMergedGqlConnectionImplAutoAccessorSetIsLocal({ + required GqlConnectionImpl that, + required bool isLocal, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + that, + ); + var arg1 = cst_encode_bool(isLocal); + return wire + .wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_is_local( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedGqlConnectionImplAutoAccessorSetIsLocalConstMeta, + argValues: [that, isLocal], + apiImpl: this, ), - constMeta: kCrateApiMergedGqlTransportImplGetLatestBlockConstMeta, - argValues: [that, address], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedGqlTransportImplGetLatestBlockConstMeta => + TaskConstMeta + get kCrateApiMergedGqlConnectionImplAutoAccessorSetIsLocalConstMeta => const TaskConstMeta( - debugName: "gql_transport_impl_get_latest_block", - argNames: ["that", "address"], + debugName: "GqlConnectionImpl_auto_accessor_set_is_local", + argNames: ["that", "isLocal"], ); @override - Future crateApiMergedGqlTransportImplGetNetworkId( - {required GqlTransportImpl that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); - return wire.wire__crate__api__merged__gql_transport_impl_get_network_id( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_i_32, - decodeErrorData: dco_decode_AnyhowException, + void crateApiMergedGqlConnectionImplAutoAccessorSetOnPost({ + required GqlConnectionImpl that, + required ArcFnStringDartFnFutureString onPost, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + onPost, + ); + return wire + .wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_on_post( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedGqlConnectionImplAutoAccessorSetOnPostConstMeta, + argValues: [that, onPost], + apiImpl: this, ), - constMeta: kCrateApiMergedGqlTransportImplGetNetworkIdConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedGqlTransportImplGetNetworkIdConstMeta => + TaskConstMeta + get kCrateApiMergedGqlConnectionImplAutoAccessorSetOnPostConstMeta => const TaskConstMeta( - debugName: "gql_transport_impl_get_network_id", - argNames: ["that"], + debugName: "GqlConnectionImpl_auto_accessor_set_on_post", + argNames: ["that", "onPost"], ); @override - Future crateApiMergedGqlTransportImplGetSignatureId( - {required GqlTransportImpl that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); - return wire - .wire__crate__api__merged__gql_transport_impl_get_signature_id( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_box_autoadd_i_32, - decodeErrorData: dco_decode_AnyhowException, + ArcFnStringDartFnFuture + crateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorGetOnBalanceChanged({ + required JettonWalletSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorGetOnBalanceChangedConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedGqlTransportImplGetSignatureIdConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedGqlTransportImplGetSignatureIdConstMeta => + TaskConstMeta + get kCrateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorGetOnBalanceChangedConstMeta => const TaskConstMeta( - debugName: "gql_transport_impl_get_signature_id", + debugName: + "JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed", argNames: ["that"], ); @override - Future crateApiMergedGqlTransportImplGetTransaction( - {required GqlTransportImpl that, required String hash}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); - var arg1 = cst_encode_String(hash); - return wire - .wire__crate__api__merged__gql_transport_impl_get_transaction( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: dco_decode_AnyhowException, + ArcFnStringDartFnFuture + crateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFound({ + required JettonWalletSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFoundConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedGqlTransportImplGetTransactionConstMeta, - argValues: [that, hash], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedGqlTransportImplGetTransactionConstMeta => + TaskConstMeta + get kCrateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFoundConstMeta => const TaskConstMeta( - debugName: "gql_transport_impl_get_transaction", - argNames: ["that", "hash"], + debugName: + "JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found", + argNames: ["that"], ); @override - Future crateApiMergedGqlTransportImplGetTransactions( - {required GqlTransportImpl that, - required String address, - String? fromLt, - required int count}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); - var arg1 = cst_encode_String(address); - var arg2 = cst_encode_opt_String(fromLt); - var arg3 = cst_encode_u_8(count); - return wire - .wire__crate__api__merged__gql_transport_impl_get_transactions( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedGqlTransportImplGetTransactionsConstMeta, - argValues: [that, address, fromLt, count], - apiImpl: this, - )); + void + crateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorSetOnBalanceChanged({ + required JettonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onBalanceChanged, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onBalanceChanged, + ); + return wire + .wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorSetOnBalanceChangedConstMeta, + argValues: [that, onBalanceChanged], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedGqlTransportImplGetTransactionsConstMeta => + TaskConstMeta + get kCrateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorSetOnBalanceChangedConstMeta => const TaskConstMeta( - debugName: "gql_transport_impl_get_transactions", - argNames: ["that", "address", "fromLt", "count"], + debugName: + "JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed", + argNames: ["that", "onBalanceChanged"], ); @override - GqlTransportImpl crateApiMergedGqlTransportImplNew( - {required GqlConnectionDartWrapper gqlConnection}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = - cst_encode_box_autoadd_gql_connection_dart_wrapper(gqlConnection); - return wire.wire__crate__api__merged__gql_transport_impl_new(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_gql_transport_impl, - decodeErrorData: null, + void + crateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFound({ + required JettonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onTransactionsFound, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onTransactionsFound, + ); + return wire + .wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFoundConstMeta, + argValues: [that, onTransactionsFound], + apiImpl: this, ), - constMeta: kCrateApiMergedGqlTransportImplNewConstMeta, - argValues: [gqlConnection], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedGqlTransportImplNewConstMeta => + TaskConstMeta + get kCrateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFoundConstMeta => const TaskConstMeta( - debugName: "gql_transport_impl_new", - argNames: ["gqlConnection"], + debugName: + "JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found", + argNames: ["that", "onTransactionsFound"], ); @override - Future crateApiMergedGqlTransportImplSimulateTransactionTree( - {required GqlTransportImpl that, - required String signedMessage, - required List ignoredComputePhaseCodes, - required List ignoredActionPhaseCodes}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); - var arg1 = cst_encode_String(signedMessage); - var arg2 = cst_encode_list_prim_i_32_loose(ignoredComputePhaseCodes); - var arg3 = cst_encode_list_prim_i_32_loose(ignoredActionPhaseCodes); - return wire - .wire__crate__api__merged__gql_transport_impl_simulate_transaction_tree( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedGqlTransportImplSimulateTransactionTreeConstMeta, - argValues: [ - that, - signedMessage, - ignoredComputePhaseCodes, - ignoredActionPhaseCodes - ], - apiImpl: this, - )); + ArcFnStringDartFnFutureString + crateApiMergedJrpcConnectionImplAutoAccessorGetOnPost({ + required JrpcConnectionImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + that, + ); + return wire + .wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_get_on_post( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedJrpcConnectionImplAutoAccessorGetOnPostConstMeta, + argValues: [that], + apiImpl: this, + ), + ); } TaskConstMeta - get kCrateApiMergedGqlTransportImplSimulateTransactionTreeConstMeta => - const TaskConstMeta( - debugName: "gql_transport_impl_simulate_transaction_tree", - argNames: [ - "that", - "signedMessage", - "ignoredComputePhaseCodes", - "ignoredActionPhaseCodes" - ], - ); - - @override - Future crateApiMergedGqlTransportImplWaitForNextBlock( - {required GqlTransportImpl that, - required String currentBlockId, - required String address, - required BigInt timeout}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); - var arg1 = cst_encode_String(currentBlockId); - var arg2 = cst_encode_String(address); - var arg3 = cst_encode_u_64(timeout); - return wire - .wire__crate__api__merged__gql_transport_impl_wait_for_next_block( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedGqlTransportImplWaitForNextBlockConstMeta, - argValues: [that, currentBlockId, address, timeout], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiMergedGqlTransportImplWaitForNextBlockConstMeta => + get kCrateApiMergedJrpcConnectionImplAutoAccessorGetOnPostConstMeta => const TaskConstMeta( - debugName: "gql_transport_impl_wait_for_next_block", - argNames: ["that", "currentBlockId", "address", "timeout"], + debugName: "JrpcConnectionImpl_auto_accessor_get_on_post", + argNames: ["that"], ); @override - Stream crateApiMergedInitCaller() { - final streamSink = RustStreamSink(); - unawaited(handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = - cst_encode_StreamSink_dart_call_stub_registred_Dco(streamSink); - return wire.wire__crate__api__merged__init_caller(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + void crateApiMergedJrpcConnectionImplAutoAccessorSetOnPost({ + required JrpcConnectionImpl that, + required ArcFnStringDartFnFutureString onPost, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + onPost, + ); + return wire + .wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_set_on_post( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedJrpcConnectionImplAutoAccessorSetOnPostConstMeta, + argValues: [that, onPost], + apiImpl: this, ), - constMeta: kCrateApiMergedInitCallerConstMeta, - argValues: [streamSink], - apiImpl: this, - ))); - return streamSink.stream; + ); } - TaskConstMeta get kCrateApiMergedInitCallerConstMeta => const TaskConstMeta( - debugName: "init_caller", - argNames: ["streamSink"], + TaskConstMeta + get kCrateApiMergedJrpcConnectionImplAutoAccessorSetOnPostConstMeta => + const TaskConstMeta( + debugName: "JrpcConnectionImpl_auto_accessor_set_on_post", + argNames: ["that", "onPost"], ); @override - Future crateApiMergedInitLogger( - {required LogLevel level, required bool mobileLogger}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_log_level(level); - var arg1 = cst_encode_bool(mobileLogger); - return wire.wire__crate__api__merged__init_logger(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + ArcFnU16DartFnFutureVecU8 + crateApiMergedLedgerConnectionImplAutoAccessorGetOnGetPublicKey({ + required LedgerConnectionImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + that, + ); + return wire + .wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_get_public_key( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedLedgerConnectionImplAutoAccessorGetOnGetPublicKeyConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedInitLoggerConstMeta, - argValues: [level, mobileLogger], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedInitLoggerConstMeta => const TaskConstMeta( - debugName: "init_logger", - argNames: ["level", "mobileLogger"], + TaskConstMeta + get kCrateApiMergedLedgerConnectionImplAutoAccessorGetOnGetPublicKeyConstMeta => + const TaskConstMeta( + debugName: "LedgerConnectionImpl_auto_accessor_get_on_get_public_key", + argNames: ["that"], ); @override - Future crateApiMergedJettonWalletDartWrapperAddress( - {required JettonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); - return wire - .wire__crate__api__merged__jetton_wallet_dart_wrapper_address( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + ArcFnU16OptionI32VecU8DartFnFutureVecU8 + crateApiMergedLedgerConnectionImplAutoAccessorGetOnSign({ + required LedgerConnectionImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + that, + ); + return wire + .wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedLedgerConnectionImplAutoAccessorGetOnSignConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedJettonWalletDartWrapperAddressConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedJettonWalletDartWrapperAddressConstMeta => + TaskConstMeta + get kCrateApiMergedLedgerConnectionImplAutoAccessorGetOnSignConstMeta => const TaskConstMeta( - debugName: "jetton_wallet_dart_wrapper_address", + debugName: "LedgerConnectionImpl_auto_accessor_get_on_sign", argNames: ["that"], ); @override - Future crateApiMergedJettonWalletDartWrapperBalance( - {required JettonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); - return wire - .wire__crate__api__merged__jetton_wallet_dart_wrapper_balance( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + crateApiMergedLedgerConnectionImplAutoAccessorGetOnSignTransaction({ + required LedgerConnectionImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + that, + ); + return wire + .wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign_transaction( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedLedgerConnectionImplAutoAccessorGetOnSignTransactionConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedJettonWalletDartWrapperBalanceConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedJettonWalletDartWrapperBalanceConstMeta => + TaskConstMeta + get kCrateApiMergedLedgerConnectionImplAutoAccessorGetOnSignTransactionConstMeta => const TaskConstMeta( - debugName: "jetton_wallet_dart_wrapper_balance", + debugName: "LedgerConnectionImpl_auto_accessor_get_on_sign_transaction", argNames: ["that"], ); @override - Future crateApiMergedJettonWalletDartWrapperContractState( - {required JettonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); - return wire - .wire__crate__api__merged__jetton_wallet_dart_wrapper_contract_state( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + void crateApiMergedLedgerConnectionImplAutoAccessorSetOnGetPublicKey({ + required LedgerConnectionImpl that, + required ArcFnU16DartFnFutureVecU8 onGetPublicKey, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + onGetPublicKey, + ); + return wire + .wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_get_public_key( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedLedgerConnectionImplAutoAccessorSetOnGetPublicKeyConstMeta, + argValues: [that, onGetPublicKey], + apiImpl: this, ), - constMeta: kCrateApiMergedJettonWalletDartWrapperContractStateConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedJettonWalletDartWrapperContractStateConstMeta => - const TaskConstMeta( - debugName: "jetton_wallet_dart_wrapper_contract_state", - argNames: ["that"], - ); + get kCrateApiMergedLedgerConnectionImplAutoAccessorSetOnGetPublicKeyConstMeta => + const TaskConstMeta( + debugName: "LedgerConnectionImpl_auto_accessor_set_on_get_public_key", + argNames: ["that", "onGetPublicKey"], + ); @override - Future crateApiMergedJettonWalletDartWrapperEstimateMinAttachedAmount( - {required JettonWalletDartWrapper that, required String destination}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(destination); - return wire - .wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amount( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + void crateApiMergedLedgerConnectionImplAutoAccessorSetOnSign({ + required LedgerConnectionImpl that, + required ArcFnU16OptionI32VecU8DartFnFutureVecU8 onSign, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + onSign, + ); + return wire + .wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedLedgerConnectionImplAutoAccessorSetOnSignConstMeta, + argValues: [that, onSign], + apiImpl: this, ), - constMeta: - kCrateApiMergedJettonWalletDartWrapperEstimateMinAttachedAmountConstMeta, - argValues: [that, destination], - apiImpl: this, - )); - } - - TaskConstMeta - get kCrateApiMergedJettonWalletDartWrapperEstimateMinAttachedAmountConstMeta => - const TaskConstMeta( - debugName: - "jetton_wallet_dart_wrapper_estimate_min_attached_amount", - argNames: ["that", "destination"], - ); - - @override - Future crateApiMergedJettonWalletDartWrapperGetJettonRootDetails( - {required ArcTransportBoxTrait transport, - required String tokenRootAddress}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - var arg1 = cst_encode_String(tokenRootAddress); - return wire - .wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedJettonWalletDartWrapperGetJettonRootDetailsConstMeta, - argValues: [transport, tokenRootAddress], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedJettonWalletDartWrapperGetJettonRootDetailsConstMeta => - const TaskConstMeta( - debugName: "jetton_wallet_dart_wrapper_get_jetton_root_details", - argNames: ["transport", "tokenRootAddress"], - ); + get kCrateApiMergedLedgerConnectionImplAutoAccessorSetOnSignConstMeta => + const TaskConstMeta( + debugName: "LedgerConnectionImpl_auto_accessor_set_on_sign", + argNames: ["that", "onSign"], + ); @override - Future - crateApiMergedJettonWalletDartWrapperGetJettonRootDetailsFromJettonWallet( - {required ArcTransportBoxTrait transport, - required String tokenWalletAddress}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - var arg1 = cst_encode_String(tokenWalletAddress); - return wire - .wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedJettonWalletDartWrapperGetJettonRootDetailsFromJettonWalletConstMeta, - argValues: [transport, tokenWalletAddress], - apiImpl: this, - )); + void crateApiMergedLedgerConnectionImplAutoAccessorSetOnSignTransaction({ + required LedgerConnectionImpl that, + required ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 onSignTransaction, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + onSignTransaction, + ); + return wire + .wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign_transaction( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedLedgerConnectionImplAutoAccessorSetOnSignTransactionConstMeta, + argValues: [that, onSignTransaction], + apiImpl: this, + ), + ); } TaskConstMeta - get kCrateApiMergedJettonWalletDartWrapperGetJettonRootDetailsFromJettonWalletConstMeta => - const TaskConstMeta( - debugName: - "jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet", - argNames: ["transport", "tokenWalletAddress"], - ); + get kCrateApiMergedLedgerConnectionImplAutoAccessorSetOnSignTransactionConstMeta => + const TaskConstMeta( + debugName: "LedgerConnectionImpl_auto_accessor_set_on_sign_transaction", + argNames: ["that", "onSignTransaction"], + ); @override - Future crateApiMergedJettonWalletDartWrapperGetJettonWalletDetails( - {required ArcTransportBoxTrait transport, required String address}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - var arg1 = cst_encode_String(address); - return wire - .wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_details( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + ArcFnVecU8DartFnFutureVecU8 + crateApiMergedProtoConnectionImplAutoAccessorGetOnPost({ + required ProtoConnectionImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + that, + ); + return wire + .wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_get_on_post( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedProtoConnectionImplAutoAccessorGetOnPostConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: - kCrateApiMergedJettonWalletDartWrapperGetJettonWalletDetailsConstMeta, - argValues: [transport, address], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedJettonWalletDartWrapperGetJettonWalletDetailsConstMeta => - const TaskConstMeta( - debugName: "jetton_wallet_dart_wrapper_get_jetton_wallet_details", - argNames: ["transport", "address"], - ); + get kCrateApiMergedProtoConnectionImplAutoAccessorGetOnPostConstMeta => + const TaskConstMeta( + debugName: "ProtoConnectionImpl_auto_accessor_get_on_post", + argNames: ["that"], + ); @override - Future crateApiMergedJettonWalletDartWrapperHandleBlock( - {required JettonWalletDartWrapper that, required String block}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(block); - return wire - .wire__crate__api__merged__jetton_wallet_dart_wrapper_handle_block( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, + void crateApiMergedProtoConnectionImplAutoAccessorSetOnPost({ + required ProtoConnectionImpl that, + required ArcFnVecU8DartFnFutureVecU8 onPost, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + onPost, + ); + return wire + .wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_set_on_post( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedProtoConnectionImplAutoAccessorSetOnPostConstMeta, + argValues: [that, onPost], + apiImpl: this, ), - constMeta: kCrateApiMergedJettonWalletDartWrapperHandleBlockConstMeta, - argValues: [that, block], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedJettonWalletDartWrapperHandleBlockConstMeta => - const TaskConstMeta( - debugName: "jetton_wallet_dart_wrapper_handle_block", - argNames: ["that", "block"], - ); + get kCrateApiMergedProtoConnectionImplAutoAccessorSetOnPostConstMeta => + const TaskConstMeta( + debugName: "ProtoConnectionImpl_auto_accessor_set_on_post", + argNames: ["that", "onPost"], + ); @override - Future crateApiMergedJettonWalletDartWrapperOwner( - {required JettonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); - return wire.wire__crate__api__merged__jetton_wallet_dart_wrapper_owner( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + ArcFnStringDartFnFutureOptionString + crateApiMergedStorageImplAutoAccessorGetOnGet({required StorageImpl that}) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + that, + ); + return wire + .wire__crate__api__merged__StorageImpl_auto_accessor_get_on_get( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedStorageImplAutoAccessorGetOnGetConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedJettonWalletDartWrapperOwnerConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedJettonWalletDartWrapperOwnerConstMeta => + TaskConstMeta get kCrateApiMergedStorageImplAutoAccessorGetOnGetConstMeta => const TaskConstMeta( - debugName: "jetton_wallet_dart_wrapper_owner", + debugName: "StorageImpl_auto_accessor_get_on_get", argNames: ["that"], ); @override - Future crateApiMergedJettonWalletDartWrapperPreloadTransactions( - {required JettonWalletDartWrapper that, required String fromLt}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(fromLt); - return wire - .wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactions( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, + ArcFnStringDartFnFuture crateApiMergedStorageImplAutoAccessorGetOnRemove({ + required StorageImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + that, + ); + return wire + .wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedStorageImplAutoAccessorGetOnRemoveConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: - kCrateApiMergedJettonWalletDartWrapperPreloadTransactionsConstMeta, - argValues: [that, fromLt], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedJettonWalletDartWrapperPreloadTransactionsConstMeta => - const TaskConstMeta( - debugName: "jetton_wallet_dart_wrapper_preload_transactions", - argNames: ["that", "fromLt"], - ); + get kCrateApiMergedStorageImplAutoAccessorGetOnRemoveConstMeta => + const TaskConstMeta( + debugName: "StorageImpl_auto_accessor_get_on_remove", + argNames: ["that"], + ); @override - Future crateApiMergedJettonWalletDartWrapperPrepareTransfer( - {required JettonWalletDartWrapper that, - required String amount, - required String destination, - required String remainingGasTo, - String? customPayload, - required String callbackValue, - String? callbackPayload, - String? attachedAmount}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(amount); - var arg2 = cst_encode_String(destination); - var arg3 = cst_encode_String(remainingGasTo); - var arg4 = cst_encode_opt_String(customPayload); - var arg5 = cst_encode_String(callbackValue); - var arg6 = cst_encode_opt_String(callbackPayload); - var arg7 = cst_encode_opt_String(attachedAmount); - return wire - .wire__crate__api__merged__jetton_wallet_dart_wrapper_prepare_transfer( - port_, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedJettonWalletDartWrapperPrepareTransferConstMeta, - argValues: [ - that, - amount, - destination, - remainingGasTo, - customPayload, - callbackValue, - callbackPayload, - attachedAmount - ], - apiImpl: this, - )); + ArcFnStringDartFnFuture + crateApiMergedStorageImplAutoAccessorGetOnRemoveUnchecked({ + required StorageImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + that, + ); + return wire + .wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove_unchecked( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedStorageImplAutoAccessorGetOnRemoveUncheckedConstMeta, + argValues: [that], + apiImpl: this, + ), + ); } TaskConstMeta - get kCrateApiMergedJettonWalletDartWrapperPrepareTransferConstMeta => - const TaskConstMeta( - debugName: "jetton_wallet_dart_wrapper_prepare_transfer", - argNames: [ - "that", - "amount", - "destination", - "remainingGasTo", - "customPayload", - "callbackValue", - "callbackPayload", - "attachedAmount" - ], - ); + get kCrateApiMergedStorageImplAutoAccessorGetOnRemoveUncheckedConstMeta => + const TaskConstMeta( + debugName: "StorageImpl_auto_accessor_get_on_remove_unchecked", + argNames: ["that"], + ); @override - Future crateApiMergedJettonWalletDartWrapperRefresh( - {required JettonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); - return wire - .wire__crate__api__merged__jetton_wallet_dart_wrapper_refresh( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, + ArcFnStringStringDartFnFuture crateApiMergedStorageImplAutoAccessorGetOnSet({ + required StorageImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + that, + ); + return wire + .wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedStorageImplAutoAccessorGetOnSetConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedJettonWalletDartWrapperRefreshConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedJettonWalletDartWrapperRefreshConstMeta => + TaskConstMeta get kCrateApiMergedStorageImplAutoAccessorGetOnSetConstMeta => const TaskConstMeta( - debugName: "jetton_wallet_dart_wrapper_refresh", + debugName: "StorageImpl_auto_accessor_get_on_set", argNames: ["that"], ); @override - Future - crateApiMergedJettonWalletDartWrapperSubscribe( - {required String instanceHash, - required String owner, - required String rootTokenContract, - required ArcTransportBoxTrait transport, - required bool preloadTransactions}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(instanceHash); - var arg1 = cst_encode_String(owner); - var arg2 = cst_encode_String(rootTokenContract); - var arg3 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - var arg4 = cst_encode_bool(preloadTransactions); - return wire - .wire__crate__api__merged__jetton_wallet_dart_wrapper_subscribe( - port_, arg0, arg1, arg2, arg3, arg4); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_jetton_wallet_dart_wrapper, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedJettonWalletDartWrapperSubscribeConstMeta, - argValues: [ - instanceHash, - owner, - rootTokenContract, - transport, - preloadTransactions - ], - apiImpl: this, - )); + ArcFnStringStringDartFnFuture + crateApiMergedStorageImplAutoAccessorGetOnSetUnchecked({ + required StorageImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + that, + ); + return wire + .wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set_unchecked( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedStorageImplAutoAccessorGetOnSetUncheckedConstMeta, + argValues: [that], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedJettonWalletDartWrapperSubscribeConstMeta => + TaskConstMeta + get kCrateApiMergedStorageImplAutoAccessorGetOnSetUncheckedConstMeta => const TaskConstMeta( - debugName: "jetton_wallet_dart_wrapper_subscribe", - argNames: [ - "instanceHash", - "owner", - "rootTokenContract", - "transport", - "preloadTransactions" - ], + debugName: "StorageImpl_auto_accessor_get_on_set_unchecked", + argNames: ["that"], ); @override - JrpcConnectionDartWrapper crateApiMergedJrpcConnectionDartWrapperNew( - {required String instanceHash}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(instanceHash); - return wire - .wire__crate__api__merged__jrpc_connection_dart_wrapper_new(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_jrpc_connection_dart_wrapper, - decodeErrorData: null, + void crateApiMergedStorageImplAutoAccessorSetOnGet({ + required StorageImpl that, + required ArcFnStringDartFnFutureOptionString onGet, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + onGet, + ); + return wire + .wire__crate__api__merged__StorageImpl_auto_accessor_set_on_get( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedStorageImplAutoAccessorSetOnGetConstMeta, + argValues: [that, onGet], + apiImpl: this, ), - constMeta: kCrateApiMergedJrpcConnectionDartWrapperNewConstMeta, - argValues: [instanceHash], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedJrpcConnectionDartWrapperNewConstMeta => + TaskConstMeta get kCrateApiMergedStorageImplAutoAccessorSetOnGetConstMeta => const TaskConstMeta( - debugName: "jrpc_connection_dart_wrapper_new", - argNames: ["instanceHash"], - ); - - @override - Future crateApiMergedJrpcTransportImplGetAccountsByCodeHash( - {required JrpcTransportImpl that, - required String codeHash, - required int limit, - String? continuation}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); - var arg1 = cst_encode_String(codeHash); - var arg2 = cst_encode_u_8(limit); - var arg3 = cst_encode_opt_String(continuation); - return wire - .wire__crate__api__merged__jrpc_transport_impl_get_accounts_by_code_hash( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedJrpcTransportImplGetAccountsByCodeHashConstMeta, - argValues: [that, codeHash, limit, continuation], - apiImpl: this, - )); + debugName: "StorageImpl_auto_accessor_set_on_get", + argNames: ["that", "onGet"], + ); + + @override + void crateApiMergedStorageImplAutoAccessorSetOnRemove({ + required StorageImpl that, + required ArcFnStringDartFnFuture onRemove, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onRemove, + ); + return wire + .wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedStorageImplAutoAccessorSetOnRemoveConstMeta, + argValues: [that, onRemove], + apiImpl: this, + ), + ); } TaskConstMeta - get kCrateApiMergedJrpcTransportImplGetAccountsByCodeHashConstMeta => - const TaskConstMeta( - debugName: "jrpc_transport_impl_get_accounts_by_code_hash", - argNames: ["that", "codeHash", "limit", "continuation"], - ); + get kCrateApiMergedStorageImplAutoAccessorSetOnRemoveConstMeta => + const TaskConstMeta( + debugName: "StorageImpl_auto_accessor_set_on_remove", + argNames: ["that", "onRemove"], + ); @override - Future crateApiMergedJrpcTransportImplGetBlockchainConfig( - {required JrpcTransportImpl that, required bool force}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); - var arg1 = cst_encode_bool(force); - return wire - .wire__crate__api__merged__jrpc_transport_impl_get_blockchain_config( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + void crateApiMergedStorageImplAutoAccessorSetOnRemoveUnchecked({ + required StorageImpl that, + required ArcFnStringDartFnFuture onRemoveUnchecked, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onRemoveUnchecked, + ); + return wire + .wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove_unchecked( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedStorageImplAutoAccessorSetOnRemoveUncheckedConstMeta, + argValues: [that, onRemoveUnchecked], + apiImpl: this, ), - constMeta: kCrateApiMergedJrpcTransportImplGetBlockchainConfigConstMeta, - argValues: [that, force], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedJrpcTransportImplGetBlockchainConfigConstMeta => - const TaskConstMeta( - debugName: "jrpc_transport_impl_get_blockchain_config", - argNames: ["that", "force"], - ); + get kCrateApiMergedStorageImplAutoAccessorSetOnRemoveUncheckedConstMeta => + const TaskConstMeta( + debugName: "StorageImpl_auto_accessor_set_on_remove_unchecked", + argNames: ["that", "onRemoveUnchecked"], + ); @override - Future crateApiMergedJrpcTransportImplGetContractState( - {required JrpcTransportImpl that, required String address}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); - var arg1 = cst_encode_String(address); - return wire - .wire__crate__api__merged__jrpc_transport_impl_get_contract_state( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + void crateApiMergedStorageImplAutoAccessorSetOnSet({ + required StorageImpl that, + required ArcFnStringStringDartFnFuture onSet, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + onSet, + ); + return wire + .wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedStorageImplAutoAccessorSetOnSetConstMeta, + argValues: [that, onSet], + apiImpl: this, ), - constMeta: kCrateApiMergedJrpcTransportImplGetContractStateConstMeta, - argValues: [that, address], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedJrpcTransportImplGetContractStateConstMeta => + TaskConstMeta get kCrateApiMergedStorageImplAutoAccessorSetOnSetConstMeta => const TaskConstMeta( - debugName: "jrpc_transport_impl_get_contract_state", - argNames: ["that", "address"], + debugName: "StorageImpl_auto_accessor_set_on_set", + argNames: ["that", "onSet"], ); @override - Future crateApiMergedJrpcTransportImplGetDstTransaction( - {required JrpcTransportImpl that, required String messageHash}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); - var arg1 = cst_encode_String(messageHash); - return wire - .wire__crate__api__merged__jrpc_transport_impl_get_dst_transaction( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: dco_decode_AnyhowException, + void crateApiMergedStorageImplAutoAccessorSetOnSetUnchecked({ + required StorageImpl that, + required ArcFnStringStringDartFnFuture onSetUnchecked, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + onSetUnchecked, + ); + return wire + .wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set_unchecked( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedStorageImplAutoAccessorSetOnSetUncheckedConstMeta, + argValues: [that, onSetUnchecked], + apiImpl: this, ), - constMeta: kCrateApiMergedJrpcTransportImplGetDstTransactionConstMeta, - argValues: [that, messageHash], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedJrpcTransportImplGetDstTransactionConstMeta => - const TaskConstMeta( - debugName: "jrpc_transport_impl_get_dst_transaction", - argNames: ["that", "messageHash"], - ); + get kCrateApiMergedStorageImplAutoAccessorSetOnSetUncheckedConstMeta => + const TaskConstMeta( + debugName: "StorageImpl_auto_accessor_set_on_set_unchecked", + argNames: ["that", "onSetUnchecked"], + ); @override - Future crateApiMergedJrpcTransportImplGetFeeFactors( - {required JrpcTransportImpl that, required bool isMasterchain}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); - var arg1 = cst_encode_bool(isMasterchain); - return wire - .wire__crate__api__merged__jrpc_transport_impl_get_fee_factors( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedStorageImplNew({ + required ArcFnStringDartFnFutureOptionString onGet, + required ArcFnStringStringDartFnFuture onSet, + required ArcFnStringStringDartFnFuture onSetUnchecked, + required ArcFnStringDartFnFuture onRemove, + required ArcFnStringDartFnFuture onRemoveUnchecked, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + onGet, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + onSet, + ); + var arg2 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + onSetUnchecked, + ); + var arg3 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onRemove, + ); + var arg4 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onRemoveUnchecked, + ); + return wire.wire__crate__api__merged__StorageImpl_new( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedStorageImplNewConstMeta, + argValues: [onGet, onSet, onSetUnchecked, onRemove, onRemoveUnchecked], + apiImpl: this, ), - constMeta: kCrateApiMergedJrpcTransportImplGetFeeFactorsConstMeta, - argValues: [that, isMasterchain], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedJrpcTransportImplGetFeeFactorsConstMeta => + TaskConstMeta get kCrateApiMergedStorageImplNewConstMeta => const TaskConstMeta( - debugName: "jrpc_transport_impl_get_fee_factors", - argNames: ["that", "isMasterchain"], + debugName: "StorageImpl_new", + argNames: [ + "onGet", + "onSet", + "onSetUnchecked", + "onRemove", + "onRemoveUnchecked", + ], ); @override - Future crateApiMergedJrpcTransportImplGetFullContractState( - {required JrpcTransportImpl that, required String address}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); - var arg1 = cst_encode_String(address); - return wire - .wire__crate__api__merged__jrpc_transport_impl_get_full_contract_state( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: dco_decode_AnyhowException, + ArcFnStringDartFnFuture + crateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorGetOnBalanceChanged({ + required TokenWalletSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorGetOnBalanceChangedConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedJrpcTransportImplGetFullContractStateConstMeta, - argValues: [that, address], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedJrpcTransportImplGetFullContractStateConstMeta => - const TaskConstMeta( - debugName: "jrpc_transport_impl_get_full_contract_state", - argNames: ["that", "address"], - ); + get kCrateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorGetOnBalanceChangedConstMeta => + const TaskConstMeta( + debugName: + "TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed", + argNames: ["that"], + ); @override - Future crateApiMergedJrpcTransportImplGetNetworkId( - {required JrpcTransportImpl that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); - return wire - .wire__crate__api__merged__jrpc_transport_impl_get_network_id( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_i_32, - decodeErrorData: dco_decode_AnyhowException, + ArcFnStringDartFnFuture + crateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFound({ + required TokenWalletSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFoundConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedJrpcTransportImplGetNetworkIdConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedJrpcTransportImplGetNetworkIdConstMeta => + TaskConstMeta + get kCrateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFoundConstMeta => const TaskConstMeta( - debugName: "jrpc_transport_impl_get_network_id", + debugName: + "TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found", argNames: ["that"], ); @override - Future crateApiMergedJrpcTransportImplGetSignatureId( - {required JrpcTransportImpl that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); - return wire - .wire__crate__api__merged__jrpc_transport_impl_get_signature_id( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_box_autoadd_i_32, - decodeErrorData: dco_decode_AnyhowException, + void + crateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorSetOnBalanceChanged({ + required TokenWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onBalanceChanged, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onBalanceChanged, + ); + return wire + .wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorSetOnBalanceChangedConstMeta, + argValues: [that, onBalanceChanged], + apiImpl: this, ), - constMeta: kCrateApiMergedJrpcTransportImplGetSignatureIdConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedJrpcTransportImplGetSignatureIdConstMeta => + TaskConstMeta + get kCrateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorSetOnBalanceChangedConstMeta => const TaskConstMeta( - debugName: "jrpc_transport_impl_get_signature_id", - argNames: ["that"], + debugName: + "TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed", + argNames: ["that", "onBalanceChanged"], ); @override - Future crateApiMergedJrpcTransportImplGetTransaction( - {required JrpcTransportImpl that, required String hash}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); - var arg1 = cst_encode_String(hash); - return wire - .wire__crate__api__merged__jrpc_transport_impl_get_transaction( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: dco_decode_AnyhowException, + void + crateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFound({ + required TokenWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onTransactionsFound, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onTransactionsFound, + ); + return wire + .wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFoundConstMeta, + argValues: [that, onTransactionsFound], + apiImpl: this, ), - constMeta: kCrateApiMergedJrpcTransportImplGetTransactionConstMeta, - argValues: [that, hash], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedJrpcTransportImplGetTransactionConstMeta => + TaskConstMeta + get kCrateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFoundConstMeta => const TaskConstMeta( - debugName: "jrpc_transport_impl_get_transaction", - argNames: ["that", "hash"], + debugName: + "TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found", + argNames: ["that", "onTransactionsFound"], ); @override - Future crateApiMergedJrpcTransportImplGetTransactions( - {required JrpcTransportImpl that, - required String address, - String? fromLt, - required int count}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); - var arg1 = cst_encode_String(address); - var arg2 = cst_encode_opt_String(fromLt); - var arg3 = cst_encode_u_8(count); - return wire - .wire__crate__api__merged__jrpc_transport_impl_get_transactions( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedJrpcTransportImplGetTransactionsConstMeta, - argValues: [that, address, fromLt, count], - apiImpl: this, - )); + ArcFnStringDartFnFuture + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnCustodiansChanged({ + required TonWalletSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_custodians_changed( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnCustodiansChangedConstMeta, + argValues: [that], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedJrpcTransportImplGetTransactionsConstMeta => + TaskConstMeta + get kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnCustodiansChangedConstMeta => const TaskConstMeta( - debugName: "jrpc_transport_impl_get_transactions", - argNames: ["that", "address", "fromLt", "count"], + debugName: + "TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_custodians_changed", + argNames: ["that"], ); @override - JrpcTransportImpl crateApiMergedJrpcTransportImplNew( - {required JrpcConnectionDartWrapper jrpcConnection}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = - cst_encode_box_autoadd_jrpc_connection_dart_wrapper(jrpcConnection); - return wire.wire__crate__api__merged__jrpc_transport_impl_new(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_jrpc_transport_impl, - decodeErrorData: null, + ArcFnStringDartFnFuture + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnDetailsChanged({ + required TonWalletSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_details_changed( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnDetailsChangedConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedJrpcTransportImplNewConstMeta, - argValues: [jrpcConnection], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedJrpcTransportImplNewConstMeta => + TaskConstMeta + get kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnDetailsChangedConstMeta => const TaskConstMeta( - debugName: "jrpc_transport_impl_new", - argNames: ["jrpcConnection"], + debugName: + "TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_details_changed", + argNames: ["that"], ); @override - Future crateApiMergedJrpcTransportImplSimulateTransactionTree( - {required JrpcTransportImpl that, - required String signedMessage, - required List ignoredComputePhaseCodes, - required List ignoredActionPhaseCodes}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); - var arg1 = cst_encode_String(signedMessage); - var arg2 = cst_encode_list_prim_i_32_loose(ignoredComputePhaseCodes); - var arg3 = cst_encode_list_prim_i_32_loose(ignoredActionPhaseCodes); - return wire - .wire__crate__api__merged__jrpc_transport_impl_simulate_transaction_tree( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedJrpcTransportImplSimulateTransactionTreeConstMeta, - argValues: [ - that, - signedMessage, - ignoredComputePhaseCodes, - ignoredActionPhaseCodes - ], - apiImpl: this, - )); + ArcFnStringDartFnFuture + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnMessageExpired({ + required TonWalletSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_expired( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnMessageExpiredConstMeta, + argValues: [that], + apiImpl: this, + ), + ); } TaskConstMeta - get kCrateApiMergedJrpcTransportImplSimulateTransactionTreeConstMeta => - const TaskConstMeta( - debugName: "jrpc_transport_impl_simulate_transaction_tree", - argNames: [ - "that", - "signedMessage", - "ignoredComputePhaseCodes", - "ignoredActionPhaseCodes" - ], - ); + get kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnMessageExpiredConstMeta => + const TaskConstMeta( + debugName: + "TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_expired", + argNames: ["that"], + ); @override - Future crateApiMergedKeystoreDartWrapperAddKey( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String input}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - var arg1 = cst_encode_box_autoadd_key_signer(signer); - var arg2 = cst_encode_String(input); - return wire.wire__crate__api__merged__keystore_dart_wrapper_add_key( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedKeystoreDartWrapperAddKeyConstMeta, - argValues: [that, signer, input], - apiImpl: this, - )); + ArcFnStringDartFnFuture + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnMessageSent({ + required TonWalletSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_sent( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnMessageSentConstMeta, + argValues: [that], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperAddKeyConstMeta => + TaskConstMeta + get kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnMessageSentConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_add_key", - argNames: ["that", "signer", "input"], + debugName: + "TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_sent", + argNames: ["that"], ); @override - Future crateApiMergedKeystoreDartWrapperAddKeys( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String input}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - var arg1 = cst_encode_box_autoadd_key_signer(signer); - var arg2 = cst_encode_String(input); - return wire.wire__crate__api__merged__keystore_dart_wrapper_add_keys( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + ArcFnStringDartFnFuture + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnStateChanged({ + required TonWalletSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_state_changed( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnStateChangedConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedKeystoreDartWrapperAddKeysConstMeta, - argValues: [that, signer, input], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperAddKeysConstMeta => + TaskConstMeta + get kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnStateChangedConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_add_keys", - argNames: ["that", "signer", "input"], + debugName: + "TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_state_changed", + argNames: ["that"], ); @override - Future crateApiMergedKeystoreDartWrapperClearKeystore( - {required KeystoreDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - return wire - .wire__crate__api__merged__keystore_dart_wrapper_clear_keystore( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + ArcFnStringDartFnFuture + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFound({ + required TonWalletSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFoundConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedKeystoreDartWrapperClearKeystoreConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperClearKeystoreConstMeta => + TaskConstMeta + get kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFoundConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_clear_keystore", + debugName: + "TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found", argNames: ["that"], ); @override - Future crateApiMergedKeystoreDartWrapperDecrypt( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String data, - required String input}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - var arg1 = cst_encode_box_autoadd_key_signer(signer); - var arg2 = cst_encode_String(data); - var arg3 = cst_encode_String(input); - return wire.wire__crate__api__merged__keystore_dart_wrapper_decrypt( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + ArcFnStringDartFnFuture + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnUnconfirmedTransactionsChanged({ + required TonWalletSubscriptionHandlerImpl that, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + that, + ); + return wire + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_unconfirmed_transactions_changed( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnUnconfirmedTransactionsChangedConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedKeystoreDartWrapperDecryptConstMeta, - argValues: [that, signer, data, input], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperDecryptConstMeta => + TaskConstMeta + get kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnUnconfirmedTransactionsChangedConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_decrypt", - argNames: ["that", "signer", "data", "input"], + debugName: + "TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_unconfirmed_transactions_changed", + argNames: ["that"], ); @override - Future crateApiMergedKeystoreDartWrapperEncrypt( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String data, - required List publicKeys, - required String algorithm, - required String input}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - var arg1 = cst_encode_box_autoadd_key_signer(signer); - var arg2 = cst_encode_String(data); - var arg3 = cst_encode_list_String(publicKeys); - var arg4 = cst_encode_String(algorithm); - var arg5 = cst_encode_String(input); - return wire.wire__crate__api__merged__keystore_dart_wrapper_encrypt( - port_, arg0, arg1, arg2, arg3, arg4, arg5); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedKeystoreDartWrapperEncryptConstMeta, - argValues: [that, signer, data, publicKeys, algorithm, input], - apiImpl: this, - )); + void + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnCustodiansChanged({ + required TonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onCustodiansChanged, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onCustodiansChanged, + ); + return wire + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_custodians_changed( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnCustodiansChangedConstMeta, + argValues: [that, onCustodiansChanged], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperEncryptConstMeta => + TaskConstMeta + get kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnCustodiansChangedConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_encrypt", - argNames: [ - "that", - "signer", - "data", - "publicKeys", - "algorithm", - "input" - ], + debugName: + "TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_custodians_changed", + argNames: ["that", "onCustodiansChanged"], ); @override - Future crateApiMergedKeystoreDartWrapperExportSeed( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String input}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - var arg1 = cst_encode_box_autoadd_key_signer(signer); - var arg2 = cst_encode_String(input); - return wire.wire__crate__api__merged__keystore_dart_wrapper_export_seed( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + void + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnDetailsChanged({ + required TonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onDetailsChanged, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onDetailsChanged, + ); + return wire + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_details_changed( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnDetailsChangedConstMeta, + argValues: [that, onDetailsChanged], + apiImpl: this, ), - constMeta: kCrateApiMergedKeystoreDartWrapperExportSeedConstMeta, - argValues: [that, signer, input], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperExportSeedConstMeta => + TaskConstMeta + get kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnDetailsChangedConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_export_seed", - argNames: ["that", "signer", "input"], + debugName: + "TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_details_changed", + argNames: ["that", "onDetailsChanged"], ); @override - Future crateApiMergedKeystoreDartWrapperGetEntries( - {required KeystoreDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - return wire.wire__crate__api__merged__keystore_dart_wrapper_get_entries( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + void + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnMessageExpired({ + required TonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onMessageExpired, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onMessageExpired, + ); + return wire + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_expired( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnMessageExpiredConstMeta, + argValues: [that, onMessageExpired], + apiImpl: this, ), - constMeta: kCrateApiMergedKeystoreDartWrapperGetEntriesConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperGetEntriesConstMeta => + TaskConstMeta + get kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnMessageExpiredConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_get_entries", - argNames: ["that"], + debugName: + "TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_expired", + argNames: ["that", "onMessageExpired"], ); @override - Future> crateApiMergedKeystoreDartWrapperGetPublicKeys( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String input}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - var arg1 = cst_encode_box_autoadd_key_signer(signer); - var arg2 = cst_encode_String(input); - return wire - .wire__crate__api__merged__keystore_dart_wrapper_get_public_keys( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_String, - decodeErrorData: dco_decode_AnyhowException, + void + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnMessageSent({ + required TonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onMessageSent, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onMessageSent, + ); + return wire + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_sent( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnMessageSentConstMeta, + argValues: [that, onMessageSent], + apiImpl: this, ), - constMeta: kCrateApiMergedKeystoreDartWrapperGetPublicKeysConstMeta, - argValues: [that, signer, input], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperGetPublicKeysConstMeta => + TaskConstMeta + get kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnMessageSentConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_get_public_keys", - argNames: ["that", "signer", "input"], + debugName: + "TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_sent", + argNames: ["that", "onMessageSent"], ); @override - Future crateApiMergedKeystoreDartWrapperIsPasswordCached( - {required KeystoreDartWrapper that, - required String publicKey, - required BigInt duration}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - var arg1 = cst_encode_String(publicKey); - var arg2 = cst_encode_u_64(duration); - return wire - .wire__crate__api__merged__keystore_dart_wrapper_is_password_cached( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, + void + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnStateChanged({ + required TonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onStateChanged, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onStateChanged, + ); + return wire + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_state_changed( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnStateChangedConstMeta, + argValues: [that, onStateChanged], + apiImpl: this, ), - constMeta: kCrateApiMergedKeystoreDartWrapperIsPasswordCachedConstMeta, - argValues: [that, publicKey, duration], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedKeystoreDartWrapperIsPasswordCachedConstMeta => - const TaskConstMeta( - debugName: "keystore_dart_wrapper_is_password_cached", - argNames: ["that", "publicKey", "duration"], - ); - - @override - Future crateApiMergedKeystoreDartWrapperNew( - {required StorageDartWrapper storage, - required List signers, - LedgerConnectionDartWrapper? ledgerConnection}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_storage_dart_wrapper(storage); - var arg1 = cst_encode_list_key_signer(signers); - var arg2 = cst_encode_opt_box_autoadd_ledger_connection_dart_wrapper( - ledgerConnection); - return wire.wire__crate__api__merged__keystore_dart_wrapper_new( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_keystore_dart_wrapper, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedKeystoreDartWrapperNewConstMeta, - argValues: [storage, signers, ledgerConnection], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperNewConstMeta => + get kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnStateChangedConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_new", - argNames: ["storage", "signers", "ledgerConnection"], + debugName: + "TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_state_changed", + argNames: ["that", "onStateChanged"], ); @override - Future crateApiMergedKeystoreDartWrapperReloadKeystore( - {required KeystoreDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - return wire - .wire__crate__api__merged__keystore_dart_wrapper_reload_keystore( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + void + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFound({ + required TonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onTransactionsFound, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onTransactionsFound, + ); + return wire + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFoundConstMeta, + argValues: [that, onTransactionsFound], + apiImpl: this, ), - constMeta: kCrateApiMergedKeystoreDartWrapperReloadKeystoreConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperReloadKeystoreConstMeta => + TaskConstMeta + get kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFoundConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_reload_keystore", - argNames: ["that"], + debugName: + "TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found", + argNames: ["that", "onTransactionsFound"], ); @override - Future crateApiMergedKeystoreDartWrapperRemoveKey( - {required KeystoreDartWrapper that, required String publicKey}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - var arg1 = cst_encode_String(publicKey); - return wire.wire__crate__api__merged__keystore_dart_wrapper_remove_key( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: dco_decode_AnyhowException, + void + crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnUnconfirmedTransactionsChanged({ + required TonWalletSubscriptionHandlerImpl that, + required ArcFnStringDartFnFuture onUnconfirmedTransactionsChanged, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + that, + ); + var arg1 = + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + onUnconfirmedTransactionsChanged, + ); + return wire + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_unconfirmed_transactions_changed( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnUnconfirmedTransactionsChangedConstMeta, + argValues: [that, onUnconfirmedTransactionsChanged], + apiImpl: this, ), - constMeta: kCrateApiMergedKeystoreDartWrapperRemoveKeyConstMeta, - argValues: [that, publicKey], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperRemoveKeyConstMeta => + TaskConstMeta + get kCrateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnUnconfirmedTransactionsChangedConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_remove_key", - argNames: ["that", "publicKey"], + debugName: + "TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_unconfirmed_transactions_changed", + argNames: ["that", "onUnconfirmedTransactionsChanged"], ); @override - Future crateApiMergedKeystoreDartWrapperRemoveKeys( - {required KeystoreDartWrapper that, required List publicKeys}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - var arg1 = cst_encode_list_String(publicKeys); - return wire.wire__crate__api__merged__keystore_dart_wrapper_remove_keys( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedAccountsStorageImplAddAccount({ + required AccountsStorageImpl that, + required String account, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); + var arg1 = cst_encode_String(account); + return wire + .wire__crate__api__merged__accounts_storage_impl_add_account( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedAccountsStorageImplAddAccountConstMeta, + argValues: [that, account], + apiImpl: this, ), - constMeta: kCrateApiMergedKeystoreDartWrapperRemoveKeysConstMeta, - argValues: [that, publicKeys], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperRemoveKeysConstMeta => + TaskConstMeta get kCrateApiMergedAccountsStorageImplAddAccountConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_remove_keys", - argNames: ["that", "publicKeys"], + debugName: "accounts_storage_impl_add_account", + argNames: ["that", "account"], ); @override - Future crateApiMergedKeystoreDartWrapperSign( - {required KeystoreDartWrapper that, - required KeySigner signer, - required UnsignedMessageImpl message, - required String input, - int? signatureId}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - var arg1 = cst_encode_box_autoadd_key_signer(signer); - var arg2 = cst_encode_box_autoadd_unsigned_message_impl(message); - var arg3 = cst_encode_String(input); - var arg4 = cst_encode_opt_box_autoadd_i_32(signatureId); - return wire.wire__crate__api__merged__keystore_dart_wrapper_sign( - port_, arg0, arg1, arg2, arg3, arg4); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedKeystoreDartWrapperSignConstMeta, - argValues: [that, signer, message, input, signatureId], - apiImpl: this, - )); + Future crateApiMergedAccountsStorageImplAddAccounts({ + required AccountsStorageImpl that, + required String accounts, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); + var arg1 = cst_encode_String(accounts); + return wire + .wire__crate__api__merged__accounts_storage_impl_add_accounts( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedAccountsStorageImplAddAccountsConstMeta, + argValues: [that, accounts], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperSignConstMeta => + TaskConstMeta get kCrateApiMergedAccountsStorageImplAddAccountsConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_sign", - argNames: ["that", "signer", "message", "input", "signatureId"], + debugName: "accounts_storage_impl_add_accounts", + argNames: ["that", "accounts"], ); @override - Future crateApiMergedKeystoreDartWrapperSignData( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String data, - required String input, - int? signatureId}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - var arg1 = cst_encode_box_autoadd_key_signer(signer); - var arg2 = cst_encode_String(data); - var arg3 = cst_encode_String(input); - var arg4 = cst_encode_opt_box_autoadd_i_32(signatureId); - return wire.wire__crate__api__merged__keystore_dart_wrapper_sign_data( - port_, arg0, arg1, arg2, arg3, arg4); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_signed_data, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedKeystoreDartWrapperSignDataConstMeta, - argValues: [that, signer, data, input, signatureId], - apiImpl: this, - )); + Future crateApiMergedAccountsStorageImplAddTokenWallet({ + required AccountsStorageImpl that, + required String accountAddress, + required String networkGroup, + required String rootTokenContract, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); + var arg1 = cst_encode_String(accountAddress); + var arg2 = cst_encode_String(networkGroup); + var arg3 = cst_encode_String(rootTokenContract); + return wire + .wire__crate__api__merged__accounts_storage_impl_add_token_wallet( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedAccountsStorageImplAddTokenWalletConstMeta, + argValues: [that, accountAddress, networkGroup, rootTokenContract], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperSignDataConstMeta => + TaskConstMeta get kCrateApiMergedAccountsStorageImplAddTokenWalletConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_sign_data", - argNames: ["that", "signer", "data", "input", "signatureId"], + debugName: "accounts_storage_impl_add_token_wallet", + argNames: [ + "that", + "accountAddress", + "networkGroup", + "rootTokenContract", + ], ); @override - Future crateApiMergedKeystoreDartWrapperSignDataRaw( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String data, - required String input, - int? signatureId}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - var arg1 = cst_encode_box_autoadd_key_signer(signer); - var arg2 = cst_encode_String(data); - var arg3 = cst_encode_String(input); - var arg4 = cst_encode_opt_box_autoadd_i_32(signatureId); - return wire - .wire__crate__api__merged__keystore_dart_wrapper_sign_data_raw( - port_, arg0, arg1, arg2, arg3, arg4); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_signed_data_raw, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedKeystoreDartWrapperSignDataRawConstMeta, - argValues: [that, signer, data, input, signatureId], - apiImpl: this, - )); + Future crateApiMergedAccountsStorageImplAddTokenWallets({ + required AccountsStorageImpl that, + required String accountAddress, + required String networkGroup, + required List rootTokenContracts, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); + var arg1 = cst_encode_String(accountAddress); + var arg2 = cst_encode_String(networkGroup); + var arg3 = cst_encode_list_String(rootTokenContracts); + return wire + .wire__crate__api__merged__accounts_storage_impl_add_token_wallets( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedAccountsStorageImplAddTokenWalletsConstMeta, + argValues: [that, accountAddress, networkGroup, rootTokenContracts], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperSignDataRawConstMeta => + TaskConstMeta + get kCrateApiMergedAccountsStorageImplAddTokenWalletsConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_sign_data_raw", - argNames: ["that", "signer", "data", "input", "signatureId"], + debugName: "accounts_storage_impl_add_token_wallets", + argNames: [ + "that", + "accountAddress", + "networkGroup", + "rootTokenContracts", + ], ); @override - Future crateApiMergedKeystoreDartWrapperUpdateKey( - {required KeystoreDartWrapper that, - required KeySigner signer, - required String input}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); - var arg1 = cst_encode_box_autoadd_key_signer(signer); - var arg2 = cst_encode_String(input); - return wire.wire__crate__api__merged__keystore_dart_wrapper_update_key( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedAccountsStorageImplClear({ + required AccountsStorageImpl that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); + return wire.wire__crate__api__merged__accounts_storage_impl_clear( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedAccountsStorageImplClearConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedKeystoreDartWrapperUpdateKeyConstMeta, - argValues: [that, signer, input], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperUpdateKeyConstMeta => + TaskConstMeta get kCrateApiMergedAccountsStorageImplClearConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_update_key", - argNames: ["that", "signer", "input"], + debugName: "accounts_storage_impl_clear", + argNames: ["that"], ); @override - Future crateApiMergedKeystoreDartWrapperVerifyData( - {required List signers, - LedgerConnectionDartWrapper? ledgerConnection, - required String data}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_list_key_signer(signers); - var arg1 = cst_encode_opt_box_autoadd_ledger_connection_dart_wrapper( - ledgerConnection); - var arg2 = cst_encode_String(data); - return wire.wire__crate__api__merged__keystore_dart_wrapper_verify_data( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedAccountsStorageImplGetEntries({ + required AccountsStorageImpl that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); + return wire + .wire__crate__api__merged__accounts_storage_impl_get_entries( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedAccountsStorageImplGetEntriesConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedKeystoreDartWrapperVerifyDataConstMeta, - argValues: [signers, ledgerConnection, data], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedKeystoreDartWrapperVerifyDataConstMeta => + TaskConstMeta get kCrateApiMergedAccountsStorageImplGetEntriesConstMeta => const TaskConstMeta( - debugName: "keystore_dart_wrapper_verify_data", - argNames: ["signers", "ledgerConnection", "data"], + debugName: "accounts_storage_impl_get_entries", + argNames: ["that"], ); @override - LedgerConnectionDartWrapper crateApiMergedLedgerConnectionDartWrapperNew( - {required String instanceHash}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(instanceHash); - return wire - .wire__crate__api__merged__ledger_connection_dart_wrapper_new(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_ledger_connection_dart_wrapper, - decodeErrorData: null, + Future crateApiMergedAccountsStorageImplNew({ + required StorageDartWrapper storage, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_storage_dart_wrapper(storage); + return wire.wire__crate__api__merged__accounts_storage_impl_new( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_accounts_storage_impl, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedAccountsStorageImplNewConstMeta, + argValues: [storage], + apiImpl: this, ), - constMeta: kCrateApiMergedLedgerConnectionDartWrapperNewConstMeta, - argValues: [instanceHash], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedLedgerConnectionDartWrapperNewConstMeta => + TaskConstMeta get kCrateApiMergedAccountsStorageImplNewConstMeta => const TaskConstMeta( - debugName: "ledger_connection_dart_wrapper_new", - argNames: ["instanceHash"], + debugName: "accounts_storage_impl_new", + argNames: ["storage"], ); @override - LedgerConnectionImpl crateApiMergedLedgerConnectionImplNew( - {required String instanceHash}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(instanceHash); - return wire.wire__crate__api__merged__ledger_connection_impl_new(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_ledger_connection_impl, - decodeErrorData: null, + Future crateApiMergedAccountsStorageImplReload({ + required AccountsStorageImpl that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); + return wire.wire__crate__api__merged__accounts_storage_impl_reload( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedAccountsStorageImplReloadConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedLedgerConnectionImplNewConstMeta, - argValues: [instanceHash], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedLedgerConnectionImplNewConstMeta => + TaskConstMeta get kCrateApiMergedAccountsStorageImplReloadConstMeta => const TaskConstMeta( - debugName: "ledger_connection_impl_new", - argNames: ["instanceHash"], + debugName: "accounts_storage_impl_reload", + argNames: ["that"], ); @override - Future crateApiMergedMyClassMyFormat({required MyClass that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_my_class(that); - return wire.wire__crate__api__merged__my_class_my_format(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + Future crateApiMergedAccountsStorageImplRemoveAccount({ + required AccountsStorageImpl that, + required String accountAddress, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); + var arg1 = cst_encode_String(accountAddress); + return wire + .wire__crate__api__merged__accounts_storage_impl_remove_account( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedAccountsStorageImplRemoveAccountConstMeta, + argValues: [that, accountAddress], + apiImpl: this, ), - constMeta: kCrateApiMergedMyClassMyFormatConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedMyClassMyFormatConstMeta => + TaskConstMeta get kCrateApiMergedAccountsStorageImplRemoveAccountConstMeta => const TaskConstMeta( - debugName: "my_class_my_format", - argNames: ["that"], + debugName: "accounts_storage_impl_remove_account", + argNames: ["that", "accountAddress"], ); @override - Future crateApiMergedMyClassNew({required int a}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_i_32(a); - return wire.wire__crate__api__merged__my_class_new(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_my_class, - decodeErrorData: null, + Future crateApiMergedAccountsStorageImplRemoveAccounts({ + required AccountsStorageImpl that, + required List accountAddresses, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); + var arg1 = cst_encode_list_String(accountAddresses); + return wire + .wire__crate__api__merged__accounts_storage_impl_remove_accounts( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedAccountsStorageImplRemoveAccountsConstMeta, + argValues: [that, accountAddresses], + apiImpl: this, ), - constMeta: kCrateApiMergedMyClassNewConstMeta, - argValues: [a], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedMyClassNewConstMeta => const TaskConstMeta( - debugName: "my_class_new", - argNames: ["a"], + TaskConstMeta get kCrateApiMergedAccountsStorageImplRemoveAccountsConstMeta => + const TaskConstMeta( + debugName: "accounts_storage_impl_remove_accounts", + argNames: ["that", "accountAddresses"], ); @override - bool crateApiMergedNtCheckPublicKey({required String publicKey}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(publicKey); - return wire.wire__crate__api__merged__nt_check_public_key(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: null, + Future crateApiMergedAccountsStorageImplRemoveTokenWallet({ + required AccountsStorageImpl that, + required String accountAddress, + required String networkGroup, + required String rootTokenContract, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); + var arg1 = cst_encode_String(accountAddress); + var arg2 = cst_encode_String(networkGroup); + var arg3 = cst_encode_String(rootTokenContract); + return wire + .wire__crate__api__merged__accounts_storage_impl_remove_token_wallet( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedAccountsStorageImplRemoveTokenWalletConstMeta, + argValues: [that, accountAddress, networkGroup, rootTokenContract], + apiImpl: this, ), - constMeta: kCrateApiMergedNtCheckPublicKeyConstMeta, - argValues: [publicKey], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtCheckPublicKeyConstMeta => + TaskConstMeta + get kCrateApiMergedAccountsStorageImplRemoveTokenWalletConstMeta => const TaskConstMeta( - debugName: "nt_check_public_key", - argNames: ["publicKey"], + debugName: "accounts_storage_impl_remove_token_wallet", + argNames: [ + "that", + "accountAddress", + "networkGroup", + "rootTokenContract", + ], ); @override - List crateApiMergedNtCodeToTvc({required String code}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(code); - return wire.wire__crate__api__merged__nt_code_to_tvc(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedNtCodeToTvcConstMeta, - argValues: [code], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiMergedNtCodeToTvcConstMeta => const TaskConstMeta( - debugName: "nt_code_to_tvc", - argNames: ["code"], - ); - - @override - Future crateApiMergedNtComputeStorageFee( - {required String config, - required String account, - required int utime, - required bool isMasterchain}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(config); - var arg1 = cst_encode_String(account); - var arg2 = cst_encode_u_32(utime); - var arg3 = cst_encode_bool(isMasterchain); - return wire.wire__crate__api__merged__nt_compute_storage_fee( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedNtComputeStorageFeeConstMeta, - argValues: [config, account, utime, isMasterchain], - apiImpl: this, - )); + Future crateApiMergedAccountsStorageImplRemoveTokenWallets({ + required AccountsStorageImpl that, + required String accountAddress, + required String networkGroup, + required List rootTokenContracts, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); + var arg1 = cst_encode_String(accountAddress); + var arg2 = cst_encode_String(networkGroup); + var arg3 = cst_encode_list_String(rootTokenContracts); + return wire + .wire__crate__api__merged__accounts_storage_impl_remove_token_wallets( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedAccountsStorageImplRemoveTokenWalletsConstMeta, + argValues: [that, accountAddress, networkGroup, rootTokenContracts], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedNtComputeStorageFeeConstMeta => + TaskConstMeta + get kCrateApiMergedAccountsStorageImplRemoveTokenWalletsConstMeta => const TaskConstMeta( - debugName: "nt_compute_storage_fee", - argNames: ["config", "account", "utime", "isMasterchain"], + debugName: "accounts_storage_impl_remove_token_wallets", + argNames: [ + "that", + "accountAddress", + "networkGroup", + "rootTokenContracts", + ], ); @override - String crateApiMergedNtComputeTonWalletAddress( - {required String publicKey, - required String walletType, - required int workchain}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(publicKey); - var arg1 = cst_encode_String(walletType); - var arg2 = cst_encode_i_8(workchain); - return wire.wire__crate__api__merged__nt_compute_ton_wallet_address( - arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedAccountsStorageImplRenameAccount({ + required AccountsStorageImpl that, + required String accountAddress, + required String name, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_accounts_storage_impl(that); + var arg1 = cst_encode_String(accountAddress); + var arg2 = cst_encode_String(name); + return wire + .wire__crate__api__merged__accounts_storage_impl_rename_account( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedAccountsStorageImplRenameAccountConstMeta, + argValues: [that, accountAddress, name], + apiImpl: this, ), - constMeta: kCrateApiMergedNtComputeTonWalletAddressConstMeta, - argValues: [publicKey, walletType, workchain], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtComputeTonWalletAddressConstMeta => + TaskConstMeta get kCrateApiMergedAccountsStorageImplRenameAccountConstMeta => const TaskConstMeta( - debugName: "nt_compute_ton_wallet_address", - argNames: ["publicKey", "walletType", "workchain"], + debugName: "accounts_storage_impl_rename_account", + argNames: ["that", "accountAddress", "name"], ); @override - Future crateApiMergedNtCreateExternalMessage( - {required String dst, - required String contractAbi, - required String method, - String? stateInit, - required String input, - required String publicKey, - required int timeout}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(dst); - var arg1 = cst_encode_String(contractAbi); - var arg2 = cst_encode_String(method); - var arg3 = cst_encode_opt_String(stateInit); - var arg4 = cst_encode_String(input); - var arg5 = cst_encode_String(publicKey); - var arg6 = cst_encode_u_32(timeout); - return wire.wire__crate__api__merged__nt_create_external_message( - port_, arg0, arg1, arg2, arg3, arg4, arg5, arg6); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unsigned_message_impl, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedNtCreateExternalMessageConstMeta, - argValues: [ - dst, - contractAbi, - method, - stateInit, - input, - publicKey, - timeout - ], - apiImpl: this, - )); + Future crateApiMergedAccountsStorageImplVerifyData({ + required String data, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(data); + return wire + .wire__crate__api__merged__accounts_storage_impl_verify_data( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedAccountsStorageImplVerifyDataConstMeta, + argValues: [data], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedNtCreateExternalMessageConstMeta => + TaskConstMeta get kCrateApiMergedAccountsStorageImplVerifyDataConstMeta => const TaskConstMeta( - debugName: "nt_create_external_message", - argNames: [ - "dst", - "contractAbi", - "method", - "stateInit", - "input", - "publicKey", - "timeout" - ], + debugName: "accounts_storage_impl_verify_data", + argNames: ["data"], ); @override - Future crateApiMergedNtCreateExternalMessageWithoutSignature( - {required String dst, - required String contractAbi, - required String method, - String? stateInit, - required String input, - required int timeout}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(dst); - var arg1 = cst_encode_String(contractAbi); - var arg2 = cst_encode_String(method); - var arg3 = cst_encode_opt_String(stateInit); - var arg4 = cst_encode_String(input); - var arg5 = cst_encode_u_32(timeout); - return wire - .wire__crate__api__merged__nt_create_external_message_without_signature( - port_, arg0, arg1, arg2, arg3, arg4, arg5); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedNtCreateExternalMessageWithoutSignatureConstMeta, - argValues: [dst, contractAbi, method, stateInit, input, timeout], - apiImpl: this, - )); + Stream crateApiMergedCreateLogStream() { + final s = RustStreamSink(); + unawaited( + handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_StreamSink_log_entry_Dco(s); + return wire.wire__crate__api__merged__create_log_stream( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedCreateLogStreamConstMeta, + argValues: [s], + apiImpl: this, + ), + ), + ); + return s.stream; } - TaskConstMeta - get kCrateApiMergedNtCreateExternalMessageWithoutSignatureConstMeta => - const TaskConstMeta( - debugName: "nt_create_external_message_without_signature", - argNames: [ - "dst", - "contractAbi", - "method", - "stateInit", - "input", - "timeout" - ], - ); + TaskConstMeta get kCrateApiMergedCreateLogStreamConstMeta => + const TaskConstMeta(debugName: "create_log_stream", argNames: ["s"]); @override - Future crateApiMergedNtCreateRawExternalMessage( - {required String dst, - String? stateInit, - String? body, - required int timeout}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(dst); - var arg1 = cst_encode_opt_String(stateInit); - var arg2 = cst_encode_opt_String(body); - var arg3 = cst_encode_u_32(timeout); - return wire.wire__crate__api__merged__nt_create_raw_external_message( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedNtCreateRawExternalMessageConstMeta, - argValues: [dst, stateInit, body, timeout], - apiImpl: this, - )); + Future crateApiMergedGenericContractDartWrapperAddress({ + required GenericContractDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); + return wire + .wire__crate__api__merged__generic_contract_dart_wrapper_address( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedGenericContractDartWrapperAddressConstMeta, + argValues: [that], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedNtCreateRawExternalMessageConstMeta => + TaskConstMeta get kCrateApiMergedGenericContractDartWrapperAddressConstMeta => const TaskConstMeta( - debugName: "nt_create_raw_external_message", - argNames: ["dst", "stateInit", "body", "timeout"], + debugName: "generic_contract_dart_wrapper_address", + argNames: ["that"], ); @override - Future crateApiMergedNtDecodeEvent( - {required String messageBody, - required String contractAbi, - String? event}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(messageBody); - var arg1 = cst_encode_String(contractAbi); - var arg2 = cst_encode_opt_String(event); - return wire.wire__crate__api__merged__nt_decode_event( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedGenericContractDartWrapperContractState({ + required GenericContractDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); + return wire + .wire__crate__api__merged__generic_contract_dart_wrapper_contract_state( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedGenericContractDartWrapperContractStateConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedNtDecodeEventConstMeta, - argValues: [messageBody, contractAbi, event], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtDecodeEventConstMeta => + TaskConstMeta + get kCrateApiMergedGenericContractDartWrapperContractStateConstMeta => const TaskConstMeta( - debugName: "nt_decode_event", - argNames: ["messageBody", "contractAbi", "event"], + debugName: "generic_contract_dart_wrapper_contract_state", + argNames: ["that"], ); @override - Future crateApiMergedNtDecodeInput( - {required String messageBody, - required String contractAbi, - String? method, - required bool internal}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(messageBody); - var arg1 = cst_encode_String(contractAbi); - var arg2 = cst_encode_opt_String(method); - var arg3 = cst_encode_bool(internal); - return wire.wire__crate__api__merged__nt_decode_input( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedGenericContractDartWrapperEstimateFees({ + required GenericContractDartWrapper that, + required String signedMessage, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); + var arg1 = cst_encode_String(signedMessage); + return wire + .wire__crate__api__merged__generic_contract_dart_wrapper_estimate_fees( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedGenericContractDartWrapperEstimateFeesConstMeta, + argValues: [that, signedMessage], + apiImpl: this, ), - constMeta: kCrateApiMergedNtDecodeInputConstMeta, - argValues: [messageBody, contractAbi, method, internal], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtDecodeInputConstMeta => + TaskConstMeta + get kCrateApiMergedGenericContractDartWrapperEstimateFeesConstMeta => const TaskConstMeta( - debugName: "nt_decode_input", - argNames: ["messageBody", "contractAbi", "method", "internal"], + debugName: "generic_contract_dart_wrapper_estimate_fees", + argNames: ["that", "signedMessage"], ); @override - Future crateApiMergedNtDecodeOutput( - {required String messageBody, - required String contractAbi, - String? method}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(messageBody); - var arg1 = cst_encode_String(contractAbi); - var arg2 = cst_encode_opt_String(method); - return wire.wire__crate__api__merged__nt_decode_output( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future + crateApiMergedGenericContractDartWrapperExecuteTransactionLocally({ + required GenericContractDartWrapper that, + required String signedMessage, + required String options, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); + var arg1 = cst_encode_String(signedMessage); + var arg2 = cst_encode_String(options); + return wire + .wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locally( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedGenericContractDartWrapperExecuteTransactionLocallyConstMeta, + argValues: [that, signedMessage, options], + apiImpl: this, ), - constMeta: kCrateApiMergedNtDecodeOutputConstMeta, - argValues: [messageBody, contractAbi, method], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtDecodeOutputConstMeta => + TaskConstMeta + get kCrateApiMergedGenericContractDartWrapperExecuteTransactionLocallyConstMeta => const TaskConstMeta( - debugName: "nt_decode_output", - argNames: ["messageBody", "contractAbi", "method"], + debugName: "generic_contract_dart_wrapper_execute_transaction_locally", + argNames: ["that", "signedMessage", "options"], ); @override - Future crateApiMergedNtDecodeTransaction( - {required String transaction, - required String contractAbi, - String? method}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(transaction); - var arg1 = cst_encode_String(contractAbi); - var arg2 = cst_encode_opt_String(method); - return wire.wire__crate__api__merged__nt_decode_transaction( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedGenericContractDartWrapperHandleBlock({ + required GenericContractDartWrapper that, + required String block, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); + var arg1 = cst_encode_String(block); + return wire + .wire__crate__api__merged__generic_contract_dart_wrapper_handle_block( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedGenericContractDartWrapperHandleBlockConstMeta, + argValues: [that, block], + apiImpl: this, ), - constMeta: kCrateApiMergedNtDecodeTransactionConstMeta, - argValues: [transaction, contractAbi, method], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtDecodeTransactionConstMeta => + TaskConstMeta + get kCrateApiMergedGenericContractDartWrapperHandleBlockConstMeta => const TaskConstMeta( - debugName: "nt_decode_transaction", - argNames: ["transaction", "contractAbi", "method"], + debugName: "generic_contract_dart_wrapper_handle_block", + argNames: ["that", "block"], ); @override - Future crateApiMergedNtDecodeTransactionEvents( - {required String transaction, required String contractAbi}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(transaction); - var arg1 = cst_encode_String(contractAbi); - return wire.wire__crate__api__merged__nt_decode_transaction_events( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedGenericContractDartWrapperPendingTransactions({ + required GenericContractDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); + return wire + .wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactions( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedGenericContractDartWrapperPendingTransactionsConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedNtDecodeTransactionEventsConstMeta, - argValues: [transaction, contractAbi], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtDecodeTransactionEventsConstMeta => + TaskConstMeta + get kCrateApiMergedGenericContractDartWrapperPendingTransactionsConstMeta => const TaskConstMeta( - debugName: "nt_decode_transaction_events", - argNames: ["transaction", "contractAbi"], + debugName: "generic_contract_dart_wrapper_pending_transactions", + argNames: ["that"], ); @override - String crateApiMergedNtDeriveFromPhrase( - {required String phrase, required MnemonicType mnemonicType}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(phrase); - var arg1 = cst_encode_box_autoadd_mnemonic_type(mnemonicType); - return wire.wire__crate__api__merged__nt_derive_from_phrase(arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedGenericContractDartWrapperPollingMethod({ + required GenericContractDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); + return wire + .wire__crate__api__merged__generic_contract_dart_wrapper_polling_method( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_polling_method, + decodeErrorData: null, + ), + constMeta: + kCrateApiMergedGenericContractDartWrapperPollingMethodConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedNtDeriveFromPhraseConstMeta, - argValues: [phrase, mnemonicType], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtDeriveFromPhraseConstMeta => + TaskConstMeta + get kCrateApiMergedGenericContractDartWrapperPollingMethodConstMeta => const TaskConstMeta( - debugName: "nt_derive_from_phrase", - argNames: ["phrase", "mnemonicType"], + debugName: "generic_contract_dart_wrapper_polling_method", + argNames: ["that"], ); @override - String crateApiMergedNtEncodeComment( - {required String comment, required bool plain}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(comment); - var arg1 = cst_encode_bool(plain); - return wire.wire__crate__api__merged__nt_encode_comment(arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedGenericContractDartWrapperPreloadTransactions({ + required GenericContractDartWrapper that, + required String fromLt, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); + var arg1 = cst_encode_String(fromLt); + return wire + .wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactions( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedGenericContractDartWrapperPreloadTransactionsConstMeta, + argValues: [that, fromLt], + apiImpl: this, ), - constMeta: kCrateApiMergedNtEncodeCommentConstMeta, - argValues: [comment, plain], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtEncodeCommentConstMeta => + TaskConstMeta + get kCrateApiMergedGenericContractDartWrapperPreloadTransactionsConstMeta => const TaskConstMeta( - debugName: "nt_encode_comment", - argNames: ["comment", "plain"], + debugName: "generic_contract_dart_wrapper_preload_transactions", + argNames: ["that", "fromLt"], ); @override - Future crateApiMergedNtEncodeInternalInput( - {required String contractAbi, - required String method, - required String input}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(contractAbi); - var arg1 = cst_encode_String(method); - var arg2 = cst_encode_String(input); - return wire.wire__crate__api__merged__nt_encode_internal_input( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedGenericContractDartWrapperRefresh({ + required GenericContractDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); + return wire + .wire__crate__api__merged__generic_contract_dart_wrapper_refresh( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGenericContractDartWrapperRefreshConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedNtEncodeInternalInputConstMeta, - argValues: [contractAbi, method, input], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtEncodeInternalInputConstMeta => + TaskConstMeta get kCrateApiMergedGenericContractDartWrapperRefreshConstMeta => const TaskConstMeta( - debugName: "nt_encode_internal_input", - argNames: ["contractAbi", "method", "input"], + debugName: "generic_contract_dart_wrapper_refresh", + argNames: ["that"], ); @override - Future crateApiMergedNtEncodeInternalMessage( - {String? src, - required String dst, - required bool bounce, - String? stateInit, - String? body, - required String amount, - bool? bounced}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_opt_String(src); - var arg1 = cst_encode_String(dst); - var arg2 = cst_encode_bool(bounce); - var arg3 = cst_encode_opt_String(stateInit); - var arg4 = cst_encode_opt_String(body); - var arg5 = cst_encode_String(amount); - var arg6 = cst_encode_opt_box_autoadd_bool(bounced); - return wire.wire__crate__api__merged__nt_encode_internal_message( - port_, arg0, arg1, arg2, arg3, arg4, arg5, arg6); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedNtEncodeInternalMessageConstMeta, - argValues: [src, dst, bounce, stateInit, body, amount, bounced], - apiImpl: this, - )); + Future crateApiMergedGenericContractDartWrapperSend({ + required GenericContractDartWrapper that, + required String signedMessage, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_generic_contract_dart_wrapper(that); + var arg1 = cst_encode_String(signedMessage); + return wire + .wire__crate__api__merged__generic_contract_dart_wrapper_send( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGenericContractDartWrapperSendConstMeta, + argValues: [that, signedMessage], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedNtEncodeInternalMessageConstMeta => + TaskConstMeta get kCrateApiMergedGenericContractDartWrapperSendConstMeta => const TaskConstMeta( - debugName: "nt_encode_internal_message", - argNames: [ - "src", - "dst", - "bounce", - "stateInit", - "body", - "amount", - "bounced" - ], + debugName: "generic_contract_dart_wrapper_send", + argNames: ["that", "signedMessage"], ); @override - Future> crateApiMergedNtExecuteLocal( - {required String config, - required String account, - required String message, - required int utime, - required bool disableSignatureCheck, - String? overwriteBalance, - int? globalId}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(config); - var arg1 = cst_encode_String(account); - var arg2 = cst_encode_String(message); - var arg3 = cst_encode_u_32(utime); - var arg4 = cst_encode_bool(disableSignatureCheck); - var arg5 = cst_encode_opt_String(overwriteBalance); - var arg6 = cst_encode_opt_box_autoadd_i_32(globalId); - return wire.wire__crate__api__merged__nt_execute_local( - port_, arg0, arg1, arg2, arg3, arg4, arg5, arg6); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedNtExecuteLocalConstMeta, - argValues: [ - config, - account, - message, - utime, - disableSignatureCheck, - overwriteBalance, - globalId - ], - apiImpl: this, - )); + Future + crateApiMergedGenericContractDartWrapperSubscribe({ + required String address, + required bool preloadTransactions, + required ArcTransportBoxTrait transport, + required FutureOr Function(String) onMessageSent, + required FutureOr Function(String) onMessageExpired, + required FutureOr Function(String) onStateChanged, + required FutureOr Function(String) onTransactionsFound, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(address); + var arg1 = cst_encode_bool(preloadTransactions); + var arg2 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg3 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onMessageSent, + ); + var arg4 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onMessageExpired, + ); + var arg5 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onStateChanged, + ); + var arg6 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onTransactionsFound, + ); + return wire + .wire__crate__api__merged__generic_contract_dart_wrapper_subscribe( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_generic_contract_dart_wrapper, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGenericContractDartWrapperSubscribeConstMeta, + argValues: [ + address, + preloadTransactions, + transport, + onMessageSent, + onMessageExpired, + onStateChanged, + onTransactionsFound, + ], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedNtExecuteLocalConstMeta => + TaskConstMeta + get kCrateApiMergedGenericContractDartWrapperSubscribeConstMeta => const TaskConstMeta( - debugName: "nt_execute_local", + debugName: "generic_contract_dart_wrapper_subscribe", argNames: [ - "config", - "account", - "message", - "utime", - "disableSignatureCheck", - "overwriteBalance", - "globalId" + "address", + "preloadTransactions", + "transport", + "onMessageSent", + "onMessageExpired", + "onStateChanged", + "onTransactionsFound", ], ); @override - String crateApiMergedNtExtractPublicKey({required String boc}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(boc); - return wire.wire__crate__api__merged__nt_extract_public_key(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + GqlConnectionDartWrapper crateApiMergedGqlConnectionDartWrapperNew({ + required bool isLocal, + required FutureOr Function(String) onPost, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_bool(isLocal); + var arg1 = + cst_encode_DartFn_Inputs_String_Output_String_AnyhowException( + onPost, + ); + return wire.wire__crate__api__merged__gql_connection_dart_wrapper_new( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_gql_connection_dart_wrapper, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedGqlConnectionDartWrapperNewConstMeta, + argValues: [isLocal, onPost], + apiImpl: this, ), - constMeta: kCrateApiMergedNtExtractPublicKeyConstMeta, - argValues: [boc], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtExtractPublicKeyConstMeta => + TaskConstMeta get kCrateApiMergedGqlConnectionDartWrapperNewConstMeta => const TaskConstMeta( - debugName: "nt_extract_public_key", - argNames: ["boc"], + debugName: "gql_connection_dart_wrapper_new", + argNames: ["isLocal", "onPost"], ); @override - GeneratedKeyG crateApiMergedNtGenerateKey( - {required MnemonicType accountType}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_mnemonic_type(accountType); - return wire.wire__crate__api__merged__nt_generate_key(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_generated_key_g, - decodeErrorData: null, + Future crateApiMergedGqlTransportImplGetAccountsByCodeHash({ + required GqlTransportImpl that, + required String codeHash, + required int limit, + String? continuation, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); + var arg1 = cst_encode_String(codeHash); + var arg2 = cst_encode_u_8(limit); + var arg3 = cst_encode_opt_String(continuation); + return wire + .wire__crate__api__merged__gql_transport_impl_get_accounts_by_code_hash( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedGqlTransportImplGetAccountsByCodeHashConstMeta, + argValues: [that, codeHash, limit, continuation], + apiImpl: this, ), - constMeta: kCrateApiMergedNtGenerateKeyConstMeta, - argValues: [accountType], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtGenerateKeyConstMeta => + TaskConstMeta + get kCrateApiMergedGqlTransportImplGetAccountsByCodeHashConstMeta => const TaskConstMeta( - debugName: "nt_generate_key", - argNames: ["accountType"], - ); - - @override - String crateApiMergedNtGetBocHash({required String boc}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(boc); - return wire.wire__crate__api__merged__nt_get_boc_hash(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedNtGetBocHashConstMeta, - argValues: [boc], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiMergedNtGetBocHashConstMeta => const TaskConstMeta( - debugName: "nt_get_boc_hash", - argNames: ["boc"], + debugName: "gql_transport_impl_get_accounts_by_code_hash", + argNames: ["that", "codeHash", "limit", "continuation"], ); @override - String? crateApiMergedNtGetCodeSalt({required String code}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(code); - return wire.wire__crate__api__merged__nt_get_code_salt(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedGqlTransportImplGetBlock({ + required GqlTransportImpl that, + required String id, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); + var arg1 = cst_encode_String(id); + return wire.wire__crate__api__merged__gql_transport_impl_get_block( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGqlTransportImplGetBlockConstMeta, + argValues: [that, id], + apiImpl: this, ), - constMeta: kCrateApiMergedNtGetCodeSaltConstMeta, - argValues: [code], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtGetCodeSaltConstMeta => + TaskConstMeta get kCrateApiMergedGqlTransportImplGetBlockConstMeta => const TaskConstMeta( - debugName: "nt_get_code_salt", - argNames: ["code"], + debugName: "gql_transport_impl_get_block", + argNames: ["that", "id"], ); @override - int crateApiMergedNtGetContractTypeNumber({required String walletType}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(walletType); - return wire.wire__crate__api__merged__nt_get_contract_type_number(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_u_16, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedGqlTransportImplGetBlockchainConfig({ + required GqlTransportImpl that, + required bool force, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); + var arg1 = cst_encode_bool(force); + return wire + .wire__crate__api__merged__gql_transport_impl_get_blockchain_config( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGqlTransportImplGetBlockchainConfigConstMeta, + argValues: [that, force], + apiImpl: this, ), - constMeta: kCrateApiMergedNtGetContractTypeNumberConstMeta, - argValues: [walletType], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtGetContractTypeNumberConstMeta => + TaskConstMeta + get kCrateApiMergedGqlTransportImplGetBlockchainConfigConstMeta => const TaskConstMeta( - debugName: "nt_get_contract_type_number", - argNames: ["walletType"], + debugName: "gql_transport_impl_get_blockchain_config", + argNames: ["that", "force"], ); @override - Future> crateApiMergedNtGetExpectedAddress( - {required String tvc, - required String contractAbi, - required int workchainId, - String? publicKey, - required String initData}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(tvc); - var arg1 = cst_encode_String(contractAbi); - var arg2 = cst_encode_i_8(workchainId); - var arg3 = cst_encode_opt_String(publicKey); - var arg4 = cst_encode_String(initData); - return wire.wire__crate__api__merged__nt_get_expected_address( - port_, arg0, arg1, arg2, arg3, arg4); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedNtGetExpectedAddressConstMeta, - argValues: [tvc, contractAbi, workchainId, publicKey, initData], - apiImpl: this, - )); + Future crateApiMergedGqlTransportImplGetContractState({ + required GqlTransportImpl that, + required String address, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); + var arg1 = cst_encode_String(address); + return wire + .wire__crate__api__merged__gql_transport_impl_get_contract_state( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGqlTransportImplGetContractStateConstMeta, + argValues: [that, address], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedNtGetExpectedAddressConstMeta => + TaskConstMeta get kCrateApiMergedGqlTransportImplGetContractStateConstMeta => const TaskConstMeta( - debugName: "nt_get_expected_address", - argNames: [ - "tvc", - "contractAbi", - "workchainId", - "publicKey", - "initData" - ], + debugName: "gql_transport_impl_get_contract_state", + argNames: ["that", "address"], ); @override - List crateApiMergedNtGetHints({required String input}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(input); - return wire.wire__crate__api__merged__nt_get_hints(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_String, - decodeErrorData: null, + Future crateApiMergedGqlTransportImplGetDstTransaction({ + required GqlTransportImpl that, + required String messageHash, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); + var arg1 = cst_encode_String(messageHash); + return wire + .wire__crate__api__merged__gql_transport_impl_get_dst_transaction( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGqlTransportImplGetDstTransactionConstMeta, + argValues: [that, messageHash], + apiImpl: this, ), - constMeta: kCrateApiMergedNtGetHintsConstMeta, - argValues: [input], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtGetHintsConstMeta => const TaskConstMeta( - debugName: "nt_get_hints", - argNames: ["input"], + TaskConstMeta get kCrateApiMergedGqlTransportImplGetDstTransactionConstMeta => + const TaskConstMeta( + debugName: "gql_transport_impl_get_dst_transaction", + argNames: ["that", "messageHash"], ); @override - Future crateApiMergedNtMakeFullAccountBoc({String? accountStuffBoc}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_opt_String(accountStuffBoc); - return wire.wire__crate__api__merged__nt_make_full_account_boc( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedNtMakeFullAccountBocConstMeta, - argValues: [accountStuffBoc], - apiImpl: this, - )); + Future crateApiMergedGqlTransportImplGetFeeFactors({ + required GqlTransportImpl that, + required bool isMasterchain, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); + var arg1 = cst_encode_bool(isMasterchain); + return wire + .wire__crate__api__merged__gql_transport_impl_get_fee_factors( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGqlTransportImplGetFeeFactorsConstMeta, + argValues: [that, isMasterchain], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedNtMakeFullAccountBocConstMeta => + TaskConstMeta get kCrateApiMergedGqlTransportImplGetFeeFactorsConstMeta => const TaskConstMeta( - debugName: "nt_make_full_account_boc", - argNames: ["accountStuffBoc"], + debugName: "gql_transport_impl_get_fee_factors", + argNames: ["that", "isMasterchain"], ); @override - List crateApiMergedNtMergeTvc( - {required String code, required String data}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(code); - var arg1 = cst_encode_String(data); - return wire.wire__crate__api__merged__nt_merge_tvc(arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedGqlTransportImplGetFullContractState({ + required GqlTransportImpl that, + required String address, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); + var arg1 = cst_encode_String(address); + return wire + .wire__crate__api__merged__gql_transport_impl_get_full_contract_state( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGqlTransportImplGetFullContractStateConstMeta, + argValues: [that, address], + apiImpl: this, ), - constMeta: kCrateApiMergedNtMergeTvcConstMeta, - argValues: [code, data], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtMergeTvcConstMeta => const TaskConstMeta( - debugName: "nt_merge_tvc", - argNames: ["code", "data"], + TaskConstMeta + get kCrateApiMergedGqlTransportImplGetFullContractStateConstMeta => + const TaskConstMeta( + debugName: "gql_transport_impl_get_full_contract_state", + argNames: ["that", "address"], ); @override - String crateApiMergedNtPackAddress( - {required String address, - required bool isUrlSafe, - required bool bounceable}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(address); - var arg1 = cst_encode_bool(isUrlSafe); - var arg2 = cst_encode_bool(bounceable); - return wire.wire__crate__api__merged__nt_pack_address(arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + Future crateApiMergedGqlTransportImplGetLatestBlock({ + required GqlTransportImpl that, + required String address, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); + var arg1 = cst_encode_String(address); + return wire + .wire__crate__api__merged__gql_transport_impl_get_latest_block( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_latest_block, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGqlTransportImplGetLatestBlockConstMeta, + argValues: [that, address], + apiImpl: this, ), - constMeta: kCrateApiMergedNtPackAddressConstMeta, - argValues: [address, isUrlSafe, bounceable], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtPackAddressConstMeta => + TaskConstMeta get kCrateApiMergedGqlTransportImplGetLatestBlockConstMeta => const TaskConstMeta( - debugName: "nt_pack_address", - argNames: ["address", "isUrlSafe", "bounceable"], + debugName: "gql_transport_impl_get_latest_block", + argNames: ["that", "address"], ); @override - List crateApiMergedNtPackIntoCell( - {required String params, required String tokens, String? version}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(params); - var arg1 = cst_encode_String(tokens); - var arg2 = cst_encode_opt_String(version); - return wire.wire__crate__api__merged__nt_pack_into_cell( - arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedGqlTransportImplGetNetworkId({ + required GqlTransportImpl that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); + return wire + .wire__crate__api__merged__gql_transport_impl_get_network_id( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_i_32, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGqlTransportImplGetNetworkIdConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedNtPackIntoCellConstMeta, - argValues: [params, tokens, version], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtPackIntoCellConstMeta => + TaskConstMeta get kCrateApiMergedGqlTransportImplGetNetworkIdConstMeta => const TaskConstMeta( - debugName: "nt_pack_into_cell", - argNames: ["params", "tokens", "version"], + debugName: "gql_transport_impl_get_network_id", + argNames: ["that"], ); @override - String crateApiMergedNtPackStdSmcAddr( - {required String addr, - required bool base64Url, - required bool bounceable}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(addr); - var arg1 = cst_encode_bool(base64Url); - var arg2 = cst_encode_bool(bounceable); - return wire.wire__crate__api__merged__nt_pack_std_smc_addr( - arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedGqlTransportImplGetSignatureId({ + required GqlTransportImpl that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); + return wire + .wire__crate__api__merged__gql_transport_impl_get_signature_id( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_i_32, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGqlTransportImplGetSignatureIdConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedNtPackStdSmcAddrConstMeta, - argValues: [addr, base64Url, bounceable], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtPackStdSmcAddrConstMeta => + TaskConstMeta get kCrateApiMergedGqlTransportImplGetSignatureIdConstMeta => const TaskConstMeta( - debugName: "nt_pack_std_smc_addr", - argNames: ["addr", "base64Url", "bounceable"], + debugName: "gql_transport_impl_get_signature_id", + argNames: ["that"], ); @override - Future crateApiMergedNtParseFullAccountBoc( - {required String account}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(account); - return wire.wire__crate__api__merged__nt_parse_full_account_boc( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedGqlTransportImplGetTransaction({ + required GqlTransportImpl that, + required String hash, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); + var arg1 = cst_encode_String(hash); + return wire + .wire__crate__api__merged__gql_transport_impl_get_transaction( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGqlTransportImplGetTransactionConstMeta, + argValues: [that, hash], + apiImpl: this, ), - constMeta: kCrateApiMergedNtParseFullAccountBocConstMeta, - argValues: [account], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtParseFullAccountBocConstMeta => + TaskConstMeta get kCrateApiMergedGqlTransportImplGetTransactionConstMeta => const TaskConstMeta( - debugName: "nt_parse_full_account_boc", - argNames: ["account"], + debugName: "gql_transport_impl_get_transaction", + argNames: ["that", "hash"], ); @override - String? crateApiMergedNtParseKnownPayload({required String payload}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(payload); - return wire.wire__crate__api__merged__nt_parse_known_payload(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: null, + Future crateApiMergedGqlTransportImplGetTransactions({ + required GqlTransportImpl that, + required String address, + String? fromLt, + required int count, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); + var arg1 = cst_encode_String(address); + var arg2 = cst_encode_opt_String(fromLt); + var arg3 = cst_encode_u_8(count); + return wire + .wire__crate__api__merged__gql_transport_impl_get_transactions( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGqlTransportImplGetTransactionsConstMeta, + argValues: [that, address, fromLt, count], + apiImpl: this, ), - constMeta: kCrateApiMergedNtParseKnownPayloadConstMeta, - argValues: [payload], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtParseKnownPayloadConstMeta => + TaskConstMeta get kCrateApiMergedGqlTransportImplGetTransactionsConstMeta => const TaskConstMeta( - debugName: "nt_parse_known_payload", - argNames: ["payload"], + debugName: "gql_transport_impl_get_transactions", + argNames: ["that", "address", "fromLt", "count"], ); @override - String crateApiMergedNtRepackAddress({required String address}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(address); - return wire.wire__crate__api__merged__nt_repack_address(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + GqlTransportImpl crateApiMergedGqlTransportImplNew({ + required GqlConnectionDartWrapper gqlConnection, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_gql_connection_dart_wrapper( + gqlConnection, + ); + return wire.wire__crate__api__merged__gql_transport_impl_new(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_gql_transport_impl, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedGqlTransportImplNewConstMeta, + argValues: [gqlConnection], + apiImpl: this, ), - constMeta: kCrateApiMergedNtRepackAddressConstMeta, - argValues: [address], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtRepackAddressConstMeta => + TaskConstMeta get kCrateApiMergedGqlTransportImplNewConstMeta => const TaskConstMeta( - debugName: "nt_repack_address", - argNames: ["address"], + debugName: "gql_transport_impl_new", + argNames: ["gqlConnection"], ); @override - Future crateApiMergedNtRunGetter( - {required String accountStuffBoc, - required String contractAbi, - required String methodId, - required String input, - required Map libraries, - int? signatureId}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(accountStuffBoc); - var arg1 = cst_encode_String(contractAbi); - var arg2 = cst_encode_String(methodId); - var arg3 = cst_encode_String(input); - var arg4 = cst_encode_Map_String_String_None(libraries); - var arg5 = cst_encode_opt_box_autoadd_i_32(signatureId); - return wire.wire__crate__api__merged__nt_run_getter( - port_, arg0, arg1, arg2, arg3, arg4, arg5); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedNtRunGetterConstMeta, - argValues: [ - accountStuffBoc, - contractAbi, - methodId, - input, - libraries, - signatureId - ], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiMergedNtRunGetterConstMeta => const TaskConstMeta( - debugName: "nt_run_getter", - argNames: [ - "accountStuffBoc", - "contractAbi", - "methodId", - "input", - "libraries", - "signatureId" + Future crateApiMergedGqlTransportImplSimulateTransactionTree({ + required GqlTransportImpl that, + required String signedMessage, + required List ignoredComputePhaseCodes, + required List ignoredActionPhaseCodes, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); + var arg1 = cst_encode_String(signedMessage); + var arg2 = cst_encode_list_prim_i_32_loose(ignoredComputePhaseCodes); + var arg3 = cst_encode_list_prim_i_32_loose(ignoredActionPhaseCodes); + return wire + .wire__crate__api__merged__gql_transport_impl_simulate_transaction_tree( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedGqlTransportImplSimulateTransactionTreeConstMeta, + argValues: [ + that, + signedMessage, + ignoredComputePhaseCodes, + ignoredActionPhaseCodes, ], - ); - - @override - Future crateApiMergedNtRunLocal( - {required String accountStuffBoc, - required String contractAbi, - required String methodId, - required String input, - required bool responsible, - required Map libraries, - int? signatureId}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(accountStuffBoc); - var arg1 = cst_encode_String(contractAbi); - var arg2 = cst_encode_String(methodId); - var arg3 = cst_encode_String(input); - var arg4 = cst_encode_bool(responsible); - var arg5 = cst_encode_Map_String_String_None(libraries); - var arg6 = cst_encode_opt_box_autoadd_i_32(signatureId); - return wire.wire__crate__api__merged__nt_run_local( - port_, arg0, arg1, arg2, arg3, arg4, arg5, arg6); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedNtRunLocalConstMeta, - argValues: [ - accountStuffBoc, - contractAbi, - methodId, - input, - responsible, - libraries, - signatureId - ], - apiImpl: this, - )); + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedNtRunLocalConstMeta => const TaskConstMeta( - debugName: "nt_run_local", + TaskConstMeta + get kCrateApiMergedGqlTransportImplSimulateTransactionTreeConstMeta => + const TaskConstMeta( + debugName: "gql_transport_impl_simulate_transaction_tree", argNames: [ - "accountStuffBoc", - "contractAbi", - "methodId", - "input", - "responsible", - "libraries", - "signatureId" + "that", + "signedMessage", + "ignoredComputePhaseCodes", + "ignoredActionPhaseCodes", ], ); @override - Future crateApiMergedNtRunLocalWithLibs( - {required ArcTransportBoxTrait transport, - required String accountStuffBoc, - required String contractAbi, - required String methodId, - required String input, - required bool responsible, - required Map libraries, - required int retryCount, - int? signatureId}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - var arg1 = cst_encode_String(accountStuffBoc); - var arg2 = cst_encode_String(contractAbi); - var arg3 = cst_encode_String(methodId); - var arg4 = cst_encode_String(input); - var arg5 = cst_encode_bool(responsible); - var arg6 = cst_encode_Map_String_String_None(libraries); - var arg7 = cst_encode_u_8(retryCount); - var arg8 = cst_encode_opt_box_autoadd_i_32(signatureId); - return wire.wire__crate__api__merged__nt_run_local_with_libs( - port_, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedNtRunLocalWithLibsConstMeta, - argValues: [ - transport, - accountStuffBoc, - contractAbi, - methodId, - input, - responsible, - libraries, - retryCount, - signatureId - ], - apiImpl: this, - )); + Future crateApiMergedGqlTransportImplWaitForNextBlock({ + required GqlTransportImpl that, + required String currentBlockId, + required String address, + required BigInt timeout, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_gql_transport_impl(that); + var arg1 = cst_encode_String(currentBlockId); + var arg2 = cst_encode_String(address); + var arg3 = cst_encode_u_64(timeout); + return wire + .wire__crate__api__merged__gql_transport_impl_wait_for_next_block( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedGqlTransportImplWaitForNextBlockConstMeta, + argValues: [that, currentBlockId, address, timeout], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedNtRunLocalWithLibsConstMeta => + TaskConstMeta get kCrateApiMergedGqlTransportImplWaitForNextBlockConstMeta => const TaskConstMeta( - debugName: "nt_run_local_with_libs", - argNames: [ - "transport", - "accountStuffBoc", - "contractAbi", - "methodId", - "input", - "responsible", - "libraries", - "retryCount", - "signatureId" - ], + debugName: "gql_transport_impl_wait_for_next_block", + argNames: ["that", "currentBlockId", "address", "timeout"], ); @override - List crateApiMergedNtSetCodeSalt( - {required String code, required String salt}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(code); - var arg1 = cst_encode_String(salt); - return wire.wire__crate__api__merged__nt_set_code_salt(arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedInitLogger({ + required LogLevel level, + required bool mobileLogger, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_log_level(level); + var arg1 = cst_encode_bool(mobileLogger); + return wire.wire__crate__api__merged__init_logger(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedInitLoggerConstMeta, + argValues: [level, mobileLogger], + apiImpl: this, ), - constMeta: kCrateApiMergedNtSetCodeSaltConstMeta, - argValues: [code, salt], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtSetCodeSaltConstMeta => - const TaskConstMeta( - debugName: "nt_set_code_salt", - argNames: ["code", "salt"], - ); + TaskConstMeta get kCrateApiMergedInitLoggerConstMeta => const TaskConstMeta( + debugName: "init_logger", + argNames: ["level", "mobileLogger"], + ); @override - List crateApiMergedNtSplitTvc({required String tvc}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(tvc); - return wire.wire__crate__api__merged__nt_split_tvc(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_opt_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedNtSplitTvcConstMeta, - argValues: [tvc], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiMergedNtSplitTvcConstMeta => const TaskConstMeta( - debugName: "nt_split_tvc", - argNames: ["tvc"], - ); - - @override - Future crateApiMergedNtUnpackContractFields( - {required String contractAbi, - required String boc, - required bool allowPartial}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(contractAbi); - var arg1 = cst_encode_String(boc); - var arg2 = cst_encode_bool(allowPartial); - return wire.wire__crate__api__merged__nt_unpack_contract_fields( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedNtUnpackContractFieldsConstMeta, - argValues: [contractAbi, boc, allowPartial], - apiImpl: this, - )); + Future crateApiMergedJettonWalletDartWrapperAddress({ + required JettonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__jetton_wallet_dart_wrapper_address( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedJettonWalletDartWrapperAddressConstMeta, + argValues: [that], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedNtUnpackContractFieldsConstMeta => + TaskConstMeta get kCrateApiMergedJettonWalletDartWrapperAddressConstMeta => const TaskConstMeta( - debugName: "nt_unpack_contract_fields", - argNames: ["contractAbi", "boc", "allowPartial"], + debugName: "jetton_wallet_dart_wrapper_address", + argNames: ["that"], ); @override - String crateApiMergedNtUnpackFromCell( - {required String params, - required String boc, - required bool allowPartial, - String? version}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(params); - var arg1 = cst_encode_String(boc); - var arg2 = cst_encode_bool(allowPartial); - var arg3 = cst_encode_opt_String(version); - return wire.wire__crate__api__merged__nt_unpack_from_cell( - arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedJettonWalletDartWrapperBalance({ + required JettonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__jetton_wallet_dart_wrapper_balance( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedJettonWalletDartWrapperBalanceConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedNtUnpackFromCellConstMeta, - argValues: [params, boc, allowPartial, version], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtUnpackFromCellConstMeta => + TaskConstMeta get kCrateApiMergedJettonWalletDartWrapperBalanceConstMeta => const TaskConstMeta( - debugName: "nt_unpack_from_cell", - argNames: ["params", "boc", "allowPartial", "version"], + debugName: "jetton_wallet_dart_wrapper_balance", + argNames: ["that"], ); @override - Future> crateApiMergedNtUnpackInitData( - {required String contractAbi, required String data}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(contractAbi); - var arg1 = cst_encode_String(data); - return wire.wire__crate__api__merged__nt_unpack_init_data( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_opt_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedJettonWalletDartWrapperContractState({ + required JettonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__jetton_wallet_dart_wrapper_contract_state( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedJettonWalletDartWrapperContractStateConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedNtUnpackInitDataConstMeta, - argValues: [contractAbi, data], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtUnpackInitDataConstMeta => + TaskConstMeta + get kCrateApiMergedJettonWalletDartWrapperContractStateConstMeta => const TaskConstMeta( - debugName: "nt_unpack_init_data", - argNames: ["contractAbi", "data"], + debugName: "jetton_wallet_dart_wrapper_contract_state", + argNames: ["that"], ); @override - String crateApiMergedNtUnpackStdSmcAddr( - {required String packed, required bool base64Url}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(packed); - var arg1 = cst_encode_bool(base64Url); - return wire.wire__crate__api__merged__nt_unpack_std_smc_addr( - arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future + crateApiMergedJettonWalletDartWrapperEstimateMinAttachedAmount({ + required JettonWalletDartWrapper that, + required String destination, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(destination); + return wire + .wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amount( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedJettonWalletDartWrapperEstimateMinAttachedAmountConstMeta, + argValues: [that, destination], + apiImpl: this, ), - constMeta: kCrateApiMergedNtUnpackStdSmcAddrConstMeta, - argValues: [packed, base64Url], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtUnpackStdSmcAddrConstMeta => + TaskConstMeta + get kCrateApiMergedJettonWalletDartWrapperEstimateMinAttachedAmountConstMeta => const TaskConstMeta( - debugName: "nt_unpack_std_smc_addr", - argNames: ["packed", "base64Url"], + debugName: "jetton_wallet_dart_wrapper_estimate_min_attached_amount", + argNames: ["that", "destination"], ); @override - bool crateApiMergedNtValidateAddress({required String address}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(address); - return wire.wire__crate__api__merged__nt_validate_address(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: null, + Future crateApiMergedJettonWalletDartWrapperGetJettonRootDetails({ + required ArcTransportBoxTrait transport, + required String tokenRootAddress, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg1 = cst_encode_String(tokenRootAddress); + return wire + .wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedJettonWalletDartWrapperGetJettonRootDetailsConstMeta, + argValues: [transport, tokenRootAddress], + apiImpl: this, ), - constMeta: kCrateApiMergedNtValidateAddressConstMeta, - argValues: [address], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtValidateAddressConstMeta => + TaskConstMeta + get kCrateApiMergedJettonWalletDartWrapperGetJettonRootDetailsConstMeta => const TaskConstMeta( - debugName: "nt_validate_address", - argNames: ["address"], + debugName: "jetton_wallet_dart_wrapper_get_jetton_root_details", + argNames: ["transport", "tokenRootAddress"], ); @override - Future crateApiMergedNtVerifySignature( - {required String publicKey, - required String data, - required String signature, - int? signatureId}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(publicKey); - var arg1 = cst_encode_String(data); - var arg2 = cst_encode_String(signature); - var arg3 = cst_encode_opt_box_autoadd_i_32(signatureId); - return wire.wire__crate__api__merged__nt_verify_signature( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, + Future + crateApiMergedJettonWalletDartWrapperGetJettonRootDetailsFromJettonWallet({ + required ArcTransportBoxTrait transport, + required String tokenWalletAddress, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg1 = cst_encode_String(tokenWalletAddress); + return wire + .wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedJettonWalletDartWrapperGetJettonRootDetailsFromJettonWalletConstMeta, + argValues: [transport, tokenWalletAddress], + apiImpl: this, ), - constMeta: kCrateApiMergedNtVerifySignatureConstMeta, - argValues: [publicKey, data, signature, signatureId], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedNtVerifySignatureConstMeta => + TaskConstMeta + get kCrateApiMergedJettonWalletDartWrapperGetJettonRootDetailsFromJettonWalletConstMeta => const TaskConstMeta( - debugName: "nt_verify_signature", - argNames: ["publicKey", "data", "signature", "signatureId"], + debugName: + "jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet", + argNames: ["transport", "tokenWalletAddress"], ); @override - ProtoConnectionDartWrapper crateApiMergedProtoConnectionDartWrapperNew( - {required String instanceHash}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(instanceHash); - return wire - .wire__crate__api__merged__proto_connection_dart_wrapper_new(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_proto_connection_dart_wrapper, - decodeErrorData: null, + Future crateApiMergedJettonWalletDartWrapperGetJettonWalletDetails({ + required ArcTransportBoxTrait transport, + required String address, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg1 = cst_encode_String(address); + return wire + .wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_details( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedJettonWalletDartWrapperGetJettonWalletDetailsConstMeta, + argValues: [transport, address], + apiImpl: this, ), - constMeta: kCrateApiMergedProtoConnectionDartWrapperNewConstMeta, - argValues: [instanceHash], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiMergedProtoConnectionDartWrapperNewConstMeta => - const TaskConstMeta( - debugName: "proto_connection_dart_wrapper_new", - argNames: ["instanceHash"], - ); - - @override - Future crateApiMergedProtoTransportImplGetAccountsByCodeHash( - {required ProtoTransportImpl that, - required String codeHash, - required int limit, - String? continuation}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); - var arg1 = cst_encode_String(codeHash); - var arg2 = cst_encode_u_8(limit); - var arg3 = cst_encode_opt_String(continuation); - return wire - .wire__crate__api__merged__proto_transport_impl_get_accounts_by_code_hash( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedProtoTransportImplGetAccountsByCodeHashConstMeta, - argValues: [that, codeHash, limit, continuation], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedProtoTransportImplGetAccountsByCodeHashConstMeta => - const TaskConstMeta( - debugName: "proto_transport_impl_get_accounts_by_code_hash", - argNames: ["that", "codeHash", "limit", "continuation"], - ); + get kCrateApiMergedJettonWalletDartWrapperGetJettonWalletDetailsConstMeta => + const TaskConstMeta( + debugName: "jetton_wallet_dart_wrapper_get_jetton_wallet_details", + argNames: ["transport", "address"], + ); @override - Future crateApiMergedProtoTransportImplGetBlockchainConfig( - {required ProtoTransportImpl that, required bool force}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); - var arg1 = cst_encode_bool(force); - return wire - .wire__crate__api__merged__proto_transport_impl_get_blockchain_config( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedJettonWalletDartWrapperHandleBlock({ + required JettonWalletDartWrapper that, + required String block, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(block); + return wire + .wire__crate__api__merged__jetton_wallet_dart_wrapper_handle_block( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedJettonWalletDartWrapperHandleBlockConstMeta, + argValues: [that, block], + apiImpl: this, ), - constMeta: kCrateApiMergedProtoTransportImplGetBlockchainConfigConstMeta, - argValues: [that, force], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedProtoTransportImplGetBlockchainConfigConstMeta => - const TaskConstMeta( - debugName: "proto_transport_impl_get_blockchain_config", - argNames: ["that", "force"], - ); + get kCrateApiMergedJettonWalletDartWrapperHandleBlockConstMeta => + const TaskConstMeta( + debugName: "jetton_wallet_dart_wrapper_handle_block", + argNames: ["that", "block"], + ); @override - Future crateApiMergedProtoTransportImplGetContractState( - {required ProtoTransportImpl that, required String address}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); - var arg1 = cst_encode_String(address); - return wire - .wire__crate__api__merged__proto_transport_impl_get_contract_state( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedJettonWalletDartWrapperOwner({ + required JettonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__jetton_wallet_dart_wrapper_owner( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedJettonWalletDartWrapperOwnerConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedProtoTransportImplGetContractStateConstMeta, - argValues: [that, address], - apiImpl: this, - )); + ); } - TaskConstMeta - get kCrateApiMergedProtoTransportImplGetContractStateConstMeta => - const TaskConstMeta( - debugName: "proto_transport_impl_get_contract_state", - argNames: ["that", "address"], - ); + TaskConstMeta get kCrateApiMergedJettonWalletDartWrapperOwnerConstMeta => + const TaskConstMeta( + debugName: "jetton_wallet_dart_wrapper_owner", + argNames: ["that"], + ); @override - Future crateApiMergedProtoTransportImplGetDstTransaction( - {required ProtoTransportImpl that, required String messageHash}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); - var arg1 = cst_encode_String(messageHash); - return wire - .wire__crate__api__merged__proto_transport_impl_get_dst_transaction( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedJettonWalletDartWrapperPreloadTransactions({ + required JettonWalletDartWrapper that, + required String fromLt, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(fromLt); + return wire + .wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactions( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedJettonWalletDartWrapperPreloadTransactionsConstMeta, + argValues: [that, fromLt], + apiImpl: this, ), - constMeta: kCrateApiMergedProtoTransportImplGetDstTransactionConstMeta, - argValues: [that, messageHash], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedProtoTransportImplGetDstTransactionConstMeta => - const TaskConstMeta( - debugName: "proto_transport_impl_get_dst_transaction", - argNames: ["that", "messageHash"], - ); - - @override - Future crateApiMergedProtoTransportImplGetFeeFactors( - {required ProtoTransportImpl that, required bool isMasterchain}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); - var arg1 = cst_encode_bool(isMasterchain); - return wire - .wire__crate__api__merged__proto_transport_impl_get_fee_factors( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedProtoTransportImplGetFeeFactorsConstMeta, - argValues: [that, isMasterchain], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiMergedProtoTransportImplGetFeeFactorsConstMeta => + get kCrateApiMergedJettonWalletDartWrapperPreloadTransactionsConstMeta => const TaskConstMeta( - debugName: "proto_transport_impl_get_fee_factors", - argNames: ["that", "isMasterchain"], + debugName: "jetton_wallet_dart_wrapper_preload_transactions", + argNames: ["that", "fromLt"], ); @override - Future crateApiMergedProtoTransportImplGetFullContractState( - {required ProtoTransportImpl that, required String address}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); - var arg1 = cst_encode_String(address); - return wire - .wire__crate__api__merged__proto_transport_impl_get_full_contract_state( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedJettonWalletDartWrapperPrepareTransfer({ + required JettonWalletDartWrapper that, + required String amount, + required String destination, + required String remainingGasTo, + String? customPayload, + required String callbackValue, + String? callbackPayload, + String? attachedAmount, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(amount); + var arg2 = cst_encode_String(destination); + var arg3 = cst_encode_String(remainingGasTo); + var arg4 = cst_encode_opt_String(customPayload); + var arg5 = cst_encode_String(callbackValue); + var arg6 = cst_encode_opt_String(callbackPayload); + var arg7 = cst_encode_opt_String(attachedAmount); + return wire + .wire__crate__api__merged__jetton_wallet_dart_wrapper_prepare_transfer( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + arg7, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedJettonWalletDartWrapperPrepareTransferConstMeta, + argValues: [ + that, + amount, + destination, + remainingGasTo, + customPayload, + callbackValue, + callbackPayload, + attachedAmount, + ], + apiImpl: this, ), - constMeta: kCrateApiMergedProtoTransportImplGetFullContractStateConstMeta, - argValues: [that, address], - apiImpl: this, - )); + ); } TaskConstMeta - get kCrateApiMergedProtoTransportImplGetFullContractStateConstMeta => - const TaskConstMeta( - debugName: "proto_transport_impl_get_full_contract_state", - argNames: ["that", "address"], - ); - - @override - Future crateApiMergedProtoTransportImplGetNetworkId( - {required ProtoTransportImpl that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); - return wire - .wire__crate__api__merged__proto_transport_impl_get_network_id( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_i_32, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedProtoTransportImplGetNetworkIdConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta get kCrateApiMergedProtoTransportImplGetNetworkIdConstMeta => + get kCrateApiMergedJettonWalletDartWrapperPrepareTransferConstMeta => const TaskConstMeta( - debugName: "proto_transport_impl_get_network_id", - argNames: ["that"], + debugName: "jetton_wallet_dart_wrapper_prepare_transfer", + argNames: [ + "that", + "amount", + "destination", + "remainingGasTo", + "customPayload", + "callbackValue", + "callbackPayload", + "attachedAmount", + ], ); @override - Future crateApiMergedProtoTransportImplGetSignatureId( - {required ProtoTransportImpl that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); - return wire - .wire__crate__api__merged__proto_transport_impl_get_signature_id( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_box_autoadd_i_32, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedJettonWalletDartWrapperRefresh({ + required JettonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jetton_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__jetton_wallet_dart_wrapper_refresh( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedJettonWalletDartWrapperRefreshConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedProtoTransportImplGetSignatureIdConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedProtoTransportImplGetSignatureIdConstMeta => + TaskConstMeta get kCrateApiMergedJettonWalletDartWrapperRefreshConstMeta => const TaskConstMeta( - debugName: "proto_transport_impl_get_signature_id", + debugName: "jetton_wallet_dart_wrapper_refresh", argNames: ["that"], ); @override - Future crateApiMergedProtoTransportImplGetTransaction( - {required ProtoTransportImpl that, required String hash}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); - var arg1 = cst_encode_String(hash); - return wire - .wire__crate__api__merged__proto_transport_impl_get_transaction( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, - decodeErrorData: dco_decode_AnyhowException, + Future + crateApiMergedJettonWalletDartWrapperSubscribe({ + required String owner, + required String rootTokenContract, + required ArcTransportBoxTrait transport, + required bool preloadTransactions, + required FutureOr Function(String) onBalanceChanged, + required FutureOr Function(String) onTransactionsFound, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(owner); + var arg1 = cst_encode_String(rootTokenContract); + var arg2 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg3 = cst_encode_bool(preloadTransactions); + var arg4 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onBalanceChanged, + ); + var arg5 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onTransactionsFound, + ); + return wire + .wire__crate__api__merged__jetton_wallet_dart_wrapper_subscribe( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_jetton_wallet_dart_wrapper, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedJettonWalletDartWrapperSubscribeConstMeta, + argValues: [ + owner, + rootTokenContract, + transport, + preloadTransactions, + onBalanceChanged, + onTransactionsFound, + ], + apiImpl: this, ), - constMeta: kCrateApiMergedProtoTransportImplGetTransactionConstMeta, - argValues: [that, hash], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedProtoTransportImplGetTransactionConstMeta => + TaskConstMeta get kCrateApiMergedJettonWalletDartWrapperSubscribeConstMeta => const TaskConstMeta( - debugName: "proto_transport_impl_get_transaction", - argNames: ["that", "hash"], + debugName: "jetton_wallet_dart_wrapper_subscribe", + argNames: [ + "owner", + "rootTokenContract", + "transport", + "preloadTransactions", + "onBalanceChanged", + "onTransactionsFound", + ], ); @override - Future crateApiMergedProtoTransportImplGetTransactions( - {required ProtoTransportImpl that, - required String address, - String? fromLt, - required int count}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); - var arg1 = cst_encode_String(address); - var arg2 = cst_encode_opt_String(fromLt); - var arg3 = cst_encode_u_8(count); - return wire - .wire__crate__api__merged__proto_transport_impl_get_transactions( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedProtoTransportImplGetTransactionsConstMeta, - argValues: [that, address, fromLt, count], - apiImpl: this, - )); + JrpcConnectionDartWrapper crateApiMergedJrpcConnectionDartWrapperNew({ + required FutureOr Function(String) onPost, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_DartFn_Inputs_String_Output_String_AnyhowException( + onPost, + ); + return wire + .wire__crate__api__merged__jrpc_connection_dart_wrapper_new(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_jrpc_connection_dart_wrapper, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedJrpcConnectionDartWrapperNewConstMeta, + argValues: [onPost], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedProtoTransportImplGetTransactionsConstMeta => + TaskConstMeta get kCrateApiMergedJrpcConnectionDartWrapperNewConstMeta => const TaskConstMeta( - debugName: "proto_transport_impl_get_transactions", - argNames: ["that", "address", "fromLt", "count"], + debugName: "jrpc_connection_dart_wrapper_new", + argNames: ["onPost"], ); @override - ProtoTransportImpl crateApiMergedProtoTransportImplNew( - {required ProtoConnectionDartWrapper protoConnection}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_proto_connection_dart_wrapper( - protoConnection); - return wire.wire__crate__api__merged__proto_transport_impl_new(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_proto_transport_impl, - decodeErrorData: null, + Future crateApiMergedJrpcTransportImplGetAccountsByCodeHash({ + required JrpcTransportImpl that, + required String codeHash, + required int limit, + String? continuation, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); + var arg1 = cst_encode_String(codeHash); + var arg2 = cst_encode_u_8(limit); + var arg3 = cst_encode_opt_String(continuation); + return wire + .wire__crate__api__merged__jrpc_transport_impl_get_accounts_by_code_hash( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedJrpcTransportImplGetAccountsByCodeHashConstMeta, + argValues: [that, codeHash, limit, continuation], + apiImpl: this, ), - constMeta: kCrateApiMergedProtoTransportImplNewConstMeta, - argValues: [protoConnection], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedProtoTransportImplNewConstMeta => + TaskConstMeta + get kCrateApiMergedJrpcTransportImplGetAccountsByCodeHashConstMeta => const TaskConstMeta( - debugName: "proto_transport_impl_new", - argNames: ["protoConnection"], + debugName: "jrpc_transport_impl_get_accounts_by_code_hash", + argNames: ["that", "codeHash", "limit", "continuation"], ); @override - Future crateApiMergedProtoTransportImplSimulateTransactionTree( - {required ProtoTransportImpl that, - required String signedMessage, - required List ignoredComputePhaseCodes, - required List ignoredActionPhaseCodes}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); - var arg1 = cst_encode_String(signedMessage); - var arg2 = cst_encode_list_prim_i_32_loose(ignoredComputePhaseCodes); - var arg3 = cst_encode_list_prim_i_32_loose(ignoredActionPhaseCodes); - return wire - .wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedProtoTransportImplSimulateTransactionTreeConstMeta, - argValues: [ - that, - signedMessage, - ignoredComputePhaseCodes, - ignoredActionPhaseCodes - ], - apiImpl: this, - )); + Future crateApiMergedJrpcTransportImplGetBlockchainConfig({ + required JrpcTransportImpl that, + required bool force, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); + var arg1 = cst_encode_bool(force); + return wire + .wire__crate__api__merged__jrpc_transport_impl_get_blockchain_config( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedJrpcTransportImplGetBlockchainConfigConstMeta, + argValues: [that, force], + apiImpl: this, + ), + ); } TaskConstMeta - get kCrateApiMergedProtoTransportImplSimulateTransactionTreeConstMeta => - const TaskConstMeta( - debugName: "proto_transport_impl_simulate_transaction_tree", - argNames: [ - "that", - "signedMessage", - "ignoredComputePhaseCodes", - "ignoredActionPhaseCodes" - ], - ); + get kCrateApiMergedJrpcTransportImplGetBlockchainConfigConstMeta => + const TaskConstMeta( + debugName: "jrpc_transport_impl_get_blockchain_config", + argNames: ["that", "force"], + ); @override - Future crateApiMergedSetClockOffset({required PlatformInt64 offsetMs}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_i_64(offsetMs); - return wire.wire__crate__api__merged__set_clock_offset(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiMergedJrpcTransportImplGetContractState({ + required JrpcTransportImpl that, + required String address, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); + var arg1 = cst_encode_String(address); + return wire + .wire__crate__api__merged__jrpc_transport_impl_get_contract_state( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedJrpcTransportImplGetContractStateConstMeta, + argValues: [that, address], + apiImpl: this, ), - constMeta: kCrateApiMergedSetClockOffsetConstMeta, - argValues: [offsetMs], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedSetClockOffsetConstMeta => + TaskConstMeta get kCrateApiMergedJrpcTransportImplGetContractStateConstMeta => const TaskConstMeta( - debugName: "set_clock_offset", - argNames: ["offsetMs"], + debugName: "jrpc_transport_impl_get_contract_state", + argNames: ["that", "address"], ); @override - Future crateApiMergedSimpleAdder({required int a, required int b}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_i_32(a); - var arg1 = cst_encode_i_32(b); - return wire.wire__crate__api__merged__simple_adder(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_i_32, - decodeErrorData: null, + Future crateApiMergedJrpcTransportImplGetDstTransaction({ + required JrpcTransportImpl that, + required String messageHash, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); + var arg1 = cst_encode_String(messageHash); + return wire + .wire__crate__api__merged__jrpc_transport_impl_get_dst_transaction( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedJrpcTransportImplGetDstTransactionConstMeta, + argValues: [that, messageHash], + apiImpl: this, ), - constMeta: kCrateApiMergedSimpleAdderConstMeta, - argValues: [a, b], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedSimpleAdderConstMeta => const TaskConstMeta( - debugName: "simple_adder", - argNames: ["a", "b"], + TaskConstMeta + get kCrateApiMergedJrpcTransportImplGetDstTransactionConstMeta => + const TaskConstMeta( + debugName: "jrpc_transport_impl_get_dst_transaction", + argNames: ["that", "messageHash"], ); @override - int crateApiMergedSimpleAdderSync({required int a, required int b}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_i_32(a); - var arg1 = cst_encode_i_32(b); - return wire.wire__crate__api__merged__simple_adder_sync(arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_i_32, - decodeErrorData: null, + Future crateApiMergedJrpcTransportImplGetFeeFactors({ + required JrpcTransportImpl that, + required bool isMasterchain, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); + var arg1 = cst_encode_bool(isMasterchain); + return wire + .wire__crate__api__merged__jrpc_transport_impl_get_fee_factors( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedJrpcTransportImplGetFeeFactorsConstMeta, + argValues: [that, isMasterchain], + apiImpl: this, ), - constMeta: kCrateApiMergedSimpleAdderSyncConstMeta, - argValues: [a, b], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedSimpleAdderSyncConstMeta => + TaskConstMeta get kCrateApiMergedJrpcTransportImplGetFeeFactorsConstMeta => const TaskConstMeta( - debugName: "simple_adder_sync", - argNames: ["a", "b"], + debugName: "jrpc_transport_impl_get_fee_factors", + argNames: ["that", "isMasterchain"], ); @override - Future crateApiMergedSimpleCallDart() { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - return wire.wire__crate__api__merged__simple_call_dart(port_); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiMergedJrpcTransportImplGetFullContractState({ + required JrpcTransportImpl that, + required String address, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); + var arg1 = cst_encode_String(address); + return wire + .wire__crate__api__merged__jrpc_transport_impl_get_full_contract_state( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedJrpcTransportImplGetFullContractStateConstMeta, + argValues: [that, address], + apiImpl: this, ), - constMeta: kCrateApiMergedSimpleCallDartConstMeta, - argValues: [], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedSimpleCallDartConstMeta => + TaskConstMeta + get kCrateApiMergedJrpcTransportImplGetFullContractStateConstMeta => const TaskConstMeta( - debugName: "simple_call_dart", - argNames: [], + debugName: "jrpc_transport_impl_get_full_contract_state", + argNames: ["that", "address"], ); @override - Future crateApiMergedSimpleCallFunc0({required bool needResult}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_bool(needResult); - return wire.wire__crate__api__merged__simple_call_func0(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiMergedJrpcTransportImplGetNetworkId({ + required JrpcTransportImpl that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); + return wire + .wire__crate__api__merged__jrpc_transport_impl_get_network_id( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_i_32, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedJrpcTransportImplGetNetworkIdConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedSimpleCallFunc0ConstMeta, - argValues: [needResult], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedSimpleCallFunc0ConstMeta => + TaskConstMeta get kCrateApiMergedJrpcTransportImplGetNetworkIdConstMeta => const TaskConstMeta( - debugName: "simple_call_func0", - argNames: ["needResult"], + debugName: "jrpc_transport_impl_get_network_id", + argNames: ["that"], ); @override - Future crateApiMergedSimpleCallFunc1({required bool needResult}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_bool(needResult); - return wire.wire__crate__api__merged__simple_call_func1(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiMergedJrpcTransportImplGetSignatureId({ + required JrpcTransportImpl that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); + return wire + .wire__crate__api__merged__jrpc_transport_impl_get_signature_id( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_i_32, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedJrpcTransportImplGetSignatureIdConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedSimpleCallFunc1ConstMeta, - argValues: [needResult], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedSimpleCallFunc1ConstMeta => + TaskConstMeta get kCrateApiMergedJrpcTransportImplGetSignatureIdConstMeta => const TaskConstMeta( - debugName: "simple_call_func1", - argNames: ["needResult"], + debugName: "jrpc_transport_impl_get_signature_id", + argNames: ["that"], ); @override - Future crateApiMergedSimpleCallFunc2() { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - return wire.wire__crate__api__merged__simple_call_func2(port_); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiMergedJrpcTransportImplGetTransaction({ + required JrpcTransportImpl that, + required String hash, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); + var arg1 = cst_encode_String(hash); + return wire + .wire__crate__api__merged__jrpc_transport_impl_get_transaction( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedJrpcTransportImplGetTransactionConstMeta, + argValues: [that, hash], + apiImpl: this, ), - constMeta: kCrateApiMergedSimpleCallFunc2ConstMeta, - argValues: [], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedSimpleCallFunc2ConstMeta => + TaskConstMeta get kCrateApiMergedJrpcTransportImplGetTransactionConstMeta => const TaskConstMeta( - debugName: "simple_call_func2", - argNames: [], + debugName: "jrpc_transport_impl_get_transaction", + argNames: ["that", "hash"], ); @override - Future crateApiMergedSimpleCallFunc3() { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - return wire.wire__crate__api__merged__simple_call_func3(port_); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiMergedJrpcTransportImplGetTransactions({ + required JrpcTransportImpl that, + required String address, + String? fromLt, + required int count, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); + var arg1 = cst_encode_String(address); + var arg2 = cst_encode_opt_String(fromLt); + var arg3 = cst_encode_u_8(count); + return wire + .wire__crate__api__merged__jrpc_transport_impl_get_transactions( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedJrpcTransportImplGetTransactionsConstMeta, + argValues: [that, address, fromLt, count], + apiImpl: this, ), - constMeta: kCrateApiMergedSimpleCallFunc3ConstMeta, - argValues: [], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedSimpleCallFunc3ConstMeta => + TaskConstMeta get kCrateApiMergedJrpcTransportImplGetTransactionsConstMeta => const TaskConstMeta( - debugName: "simple_call_func3", - argNames: [], + debugName: "jrpc_transport_impl_get_transactions", + argNames: ["that", "address", "fromLt", "count"], ); @override - Future crateApiMergedSimpleLog({required String string}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(string); - return wire.wire__crate__api__merged__simple_log(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + JrpcTransportImpl crateApiMergedJrpcTransportImplNew({ + required JrpcConnectionDartWrapper jrpcConnection, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_jrpc_connection_dart_wrapper( + jrpcConnection, + ); + return wire.wire__crate__api__merged__jrpc_transport_impl_new(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_jrpc_transport_impl, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedJrpcTransportImplNewConstMeta, + argValues: [jrpcConnection], + apiImpl: this, ), - constMeta: kCrateApiMergedSimpleLogConstMeta, - argValues: [string], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedSimpleLogConstMeta => const TaskConstMeta( - debugName: "simple_log", - argNames: ["string"], + TaskConstMeta get kCrateApiMergedJrpcTransportImplNewConstMeta => + const TaskConstMeta( + debugName: "jrpc_transport_impl_new", + argNames: ["jrpcConnection"], ); @override - Future crateApiMergedSimplePanic() { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - return wire.wire__crate__api__merged__simple_panic(port_); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiMergedJrpcTransportImplSimulateTransactionTree({ + required JrpcTransportImpl that, + required String signedMessage, + required List ignoredComputePhaseCodes, + required List ignoredActionPhaseCodes, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_jrpc_transport_impl(that); + var arg1 = cst_encode_String(signedMessage); + var arg2 = cst_encode_list_prim_i_32_loose(ignoredComputePhaseCodes); + var arg3 = cst_encode_list_prim_i_32_loose(ignoredActionPhaseCodes); + return wire + .wire__crate__api__merged__jrpc_transport_impl_simulate_transaction_tree( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedJrpcTransportImplSimulateTransactionTreeConstMeta, + argValues: [ + that, + signedMessage, + ignoredComputePhaseCodes, + ignoredActionPhaseCodes, + ], + apiImpl: this, ), - constMeta: kCrateApiMergedSimplePanicConstMeta, - argValues: [], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedSimplePanicConstMeta => const TaskConstMeta( - debugName: "simple_panic", - argNames: [], + TaskConstMeta + get kCrateApiMergedJrpcTransportImplSimulateTransactionTreeConstMeta => + const TaskConstMeta( + debugName: "jrpc_transport_impl_simulate_transaction_tree", + argNames: [ + "that", + "signedMessage", + "ignoredComputePhaseCodes", + "ignoredActionPhaseCodes", + ], ); @override - StorageDartWrapper crateApiMergedStorageDartWrapperNew( - {required String instanceHash}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(instanceHash); - return wire.wire__crate__api__merged__storage_dart_wrapper_new(arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_storage_dart_wrapper, - decodeErrorData: null, + Future crateApiMergedKeystoreDartWrapperAddKey({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String input, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + var arg1 = cst_encode_box_autoadd_key_signer(signer); + var arg2 = cst_encode_String(input); + return wire.wire__crate__api__merged__keystore_dart_wrapper_add_key( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperAddKeyConstMeta, + argValues: [that, signer, input], + apiImpl: this, ), - constMeta: kCrateApiMergedStorageDartWrapperNewConstMeta, - argValues: [instanceHash], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedStorageDartWrapperNewConstMeta => + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperAddKeyConstMeta => const TaskConstMeta( - debugName: "storage_dart_wrapper_new", - argNames: ["instanceHash"], + debugName: "keystore_dart_wrapper_add_key", + argNames: ["that", "signer", "input"], ); @override - Future crateApiMergedStorageImplNew( - {required String instanceHash}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(instanceHash); - return wire.wire__crate__api__merged__storage_impl_new(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_storage_impl, - decodeErrorData: null, + Future crateApiMergedKeystoreDartWrapperAddKeys({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String input, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + var arg1 = cst_encode_box_autoadd_key_signer(signer); + var arg2 = cst_encode_String(input); + return wire.wire__crate__api__merged__keystore_dart_wrapper_add_keys( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperAddKeysConstMeta, + argValues: [that, signer, input], + apiImpl: this, ), - constMeta: kCrateApiMergedStorageImplNewConstMeta, - argValues: [instanceHash], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedStorageImplNewConstMeta => + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperAddKeysConstMeta => const TaskConstMeta( - debugName: "storage_impl_new", - argNames: ["instanceHash"], + debugName: "keystore_dart_wrapper_add_keys", + argNames: ["that", "signer", "input"], ); @override - Future crateApiMergedStubCallDart({required DartCallStub stub}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_dart_call_stub(stub); - return wire.wire__crate__api__merged__stub_call_dart(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiMergedKeystoreDartWrapperClearKeystore({ + required KeystoreDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + return wire + .wire__crate__api__merged__keystore_dart_wrapper_clear_keystore( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperClearKeystoreConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedStubCallDartConstMeta, - argValues: [stub], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedStubCallDartConstMeta => const TaskConstMeta( - debugName: "stub_call_dart", - argNames: ["stub"], + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperClearKeystoreConstMeta => + const TaskConstMeta( + debugName: "keystore_dart_wrapper_clear_keystore", + argNames: ["that"], ); @override - Future crateApiMergedStubDcs() { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - return wire.wire__crate__api__merged__stub_dcs(port_); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_dart_call_stub, - decodeErrorData: null, + Future crateApiMergedKeystoreDartWrapperDecrypt({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String data, + required String input, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + var arg1 = cst_encode_box_autoadd_key_signer(signer); + var arg2 = cst_encode_String(data); + var arg3 = cst_encode_String(input); + return wire.wire__crate__api__merged__keystore_dart_wrapper_decrypt( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperDecryptConstMeta, + argValues: [that, signer, data, input], + apiImpl: this, ), - constMeta: kCrateApiMergedStubDcsConstMeta, - argValues: [], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedStubDcsConstMeta => const TaskConstMeta( - debugName: "stub_dcs", - argNames: [], + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperDecryptConstMeta => + const TaskConstMeta( + debugName: "keystore_dart_wrapper_decrypt", + argNames: ["that", "signer", "data", "input"], ); @override - Future crateApiMergedStubDv() { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - return wire.wire__crate__api__merged__stub_dv(port_); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_dynamic_value, - decodeErrorData: null, + Future crateApiMergedKeystoreDartWrapperEncrypt({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String data, + required List publicKeys, + required String algorithm, + required String input, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + var arg1 = cst_encode_box_autoadd_key_signer(signer); + var arg2 = cst_encode_String(data); + var arg3 = cst_encode_list_String(publicKeys); + var arg4 = cst_encode_String(algorithm); + var arg5 = cst_encode_String(input); + return wire.wire__crate__api__merged__keystore_dart_wrapper_encrypt( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperEncryptConstMeta, + argValues: [that, signer, data, publicKeys, algorithm, input], + apiImpl: this, ), - constMeta: kCrateApiMergedStubDvConstMeta, - argValues: [], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedStubDvConstMeta => const TaskConstMeta( - debugName: "stub_dv", - argNames: [], + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperEncryptConstMeta => + const TaskConstMeta( + debugName: "keystore_dart_wrapper_encrypt", + argNames: [ + "that", + "signer", + "data", + "publicKeys", + "algorithm", + "input", + ], ); @override - Future crateApiMergedTestCallerCallTest0Async( - {required String string, required bool needResult}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(string); - var arg1 = cst_encode_bool(needResult); - return wire.wire__crate__api__merged__test_caller_call_test0_async( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_dynamic_value, - decodeErrorData: null, + Future crateApiMergedKeystoreDartWrapperExportSeed({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String input, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + var arg1 = cst_encode_box_autoadd_key_signer(signer); + var arg2 = cst_encode_String(input); + return wire + .wire__crate__api__merged__keystore_dart_wrapper_export_seed( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperExportSeedConstMeta, + argValues: [that, signer, input], + apiImpl: this, ), - constMeta: kCrateApiMergedTestCallerCallTest0AsyncConstMeta, - argValues: [string, needResult], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTestCallerCallTest0AsyncConstMeta => + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperExportSeedConstMeta => const TaskConstMeta( - debugName: "test_caller_call_test0_async", - argNames: ["string", "needResult"], + debugName: "keystore_dart_wrapper_export_seed", + argNames: ["that", "signer", "input"], ); @override - DynamicValue crateApiMergedTestCallerCallTest0Sync( - {required String string, required bool needResult}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_String(string); - var arg1 = cst_encode_bool(needResult); - return wire.wire__crate__api__merged__test_caller_call_test0_sync( - arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_dynamic_value, - decodeErrorData: null, + Future crateApiMergedKeystoreDartWrapperGetEntries({ + required KeystoreDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + return wire + .wire__crate__api__merged__keystore_dart_wrapper_get_entries( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperGetEntriesConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedTestCallerCallTest0SyncConstMeta, - argValues: [string, needResult], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTestCallerCallTest0SyncConstMeta => + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperGetEntriesConstMeta => const TaskConstMeta( - debugName: "test_caller_call_test0_sync", - argNames: ["string", "needResult"], + debugName: "keystore_dart_wrapper_get_entries", + argNames: ["that"], ); @override - Future crateApiMergedTestCallerCallTest1Async( - {required String string, required bool needResult}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(string); - var arg1 = cst_encode_bool(needResult); - return wire.wire__crate__api__merged__test_caller_call_test1_async( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_dynamic_value, - decodeErrorData: null, + Future> crateApiMergedKeystoreDartWrapperGetPublicKeys({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String input, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + var arg1 = cst_encode_box_autoadd_key_signer(signer); + var arg2 = cst_encode_String(input); + return wire + .wire__crate__api__merged__keystore_dart_wrapper_get_public_keys( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperGetPublicKeysConstMeta, + argValues: [that, signer, input], + apiImpl: this, ), - constMeta: kCrateApiMergedTestCallerCallTest1AsyncConstMeta, - argValues: [string, needResult], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTestCallerCallTest1AsyncConstMeta => + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperGetPublicKeysConstMeta => const TaskConstMeta( - debugName: "test_caller_call_test1_async", - argNames: ["string", "needResult"], + debugName: "keystore_dart_wrapper_get_public_keys", + argNames: ["that", "signer", "input"], ); @override - Future crateApiMergedTestLoggerDebug({required String string}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(string); - return wire.wire__crate__api__merged__test_logger_debug(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiMergedKeystoreDartWrapperIsPasswordCached({ + required KeystoreDartWrapper that, + required String publicKey, + required BigInt duration, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + var arg1 = cst_encode_String(publicKey); + var arg2 = cst_encode_u_64(duration); + return wire + .wire__crate__api__merged__keystore_dart_wrapper_is_password_cached( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperIsPasswordCachedConstMeta, + argValues: [that, publicKey, duration], + apiImpl: this, ), - constMeta: kCrateApiMergedTestLoggerDebugConstMeta, - argValues: [string], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTestLoggerDebugConstMeta => + TaskConstMeta + get kCrateApiMergedKeystoreDartWrapperIsPasswordCachedConstMeta => const TaskConstMeta( - debugName: "test_logger_debug", - argNames: ["string"], + debugName: "keystore_dart_wrapper_is_password_cached", + argNames: ["that", "publicKey", "duration"], ); @override - Future crateApiMergedTestLoggerError({required String string}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(string); - return wire.wire__crate__api__merged__test_logger_error(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiMergedKeystoreDartWrapperNew({ + required StorageDartWrapper storage, + required List signers, + LedgerConnectionDartWrapper? ledgerConnection, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_storage_dart_wrapper(storage); + var arg1 = cst_encode_list_key_signer(signers); + var arg2 = cst_encode_opt_box_autoadd_ledger_connection_dart_wrapper( + ledgerConnection, + ); + return wire.wire__crate__api__merged__keystore_dart_wrapper_new( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_keystore_dart_wrapper, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperNewConstMeta, + argValues: [storage, signers, ledgerConnection], + apiImpl: this, ), - constMeta: kCrateApiMergedTestLoggerErrorConstMeta, - argValues: [string], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTestLoggerErrorConstMeta => + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperNewConstMeta => const TaskConstMeta( - debugName: "test_logger_error", - argNames: ["string"], + debugName: "keystore_dart_wrapper_new", + argNames: ["storage", "signers", "ledgerConnection"], ); @override - Future crateApiMergedTestLoggerInfo({required String string}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(string); - return wire.wire__crate__api__merged__test_logger_info(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiMergedKeystoreDartWrapperReloadKeystore({ + required KeystoreDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + return wire + .wire__crate__api__merged__keystore_dart_wrapper_reload_keystore( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperReloadKeystoreConstMeta, + argValues: [that], + apiImpl: this, ), - constMeta: kCrateApiMergedTestLoggerInfoConstMeta, - argValues: [string], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTestLoggerInfoConstMeta => + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperReloadKeystoreConstMeta => const TaskConstMeta( - debugName: "test_logger_info", - argNames: ["string"], + debugName: "keystore_dart_wrapper_reload_keystore", + argNames: ["that"], ); @override - Future crateApiMergedTestLoggerPanic({required String string}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(string); - return wire.wire__crate__api__merged__test_logger_panic(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiMergedKeystoreDartWrapperRemoveKey({ + required KeystoreDartWrapper that, + required String publicKey, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + var arg1 = cst_encode_String(publicKey); + return wire + .wire__crate__api__merged__keystore_dart_wrapper_remove_key( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperRemoveKeyConstMeta, + argValues: [that, publicKey], + apiImpl: this, ), - constMeta: kCrateApiMergedTestLoggerPanicConstMeta, - argValues: [string], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTestLoggerPanicConstMeta => + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperRemoveKeyConstMeta => const TaskConstMeta( - debugName: "test_logger_panic", - argNames: ["string"], + debugName: "keystore_dart_wrapper_remove_key", + argNames: ["that", "publicKey"], ); @override - Future crateApiMergedTestLoggerWarn({required String string}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(string); - return wire.wire__crate__api__merged__test_logger_warn(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiMergedKeystoreDartWrapperRemoveKeys({ + required KeystoreDartWrapper that, + required List publicKeys, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + var arg1 = cst_encode_list_String(publicKeys); + return wire + .wire__crate__api__merged__keystore_dart_wrapper_remove_keys( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperRemoveKeysConstMeta, + argValues: [that, publicKeys], + apiImpl: this, ), - constMeta: kCrateApiMergedTestLoggerWarnConstMeta, - argValues: [string], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTestLoggerWarnConstMeta => + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperRemoveKeysConstMeta => const TaskConstMeta( - debugName: "test_logger_warn", - argNames: ["string"], + debugName: "keystore_dart_wrapper_remove_keys", + argNames: ["that", "publicKeys"], ); @override - Future crateApiMergedTokenWalletDartWrapperAddress( - {required TokenWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); - return wire.wire__crate__api__merged__token_wallet_dart_wrapper_address( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + Future crateApiMergedKeystoreDartWrapperSign({ + required KeystoreDartWrapper that, + required KeySigner signer, + required UnsignedMessageImpl message, + required String input, + int? signatureId, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + var arg1 = cst_encode_box_autoadd_key_signer(signer); + var arg2 = cst_encode_box_autoadd_unsigned_message_impl(message); + var arg3 = cst_encode_String(input); + var arg4 = cst_encode_opt_box_autoadd_i_32(signatureId); + return wire.wire__crate__api__merged__keystore_dart_wrapper_sign( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperSignConstMeta, + argValues: [that, signer, message, input, signatureId], + apiImpl: this, ), - constMeta: kCrateApiMergedTokenWalletDartWrapperAddressConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperAddressConstMeta => + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperSignConstMeta => const TaskConstMeta( - debugName: "token_wallet_dart_wrapper_address", - argNames: ["that"], + debugName: "keystore_dart_wrapper_sign", + argNames: ["that", "signer", "message", "input", "signatureId"], ); @override - Future crateApiMergedTokenWalletDartWrapperBalance( - {required TokenWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); - return wire.wire__crate__api__merged__token_wallet_dart_wrapper_balance( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + Future crateApiMergedKeystoreDartWrapperSignData({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String data, + required String input, + int? signatureId, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + var arg1 = cst_encode_box_autoadd_key_signer(signer); + var arg2 = cst_encode_String(data); + var arg3 = cst_encode_String(input); + var arg4 = cst_encode_opt_box_autoadd_i_32(signatureId); + return wire.wire__crate__api__merged__keystore_dart_wrapper_sign_data( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_signed_data, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperSignDataConstMeta, + argValues: [that, signer, data, input, signatureId], + apiImpl: this, ), - constMeta: kCrateApiMergedTokenWalletDartWrapperBalanceConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperBalanceConstMeta => + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperSignDataConstMeta => const TaskConstMeta( - debugName: "token_wallet_dart_wrapper_balance", - argNames: ["that"], + debugName: "keystore_dart_wrapper_sign_data", + argNames: ["that", "signer", "data", "input", "signatureId"], ); @override - Future crateApiMergedTokenWalletDartWrapperContractState( - {required TokenWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); - return wire - .wire__crate__api__merged__token_wallet_dart_wrapper_contract_state( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedKeystoreDartWrapperSignDataRaw({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String data, + required String input, + int? signatureId, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + var arg1 = cst_encode_box_autoadd_key_signer(signer); + var arg2 = cst_encode_String(data); + var arg3 = cst_encode_String(input); + var arg4 = cst_encode_opt_box_autoadd_i_32(signatureId); + return wire + .wire__crate__api__merged__keystore_dart_wrapper_sign_data_raw( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_signed_data_raw, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperSignDataRawConstMeta, + argValues: [that, signer, data, input, signatureId], + apiImpl: this, ), - constMeta: kCrateApiMergedTokenWalletDartWrapperContractStateConstMeta, - argValues: [that], - apiImpl: this, - )); - } - - TaskConstMeta - get kCrateApiMergedTokenWalletDartWrapperContractStateConstMeta => - const TaskConstMeta( - debugName: "token_wallet_dart_wrapper_contract_state", - argNames: ["that"], - ); - - @override - Future crateApiMergedTokenWalletDartWrapperEstimateMinAttachedAmount( - {required TokenWalletDartWrapper that, - required String destination, - required String amount, - required bool notifyReceiver, - String? payload}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(destination); - var arg2 = cst_encode_String(amount); - var arg3 = cst_encode_bool(notifyReceiver); - var arg4 = cst_encode_opt_String(payload); - return wire - .wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount( - port_, arg0, arg1, arg2, arg3, arg4); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedTokenWalletDartWrapperEstimateMinAttachedAmountConstMeta, - argValues: [that, destination, amount, notifyReceiver, payload], - apiImpl: this, - )); + ); } - TaskConstMeta - get kCrateApiMergedTokenWalletDartWrapperEstimateMinAttachedAmountConstMeta => - const TaskConstMeta( - debugName: "token_wallet_dart_wrapper_estimate_min_attached_amount", - argNames: [ - "that", - "destination", - "amount", - "notifyReceiver", - "payload" - ], - ); + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperSignDataRawConstMeta => + const TaskConstMeta( + debugName: "keystore_dart_wrapper_sign_data_raw", + argNames: ["that", "signer", "data", "input", "signatureId"], + ); @override - Future crateApiMergedTokenWalletDartWrapperGetTokenRootDetails( - {required ArcTransportBoxTrait transport, - required String tokenRootAddress}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - var arg1 = cst_encode_String(tokenRootAddress); - return wire - .wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedTokenWalletDartWrapperGetTokenRootDetailsConstMeta, - argValues: [transport, tokenRootAddress], - apiImpl: this, - )); + Future crateApiMergedKeystoreDartWrapperUpdateKey({ + required KeystoreDartWrapper that, + required KeySigner signer, + required String input, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_keystore_dart_wrapper(that); + var arg1 = cst_encode_box_autoadd_key_signer(signer); + var arg2 = cst_encode_String(input); + return wire + .wire__crate__api__merged__keystore_dart_wrapper_update_key( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperUpdateKeyConstMeta, + argValues: [that, signer, input], + apiImpl: this, + ), + ); } - TaskConstMeta - get kCrateApiMergedTokenWalletDartWrapperGetTokenRootDetailsConstMeta => - const TaskConstMeta( - debugName: "token_wallet_dart_wrapper_get_token_root_details", - argNames: ["transport", "tokenRootAddress"], - ); + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperUpdateKeyConstMeta => + const TaskConstMeta( + debugName: "keystore_dart_wrapper_update_key", + argNames: ["that", "signer", "input"], + ); @override - Future - crateApiMergedTokenWalletDartWrapperGetTokenRootDetailsFromTokenWallet( - {required ArcTransportBoxTrait transport, - required String tokenWalletAddress}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - var arg1 = cst_encode_String(tokenWalletAddress); - return wire - .wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedTokenWalletDartWrapperGetTokenRootDetailsFromTokenWalletConstMeta, - argValues: [transport, tokenWalletAddress], - apiImpl: this, - )); - } - - TaskConstMeta - get kCrateApiMergedTokenWalletDartWrapperGetTokenRootDetailsFromTokenWalletConstMeta => - const TaskConstMeta( - debugName: - "token_wallet_dart_wrapper_get_token_root_details_from_token_wallet", - argNames: ["transport", "tokenWalletAddress"], + Future crateApiMergedKeystoreDartWrapperVerifyData({ + required List signers, + LedgerConnectionDartWrapper? ledgerConnection, + required String data, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_list_key_signer(signers); + var arg1 = cst_encode_opt_box_autoadd_ledger_connection_dart_wrapper( + ledgerConnection, ); - - @override - Future crateApiMergedTokenWalletDartWrapperGetTokenWalletDetails( - {required ArcTransportBoxTrait transport, required String address}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - var arg1 = cst_encode_String(address); - return wire - .wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + var arg2 = cst_encode_String(data); + return wire + .wire__crate__api__merged__keystore_dart_wrapper_verify_data( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedKeystoreDartWrapperVerifyDataConstMeta, + argValues: [signers, ledgerConnection, data], + apiImpl: this, ), - constMeta: - kCrateApiMergedTokenWalletDartWrapperGetTokenWalletDetailsConstMeta, - argValues: [transport, address], - apiImpl: this, - )); + ); } - TaskConstMeta - get kCrateApiMergedTokenWalletDartWrapperGetTokenWalletDetailsConstMeta => - const TaskConstMeta( - debugName: "token_wallet_dart_wrapper_get_token_wallet_details", - argNames: ["transport", "address"], - ); + TaskConstMeta get kCrateApiMergedKeystoreDartWrapperVerifyDataConstMeta => + const TaskConstMeta( + debugName: "keystore_dart_wrapper_verify_data", + argNames: ["signers", "ledgerConnection", "data"], + ); @override - Future crateApiMergedTokenWalletDartWrapperHandleBlock( - {required TokenWalletDartWrapper that, required String block}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(block); - return wire - .wire__crate__api__merged__token_wallet_dart_wrapper_handle_block( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, + LedgerConnectionDartWrapper crateApiMergedLedgerConnectionDartWrapperNew({ + required FutureOr Function(int) onGetPublicKey, + required FutureOr Function(int, int?, Uint8List) onSign, + required FutureOr Function(int, int, int?, Uint8List, String) + onSignTransaction, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_DartFn_Inputs_u_16_Output_list_prim_u_8_strict_AnyhowException( + onGetPublicKey, + ); + var arg1 = + cst_encode_DartFn_Inputs_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + onSign, + ); + var arg2 = + cst_encode_DartFn_Inputs_u_16_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_String_Output_list_prim_u_8_strict_AnyhowException( + onSignTransaction, + ); + return wire + .wire__crate__api__merged__ledger_connection_dart_wrapper_new( + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ledger_connection_dart_wrapper, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedLedgerConnectionDartWrapperNewConstMeta, + argValues: [onGetPublicKey, onSign, onSignTransaction], + apiImpl: this, ), - constMeta: kCrateApiMergedTokenWalletDartWrapperHandleBlockConstMeta, - argValues: [that, block], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperHandleBlockConstMeta => + TaskConstMeta get kCrateApiMergedLedgerConnectionDartWrapperNewConstMeta => const TaskConstMeta( - debugName: "token_wallet_dart_wrapper_handle_block", - argNames: ["that", "block"], + debugName: "ledger_connection_dart_wrapper_new", + argNames: ["onGetPublicKey", "onSign", "onSignTransaction"], ); @override - Future crateApiMergedTokenWalletDartWrapperOwner( - {required TokenWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); - return wire.wire__crate__api__merged__token_wallet_dart_wrapper_owner( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + bool crateApiMergedNtCheckPublicKey({required String publicKey}) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(publicKey); + return wire.wire__crate__api__merged__nt_check_public_key(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedNtCheckPublicKeyConstMeta, + argValues: [publicKey], + apiImpl: this, ), - constMeta: kCrateApiMergedTokenWalletDartWrapperOwnerConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperOwnerConstMeta => + TaskConstMeta get kCrateApiMergedNtCheckPublicKeyConstMeta => const TaskConstMeta( - debugName: "token_wallet_dart_wrapper_owner", - argNames: ["that"], + debugName: "nt_check_public_key", + argNames: ["publicKey"], ); @override - Future crateApiMergedTokenWalletDartWrapperPreloadTransactions( - {required TokenWalletDartWrapper that, required String fromLt}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(fromLt); - return wire - .wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, + List crateApiMergedNtCodeToTvc({required String code}) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(code); + return wire.wire__crate__api__merged__nt_code_to_tvc(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtCodeToTvcConstMeta, + argValues: [code], + apiImpl: this, ), - constMeta: - kCrateApiMergedTokenWalletDartWrapperPreloadTransactionsConstMeta, - argValues: [that, fromLt], - apiImpl: this, - )); + ); } - TaskConstMeta - get kCrateApiMergedTokenWalletDartWrapperPreloadTransactionsConstMeta => - const TaskConstMeta( - debugName: "token_wallet_dart_wrapper_preload_transactions", - argNames: ["that", "fromLt"], - ); + TaskConstMeta get kCrateApiMergedNtCodeToTvcConstMeta => + const TaskConstMeta(debugName: "nt_code_to_tvc", argNames: ["code"]); @override - Future crateApiMergedTokenWalletDartWrapperPrepareTransfer( - {required TokenWalletDartWrapper that, - required String destination, - required String amount, - required bool notifyReceiver, - String? attachedAmount, - String? payload, - String? remainingGasTo}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(destination); - var arg2 = cst_encode_String(amount); - var arg3 = cst_encode_bool(notifyReceiver); - var arg4 = cst_encode_opt_String(attachedAmount); - var arg5 = cst_encode_opt_String(payload); - var arg6 = cst_encode_opt_String(remainingGasTo); - return wire - .wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer( - port_, arg0, arg1, arg2, arg3, arg4, arg5, arg6); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedTokenWalletDartWrapperPrepareTransferConstMeta, - argValues: [ - that, - destination, - amount, - notifyReceiver, - attachedAmount, - payload, - remainingGasTo - ], - apiImpl: this, - )); + Future crateApiMergedNtComputeStorageFee({ + required String config, + required String account, + required int utime, + required bool isMasterchain, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(config); + var arg1 = cst_encode_String(account); + var arg2 = cst_encode_u_32(utime); + var arg3 = cst_encode_bool(isMasterchain); + return wire.wire__crate__api__merged__nt_compute_storage_fee( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtComputeStorageFeeConstMeta, + argValues: [config, account, utime, isMasterchain], + apiImpl: this, + ), + ); } - TaskConstMeta - get kCrateApiMergedTokenWalletDartWrapperPrepareTransferConstMeta => - const TaskConstMeta( - debugName: "token_wallet_dart_wrapper_prepare_transfer", - argNames: [ - "that", - "destination", - "amount", - "notifyReceiver", - "attachedAmount", - "payload", - "remainingGasTo" - ], - ); + TaskConstMeta get kCrateApiMergedNtComputeStorageFeeConstMeta => + const TaskConstMeta( + debugName: "nt_compute_storage_fee", + argNames: ["config", "account", "utime", "isMasterchain"], + ); @override - Future crateApiMergedTokenWalletDartWrapperRefresh( - {required TokenWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); - return wire.wire__crate__api__merged__token_wallet_dart_wrapper_refresh( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, + String crateApiMergedNtComputeTonWalletAddress({ + required String publicKey, + required String walletType, + required int workchain, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(publicKey); + var arg1 = cst_encode_String(walletType); + var arg2 = cst_encode_i_8(workchain); + return wire.wire__crate__api__merged__nt_compute_ton_wallet_address( + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtComputeTonWalletAddressConstMeta, + argValues: [publicKey, walletType, workchain], + apiImpl: this, ), - constMeta: kCrateApiMergedTokenWalletDartWrapperRefreshConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperRefreshConstMeta => + TaskConstMeta get kCrateApiMergedNtComputeTonWalletAddressConstMeta => const TaskConstMeta( - debugName: "token_wallet_dart_wrapper_refresh", - argNames: ["that"], + debugName: "nt_compute_ton_wallet_address", + argNames: ["publicKey", "walletType", "workchain"], ); @override - Future crateApiMergedTokenWalletDartWrapperSubscribe( - {required String instanceHash, - required String owner, - required String rootTokenContract, - required ArcTransportBoxTrait transport, - required bool preloadTransactions}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(instanceHash); - var arg1 = cst_encode_String(owner); - var arg2 = cst_encode_String(rootTokenContract); - var arg3 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - var arg4 = cst_encode_bool(preloadTransactions); - return wire - .wire__crate__api__merged__token_wallet_dart_wrapper_subscribe( - port_, arg0, arg1, arg2, arg3, arg4); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_token_wallet_dart_wrapper, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedTokenWalletDartWrapperSubscribeConstMeta, - argValues: [ - instanceHash, - owner, - rootTokenContract, - transport, - preloadTransactions - ], - apiImpl: this, - )); + Future crateApiMergedNtCreateExternalMessage({ + required String dst, + required String contractAbi, + required String method, + String? stateInit, + required String input, + required String publicKey, + required int timeout, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(dst); + var arg1 = cst_encode_String(contractAbi); + var arg2 = cst_encode_String(method); + var arg3 = cst_encode_opt_String(stateInit); + var arg4 = cst_encode_String(input); + var arg5 = cst_encode_String(publicKey); + var arg6 = cst_encode_u_32(timeout); + return wire.wire__crate__api__merged__nt_create_external_message( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unsigned_message_impl, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtCreateExternalMessageConstMeta, + argValues: [ + dst, + contractAbi, + method, + stateInit, + input, + publicKey, + timeout, + ], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperSubscribeConstMeta => + TaskConstMeta get kCrateApiMergedNtCreateExternalMessageConstMeta => const TaskConstMeta( - debugName: "token_wallet_dart_wrapper_subscribe", + debugName: "nt_create_external_message", argNames: [ - "instanceHash", - "owner", - "rootTokenContract", - "transport", - "preloadTransactions" + "dst", + "contractAbi", + "method", + "stateInit", + "input", + "publicKey", + "timeout", ], ); @override - Future crateApiMergedTokenWalletDartWrapperSymbol( - {required TokenWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); - return wire.wire__crate__api__merged__token_wallet_dart_wrapper_symbol( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedNtCreateExternalMessageWithoutSignature({ + required String dst, + required String contractAbi, + required String method, + String? stateInit, + required String input, + required int timeout, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(dst); + var arg1 = cst_encode_String(contractAbi); + var arg2 = cst_encode_String(method); + var arg3 = cst_encode_opt_String(stateInit); + var arg4 = cst_encode_String(input); + var arg5 = cst_encode_u_32(timeout); + return wire + .wire__crate__api__merged__nt_create_external_message_without_signature( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedNtCreateExternalMessageWithoutSignatureConstMeta, + argValues: [dst, contractAbi, method, stateInit, input, timeout], + apiImpl: this, ), - constMeta: kCrateApiMergedTokenWalletDartWrapperSymbolConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperSymbolConstMeta => + TaskConstMeta + get kCrateApiMergedNtCreateExternalMessageWithoutSignatureConstMeta => const TaskConstMeta( - debugName: "token_wallet_dart_wrapper_symbol", - argNames: ["that"], + debugName: "nt_create_external_message_without_signature", + argNames: [ + "dst", + "contractAbi", + "method", + "stateInit", + "input", + "timeout", + ], ); @override - Future crateApiMergedTokenWalletDartWrapperVersion( - {required TokenWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); - return wire.wire__crate__api__merged__token_wallet_dart_wrapper_version( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedNtCreateRawExternalMessage({ + required String dst, + String? stateInit, + String? body, + required int timeout, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(dst); + var arg1 = cst_encode_opt_String(stateInit); + var arg2 = cst_encode_opt_String(body); + var arg3 = cst_encode_u_32(timeout); + return wire.wire__crate__api__merged__nt_create_raw_external_message( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtCreateRawExternalMessageConstMeta, + argValues: [dst, stateInit, body, timeout], + apiImpl: this, ), - constMeta: kCrateApiMergedTokenWalletDartWrapperVersionConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperVersionConstMeta => + TaskConstMeta get kCrateApiMergedNtCreateRawExternalMessageConstMeta => const TaskConstMeta( - debugName: "token_wallet_dart_wrapper_version", - argNames: ["that"], + debugName: "nt_create_raw_external_message", + argNames: ["dst", "stateInit", "body", "timeout"], ); @override - Future crateApiMergedTonWalletDartWrapperAddress( - {required TonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - return wire.wire__crate__api__merged__ton_wallet_dart_wrapper_address( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + Future crateApiMergedNtDecodeEvent({ + required String messageBody, + required String contractAbi, + String? event, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(messageBody); + var arg1 = cst_encode_String(contractAbi); + var arg2 = cst_encode_opt_String(event); + return wire.wire__crate__api__merged__nt_decode_event( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtDecodeEventConstMeta, + argValues: [messageBody, contractAbi, event], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperAddressConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperAddressConstMeta => + TaskConstMeta get kCrateApiMergedNtDecodeEventConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_address", - argNames: ["that"], + debugName: "nt_decode_event", + argNames: ["messageBody", "contractAbi", "event"], ); @override - Future - crateApiMergedTonWalletDartWrapperAppendSignatureToWalletV5R1Payload( - {required String payload, required String base64Signature}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(payload); - var arg1 = cst_encode_String(base64Signature); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedTonWalletDartWrapperAppendSignatureToWalletV5R1PayloadConstMeta, - argValues: [payload, base64Signature], - apiImpl: this, - )); - } - - TaskConstMeta - get kCrateApiMergedTonWalletDartWrapperAppendSignatureToWalletV5R1PayloadConstMeta => - const TaskConstMeta( - debugName: - "ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload", - argNames: ["payload", "base64Signature"], + Future crateApiMergedNtDecodeInput({ + required String messageBody, + required String contractAbi, + String? method, + required bool internal, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(messageBody); + var arg1 = cst_encode_String(contractAbi); + var arg2 = cst_encode_opt_String(method); + var arg3 = cst_encode_bool(internal); + return wire.wire__crate__api__merged__nt_decode_input( + port_, + arg0, + arg1, + arg2, + arg3, ); - - @override - Future crateApiMergedTonWalletDartWrapperContractState( - {required TonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtDecodeInputConstMeta, + argValues: [messageBody, contractAbi, method, internal], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperContractStateConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperContractStateConstMeta => + TaskConstMeta get kCrateApiMergedNtDecodeInputConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_contract_state", - argNames: ["that"], + debugName: "nt_decode_input", + argNames: ["messageBody", "contractAbi", "method", "internal"], ); @override - Future?> crateApiMergedTonWalletDartWrapperCustodians( - {required TonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_custodians( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_list_String, - decodeErrorData: null, + Future crateApiMergedNtDecodeOutput({ + required String messageBody, + required String contractAbi, + String? method, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(messageBody); + var arg1 = cst_encode_String(contractAbi); + var arg2 = cst_encode_opt_String(method); + return wire.wire__crate__api__merged__nt_decode_output( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtDecodeOutputConstMeta, + argValues: [messageBody, contractAbi, method], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperCustodiansConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperCustodiansConstMeta => + TaskConstMeta get kCrateApiMergedNtDecodeOutputConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_custodians", - argNames: ["that"], + debugName: "nt_decode_output", + argNames: ["messageBody", "contractAbi", "method"], ); @override - Future crateApiMergedTonWalletDartWrapperDetails( - {required TonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - return wire.wire__crate__api__merged__ton_wallet_dart_wrapper_details( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedNtDecodeTransaction({ + required String transaction, + required String contractAbi, + String? method, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(transaction); + var arg1 = cst_encode_String(contractAbi); + var arg2 = cst_encode_opt_String(method); + return wire.wire__crate__api__merged__nt_decode_transaction( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtDecodeTransactionConstMeta, + argValues: [transaction, contractAbi, method], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperDetailsConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperDetailsConstMeta => + TaskConstMeta get kCrateApiMergedNtDecodeTransactionConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_details", - argNames: ["that"], + debugName: "nt_decode_transaction", + argNames: ["transaction", "contractAbi", "method"], ); @override - Future crateApiMergedTonWalletDartWrapperEstimateFees( - {required TonWalletDartWrapper that, - required String signedMessage, - String? executionOptions}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(signedMessage); - var arg2 = cst_encode_opt_String(executionOptions); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_fees( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedNtDecodeTransactionEvents({ + required String transaction, + required String contractAbi, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(transaction); + var arg1 = cst_encode_String(contractAbi); + return wire.wire__crate__api__merged__nt_decode_transaction_events( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtDecodeTransactionEventsConstMeta, + argValues: [transaction, contractAbi], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperEstimateFeesConstMeta, - argValues: [that, signedMessage, executionOptions], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperEstimateFeesConstMeta => + TaskConstMeta get kCrateApiMergedNtDecodeTransactionEventsConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_estimate_fees", - argNames: ["that", "signedMessage", "executionOptions"], + debugName: "nt_decode_transaction_events", + argNames: ["transaction", "contractAbi"], ); @override - Future crateApiMergedTonWalletDartWrapperFindExistingWallets( - {required ArcTransportBoxTrait transport, - required String publicKey, - required int workchainId, - required String walletTypes}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - var arg1 = cst_encode_String(publicKey); - var arg2 = cst_encode_i_8(workchainId); - var arg3 = cst_encode_String(walletTypes); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedTonWalletDartWrapperFindExistingWalletsConstMeta, - argValues: [transport, publicKey, workchainId, walletTypes], - apiImpl: this, - )); + String crateApiMergedNtDeriveFromPhrase({ + required String phrase, + required MnemonicType mnemonicType, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(phrase); + var arg1 = cst_encode_box_autoadd_mnemonic_type(mnemonicType); + return wire.wire__crate__api__merged__nt_derive_from_phrase( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtDeriveFromPhraseConstMeta, + argValues: [phrase, mnemonicType], + apiImpl: this, + ), + ); } - TaskConstMeta - get kCrateApiMergedTonWalletDartWrapperFindExistingWalletsConstMeta => - const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_find_existing_wallets", - argNames: ["transport", "publicKey", "workchainId", "walletTypes"], - ); + TaskConstMeta get kCrateApiMergedNtDeriveFromPhraseConstMeta => + const TaskConstMeta( + debugName: "nt_derive_from_phrase", + argNames: ["phrase", "mnemonicType"], + ); @override - Future> crateApiMergedTonWalletDartWrapperGetCustodians( - {required ArcTransportBoxTrait transport, required String address}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - var arg1 = cst_encode_String(address); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_String, - decodeErrorData: dco_decode_AnyhowException, + String crateApiMergedNtEncodeComment({ + required String comment, + required bool plain, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(comment); + var arg1 = cst_encode_bool(plain); + return wire.wire__crate__api__merged__nt_encode_comment(arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtEncodeCommentConstMeta, + argValues: [comment, plain], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperGetCustodiansConstMeta, - argValues: [transport, address], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperGetCustodiansConstMeta => + TaskConstMeta get kCrateApiMergedNtEncodeCommentConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_get_custodians", - argNames: ["transport", "address"], + debugName: "nt_encode_comment", + argNames: ["comment", "plain"], ); @override - Future crateApiMergedTonWalletDartWrapperGetExistingWalletInfo( - {required ArcTransportBoxTrait transport, required String address}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - var arg1 = cst_encode_String(address); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedNtEncodeInternalInput({ + required String contractAbi, + required String method, + required String input, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(contractAbi); + var arg1 = cst_encode_String(method); + var arg2 = cst_encode_String(input); + return wire.wire__crate__api__merged__nt_encode_internal_input( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtEncodeInternalInputConstMeta, + argValues: [contractAbi, method, input], + apiImpl: this, ), - constMeta: - kCrateApiMergedTonWalletDartWrapperGetExistingWalletInfoConstMeta, - argValues: [transport, address], - apiImpl: this, - )); + ); } - TaskConstMeta - get kCrateApiMergedTonWalletDartWrapperGetExistingWalletInfoConstMeta => - const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_get_existing_wallet_info", - argNames: ["transport", "address"], - ); + TaskConstMeta get kCrateApiMergedNtEncodeInternalInputConstMeta => + const TaskConstMeta( + debugName: "nt_encode_internal_input", + argNames: ["contractAbi", "method", "input"], + ); @override - Future crateApiMergedTonWalletDartWrapperGetWalletV5R1Seqno( - {required TonWalletDartWrapper that, - required String rawCurrentState, - required String publicKey}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(rawCurrentState); - var arg2 = cst_encode_String(publicKey); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_u_32, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedTonWalletDartWrapperGetWalletV5R1SeqnoConstMeta, - argValues: [that, rawCurrentState, publicKey], - apiImpl: this, - )); - } - - TaskConstMeta - get kCrateApiMergedTonWalletDartWrapperGetWalletV5R1SeqnoConstMeta => - const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_get_wallet_v5r1_seqno", - argNames: ["that", "rawCurrentState", "publicKey"], + Future crateApiMergedNtEncodeInternalMessage({ + String? src, + required String dst, + required bool bounce, + String? stateInit, + String? body, + required String amount, + bool? bounced, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_opt_String(src); + var arg1 = cst_encode_String(dst); + var arg2 = cst_encode_bool(bounce); + var arg3 = cst_encode_opt_String(stateInit); + var arg4 = cst_encode_opt_String(body); + var arg5 = cst_encode_String(amount); + var arg6 = cst_encode_opt_box_autoadd_bool(bounced); + return wire.wire__crate__api__merged__nt_encode_internal_message( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, ); - - @override - Future crateApiMergedTonWalletDartWrapperHandleBlock( - {required TonWalletDartWrapper that, required String block}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(block); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_handle_block( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtEncodeInternalMessageConstMeta, + argValues: [src, dst, bounce, stateInit, body, amount, bounced], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperHandleBlockConstMeta, - argValues: [that, block], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperHandleBlockConstMeta => + TaskConstMeta get kCrateApiMergedNtEncodeInternalMessageConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_handle_block", - argNames: ["that", "block"], + debugName: "nt_encode_internal_message", + argNames: [ + "src", + "dst", + "bounce", + "stateInit", + "body", + "amount", + "bounced", + ], ); @override - Future crateApiMergedTonWalletDartWrapperMakeStateInit( - {required TonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future> crateApiMergedNtExecuteLocal({ + required String config, + required String account, + required String message, + required int utime, + required bool disableSignatureCheck, + String? overwriteBalance, + int? globalId, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(config); + var arg1 = cst_encode_String(account); + var arg2 = cst_encode_String(message); + var arg3 = cst_encode_u_32(utime); + var arg4 = cst_encode_bool(disableSignatureCheck); + var arg5 = cst_encode_opt_String(overwriteBalance); + var arg6 = cst_encode_opt_box_autoadd_i_32(globalId); + return wire.wire__crate__api__merged__nt_execute_local( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtExecuteLocalConstMeta, + argValues: [ + config, + account, + message, + utime, + disableSignatureCheck, + overwriteBalance, + globalId, + ], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperMakeStateInitConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperMakeStateInitConstMeta => + TaskConstMeta get kCrateApiMergedNtExecuteLocalConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_make_state_init", - argNames: ["that"], + debugName: "nt_execute_local", + argNames: [ + "config", + "account", + "message", + "utime", + "disableSignatureCheck", + "overwriteBalance", + "globalId", + ], ); @override - Future crateApiMergedTonWalletDartWrapperPendingTransactions( - {required TonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + String crateApiMergedNtExtractPublicKey({required String boc}) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(boc); + return wire.wire__crate__api__merged__nt_extract_public_key(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtExtractPublicKeyConstMeta, + argValues: [boc], + apiImpl: this, ), - constMeta: - kCrateApiMergedTonWalletDartWrapperPendingTransactionsConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta - get kCrateApiMergedTonWalletDartWrapperPendingTransactionsConstMeta => - const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_pending_transactions", - argNames: ["that"], - ); + TaskConstMeta get kCrateApiMergedNtExtractPublicKeyConstMeta => + const TaskConstMeta( + debugName: "nt_extract_public_key", + argNames: ["boc"], + ); @override - Future crateApiMergedTonWalletDartWrapperPollingMethod( - {required TonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_polling_method, - decodeErrorData: null, + GeneratedKeyG crateApiMergedNtGenerateKey({ + required MnemonicType accountType, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_mnemonic_type(accountType); + return wire.wire__crate__api__merged__nt_generate_key(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_generated_key_g, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedNtGenerateKeyConstMeta, + argValues: [accountType], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperPollingMethodConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperPollingMethodConstMeta => + TaskConstMeta get kCrateApiMergedNtGenerateKeyConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_polling_method", - argNames: ["that"], + debugName: "nt_generate_key", + argNames: ["accountType"], ); @override - Future crateApiMergedTonWalletDartWrapperPreloadTransactions( - {required TonWalletDartWrapper that, required String fromLt}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(fromLt); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, + String crateApiMergedNtGetBocHash({required String boc}) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(boc); + return wire.wire__crate__api__merged__nt_get_boc_hash(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtGetBocHashConstMeta, + argValues: [boc], + apiImpl: this, ), - constMeta: - kCrateApiMergedTonWalletDartWrapperPreloadTransactionsConstMeta, - argValues: [that, fromLt], - apiImpl: this, - )); + ); } - TaskConstMeta - get kCrateApiMergedTonWalletDartWrapperPreloadTransactionsConstMeta => - const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_preload_transactions", - argNames: ["that", "fromLt"], - ); + TaskConstMeta get kCrateApiMergedNtGetBocHashConstMeta => + const TaskConstMeta(debugName: "nt_get_boc_hash", argNames: ["boc"]); @override - Future - crateApiMergedTonWalletDartWrapperPrepareConfirmTransaction( - {required TonWalletDartWrapper that, - required String contractState, - required String publicKey, - required String transactionId, - required String expiration}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(contractState); - var arg2 = cst_encode_String(publicKey); - var arg3 = cst_encode_String(transactionId); - var arg4 = cst_encode_String(expiration); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction( - port_, arg0, arg1, arg2, arg3, arg4); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unsigned_message_impl, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedTonWalletDartWrapperPrepareConfirmTransactionConstMeta, - argValues: [that, contractState, publicKey, transactionId, expiration], - apiImpl: this, - )); + String? crateApiMergedNtGetCodeSalt({required String code}) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(code); + return wire.wire__crate__api__merged__nt_get_code_salt(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtGetCodeSaltConstMeta, + argValues: [code], + apiImpl: this, + ), + ); } - TaskConstMeta - get kCrateApiMergedTonWalletDartWrapperPrepareConfirmTransactionConstMeta => - const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_prepare_confirm_transaction", - argNames: [ - "that", - "contractState", - "publicKey", - "transactionId", - "expiration" - ], - ); + TaskConstMeta get kCrateApiMergedNtGetCodeSaltConstMeta => + const TaskConstMeta(debugName: "nt_get_code_salt", argNames: ["code"]); @override - Future crateApiMergedTonWalletDartWrapperPrepareDeploy( - {required TonWalletDartWrapper that, required String expiration}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(expiration); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unsigned_message_impl, - decodeErrorData: dco_decode_AnyhowException, + int crateApiMergedNtGetContractTypeNumber({required String walletType}) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(walletType); + return wire.wire__crate__api__merged__nt_get_contract_type_number( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_u_16, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtGetContractTypeNumberConstMeta, + argValues: [walletType], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperPrepareDeployConstMeta, - argValues: [that, expiration], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperPrepareDeployConstMeta => + TaskConstMeta get kCrateApiMergedNtGetContractTypeNumberConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_prepare_deploy", - argNames: ["that", "expiration"], + debugName: "nt_get_contract_type_number", + argNames: ["walletType"], ); @override - Future - crateApiMergedTonWalletDartWrapperPrepareDeployWithMultipleOwners( - {required TonWalletDartWrapper that, - required String expiration, - required List custodians, - required int reqConfirms, - int? expirationTime}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(expiration); - var arg2 = cst_encode_list_String(custodians); - var arg3 = cst_encode_u_8(reqConfirms); - var arg4 = cst_encode_opt_box_autoadd_u_32(expirationTime); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners( - port_, arg0, arg1, arg2, arg3, arg4); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unsigned_message_impl, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedTonWalletDartWrapperPrepareDeployWithMultipleOwnersConstMeta, - argValues: [that, expiration, custodians, reqConfirms, expirationTime], - apiImpl: this, - )); + Future> crateApiMergedNtGetExpectedAddress({ + required String tvc, + required String contractAbi, + required int workchainId, + String? publicKey, + required String initData, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(tvc); + var arg1 = cst_encode_String(contractAbi); + var arg2 = cst_encode_i_8(workchainId); + var arg3 = cst_encode_opt_String(publicKey); + var arg4 = cst_encode_String(initData); + return wire.wire__crate__api__merged__nt_get_expected_address( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtGetExpectedAddressConstMeta, + argValues: [tvc, contractAbi, workchainId, publicKey, initData], + apiImpl: this, + ), + ); } - TaskConstMeta - get kCrateApiMergedTonWalletDartWrapperPrepareDeployWithMultipleOwnersConstMeta => - const TaskConstMeta( - debugName: - "ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners", - argNames: [ - "that", - "expiration", - "custodians", - "reqConfirms", - "expirationTime" - ], - ); + TaskConstMeta get kCrateApiMergedNtGetExpectedAddressConstMeta => + const TaskConstMeta( + debugName: "nt_get_expected_address", + argNames: [ + "tvc", + "contractAbi", + "workchainId", + "publicKey", + "initData", + ], + ); @override - Future<(String, String)> - crateApiMergedTonWalletDartWrapperPrepareNonexistWalletV5R1MessageBody( - {required TonWalletDartWrapper that, - required String expiration, - required String params, - required bool isInternalFlow}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(expiration); - var arg2 = cst_encode_String(params); - var arg3 = cst_encode_bool(isInternalFlow); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_record_string_string, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedTonWalletDartWrapperPrepareNonexistWalletV5R1MessageBodyConstMeta, - argValues: [that, expiration, params, isInternalFlow], - apiImpl: this, - )); + List crateApiMergedNtGetHints({required String input}) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(input); + return wire.wire__crate__api__merged__nt_get_hints(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedNtGetHintsConstMeta, + argValues: [input], + apiImpl: this, + ), + ); } - TaskConstMeta - get kCrateApiMergedTonWalletDartWrapperPrepareNonexistWalletV5R1MessageBodyConstMeta => - const TaskConstMeta( - debugName: - "ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body", - argNames: ["that", "expiration", "params", "isInternalFlow"], - ); + TaskConstMeta get kCrateApiMergedNtGetHintsConstMeta => + const TaskConstMeta(debugName: "nt_get_hints", argNames: ["input"]); @override - Future crateApiMergedTonWalletDartWrapperPrepareTransfer( - {required TonWalletDartWrapper that, - required String contractState, - required String publicKey, - required String expiration, - required String params}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(contractState); - var arg2 = cst_encode_String(publicKey); - var arg3 = cst_encode_String(expiration); - var arg4 = cst_encode_String(params); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer( - port_, arg0, arg1, arg2, arg3, arg4); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unsigned_message_impl, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedTonWalletDartWrapperPrepareTransferConstMeta, - argValues: [that, contractState, publicKey, expiration, params], - apiImpl: this, - )); + Future crateApiMergedNtMakeFullAccountBoc({String? accountStuffBoc}) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_opt_String(accountStuffBoc); + return wire.wire__crate__api__merged__nt_make_full_account_boc( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtMakeFullAccountBocConstMeta, + argValues: [accountStuffBoc], + apiImpl: this, + ), + ); } - TaskConstMeta - get kCrateApiMergedTonWalletDartWrapperPrepareTransferConstMeta => - const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_prepare_transfer", - argNames: [ - "that", - "contractState", - "publicKey", - "expiration", - "params" - ], - ); + TaskConstMeta get kCrateApiMergedNtMakeFullAccountBocConstMeta => + const TaskConstMeta( + debugName: "nt_make_full_account_boc", + argNames: ["accountStuffBoc"], + ); @override - Future<(String, String)> - crateApiMergedTonWalletDartWrapperPrepareWalletV5R1MessageBody( - {required TonWalletDartWrapper that, - required String contractState, - required String publicKey, - required String expiration, - required String params, - required bool isInternalFlow}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(contractState); - var arg2 = cst_encode_String(publicKey); - var arg3 = cst_encode_String(expiration); - var arg4 = cst_encode_String(params); - var arg5 = cst_encode_bool(isInternalFlow); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body( - port_, arg0, arg1, arg2, arg3, arg4, arg5); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_record_string_string, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedTonWalletDartWrapperPrepareWalletV5R1MessageBodyConstMeta, - argValues: [ - that, - contractState, - publicKey, - expiration, - params, - isInternalFlow - ], - apiImpl: this, - )); + List crateApiMergedNtMergeTvc({ + required String code, + required String data, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(code); + var arg1 = cst_encode_String(data); + return wire.wire__crate__api__merged__nt_merge_tvc(arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtMergeTvcConstMeta, + argValues: [code, data], + apiImpl: this, + ), + ); } - TaskConstMeta - get kCrateApiMergedTonWalletDartWrapperPrepareWalletV5R1MessageBodyConstMeta => - const TaskConstMeta( - debugName: - "ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body", - argNames: [ - "that", - "contractState", - "publicKey", - "expiration", - "params", - "isInternalFlow" - ], - ); + TaskConstMeta get kCrateApiMergedNtMergeTvcConstMeta => const TaskConstMeta( + debugName: "nt_merge_tvc", + argNames: ["code", "data"], + ); @override - Future crateApiMergedTonWalletDartWrapperPublicKey( - {required TonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_public_key( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + String crateApiMergedNtPackAddress({ + required String address, + required bool isUrlSafe, + required bool bounceable, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(address); + var arg1 = cst_encode_bool(isUrlSafe); + var arg2 = cst_encode_bool(bounceable); + return wire.wire__crate__api__merged__nt_pack_address( + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedNtPackAddressConstMeta, + argValues: [address, isUrlSafe, bounceable], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperPublicKeyConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperPublicKeyConstMeta => + TaskConstMeta get kCrateApiMergedNtPackAddressConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_public_key", - argNames: ["that"], + debugName: "nt_pack_address", + argNames: ["address", "isUrlSafe", "bounceable"], ); @override - Future crateApiMergedTonWalletDartWrapperRefresh( - {required TonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - return wire.wire__crate__api__merged__ton_wallet_dart_wrapper_refresh( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, + List crateApiMergedNtPackIntoCell({ + required String params, + required String tokens, + String? version, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(params); + var arg1 = cst_encode_String(tokens); + var arg2 = cst_encode_opt_String(version); + return wire.wire__crate__api__merged__nt_pack_into_cell( + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtPackIntoCellConstMeta, + argValues: [params, tokens, version], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperRefreshConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperRefreshConstMeta => + TaskConstMeta get kCrateApiMergedNtPackIntoCellConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_refresh", - argNames: ["that"], + debugName: "nt_pack_into_cell", + argNames: ["params", "tokens", "version"], ); @override - Future crateApiMergedTonWalletDartWrapperSend( - {required TonWalletDartWrapper that, required String signedMessage}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - var arg1 = cst_encode_String(signedMessage); - return wire.wire__crate__api__merged__ton_wallet_dart_wrapper_send( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + String crateApiMergedNtPackStdSmcAddr({ + required String addr, + required bool base64Url, + required bool bounceable, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(addr); + var arg1 = cst_encode_bool(base64Url); + var arg2 = cst_encode_bool(bounceable); + return wire.wire__crate__api__merged__nt_pack_std_smc_addr( + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtPackStdSmcAddrConstMeta, + argValues: [addr, base64Url, bounceable], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperSendConstMeta, - argValues: [that, signedMessage], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperSendConstMeta => + TaskConstMeta get kCrateApiMergedNtPackStdSmcAddrConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_send", - argNames: ["that", "signedMessage"], + debugName: "nt_pack_std_smc_addr", + argNames: ["addr", "base64Url", "bounceable"], ); @override - Future crateApiMergedTonWalletDartWrapperSubscribe( - {required String instanceHash, - required int workchainId, - required String publicKey, - required String walletType, - required ArcTransportBoxTrait transport}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(instanceHash); - var arg1 = cst_encode_i_8(workchainId); - var arg2 = cst_encode_String(publicKey); - var arg3 = cst_encode_String(walletType); - var arg4 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - return wire.wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe( - port_, arg0, arg1, arg2, arg3, arg4); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_ton_wallet_dart_wrapper, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedTonWalletDartWrapperSubscribeConstMeta, - argValues: [instanceHash, workchainId, publicKey, walletType, transport], - apiImpl: this, - )); + Future crateApiMergedNtParseFullAccountBoc({ + required String account, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(account); + return wire.wire__crate__api__merged__nt_parse_full_account_boc( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtParseFullAccountBocConstMeta, + argValues: [account], + apiImpl: this, + ), + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperSubscribeConstMeta => + TaskConstMeta get kCrateApiMergedNtParseFullAccountBocConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_subscribe", - argNames: [ - "instanceHash", - "workchainId", - "publicKey", - "walletType", - "transport" - ], + debugName: "nt_parse_full_account_boc", + argNames: ["account"], ); @override - Future - crateApiMergedTonWalletDartWrapperSubscribeByAddress( - {required String instanceHash, - required String address, - required ArcTransportBoxTrait transport}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(instanceHash); - var arg1 = cst_encode_String(address); - var arg2 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_ton_wallet_dart_wrapper, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateApiMergedTonWalletDartWrapperSubscribeByAddressConstMeta, - argValues: [instanceHash, address, transport], - apiImpl: this, - )); + String? crateApiMergedNtParseKnownPayload({required String payload}) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(payload); + return wire.wire__crate__api__merged__nt_parse_known_payload(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedNtParseKnownPayloadConstMeta, + argValues: [payload], + apiImpl: this, + ), + ); } - TaskConstMeta - get kCrateApiMergedTonWalletDartWrapperSubscribeByAddressConstMeta => - const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_subscribe_by_address", - argNames: ["instanceHash", "address", "transport"], - ); + TaskConstMeta get kCrateApiMergedNtParseKnownPayloadConstMeta => + const TaskConstMeta( + debugName: "nt_parse_known_payload", + argNames: ["payload"], + ); @override - Future - crateApiMergedTonWalletDartWrapperSubscribeByExisting( - {required String instanceHash, - required String existingWallet, - required ArcTransportBoxTrait transport}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(instanceHash); - var arg1 = cst_encode_String(existingWallet); - var arg2 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_ton_wallet_dart_wrapper, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: - kCrateApiMergedTonWalletDartWrapperSubscribeByExistingConstMeta, - argValues: [instanceHash, existingWallet, transport], - apiImpl: this, - )); + String crateApiMergedNtRepackAddress({required String address}) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(address); + return wire.wire__crate__api__merged__nt_repack_address(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedNtRepackAddressConstMeta, + argValues: [address], + apiImpl: this, + ), + ); } - TaskConstMeta - get kCrateApiMergedTonWalletDartWrapperSubscribeByExistingConstMeta => - const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_subscribe_by_existing", - argNames: ["instanceHash", "existingWallet", "transport"], - ); + TaskConstMeta get kCrateApiMergedNtRepackAddressConstMeta => + const TaskConstMeta( + debugName: "nt_repack_address", + argNames: ["address"], + ); @override - Future crateApiMergedTonWalletDartWrapperUnconfirmedTransactions( - {required TonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedNtRunGetter({ + required String accountStuffBoc, + required String contractAbi, + required String methodId, + required String input, + required Map libraries, + int? signatureId, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(accountStuffBoc); + var arg1 = cst_encode_String(contractAbi); + var arg2 = cst_encode_String(methodId); + var arg3 = cst_encode_String(input); + var arg4 = cst_encode_Map_String_String_None(libraries); + var arg5 = cst_encode_opt_box_autoadd_i_32(signatureId); + return wire.wire__crate__api__merged__nt_run_getter( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtRunGetterConstMeta, + argValues: [ + accountStuffBoc, + contractAbi, + methodId, + input, + libraries, + signatureId, + ], + apiImpl: this, ), - constMeta: - kCrateApiMergedTonWalletDartWrapperUnconfirmedTransactionsConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta - get kCrateApiMergedTonWalletDartWrapperUnconfirmedTransactionsConstMeta => - const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_unconfirmed_transactions", - argNames: ["that"], - ); + TaskConstMeta get kCrateApiMergedNtRunGetterConstMeta => const TaskConstMeta( + debugName: "nt_run_getter", + argNames: [ + "accountStuffBoc", + "contractAbi", + "methodId", + "input", + "libraries", + "signatureId", + ], + ); @override - Future crateApiMergedTonWalletDartWrapperWalletType( - {required TonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - return wire - .wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_type( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiMergedNtRunLocal({ + required String accountStuffBoc, + required String contractAbi, + required String methodId, + required String input, + required bool responsible, + required Map libraries, + int? signatureId, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(accountStuffBoc); + var arg1 = cst_encode_String(contractAbi); + var arg2 = cst_encode_String(methodId); + var arg3 = cst_encode_String(input); + var arg4 = cst_encode_bool(responsible); + var arg5 = cst_encode_Map_String_String_None(libraries); + var arg6 = cst_encode_opt_box_autoadd_i_32(signatureId); + return wire.wire__crate__api__merged__nt_run_local( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtRunLocalConstMeta, + argValues: [ + accountStuffBoc, + contractAbi, + methodId, + input, + responsible, + libraries, + signatureId, + ], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperWalletTypeConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperWalletTypeConstMeta => - const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_wallet_type", - argNames: ["that"], - ); + TaskConstMeta get kCrateApiMergedNtRunLocalConstMeta => const TaskConstMeta( + debugName: "nt_run_local", + argNames: [ + "accountStuffBoc", + "contractAbi", + "methodId", + "input", + "responsible", + "libraries", + "signatureId", + ], + ); @override - Future crateApiMergedTonWalletDartWrapperWorkchain( - {required TonWalletDartWrapper that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); - return wire.wire__crate__api__merged__ton_wallet_dart_wrapper_workchain( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_i_8, - decodeErrorData: null, + Future crateApiMergedNtRunLocalWithLibs({ + required ArcTransportBoxTrait transport, + required String accountStuffBoc, + required String contractAbi, + required String methodId, + required String input, + required bool responsible, + required Map libraries, + required int retryCount, + int? signatureId, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg1 = cst_encode_String(accountStuffBoc); + var arg2 = cst_encode_String(contractAbi); + var arg3 = cst_encode_String(methodId); + var arg4 = cst_encode_String(input); + var arg5 = cst_encode_bool(responsible); + var arg6 = cst_encode_Map_String_String_None(libraries); + var arg7 = cst_encode_u_8(retryCount); + var arg8 = cst_encode_opt_box_autoadd_i_32(signatureId); + return wire.wire__crate__api__merged__nt_run_local_with_libs( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + arg7, + arg8, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtRunLocalWithLibsConstMeta, + argValues: [ + transport, + accountStuffBoc, + contractAbi, + methodId, + input, + responsible, + libraries, + retryCount, + signatureId, + ], + apiImpl: this, ), - constMeta: kCrateApiMergedTonWalletDartWrapperWorkchainConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedTonWalletDartWrapperWorkchainConstMeta => + TaskConstMeta get kCrateApiMergedNtRunLocalWithLibsConstMeta => const TaskConstMeta( - debugName: "ton_wallet_dart_wrapper_workchain", - argNames: ["that"], + debugName: "nt_run_local_with_libs", + argNames: [ + "transport", + "accountStuffBoc", + "contractAbi", + "methodId", + "input", + "responsible", + "libraries", + "retryCount", + "signatureId", + ], ); @override - Future crateApiMergedUnsignedMessageImplExpireAt( - {required UnsignedMessageImpl that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_unsigned_message_impl(that); - return wire.wire__crate__api__merged__unsigned_message_impl_expire_at( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_u_32, - decodeErrorData: null, + List crateApiMergedNtSetCodeSalt({ + required String code, + required String salt, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(code); + var arg1 = cst_encode_String(salt); + return wire.wire__crate__api__merged__nt_set_code_salt(arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtSetCodeSaltConstMeta, + argValues: [code, salt], + apiImpl: this, ), - constMeta: kCrateApiMergedUnsignedMessageImplExpireAtConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedUnsignedMessageImplExpireAtConstMeta => + TaskConstMeta get kCrateApiMergedNtSetCodeSaltConstMeta => const TaskConstMeta( - debugName: "unsigned_message_impl_expire_at", - argNames: ["that"], + debugName: "nt_set_code_salt", + argNames: ["code", "salt"], ); @override - Future crateApiMergedUnsignedMessageImplHash( - {required UnsignedMessageImpl that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_unsigned_message_impl(that); - return wire.wire__crate__api__merged__unsigned_message_impl_hash( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + List crateApiMergedNtSplitTvc({required String tvc}) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(tvc); + return wire.wire__crate__api__merged__nt_split_tvc(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtSplitTvcConstMeta, + argValues: [tvc], + apiImpl: this, ), - constMeta: kCrateApiMergedUnsignedMessageImplHashConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedUnsignedMessageImplHashConstMeta => - const TaskConstMeta( - debugName: "unsigned_message_impl_hash", - argNames: ["that"], - ); + TaskConstMeta get kCrateApiMergedNtSplitTvcConstMeta => + const TaskConstMeta(debugName: "nt_split_tvc", argNames: ["tvc"]); @override - Future crateApiMergedUnsignedMessageImplRefreshTimeout( - {required UnsignedMessageImpl that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_unsigned_message_impl(that); - return wire - .wire__crate__api__merged__unsigned_message_impl_refresh_timeout( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unsigned_message_impl, - decodeErrorData: null, + Future crateApiMergedNtUnpackContractFields({ + required String contractAbi, + required String boc, + required bool allowPartial, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(contractAbi); + var arg1 = cst_encode_String(boc); + var arg2 = cst_encode_bool(allowPartial); + return wire.wire__crate__api__merged__nt_unpack_contract_fields( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtUnpackContractFieldsConstMeta, + argValues: [contractAbi, boc, allowPartial], + apiImpl: this, ), - constMeta: kCrateApiMergedUnsignedMessageImplRefreshTimeoutConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedUnsignedMessageImplRefreshTimeoutConstMeta => + TaskConstMeta get kCrateApiMergedNtUnpackContractFieldsConstMeta => const TaskConstMeta( - debugName: "unsigned_message_impl_refresh_timeout", - argNames: ["that"], + debugName: "nt_unpack_contract_fields", + argNames: ["contractAbi", "boc", "allowPartial"], ); @override - Future crateApiMergedUnsignedMessageImplSign( - {required UnsignedMessageImpl that, required String signature}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_unsigned_message_impl(that); - var arg1 = cst_encode_String(signature); - return wire.wire__crate__api__merged__unsigned_message_impl_sign( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + String crateApiMergedNtUnpackFromCell({ + required String params, + required String boc, + required bool allowPartial, + String? version, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(params); + var arg1 = cst_encode_String(boc); + var arg2 = cst_encode_bool(allowPartial); + var arg3 = cst_encode_opt_String(version); + return wire.wire__crate__api__merged__nt_unpack_from_cell( + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtUnpackFromCellConstMeta, + argValues: [params, boc, allowPartial, version], + apiImpl: this, ), - constMeta: kCrateApiMergedUnsignedMessageImplSignConstMeta, - argValues: [that, signature], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedUnsignedMessageImplSignConstMeta => + TaskConstMeta get kCrateApiMergedNtUnpackFromCellConstMeta => const TaskConstMeta( - debugName: "unsigned_message_impl_sign", - argNames: ["that", "signature"], + debugName: "nt_unpack_from_cell", + argNames: ["params", "boc", "allowPartial", "version"], ); @override - Future crateApiMergedUnsignedMessageImplSignFake( - {required UnsignedMessageImpl that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_unsigned_message_impl(that); - return wire.wire__crate__api__merged__unsigned_message_impl_sign_fake( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_AnyhowException, + Future> crateApiMergedNtUnpackInitData({ + required String contractAbi, + required String data, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(contractAbi); + var arg1 = cst_encode_String(data); + return wire.wire__crate__api__merged__nt_unpack_init_data( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtUnpackInitDataConstMeta, + argValues: [contractAbi, data], + apiImpl: this, ), - constMeta: kCrateApiMergedUnsignedMessageImplSignFakeConstMeta, - argValues: [that], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiMergedUnsignedMessageImplSignFakeConstMeta => + TaskConstMeta get kCrateApiMergedNtUnpackInitDataConstMeta => const TaskConstMeta( - debugName: "unsigned_message_impl_sign_fake", + debugName: "nt_unpack_init_data", + argNames: ["contractAbi", "data"], + ); + + @override + String crateApiMergedNtUnpackStdSmcAddr({ + required String packed, + required bool base64Url, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(packed); + var arg1 = cst_encode_bool(base64Url); + return wire.wire__crate__api__merged__nt_unpack_std_smc_addr( + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtUnpackStdSmcAddrConstMeta, + argValues: [packed, base64Url], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedNtUnpackStdSmcAddrConstMeta => + const TaskConstMeta( + debugName: "nt_unpack_std_smc_addr", + argNames: ["packed", "base64Url"], + ); + + @override + bool crateApiMergedNtValidateAddress({required String address}) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_String(address); + return wire.wire__crate__api__merged__nt_validate_address(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedNtValidateAddressConstMeta, + argValues: [address], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedNtValidateAddressConstMeta => + const TaskConstMeta( + debugName: "nt_validate_address", + argNames: ["address"], + ); + + @override + Future crateApiMergedNtVerifySignature({ + required String publicKey, + required String data, + required String signature, + int? signatureId, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(publicKey); + var arg1 = cst_encode_String(data); + var arg2 = cst_encode_String(signature); + var arg3 = cst_encode_opt_box_autoadd_i_32(signatureId); + return wire.wire__crate__api__merged__nt_verify_signature( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedNtVerifySignatureConstMeta, + argValues: [publicKey, data, signature, signatureId], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedNtVerifySignatureConstMeta => + const TaskConstMeta( + debugName: "nt_verify_signature", + argNames: ["publicKey", "data", "signature", "signatureId"], + ); + + @override + ProtoConnectionDartWrapper crateApiMergedProtoConnectionDartWrapperNew({ + required FutureOr Function(Uint8List) onPost, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_DartFn_Inputs_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + onPost, + ); + return wire + .wire__crate__api__merged__proto_connection_dart_wrapper_new( + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_proto_connection_dart_wrapper, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedProtoConnectionDartWrapperNewConstMeta, + argValues: [onPost], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedProtoConnectionDartWrapperNewConstMeta => + const TaskConstMeta( + debugName: "proto_connection_dart_wrapper_new", + argNames: ["onPost"], + ); + + @override + Future crateApiMergedProtoTransportImplGetAccountsByCodeHash({ + required ProtoTransportImpl that, + required String codeHash, + required int limit, + String? continuation, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); + var arg1 = cst_encode_String(codeHash); + var arg2 = cst_encode_u_8(limit); + var arg3 = cst_encode_opt_String(continuation); + return wire + .wire__crate__api__merged__proto_transport_impl_get_accounts_by_code_hash( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedProtoTransportImplGetAccountsByCodeHashConstMeta, + argValues: [that, codeHash, limit, continuation], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedProtoTransportImplGetAccountsByCodeHashConstMeta => + const TaskConstMeta( + debugName: "proto_transport_impl_get_accounts_by_code_hash", + argNames: ["that", "codeHash", "limit", "continuation"], + ); + + @override + Future crateApiMergedProtoTransportImplGetBlockchainConfig({ + required ProtoTransportImpl that, + required bool force, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); + var arg1 = cst_encode_bool(force); + return wire + .wire__crate__api__merged__proto_transport_impl_get_blockchain_config( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedProtoTransportImplGetBlockchainConfigConstMeta, + argValues: [that, force], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedProtoTransportImplGetBlockchainConfigConstMeta => + const TaskConstMeta( + debugName: "proto_transport_impl_get_blockchain_config", + argNames: ["that", "force"], + ); + + @override + Future crateApiMergedProtoTransportImplGetContractState({ + required ProtoTransportImpl that, + required String address, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); + var arg1 = cst_encode_String(address); + return wire + .wire__crate__api__merged__proto_transport_impl_get_contract_state( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedProtoTransportImplGetContractStateConstMeta, + argValues: [that, address], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedProtoTransportImplGetContractStateConstMeta => + const TaskConstMeta( + debugName: "proto_transport_impl_get_contract_state", + argNames: ["that", "address"], + ); + + @override + Future crateApiMergedProtoTransportImplGetDstTransaction({ + required ProtoTransportImpl that, + required String messageHash, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); + var arg1 = cst_encode_String(messageHash); + return wire + .wire__crate__api__merged__proto_transport_impl_get_dst_transaction( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedProtoTransportImplGetDstTransactionConstMeta, + argValues: [that, messageHash], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedProtoTransportImplGetDstTransactionConstMeta => + const TaskConstMeta( + debugName: "proto_transport_impl_get_dst_transaction", + argNames: ["that", "messageHash"], + ); + + @override + Future crateApiMergedProtoTransportImplGetFeeFactors({ + required ProtoTransportImpl that, + required bool isMasterchain, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); + var arg1 = cst_encode_bool(isMasterchain); + return wire + .wire__crate__api__merged__proto_transport_impl_get_fee_factors( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedProtoTransportImplGetFeeFactorsConstMeta, + argValues: [that, isMasterchain], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedProtoTransportImplGetFeeFactorsConstMeta => + const TaskConstMeta( + debugName: "proto_transport_impl_get_fee_factors", + argNames: ["that", "isMasterchain"], + ); + + @override + Future crateApiMergedProtoTransportImplGetFullContractState({ + required ProtoTransportImpl that, + required String address, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); + var arg1 = cst_encode_String(address); + return wire + .wire__crate__api__merged__proto_transport_impl_get_full_contract_state( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedProtoTransportImplGetFullContractStateConstMeta, + argValues: [that, address], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedProtoTransportImplGetFullContractStateConstMeta => + const TaskConstMeta( + debugName: "proto_transport_impl_get_full_contract_state", + argNames: ["that", "address"], + ); + + @override + Future crateApiMergedProtoTransportImplGetNetworkId({ + required ProtoTransportImpl that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); + return wire + .wire__crate__api__merged__proto_transport_impl_get_network_id( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_i_32, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedProtoTransportImplGetNetworkIdConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedProtoTransportImplGetNetworkIdConstMeta => + const TaskConstMeta( + debugName: "proto_transport_impl_get_network_id", argNames: ["that"], ); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcAccountsStorageBoxTrait => wire - .rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait; + @override + Future crateApiMergedProtoTransportImplGetSignatureId({ + required ProtoTransportImpl that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); + return wire + .wire__crate__api__merged__proto_transport_impl_get_signature_id( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_i_32, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedProtoTransportImplGetSignatureIdConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcAccountsStorageBoxTrait => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait; + TaskConstMeta get kCrateApiMergedProtoTransportImplGetSignatureIdConstMeta => + const TaskConstMeta( + debugName: "proto_transport_impl_get_signature_id", + argNames: ["that"], + ); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcGenericContractBoxTrait => wire - .rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait; + @override + Future crateApiMergedProtoTransportImplGetTransaction({ + required ProtoTransportImpl that, + required String hash, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); + var arg1 = cst_encode_String(hash); + return wire + .wire__crate__api__merged__proto_transport_impl_get_transaction( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedProtoTransportImplGetTransactionConstMeta, + argValues: [that, hash], + apiImpl: this, + ), + ); + } - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcGenericContractBoxTrait => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait; + TaskConstMeta get kCrateApiMergedProtoTransportImplGetTransactionConstMeta => + const TaskConstMeta( + debugName: "proto_transport_impl_get_transaction", + argNames: ["that", "hash"], + ); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcGqlConnectionBoxTrait => wire - .rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait; + @override + Future crateApiMergedProtoTransportImplGetTransactions({ + required ProtoTransportImpl that, + required String address, + String? fromLt, + required int count, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); + var arg1 = cst_encode_String(address); + var arg2 = cst_encode_opt_String(fromLt); + var arg3 = cst_encode_u_8(count); + return wire + .wire__crate__api__merged__proto_transport_impl_get_transactions( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedProtoTransportImplGetTransactionsConstMeta, + argValues: [that, address, fromLt, count], + apiImpl: this, + ), + ); + } - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcGqlConnectionBoxTrait => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait; + TaskConstMeta get kCrateApiMergedProtoTransportImplGetTransactionsConstMeta => + const TaskConstMeta( + debugName: "proto_transport_impl_get_transactions", + argNames: ["that", "address", "fromLt", "count"], + ); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcJettonWalletBoxTrait => wire - .rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait; + @override + ProtoTransportImpl crateApiMergedProtoTransportImplNew({ + required ProtoConnectionDartWrapper protoConnection, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_proto_connection_dart_wrapper( + protoConnection, + ); + return wire.wire__crate__api__merged__proto_transport_impl_new(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_proto_transport_impl, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedProtoTransportImplNewConstMeta, + argValues: [protoConnection], + apiImpl: this, + ), + ); + } - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcJettonWalletBoxTrait => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait; + TaskConstMeta get kCrateApiMergedProtoTransportImplNewConstMeta => + const TaskConstMeta( + debugName: "proto_transport_impl_new", + argNames: ["protoConnection"], + ); - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcJrpcConnectionBoxTrait => wire - .rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait; + @override + Future crateApiMergedProtoTransportImplSimulateTransactionTree({ + required ProtoTransportImpl that, + required String signedMessage, + required List ignoredComputePhaseCodes, + required List ignoredActionPhaseCodes, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_proto_transport_impl(that); + var arg1 = cst_encode_String(signedMessage); + var arg2 = cst_encode_list_prim_i_32_loose(ignoredComputePhaseCodes); + var arg3 = cst_encode_list_prim_i_32_loose(ignoredActionPhaseCodes); + return wire + .wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedProtoTransportImplSimulateTransactionTreeConstMeta, + argValues: [ + that, + signedMessage, + ignoredComputePhaseCodes, + ignoredActionPhaseCodes, + ], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedProtoTransportImplSimulateTransactionTreeConstMeta => + const TaskConstMeta( + debugName: "proto_transport_impl_simulate_transaction_tree", + argNames: [ + "that", + "signedMessage", + "ignoredComputePhaseCodes", + "ignoredActionPhaseCodes", + ], + ); + + @override + Future crateApiMergedSetClockOffset({required PlatformInt64 offsetMs}) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_i_64(offsetMs); + return wire.wire__crate__api__merged__set_clock_offset(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedSetClockOffsetConstMeta, + argValues: [offsetMs], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedSetClockOffsetConstMeta => + const TaskConstMeta( + debugName: "set_clock_offset", + argNames: ["offsetMs"], + ); + + @override + StorageDartWrapper crateApiMergedStorageDartWrapperNew({ + required FutureOr Function(String) onGet, + required FutureOr Function(String, String) onSet, + required FutureOr Function(String, String) onSetUnchecked, + required FutureOr Function(String) onRemove, + required FutureOr Function(String) onRemoveUnchecked, + }) { + return handler.executeSync( + SyncTask( + callFfi: () { + var arg0 = + cst_encode_DartFn_Inputs_String_Output_opt_String_AnyhowException( + onGet, + ); + var arg1 = + cst_encode_DartFn_Inputs_String_String_Output_unit_AnyhowException( + onSet, + ); + var arg2 = + cst_encode_DartFn_Inputs_String_String_Output_unit_AnyhowException( + onSetUnchecked, + ); + var arg3 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onRemove, + ); + var arg4 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onRemoveUnchecked, + ); + return wire.wire__crate__api__merged__storage_dart_wrapper_new( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_storage_dart_wrapper, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedStorageDartWrapperNewConstMeta, + argValues: [onGet, onSet, onSetUnchecked, onRemove, onRemoveUnchecked], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedStorageDartWrapperNewConstMeta => + const TaskConstMeta( + debugName: "storage_dart_wrapper_new", + argNames: [ + "onGet", + "onSet", + "onSetUnchecked", + "onRemove", + "onRemoveUnchecked", + ], + ); + + @override + Future crateApiMergedTokenWalletDartWrapperAddress({ + required TokenWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__token_wallet_dart_wrapper_address( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedTokenWalletDartWrapperAddressConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperAddressConstMeta => + const TaskConstMeta( + debugName: "token_wallet_dart_wrapper_address", + argNames: ["that"], + ); + + @override + Future crateApiMergedTokenWalletDartWrapperBalance({ + required TokenWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__token_wallet_dart_wrapper_balance( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedTokenWalletDartWrapperBalanceConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperBalanceConstMeta => + const TaskConstMeta( + debugName: "token_wallet_dart_wrapper_balance", + argNames: ["that"], + ); + + @override + Future crateApiMergedTokenWalletDartWrapperContractState({ + required TokenWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__token_wallet_dart_wrapper_contract_state( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTokenWalletDartWrapperContractStateConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTokenWalletDartWrapperContractStateConstMeta => + const TaskConstMeta( + debugName: "token_wallet_dart_wrapper_contract_state", + argNames: ["that"], + ); + + @override + Future crateApiMergedTokenWalletDartWrapperEstimateMinAttachedAmount({ + required TokenWalletDartWrapper that, + required String destination, + required String amount, + required bool notifyReceiver, + String? payload, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(destination); + var arg2 = cst_encode_String(amount); + var arg3 = cst_encode_bool(notifyReceiver); + var arg4 = cst_encode_opt_String(payload); + return wire + .wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTokenWalletDartWrapperEstimateMinAttachedAmountConstMeta, + argValues: [that, destination, amount, notifyReceiver, payload], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTokenWalletDartWrapperEstimateMinAttachedAmountConstMeta => + const TaskConstMeta( + debugName: "token_wallet_dart_wrapper_estimate_min_attached_amount", + argNames: [ + "that", + "destination", + "amount", + "notifyReceiver", + "payload", + ], + ); + + @override + Future crateApiMergedTokenWalletDartWrapperGetTokenRootDetails({ + required ArcTransportBoxTrait transport, + required String tokenRootAddress, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg1 = cst_encode_String(tokenRootAddress); + return wire + .wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTokenWalletDartWrapperGetTokenRootDetailsConstMeta, + argValues: [transport, tokenRootAddress], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTokenWalletDartWrapperGetTokenRootDetailsConstMeta => + const TaskConstMeta( + debugName: "token_wallet_dart_wrapper_get_token_root_details", + argNames: ["transport", "tokenRootAddress"], + ); + + @override + Future + crateApiMergedTokenWalletDartWrapperGetTokenRootDetailsFromTokenWallet({ + required ArcTransportBoxTrait transport, + required String tokenWalletAddress, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg1 = cst_encode_String(tokenWalletAddress); + return wire + .wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTokenWalletDartWrapperGetTokenRootDetailsFromTokenWalletConstMeta, + argValues: [transport, tokenWalletAddress], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTokenWalletDartWrapperGetTokenRootDetailsFromTokenWalletConstMeta => + const TaskConstMeta( + debugName: + "token_wallet_dart_wrapper_get_token_root_details_from_token_wallet", + argNames: ["transport", "tokenWalletAddress"], + ); + + @override + Future crateApiMergedTokenWalletDartWrapperGetTokenWalletDetails({ + required ArcTransportBoxTrait transport, + required String address, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg1 = cst_encode_String(address); + return wire + .wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTokenWalletDartWrapperGetTokenWalletDetailsConstMeta, + argValues: [transport, address], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTokenWalletDartWrapperGetTokenWalletDetailsConstMeta => + const TaskConstMeta( + debugName: "token_wallet_dart_wrapper_get_token_wallet_details", + argNames: ["transport", "address"], + ); + + @override + Future crateApiMergedTokenWalletDartWrapperHandleBlock({ + required TokenWalletDartWrapper that, + required String block, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(block); + return wire + .wire__crate__api__merged__token_wallet_dart_wrapper_handle_block( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTokenWalletDartWrapperHandleBlockConstMeta, + argValues: [that, block], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperHandleBlockConstMeta => + const TaskConstMeta( + debugName: "token_wallet_dart_wrapper_handle_block", + argNames: ["that", "block"], + ); + + @override + Future crateApiMergedTokenWalletDartWrapperOwner({ + required TokenWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); + return wire.wire__crate__api__merged__token_wallet_dart_wrapper_owner( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedTokenWalletDartWrapperOwnerConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperOwnerConstMeta => + const TaskConstMeta( + debugName: "token_wallet_dart_wrapper_owner", + argNames: ["that"], + ); + + @override + Future crateApiMergedTokenWalletDartWrapperPreloadTransactions({ + required TokenWalletDartWrapper that, + required String fromLt, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(fromLt); + return wire + .wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTokenWalletDartWrapperPreloadTransactionsConstMeta, + argValues: [that, fromLt], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTokenWalletDartWrapperPreloadTransactionsConstMeta => + const TaskConstMeta( + debugName: "token_wallet_dart_wrapper_preload_transactions", + argNames: ["that", "fromLt"], + ); + + @override + Future crateApiMergedTokenWalletDartWrapperPrepareTransfer({ + required TokenWalletDartWrapper that, + required String destination, + required String amount, + required bool notifyReceiver, + String? attachedAmount, + String? payload, + String? remainingGasTo, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(destination); + var arg2 = cst_encode_String(amount); + var arg3 = cst_encode_bool(notifyReceiver); + var arg4 = cst_encode_opt_String(attachedAmount); + var arg5 = cst_encode_opt_String(payload); + var arg6 = cst_encode_opt_String(remainingGasTo); + return wire + .wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTokenWalletDartWrapperPrepareTransferConstMeta, + argValues: [ + that, + destination, + amount, + notifyReceiver, + attachedAmount, + payload, + remainingGasTo, + ], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTokenWalletDartWrapperPrepareTransferConstMeta => + const TaskConstMeta( + debugName: "token_wallet_dart_wrapper_prepare_transfer", + argNames: [ + "that", + "destination", + "amount", + "notifyReceiver", + "attachedAmount", + "payload", + "remainingGasTo", + ], + ); + + @override + Future crateApiMergedTokenWalletDartWrapperRefresh({ + required TokenWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__token_wallet_dart_wrapper_refresh( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTokenWalletDartWrapperRefreshConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperRefreshConstMeta => + const TaskConstMeta( + debugName: "token_wallet_dart_wrapper_refresh", + argNames: ["that"], + ); + + @override + Future crateApiMergedTokenWalletDartWrapperSubscribe({ + required String owner, + required String rootTokenContract, + required ArcTransportBoxTrait transport, + required bool preloadTransactions, + required FutureOr Function(String) onBalanceChanged, + required FutureOr Function(String) onTransactionsFound, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(owner); + var arg1 = cst_encode_String(rootTokenContract); + var arg2 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg3 = cst_encode_bool(preloadTransactions); + var arg4 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onBalanceChanged, + ); + var arg5 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onTransactionsFound, + ); + return wire + .wire__crate__api__merged__token_wallet_dart_wrapper_subscribe( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_token_wallet_dart_wrapper, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTokenWalletDartWrapperSubscribeConstMeta, + argValues: [ + owner, + rootTokenContract, + transport, + preloadTransactions, + onBalanceChanged, + onTransactionsFound, + ], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperSubscribeConstMeta => + const TaskConstMeta( + debugName: "token_wallet_dart_wrapper_subscribe", + argNames: [ + "owner", + "rootTokenContract", + "transport", + "preloadTransactions", + "onBalanceChanged", + "onTransactionsFound", + ], + ); + + @override + Future crateApiMergedTokenWalletDartWrapperSymbol({ + required TokenWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__token_wallet_dart_wrapper_symbol( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTokenWalletDartWrapperSymbolConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperSymbolConstMeta => + const TaskConstMeta( + debugName: "token_wallet_dart_wrapper_symbol", + argNames: ["that"], + ); + + @override + Future crateApiMergedTokenWalletDartWrapperVersion({ + required TokenWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_token_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__token_wallet_dart_wrapper_version( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTokenWalletDartWrapperVersionConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTokenWalletDartWrapperVersionConstMeta => + const TaskConstMeta( + debugName: "token_wallet_dart_wrapper_version", + argNames: ["that"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperAddress({ + required TonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + return wire.wire__crate__api__merged__ton_wallet_dart_wrapper_address( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperAddressConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperAddressConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_address", + argNames: ["that"], + ); + + @override + Future + crateApiMergedTonWalletDartWrapperAppendSignatureToWalletV5R1Payload({ + required String payload, + required String base64Signature, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(payload); + var arg1 = cst_encode_String(base64Signature); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTonWalletDartWrapperAppendSignatureToWalletV5R1PayloadConstMeta, + argValues: [payload, base64Signature], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTonWalletDartWrapperAppendSignatureToWalletV5R1PayloadConstMeta => + const TaskConstMeta( + debugName: + "ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload", + argNames: ["payload", "base64Signature"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperContractState({ + required TonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperContractStateConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperContractStateConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_contract_state", + argNames: ["that"], + ); + + @override + Future?> crateApiMergedTonWalletDartWrapperCustodians({ + required TonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_custodians( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_list_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperCustodiansConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperCustodiansConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_custodians", + argNames: ["that"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperDetails({ + required TonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + return wire.wire__crate__api__merged__ton_wallet_dart_wrapper_details( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperDetailsConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperDetailsConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_details", + argNames: ["that"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperEstimateFees({ + required TonWalletDartWrapper that, + required String signedMessage, + String? executionOptions, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(signedMessage); + var arg2 = cst_encode_opt_String(executionOptions); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_fees( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperEstimateFeesConstMeta, + argValues: [that, signedMessage, executionOptions], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperEstimateFeesConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_estimate_fees", + argNames: ["that", "signedMessage", "executionOptions"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperFindExistingWallets({ + required ArcTransportBoxTrait transport, + required String publicKey, + required int workchainId, + required String walletTypes, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg1 = cst_encode_String(publicKey); + var arg2 = cst_encode_i_8(workchainId); + var arg3 = cst_encode_String(walletTypes); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTonWalletDartWrapperFindExistingWalletsConstMeta, + argValues: [transport, publicKey, workchainId, walletTypes], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTonWalletDartWrapperFindExistingWalletsConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_find_existing_wallets", + argNames: ["transport", "publicKey", "workchainId", "walletTypes"], + ); + + @override + Future> crateApiMergedTonWalletDartWrapperGetCustodians({ + required ArcTransportBoxTrait transport, + required String address, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg1 = cst_encode_String(address); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperGetCustodiansConstMeta, + argValues: [transport, address], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperGetCustodiansConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_get_custodians", + argNames: ["transport", "address"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperGetExistingWalletInfo({ + required ArcTransportBoxTrait transport, + required String address, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg1 = cst_encode_String(address); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTonWalletDartWrapperGetExistingWalletInfoConstMeta, + argValues: [transport, address], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTonWalletDartWrapperGetExistingWalletInfoConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_get_existing_wallet_info", + argNames: ["transport", "address"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperGetWalletV5R1Seqno({ + required TonWalletDartWrapper that, + required String rawCurrentState, + required String publicKey, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(rawCurrentState); + var arg2 = cst_encode_String(publicKey); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno( + port_, + arg0, + arg1, + arg2, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_u_32, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTonWalletDartWrapperGetWalletV5R1SeqnoConstMeta, + argValues: [that, rawCurrentState, publicKey], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTonWalletDartWrapperGetWalletV5R1SeqnoConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_get_wallet_v5r1_seqno", + argNames: ["that", "rawCurrentState", "publicKey"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperHandleBlock({ + required TonWalletDartWrapper that, + required String block, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(block); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_handle_block( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperHandleBlockConstMeta, + argValues: [that, block], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperHandleBlockConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_handle_block", + argNames: ["that", "block"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperMakeStateInit({ + required TonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperMakeStateInitConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperMakeStateInitConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_make_state_init", + argNames: ["that"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperPendingTransactions({ + required TonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTonWalletDartWrapperPendingTransactionsConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTonWalletDartWrapperPendingTransactionsConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_pending_transactions", + argNames: ["that"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperPollingMethod({ + required TonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_polling_method, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperPollingMethodConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperPollingMethodConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_polling_method", + argNames: ["that"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperPreloadTransactions({ + required TonWalletDartWrapper that, + required String fromLt, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(fromLt); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTonWalletDartWrapperPreloadTransactionsConstMeta, + argValues: [that, fromLt], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTonWalletDartWrapperPreloadTransactionsConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_preload_transactions", + argNames: ["that", "fromLt"], + ); + + @override + Future + crateApiMergedTonWalletDartWrapperPrepareConfirmTransaction({ + required TonWalletDartWrapper that, + required String contractState, + required String publicKey, + required String transactionId, + required String expiration, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(contractState); + var arg2 = cst_encode_String(publicKey); + var arg3 = cst_encode_String(transactionId); + var arg4 = cst_encode_String(expiration); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unsigned_message_impl, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTonWalletDartWrapperPrepareConfirmTransactionConstMeta, + argValues: [that, contractState, publicKey, transactionId, expiration], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTonWalletDartWrapperPrepareConfirmTransactionConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_prepare_confirm_transaction", + argNames: [ + "that", + "contractState", + "publicKey", + "transactionId", + "expiration", + ], + ); + + @override + Future crateApiMergedTonWalletDartWrapperPrepareDeploy({ + required TonWalletDartWrapper that, + required String expiration, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(expiration); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unsigned_message_impl, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperPrepareDeployConstMeta, + argValues: [that, expiration], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperPrepareDeployConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_prepare_deploy", + argNames: ["that", "expiration"], + ); + + @override + Future + crateApiMergedTonWalletDartWrapperPrepareDeployWithMultipleOwners({ + required TonWalletDartWrapper that, + required String expiration, + required List custodians, + required int reqConfirms, + int? expirationTime, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(expiration); + var arg2 = cst_encode_list_String(custodians); + var arg3 = cst_encode_u_8(reqConfirms); + var arg4 = cst_encode_opt_box_autoadd_u_32(expirationTime); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unsigned_message_impl, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTonWalletDartWrapperPrepareDeployWithMultipleOwnersConstMeta, + argValues: [that, expiration, custodians, reqConfirms, expirationTime], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTonWalletDartWrapperPrepareDeployWithMultipleOwnersConstMeta => + const TaskConstMeta( + debugName: + "ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners", + argNames: [ + "that", + "expiration", + "custodians", + "reqConfirms", + "expirationTime", + ], + ); + + @override + Future<(String, String)> + crateApiMergedTonWalletDartWrapperPrepareNonexistWalletV5R1MessageBody({ + required TonWalletDartWrapper that, + required String expiration, + required String params, + required bool isInternalFlow, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(expiration); + var arg2 = cst_encode_String(params); + var arg3 = cst_encode_bool(isInternalFlow); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_record_string_string, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTonWalletDartWrapperPrepareNonexistWalletV5R1MessageBodyConstMeta, + argValues: [that, expiration, params, isInternalFlow], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTonWalletDartWrapperPrepareNonexistWalletV5R1MessageBodyConstMeta => + const TaskConstMeta( + debugName: + "ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body", + argNames: ["that", "expiration", "params", "isInternalFlow"], + ); + + @override + Future + crateApiMergedTonWalletDartWrapperPrepareTransfer({ + required TonWalletDartWrapper that, + required String contractState, + required String publicKey, + required String expiration, + required String params, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(contractState); + var arg2 = cst_encode_String(publicKey); + var arg3 = cst_encode_String(expiration); + var arg4 = cst_encode_String(params); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unsigned_message_impl, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperPrepareTransferConstMeta, + argValues: [that, contractState, publicKey, expiration, params], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTonWalletDartWrapperPrepareTransferConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_prepare_transfer", + argNames: [ + "that", + "contractState", + "publicKey", + "expiration", + "params", + ], + ); + + @override + Future<(String, String)> + crateApiMergedTonWalletDartWrapperPrepareWalletV5R1MessageBody({ + required TonWalletDartWrapper that, + required String contractState, + required String publicKey, + required String expiration, + required String params, + required bool isInternalFlow, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(contractState); + var arg2 = cst_encode_String(publicKey); + var arg3 = cst_encode_String(expiration); + var arg4 = cst_encode_String(params); + var arg5 = cst_encode_bool(isInternalFlow); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_record_string_string, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTonWalletDartWrapperPrepareWalletV5R1MessageBodyConstMeta, + argValues: [ + that, + contractState, + publicKey, + expiration, + params, + isInternalFlow, + ], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTonWalletDartWrapperPrepareWalletV5R1MessageBodyConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body", + argNames: [ + "that", + "contractState", + "publicKey", + "expiration", + "params", + "isInternalFlow", + ], + ); + + @override + Future crateApiMergedTonWalletDartWrapperPublicKey({ + required TonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_public_key( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperPublicKeyConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperPublicKeyConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_public_key", + argNames: ["that"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperRefresh({ + required TonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + return wire.wire__crate__api__merged__ton_wallet_dart_wrapper_refresh( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperRefreshConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperRefreshConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_refresh", + argNames: ["that"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperSend({ + required TonWalletDartWrapper that, + required String signedMessage, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + var arg1 = cst_encode_String(signedMessage); + return wire.wire__crate__api__merged__ton_wallet_dart_wrapper_send( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperSendConstMeta, + argValues: [that, signedMessage], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperSendConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_send", + argNames: ["that", "signedMessage"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperSubscribe({ + required int workchainId, + required String publicKey, + required String walletType, + required ArcTransportBoxTrait transport, + required FutureOr Function(String) onMessageSent, + required FutureOr Function(String) onMessageExpired, + required FutureOr Function(String) onStateChanged, + required FutureOr Function(String) onTransactionsFound, + required FutureOr Function(String) onDetailsChanged, + required FutureOr Function(String) onCustodiansChanged, + required FutureOr Function(String) onUnconfirmedTransactionsChanged, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_i_8(workchainId); + var arg1 = cst_encode_String(publicKey); + var arg2 = cst_encode_String(walletType); + var arg3 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg4 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onMessageSent, + ); + var arg5 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onMessageExpired, + ); + var arg6 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onStateChanged, + ); + var arg7 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onTransactionsFound, + ); + var arg8 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onDetailsChanged, + ); + var arg9 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onCustodiansChanged, + ); + var arg10 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onUnconfirmedTransactionsChanged, + ); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + arg7, + arg8, + arg9, + arg10, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ton_wallet_dart_wrapper, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperSubscribeConstMeta, + argValues: [ + workchainId, + publicKey, + walletType, + transport, + onMessageSent, + onMessageExpired, + onStateChanged, + onTransactionsFound, + onDetailsChanged, + onCustodiansChanged, + onUnconfirmedTransactionsChanged, + ], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperSubscribeConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_subscribe", + argNames: [ + "workchainId", + "publicKey", + "walletType", + "transport", + "onMessageSent", + "onMessageExpired", + "onStateChanged", + "onTransactionsFound", + "onDetailsChanged", + "onCustodiansChanged", + "onUnconfirmedTransactionsChanged", + ], + ); + + @override + Future + crateApiMergedTonWalletDartWrapperSubscribeByAddress({ + required String address, + required ArcTransportBoxTrait transport, + required FutureOr Function(String) onMessageSent, + required FutureOr Function(String) onMessageExpired, + required FutureOr Function(String) onStateChanged, + required FutureOr Function(String) onTransactionsFound, + required FutureOr Function(String) onDetailsChanged, + required FutureOr Function(String) onCustodiansChanged, + required FutureOr Function(String) onUnconfirmedTransactionsChanged, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(address); + var arg1 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg2 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onMessageSent, + ); + var arg3 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onMessageExpired, + ); + var arg4 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onStateChanged, + ); + var arg5 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onTransactionsFound, + ); + var arg6 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onDetailsChanged, + ); + var arg7 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onCustodiansChanged, + ); + var arg8 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onUnconfirmedTransactionsChanged, + ); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + arg7, + arg8, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ton_wallet_dart_wrapper, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTonWalletDartWrapperSubscribeByAddressConstMeta, + argValues: [ + address, + transport, + onMessageSent, + onMessageExpired, + onStateChanged, + onTransactionsFound, + onDetailsChanged, + onCustodiansChanged, + onUnconfirmedTransactionsChanged, + ], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTonWalletDartWrapperSubscribeByAddressConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_subscribe_by_address", + argNames: [ + "address", + "transport", + "onMessageSent", + "onMessageExpired", + "onStateChanged", + "onTransactionsFound", + "onDetailsChanged", + "onCustodiansChanged", + "onUnconfirmedTransactionsChanged", + ], + ); + + @override + Future + crateApiMergedTonWalletDartWrapperSubscribeByExisting({ + required String existingWallet, + required ArcTransportBoxTrait transport, + required FutureOr Function(String) onMessageSent, + required FutureOr Function(String) onMessageExpired, + required FutureOr Function(String) onStateChanged, + required FutureOr Function(String) onTransactionsFound, + required FutureOr Function(String) onDetailsChanged, + required FutureOr Function(String) onCustodiansChanged, + required FutureOr Function(String) onUnconfirmedTransactionsChanged, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(existingWallet); + var arg1 = cst_encode_RustOpaque_ArcdynTransportBoxTrait(transport); + var arg2 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onMessageSent, + ); + var arg3 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onMessageExpired, + ); + var arg4 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onStateChanged, + ); + var arg5 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onTransactionsFound, + ); + var arg6 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onDetailsChanged, + ); + var arg7 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onCustodiansChanged, + ); + var arg8 = + cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + onUnconfirmedTransactionsChanged, + ); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + arg7, + arg8, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ton_wallet_dart_wrapper, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTonWalletDartWrapperSubscribeByExistingConstMeta, + argValues: [ + existingWallet, + transport, + onMessageSent, + onMessageExpired, + onStateChanged, + onTransactionsFound, + onDetailsChanged, + onCustodiansChanged, + onUnconfirmedTransactionsChanged, + ], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTonWalletDartWrapperSubscribeByExistingConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_subscribe_by_existing", + argNames: [ + "existingWallet", + "transport", + "onMessageSent", + "onMessageExpired", + "onStateChanged", + "onTransactionsFound", + "onDetailsChanged", + "onCustodiansChanged", + "onUnconfirmedTransactionsChanged", + ], + ); + + @override + Future crateApiMergedTonWalletDartWrapperUnconfirmedTransactions({ + required TonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: + kCrateApiMergedTonWalletDartWrapperUnconfirmedTransactionsConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta + get kCrateApiMergedTonWalletDartWrapperUnconfirmedTransactionsConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_unconfirmed_transactions", + argNames: ["that"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperWalletType({ + required TonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_type( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperWalletTypeConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperWalletTypeConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_wallet_type", + argNames: ["that"], + ); + + @override + Future crateApiMergedTonWalletDartWrapperWorkchain({ + required TonWalletDartWrapper that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ton_wallet_dart_wrapper(that); + return wire + .wire__crate__api__merged__ton_wallet_dart_wrapper_workchain( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_i_8, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedTonWalletDartWrapperWorkchainConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedTonWalletDartWrapperWorkchainConstMeta => + const TaskConstMeta( + debugName: "ton_wallet_dart_wrapper_workchain", + argNames: ["that"], + ); + + @override + Future crateApiMergedUnsignedMessageImplExpireAt({ + required UnsignedMessageImpl that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_unsigned_message_impl(that); + return wire.wire__crate__api__merged__unsigned_message_impl_expire_at( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_u_32, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedUnsignedMessageImplExpireAtConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedUnsignedMessageImplExpireAtConstMeta => + const TaskConstMeta( + debugName: "unsigned_message_impl_expire_at", + argNames: ["that"], + ); + + @override + Future crateApiMergedUnsignedMessageImplHash({ + required UnsignedMessageImpl that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_unsigned_message_impl(that); + return wire.wire__crate__api__merged__unsigned_message_impl_hash( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedUnsignedMessageImplHashConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedUnsignedMessageImplHashConstMeta => + const TaskConstMeta( + debugName: "unsigned_message_impl_hash", + argNames: ["that"], + ); + + @override + Future crateApiMergedUnsignedMessageImplRefreshTimeout({ + required UnsignedMessageImpl that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_unsigned_message_impl(that); + return wire + .wire__crate__api__merged__unsigned_message_impl_refresh_timeout( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unsigned_message_impl, + decodeErrorData: null, + ), + constMeta: kCrateApiMergedUnsignedMessageImplRefreshTimeoutConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedUnsignedMessageImplRefreshTimeoutConstMeta => + const TaskConstMeta( + debugName: "unsigned_message_impl_refresh_timeout", + argNames: ["that"], + ); + + @override + Future crateApiMergedUnsignedMessageImplSign({ + required UnsignedMessageImpl that, + required String signature, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_unsigned_message_impl(that); + var arg1 = cst_encode_String(signature); + return wire.wire__crate__api__merged__unsigned_message_impl_sign( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedUnsignedMessageImplSignConstMeta, + argValues: [that, signature], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedUnsignedMessageImplSignConstMeta => + const TaskConstMeta( + debugName: "unsigned_message_impl_sign", + argNames: ["that", "signature"], + ); + + @override + Future crateApiMergedUnsignedMessageImplSignFake({ + required UnsignedMessageImpl that, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_unsigned_message_impl(that); + return wire.wire__crate__api__merged__unsigned_message_impl_sign_fake( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiMergedUnsignedMessageImplSignFakeConstMeta, + argValues: [that], + apiImpl: this, + ), + ); + } + + TaskConstMeta get kCrateApiMergedUnsignedMessageImplSignFakeConstMeta => + const TaskConstMeta( + debugName: "unsigned_message_impl_sign_fake", + argNames: ["that"], + ); + + Future Function(int, dynamic) + encode_DartFn_Inputs_String_Output_String_AnyhowException( + FutureOr Function(String) raw, + ) { + return (callId, rawArg0) async { + final arg0 = dco_decode_String(rawArg0); + + Box? rawOutput; + Box? rawError; + try { + rawOutput = Box(await raw(arg0)); + } catch (e, s) { + rawError = Box(AnyhowException("$e\n\n$s")); + } + + final serializer = SseSerializer(generalizedFrbRustBinding); + assert((rawOutput != null) ^ (rawError != null)); + if (rawOutput != null) { + serializer.buffer.putUint8(0); + sse_encode_String(rawOutput.value, serializer); + } else { + serializer.buffer.putUint8(1); + sse_encode_AnyhowException(rawError!.value, serializer); + } + final output = serializer.intoRaw(); + + generalizedFrbRustBinding.dartFnDeliverOutput( + callId: callId, + ptr: output.ptr, + rustVecLen: output.rustVecLen, + dataLen: output.dataLen, + ); + }; + } + + Future Function(int, dynamic) + encode_DartFn_Inputs_String_Output_opt_String_AnyhowException( + FutureOr Function(String) raw, + ) { + return (callId, rawArg0) async { + final arg0 = dco_decode_String(rawArg0); + + Box? rawOutput; + Box? rawError; + try { + rawOutput = Box(await raw(arg0)); + } catch (e, s) { + rawError = Box(AnyhowException("$e\n\n$s")); + } + + final serializer = SseSerializer(generalizedFrbRustBinding); + assert((rawOutput != null) ^ (rawError != null)); + if (rawOutput != null) { + serializer.buffer.putUint8(0); + sse_encode_opt_String(rawOutput.value, serializer); + } else { + serializer.buffer.putUint8(1); + sse_encode_AnyhowException(rawError!.value, serializer); + } + final output = serializer.intoRaw(); + + generalizedFrbRustBinding.dartFnDeliverOutput( + callId: callId, + ptr: output.ptr, + rustVecLen: output.rustVecLen, + dataLen: output.dataLen, + ); + }; + } + + Future Function(int, dynamic) + encode_DartFn_Inputs_String_Output_unit_AnyhowException( + FutureOr Function(String) raw, + ) { + return (callId, rawArg0) async { + final arg0 = dco_decode_String(rawArg0); + + Box? rawOutput; + Box? rawError; + try { + rawOutput = Box(await raw(arg0)); + } catch (e, s) { + rawError = Box(AnyhowException("$e\n\n$s")); + } + + final serializer = SseSerializer(generalizedFrbRustBinding); + assert((rawOutput != null) ^ (rawError != null)); + if (rawOutput != null) { + serializer.buffer.putUint8(0); + sse_encode_unit(rawOutput.value, serializer); + } else { + serializer.buffer.putUint8(1); + sse_encode_AnyhowException(rawError!.value, serializer); + } + final output = serializer.intoRaw(); + + generalizedFrbRustBinding.dartFnDeliverOutput( + callId: callId, + ptr: output.ptr, + rustVecLen: output.rustVecLen, + dataLen: output.dataLen, + ); + }; + } + + Future Function(int, dynamic, dynamic) + encode_DartFn_Inputs_String_String_Output_unit_AnyhowException( + FutureOr Function(String, String) raw, + ) { + return (callId, rawArg0, rawArg1) async { + final arg0 = dco_decode_String(rawArg0); + final arg1 = dco_decode_String(rawArg1); + + Box? rawOutput; + Box? rawError; + try { + rawOutput = Box(await raw(arg0, arg1)); + } catch (e, s) { + rawError = Box(AnyhowException("$e\n\n$s")); + } + + final serializer = SseSerializer(generalizedFrbRustBinding); + assert((rawOutput != null) ^ (rawError != null)); + if (rawOutput != null) { + serializer.buffer.putUint8(0); + sse_encode_unit(rawOutput.value, serializer); + } else { + serializer.buffer.putUint8(1); + sse_encode_AnyhowException(rawError!.value, serializer); + } + final output = serializer.intoRaw(); + + generalizedFrbRustBinding.dartFnDeliverOutput( + callId: callId, + ptr: output.ptr, + rustVecLen: output.rustVecLen, + dataLen: output.dataLen, + ); + }; + } + + Future Function(int, dynamic) + encode_DartFn_Inputs_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(Uint8List) raw, + ) { + return (callId, rawArg0) async { + final arg0 = dco_decode_list_prim_u_8_strict(rawArg0); + + Box? rawOutput; + Box? rawError; + try { + rawOutput = Box(await raw(arg0)); + } catch (e, s) { + rawError = Box(AnyhowException("$e\n\n$s")); + } + + final serializer = SseSerializer(generalizedFrbRustBinding); + assert((rawOutput != null) ^ (rawError != null)); + if (rawOutput != null) { + serializer.buffer.putUint8(0); + sse_encode_list_prim_u_8_strict(rawOutput.value, serializer); + } else { + serializer.buffer.putUint8(1); + sse_encode_AnyhowException(rawError!.value, serializer); + } + final output = serializer.intoRaw(); + + generalizedFrbRustBinding.dartFnDeliverOutput( + callId: callId, + ptr: output.ptr, + rustVecLen: output.rustVecLen, + dataLen: output.dataLen, + ); + }; + } + + Future Function(int, dynamic) + encode_DartFn_Inputs_u_16_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int) raw, + ) { + return (callId, rawArg0) async { + final arg0 = dco_decode_u_16(rawArg0); + + Box? rawOutput; + Box? rawError; + try { + rawOutput = Box(await raw(arg0)); + } catch (e, s) { + rawError = Box(AnyhowException("$e\n\n$s")); + } + + final serializer = SseSerializer(generalizedFrbRustBinding); + assert((rawOutput != null) ^ (rawError != null)); + if (rawOutput != null) { + serializer.buffer.putUint8(0); + sse_encode_list_prim_u_8_strict(rawOutput.value, serializer); + } else { + serializer.buffer.putUint8(1); + sse_encode_AnyhowException(rawError!.value, serializer); + } + final output = serializer.intoRaw(); + + generalizedFrbRustBinding.dartFnDeliverOutput( + callId: callId, + ptr: output.ptr, + rustVecLen: output.rustVecLen, + dataLen: output.dataLen, + ); + }; + } + + Future Function(int, dynamic, dynamic, dynamic) + encode_DartFn_Inputs_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int, int?, Uint8List) raw, + ) { + return (callId, rawArg0, rawArg1, rawArg2) async { + final arg0 = dco_decode_u_16(rawArg0); + final arg1 = dco_decode_opt_box_autoadd_i_32(rawArg1); + final arg2 = dco_decode_list_prim_u_8_strict(rawArg2); + + Box? rawOutput; + Box? rawError; + try { + rawOutput = Box(await raw(arg0, arg1, arg2)); + } catch (e, s) { + rawError = Box(AnyhowException("$e\n\n$s")); + } + + final serializer = SseSerializer(generalizedFrbRustBinding); + assert((rawOutput != null) ^ (rawError != null)); + if (rawOutput != null) { + serializer.buffer.putUint8(0); + sse_encode_list_prim_u_8_strict(rawOutput.value, serializer); + } else { + serializer.buffer.putUint8(1); + sse_encode_AnyhowException(rawError!.value, serializer); + } + final output = serializer.intoRaw(); + + generalizedFrbRustBinding.dartFnDeliverOutput( + callId: callId, + ptr: output.ptr, + rustVecLen: output.rustVecLen, + dataLen: output.dataLen, + ); + }; + } + + Future Function(int, dynamic, dynamic, dynamic, dynamic, dynamic) + encode_DartFn_Inputs_u_16_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_String_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int, int, int?, Uint8List, String) raw, + ) { + return (callId, rawArg0, rawArg1, rawArg2, rawArg3, rawArg4) async { + final arg0 = dco_decode_u_16(rawArg0); + final arg1 = dco_decode_u_16(rawArg1); + final arg2 = dco_decode_opt_box_autoadd_i_32(rawArg2); + final arg3 = dco_decode_list_prim_u_8_strict(rawArg3); + final arg4 = dco_decode_String(rawArg4); + + Box? rawOutput; + Box? rawError; + try { + rawOutput = Box(await raw(arg0, arg1, arg2, arg3, arg4)); + } catch (e, s) { + rawError = Box(AnyhowException("$e\n\n$s")); + } + + final serializer = SseSerializer(generalizedFrbRustBinding); + assert((rawOutput != null) ^ (rawError != null)); + if (rawOutput != null) { + serializer.buffer.putUint8(0); + sse_encode_list_prim_u_8_strict(rawOutput.value, serializer); + } else { + serializer.buffer.putUint8(1); + sse_encode_AnyhowException(rawError!.value, serializer); + } + final output = serializer.intoRaw(); + + generalizedFrbRustBinding.dartFnDeliverOutput( + callId: callId, + ptr: output.ptr, + rustVecLen: output.rustVecLen, + dataLen: output.dataLen, + ); + }; + } + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcAccountsStorageBoxTrait => wire + .rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcAccountsStorageBoxTrait => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcGenericContractBoxTrait => wire + .rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcGenericContractBoxTrait => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcGqlConnectionBoxTrait => wire + .rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcGqlConnectionBoxTrait => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcJettonWalletBoxTrait => wire + .rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcJettonWalletBoxTrait => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcJrpcConnectionBoxTrait => wire + .rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcJrpcConnectionBoxTrait => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcKeyStoreApiBoxTrait => + wire.rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcKeyStoreApiBoxTrait => + wire.rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcLedgerConnectionBoxTrait => wire + .rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcLedgerConnectionBoxTrait => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcProtoConnectionBoxTrait => wire + .rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcProtoConnectionBoxTrait => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcStorageBoxTrait => + wire.rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcStorageBoxTrait => + wire.rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcTokenWalletBoxTrait => + wire.rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcTokenWalletBoxTrait => + wire.rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcTonWalletBoxTrait => + wire.rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcTonWalletBoxTrait => + wire.rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcTransportBoxTrait => + wire.rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcTransportBoxTrait => + wire.rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcUnsignedMessageBoxTrait => wire + .rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcUnsignedMessageBoxTrait => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnStringDartFnFutureOptionString => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnStringDartFnFutureOptionString => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnStringDartFnFuture => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnStringDartFnFuture => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnStringDartFnFutureString => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnStringDartFnFutureString => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnStringStringDartFnFuture => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnStringStringDartFnFuture => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnVecU8DartFnFutureVecU8 => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnVecU8DartFnFutureVecU8 => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnU16DartFnFutureVecU8 => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnU16DartFnFutureVecU8 => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnU16OptionI32VecU8DartFnFutureVecU8 => + wire.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnU16OptionI32VecU8DartFnFutureVecU8 => + wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 => + wire.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 => + wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_GenericContractSubscriptionHandlerImpl => + wire.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_GenericContractSubscriptionHandlerImpl => + wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_GqlConnectionImpl => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_GqlConnectionImpl => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_JettonWalletSubscriptionHandlerImpl => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_JettonWalletSubscriptionHandlerImpl => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_JrpcConnectionImpl => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_JrpcConnectionImpl => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_LedgerConnectionImpl => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_LedgerConnectionImpl => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ProtoConnectionImpl => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ProtoConnectionImpl => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_StorageImpl => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_StorageImpl => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_TokenWalletSubscriptionHandlerImpl => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_TokenWalletSubscriptionHandlerImpl => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_TonWalletSubscriptionHandlerImpl => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_TonWalletSubscriptionHandlerImpl => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl; + + @protected + AnyhowException dco_decode_AnyhowException(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return AnyhowException(raw as String); + } + + @protected + ArcFnStringDartFnFutureOptionString + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnStringDartFnFutureOptionStringImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnStringDartFnFuture + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnStringDartFnFutureImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnStringDartFnFutureString + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnStringDartFnFutureStringImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnStringStringDartFnFuture + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnStringStringDartFnFutureImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnVecU8DartFnFutureVecU8 + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnVecU8DartFnFutureVecU8Impl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnU16DartFnFutureVecU8 + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnU16DartFnFutureVecU8Impl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnU16OptionI32VecU8DartFnFutureVecU8 + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnU16OptionI32VecU8DartFnFutureVecU8Impl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Impl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + GenericContractSubscriptionHandlerImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return GenericContractSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + GqlConnectionImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return GqlConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + JettonWalletSubscriptionHandlerImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return JettonWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + JrpcConnectionImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return JrpcConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + LedgerConnectionImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return LedgerConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + ProtoConnectionImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ProtoConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + StorageImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return StorageImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + TokenWalletSubscriptionHandlerImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return TokenWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + TonWalletSubscriptionHandlerImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return TonWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + GenericContractSubscriptionHandlerImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return GenericContractSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + GqlConnectionImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return GqlConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + JettonWalletSubscriptionHandlerImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return JettonWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + JrpcConnectionImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return JrpcConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + LedgerConnectionImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return LedgerConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + ProtoConnectionImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ProtoConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + StorageImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return StorageImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + TokenWalletSubscriptionHandlerImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return TokenWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + TonWalletSubscriptionHandlerImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return TonWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + GenericContractSubscriptionHandlerImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return GenericContractSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + GqlConnectionImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return GqlConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + JettonWalletSubscriptionHandlerImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return JettonWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + JrpcConnectionImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return JrpcConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + LedgerConnectionImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return LedgerConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + ProtoConnectionImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ProtoConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + StorageImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return StorageImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + TokenWalletSubscriptionHandlerImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return TokenWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + TonWalletSubscriptionHandlerImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return TonWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + FutureOr Function(String) + dco_decode_DartFn_Inputs_String_Output_String_AnyhowException(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + throw UnimplementedError(''); + } + + @protected + FutureOr Function(String) + dco_decode_DartFn_Inputs_String_Output_opt_String_AnyhowException( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + throw UnimplementedError(''); + } + + @protected + FutureOr Function(String) + dco_decode_DartFn_Inputs_String_Output_unit_AnyhowException(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + throw UnimplementedError(''); + } + + @protected + FutureOr Function(String, String) + dco_decode_DartFn_Inputs_String_String_Output_unit_AnyhowException( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + throw UnimplementedError(''); + } + + @protected + FutureOr Function(Uint8List) + dco_decode_DartFn_Inputs_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + throw UnimplementedError(''); + } + + @protected + FutureOr Function(int) + dco_decode_DartFn_Inputs_u_16_Output_list_prim_u_8_strict_AnyhowException( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + throw UnimplementedError(''); + } + + @protected + FutureOr Function(int, int?, Uint8List) + dco_decode_DartFn_Inputs_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + throw UnimplementedError(''); + } + + @protected + FutureOr Function(int, int, int?, Uint8List, String) + dco_decode_DartFn_Inputs_u_16_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_String_Output_list_prim_u_8_strict_AnyhowException( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + throw UnimplementedError(''); + } + + @protected + Object dco_decode_DartOpaque(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return decodeDartOpaque(raw, generalizedFrbRustBinding); + } + + @protected + Map dco_decode_Map_String_String_None(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return Map.fromEntries( + dco_decode_list_record_string_string( + raw, + ).map((e) => MapEntry(e.$1, e.$2)), + ); + } + + @protected + ArcAccountsStorageBoxTrait + dco_decode_RustOpaque_ArcdynAccountsStorageBoxTrait(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcAccountsStorageBoxTraitImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcGenericContractBoxTrait + dco_decode_RustOpaque_ArcdynGenericContractBoxTrait(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcGenericContractBoxTraitImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcGqlConnectionBoxTrait dco_decode_RustOpaque_ArcdynGqlConnectionBoxTrait( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcGqlConnectionBoxTraitImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcJettonWalletBoxTrait dco_decode_RustOpaque_ArcdynJettonWalletBoxTrait( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcJettonWalletBoxTraitImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcJrpcConnectionBoxTrait dco_decode_RustOpaque_ArcdynJrpcConnectionBoxTrait( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcJrpcConnectionBoxTraitImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcKeyStoreApiBoxTrait dco_decode_RustOpaque_ArcdynKeyStoreApiBoxTrait( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcKeyStoreApiBoxTraitImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcLedgerConnectionBoxTrait + dco_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcLedgerConnectionBoxTraitImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcProtoConnectionBoxTrait + dco_decode_RustOpaque_ArcdynProtoConnectionBoxTrait(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcProtoConnectionBoxTraitImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcStorageBoxTrait dco_decode_RustOpaque_ArcdynStorageBoxTrait(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcStorageBoxTraitImpl.frbInternalDcoDecode(raw as List); + } + + @protected + ArcTokenWalletBoxTrait dco_decode_RustOpaque_ArcdynTokenWalletBoxTrait( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcTokenWalletBoxTraitImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcTonWalletBoxTrait dco_decode_RustOpaque_ArcdynTonWalletBoxTrait( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcTonWalletBoxTraitImpl.frbInternalDcoDecode(raw as List); + } + + @protected + ArcTransportBoxTrait dco_decode_RustOpaque_ArcdynTransportBoxTrait( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcTransportBoxTraitImpl.frbInternalDcoDecode(raw as List); + } + + @protected + ArcUnsignedMessageBoxTrait + dco_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcUnsignedMessageBoxTraitImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnStringDartFnFutureOptionString + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnStringDartFnFutureOptionStringImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnStringDartFnFuture + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnStringDartFnFutureImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnStringDartFnFutureString + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnStringDartFnFutureStringImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnStringStringDartFnFuture + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnStringStringDartFnFutureImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnVecU8DartFnFutureVecU8 + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnVecU8DartFnFutureVecU8Impl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnU16DartFnFutureVecU8 + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnU16DartFnFutureVecU8Impl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnU16OptionI32VecU8DartFnFutureVecU8 + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnU16OptionI32VecU8DartFnFutureVecU8Impl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Impl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + GenericContractSubscriptionHandlerImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return GenericContractSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + GqlConnectionImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return GqlConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + JettonWalletSubscriptionHandlerImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return JettonWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + JrpcConnectionImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return JrpcConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + LedgerConnectionImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return LedgerConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + ProtoConnectionImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ProtoConnectionImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + StorageImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return StorageImplImpl.frbInternalDcoDecode(raw as List); + } + + @protected + TokenWalletSubscriptionHandlerImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return TokenWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + TonWalletSubscriptionHandlerImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return TonWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode( + raw as List, + ); + } + + @protected + RustStreamSink dco_decode_StreamSink_log_entry_Dco(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + throw UnimplementedError(); + } + + @protected + String dco_decode_String(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as String; + } + + @protected + AccountsStorageImpl dco_decode_accounts_storage_impl(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return AccountsStorageImpl( + innerStorage: dco_decode_RustOpaque_ArcdynAccountsStorageBoxTrait(arr[0]), + ); + } + + @protected + Bip39Entropy dco_decode_bip_39_entropy(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return Bip39Entropy.values[raw as int]; + } + + @protected + Bip39MnemonicData dco_decode_bip_39_mnemonic_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); + return Bip39MnemonicData( + accountId: dco_decode_u_16(arr[0]), + path: dco_decode_bip_39_path(arr[1]), + entropy: dco_decode_bip_39_entropy(arr[2]), + ); + } + + @protected + Bip39Path dco_decode_bip_39_path(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return Bip39Path.values[raw as int]; + } + + @protected + bool dco_decode_bool(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as bool; + } + + @protected + AccountsStorageImpl dco_decode_box_autoadd_accounts_storage_impl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_accounts_storage_impl(raw); + } + + @protected + Bip39MnemonicData dco_decode_box_autoadd_bip_39_mnemonic_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_bip_39_mnemonic_data(raw); + } + + @protected + bool dco_decode_box_autoadd_bool(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as bool; + } + + @protected + GenericContractDartWrapper + dco_decode_box_autoadd_generic_contract_dart_wrapper(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_generic_contract_dart_wrapper(raw); + } + + @protected + GqlConnectionDartWrapper dco_decode_box_autoadd_gql_connection_dart_wrapper( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_gql_connection_dart_wrapper(raw); + } + + @protected + GqlTransportImpl dco_decode_box_autoadd_gql_transport_impl(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_gql_transport_impl(raw); + } + + @protected + int dco_decode_box_autoadd_i_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + JettonWalletDartWrapper dco_decode_box_autoadd_jetton_wallet_dart_wrapper( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_jetton_wallet_dart_wrapper(raw); + } + + @protected + JrpcConnectionDartWrapper dco_decode_box_autoadd_jrpc_connection_dart_wrapper( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_jrpc_connection_dart_wrapper(raw); + } + + @protected + JrpcTransportImpl dco_decode_box_autoadd_jrpc_transport_impl(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_jrpc_transport_impl(raw); + } + + @protected + KeySigner dco_decode_box_autoadd_key_signer(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_key_signer(raw); + } + + @protected + KeystoreDartWrapper dco_decode_box_autoadd_keystore_dart_wrapper( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_keystore_dart_wrapper(raw); + } + + @protected + LedgerConnectionDartWrapper + dco_decode_box_autoadd_ledger_connection_dart_wrapper(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ledger_connection_dart_wrapper(raw); + } + + @protected + MnemonicType dco_decode_box_autoadd_mnemonic_type(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_mnemonic_type(raw); + } + + @protected + ProtoConnectionDartWrapper + dco_decode_box_autoadd_proto_connection_dart_wrapper(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_proto_connection_dart_wrapper(raw); + } + + @protected + ProtoTransportImpl dco_decode_box_autoadd_proto_transport_impl(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_proto_transport_impl(raw); + } + + @protected + StorageDartWrapper dco_decode_box_autoadd_storage_dart_wrapper(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_storage_dart_wrapper(raw); + } + + @protected + TokenWalletDartWrapper dco_decode_box_autoadd_token_wallet_dart_wrapper( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_token_wallet_dart_wrapper(raw); + } + + @protected + TonWalletDartWrapper dco_decode_box_autoadd_ton_wallet_dart_wrapper( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ton_wallet_dart_wrapper(raw); + } + + @protected + int dco_decode_box_autoadd_u_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + UnsignedMessageImpl dco_decode_box_autoadd_unsigned_message_impl( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_unsigned_message_impl(raw); + } + + @protected + GeneratedKeyG dco_decode_generated_key_g(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return GeneratedKeyG( + words: dco_decode_list_String(arr[0]), + accountType: dco_decode_mnemonic_type(arr[1]), + ); + } + + @protected + GenericContractDartWrapper dco_decode_generic_contract_dart_wrapper( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return GenericContractDartWrapper( + innerContract: dco_decode_RustOpaque_ArcdynGenericContractBoxTrait( + arr[0], + ), + ); + } + + @protected + GqlConnectionDartWrapper dco_decode_gql_connection_dart_wrapper(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return GqlConnectionDartWrapper.raw( + innerConnection: dco_decode_RustOpaque_ArcdynGqlConnectionBoxTrait( + arr[0], + ), + ); + } + + @protected + GqlTransportImpl dco_decode_gql_transport_impl(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return GqlTransportImpl.raw( + innerTransport: dco_decode_RustOpaque_ArcdynTransportBoxTrait(arr[0]), + ); + } + + @protected + int dco_decode_i_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + PlatformInt64 dco_decode_i_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeI64(raw); + } + + @protected + int dco_decode_i_8(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + PlatformInt64 dco_decode_isize(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeI64(raw); + } + + @protected + JettonWalletDartWrapper dco_decode_jetton_wallet_dart_wrapper(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return JettonWalletDartWrapper( + innerWallet: dco_decode_RustOpaque_ArcdynJettonWalletBoxTrait(arr[0]), + ); + } + + @protected + JrpcConnectionDartWrapper dco_decode_jrpc_connection_dart_wrapper( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return JrpcConnectionDartWrapper.raw( + innerConnection: dco_decode_RustOpaque_ArcdynJrpcConnectionBoxTrait( + arr[0], + ), + ); + } + + @protected + JrpcTransportImpl dco_decode_jrpc_transport_impl(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return JrpcTransportImpl.raw( + innerTransport: dco_decode_RustOpaque_ArcdynTransportBoxTrait(arr[0]), + ); + } + + @protected + KeySigner dco_decode_key_signer(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return KeySigner_Encrypted(); + case 1: + return KeySigner_Derived(); + case 2: + return KeySigner_Ledger(); + case 3: + return KeySigner_Stub(dco_decode_bool(raw[1])); + default: + throw Exception("unreachable"); + } + } + + @protected + KeystoreDartWrapper dco_decode_keystore_dart_wrapper(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return KeystoreDartWrapper( + innerKeystore: dco_decode_RustOpaque_ArcdynKeyStoreApiBoxTrait(arr[0]), + ); + } + + @protected + LatestBlock dco_decode_latest_block(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); + return LatestBlock( + id: dco_decode_String(arr[0]), + endLt: dco_decode_u_64(arr[1]), + genUtime: dco_decode_u_32(arr[2]), + ); + } + + @protected + LedgerConnectionDartWrapper dco_decode_ledger_connection_dart_wrapper( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return LedgerConnectionDartWrapper.raw( + innerConnection: dco_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait( + arr[0], + ), + ); + } + + @protected + List dco_decode_list_String(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_String).toList(); + } + + @protected + List dco_decode_list_key_signer(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_key_signer).toList(); + } + + @protected + List dco_decode_list_opt_String(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_opt_String).toList(); + } + + @protected + List dco_decode_list_prim_i_32_loose(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as List; + } + + @protected + Int32List dco_decode_list_prim_i_32_strict(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as Int32List; + } + + @protected + Uint8List dco_decode_list_prim_u_8_strict(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as Uint8List; + } + + @protected + List<(String, String)> dco_decode_list_record_string_string(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_record_string_string).toList(); + } + + @protected + LogEntry dco_decode_log_entry(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 5) + throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); + return LogEntry( + timeMillis: dco_decode_i_64(arr[0]), + level: dco_decode_log_level(arr[1]), + tag: dco_decode_String(arr[2]), + msg: dco_decode_String(arr[3]), + stack: dco_decode_opt_String(arr[4]), + ); + } + + @protected + LogLevel dco_decode_log_level(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return LogLevel.values[raw as int]; + } + + @protected + MnemonicType dco_decode_mnemonic_type(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return MnemonicType_Legacy(); + case 1: + return MnemonicType_Bip39( + dco_decode_box_autoadd_bip_39_mnemonic_data(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + String? dco_decode_opt_String(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_String(raw); + } + + @protected + bool? dco_decode_opt_box_autoadd_bool(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_bool(raw); + } + + @protected + int? dco_decode_opt_box_autoadd_i_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_i_32(raw); + } + + @protected + LedgerConnectionDartWrapper? + dco_decode_opt_box_autoadd_ledger_connection_dart_wrapper(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_ledger_connection_dart_wrapper(raw); + } + + @protected + int? dco_decode_opt_box_autoadd_u_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_u_32(raw); + } + + @protected + List? dco_decode_opt_list_String(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_list_String(raw); + } + + @protected + PollingMethod dco_decode_polling_method(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return PollingMethod.values[raw as int]; + } + + @protected + ProtoConnectionDartWrapper dco_decode_proto_connection_dart_wrapper( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return ProtoConnectionDartWrapper.raw( + innerConnection: dco_decode_RustOpaque_ArcdynProtoConnectionBoxTrait( + arr[0], + ), + ); + } + + @protected + ProtoTransportImpl dco_decode_proto_transport_impl(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return ProtoTransportImpl.raw( + innerTransport: dco_decode_RustOpaque_ArcdynTransportBoxTrait(arr[0]), + ); + } + + @protected + (String, String) dco_decode_record_string_string(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) { + throw Exception('Expected 2 elements, got ${arr.length}'); + } + return (dco_decode_String(arr[0]), dco_decode_String(arr[1])); + } + + @protected + SignatureParts dco_decode_signature_parts(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return SignatureParts( + low: dco_decode_String(arr[0]), + high: dco_decode_String(arr[1]), + ); + } + + @protected + SignedData dco_decode_signed_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 4) + throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); + return SignedData( + dataHash: dco_decode_String(arr[0]), + signature: dco_decode_String(arr[1]), + signatureHex: dco_decode_String(arr[2]), + signatureParts: dco_decode_signature_parts(arr[3]), + ); + } + + @protected + SignedDataRaw dco_decode_signed_data_raw(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); + return SignedDataRaw( + signature: dco_decode_String(arr[0]), + signatureHex: dco_decode_String(arr[1]), + signatureParts: dco_decode_signature_parts(arr[2]), + ); + } + + @protected + StorageDartWrapper dco_decode_storage_dart_wrapper(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return StorageDartWrapper.raw( + innerStorage: dco_decode_RustOpaque_ArcdynStorageBoxTrait(arr[0]), + ); + } + + @protected + TokenWalletDartWrapper dco_decode_token_wallet_dart_wrapper(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return TokenWalletDartWrapper( + innerWallet: dco_decode_RustOpaque_ArcdynTokenWalletBoxTrait(arr[0]), + ); + } + + @protected + TonWalletDartWrapper dco_decode_ton_wallet_dart_wrapper(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return TonWalletDartWrapper( + innerWallet: dco_decode_RustOpaque_ArcdynTonWalletBoxTrait(arr[0]), + ); + } + + @protected + int dco_decode_u_16(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + int dco_decode_u_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + BigInt dco_decode_u_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeU64(raw); + } + + @protected + int dco_decode_u_8(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + void dco_decode_unit(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return; + } + + @protected + UnsignedMessageImpl dco_decode_unsigned_message_impl(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return UnsignedMessageImpl( + innerMessage: dco_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait(arr[0]), + ); + } + + @protected + BigInt dco_decode_usize(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeU64(raw); + } + + @protected + AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_String(deserializer); + return AnyhowException(inner); + } + + @protected + ArcFnStringDartFnFutureOptionString + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnStringDartFnFutureOptionStringImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + ArcFnStringDartFnFuture + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnStringDartFnFutureImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + ArcFnStringDartFnFutureString + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnStringDartFnFutureStringImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + ArcFnStringStringDartFnFuture + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnStringStringDartFnFutureImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + ArcFnVecU8DartFnFutureVecU8 + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnVecU8DartFnFutureVecU8Impl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + ArcFnU16DartFnFutureVecU8 + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnU16DartFnFutureVecU8Impl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + ArcFnU16OptionI32VecU8DartFnFutureVecU8 + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnU16OptionI32VecU8DartFnFutureVecU8Impl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Impl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + GenericContractSubscriptionHandlerImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return GenericContractSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + GqlConnectionImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return GqlConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + JettonWalletSubscriptionHandlerImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return JettonWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + JrpcConnectionImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return JrpcConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + LedgerConnectionImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return LedgerConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + ProtoConnectionImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ProtoConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + StorageImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return StorageImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + TokenWalletSubscriptionHandlerImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return TokenWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + TonWalletSubscriptionHandlerImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return TonWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + GenericContractSubscriptionHandlerImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return GenericContractSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcJrpcConnectionBoxTrait => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait; + @protected + GqlConnectionImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return GqlConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcKeyStoreApiBoxTrait => wire - .rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait; + @protected + JettonWalletSubscriptionHandlerImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return JettonWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcKeyStoreApiBoxTrait => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait; + @protected + JrpcConnectionImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return JrpcConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcLedgerConnectionBoxTrait => wire - .rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait; + @protected + LedgerConnectionImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return LedgerConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcLedgerConnectionBoxTrait => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait; + @protected + ProtoConnectionImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ProtoConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcProtoConnectionBoxTrait => wire - .rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait; + @protected + StorageImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return StorageImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcProtoConnectionBoxTrait => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait; + @protected + TokenWalletSubscriptionHandlerImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return TokenWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcStorageBoxTrait => - wire.rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait; + @protected + TonWalletSubscriptionHandlerImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return TonWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcStorageBoxTrait => - wire.rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait; + @protected + GenericContractSubscriptionHandlerImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return GenericContractSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcTokenWalletBoxTrait => wire - .rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait; + @protected + GqlConnectionImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return GqlConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcTokenWalletBoxTrait => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait; + @protected + JettonWalletSubscriptionHandlerImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return JettonWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcTonWalletBoxTrait => wire - .rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait; + @protected + JrpcConnectionImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return JrpcConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcTonWalletBoxTrait => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait; + @protected + LedgerConnectionImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return LedgerConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcTransportBoxTrait => wire - .rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait; + @protected + ProtoConnectionImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ProtoConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcTransportBoxTrait => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait; + @protected + StorageImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return StorageImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ArcUnsignedMessageBoxTrait => wire - .rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait; + @protected + TokenWalletSubscriptionHandlerImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return TokenWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ArcUnsignedMessageBoxTrait => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait; + @protected + TonWalletSubscriptionHandlerImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return TonWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } @protected - AnyhowException dco_decode_AnyhowException(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return AnyhowException(raw as String); + Object sse_decode_DartOpaque(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_isize(deserializer); + return decodeDartOpaque(inner, generalizedFrbRustBinding); } @protected - Map dco_decode_Map_String_String_None(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return Map.fromEntries(dco_decode_list_record_string_string(raw) - .map((e) => MapEntry(e.$1, e.$2))); + Map sse_decode_Map_String_String_None( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_list_record_string_string(deserializer); + return Map.fromEntries(inner.map((e) => MapEntry(e.$1, e.$2))); } @protected ArcAccountsStorageBoxTrait - dco_decode_RustOpaque_ArcdynAccountsStorageBoxTrait(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ArcAccountsStorageBoxTraitImpl.frbInternalDcoDecode( - raw as List); + sse_decode_RustOpaque_ArcdynAccountsStorageBoxTrait( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcAccountsStorageBoxTraitImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected ArcGenericContractBoxTrait - dco_decode_RustOpaque_ArcdynGenericContractBoxTrait(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ArcGenericContractBoxTraitImpl.frbInternalDcoDecode( - raw as List); + sse_decode_RustOpaque_ArcdynGenericContractBoxTrait( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcGenericContractBoxTraitImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - ArcGqlConnectionBoxTrait dco_decode_RustOpaque_ArcdynGqlConnectionBoxTrait( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ArcGqlConnectionBoxTraitImpl.frbInternalDcoDecode( - raw as List); + ArcGqlConnectionBoxTrait sse_decode_RustOpaque_ArcdynGqlConnectionBoxTrait( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcGqlConnectionBoxTraitImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - ArcJettonWalletBoxTrait dco_decode_RustOpaque_ArcdynJettonWalletBoxTrait( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ArcJettonWalletBoxTraitImpl.frbInternalDcoDecode( - raw as List); + ArcJettonWalletBoxTrait sse_decode_RustOpaque_ArcdynJettonWalletBoxTrait( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcJettonWalletBoxTraitImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - ArcJrpcConnectionBoxTrait dco_decode_RustOpaque_ArcdynJrpcConnectionBoxTrait( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ArcJrpcConnectionBoxTraitImpl.frbInternalDcoDecode( - raw as List); + ArcJrpcConnectionBoxTrait sse_decode_RustOpaque_ArcdynJrpcConnectionBoxTrait( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcJrpcConnectionBoxTraitImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - ArcKeyStoreApiBoxTrait dco_decode_RustOpaque_ArcdynKeyStoreApiBoxTrait( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ArcKeyStoreApiBoxTraitImpl.frbInternalDcoDecode( - raw as List); + ArcKeyStoreApiBoxTrait sse_decode_RustOpaque_ArcdynKeyStoreApiBoxTrait( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcKeyStoreApiBoxTraitImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected ArcLedgerConnectionBoxTrait - dco_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ArcLedgerConnectionBoxTraitImpl.frbInternalDcoDecode( - raw as List); + sse_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcLedgerConnectionBoxTraitImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected ArcProtoConnectionBoxTrait - dco_decode_RustOpaque_ArcdynProtoConnectionBoxTrait(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ArcProtoConnectionBoxTraitImpl.frbInternalDcoDecode( - raw as List); + sse_decode_RustOpaque_ArcdynProtoConnectionBoxTrait( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcProtoConnectionBoxTraitImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - ArcStorageBoxTrait dco_decode_RustOpaque_ArcdynStorageBoxTrait(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ArcStorageBoxTraitImpl.frbInternalDcoDecode(raw as List); + ArcStorageBoxTrait sse_decode_RustOpaque_ArcdynStorageBoxTrait( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcStorageBoxTraitImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - ArcTokenWalletBoxTrait dco_decode_RustOpaque_ArcdynTokenWalletBoxTrait( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ArcTokenWalletBoxTraitImpl.frbInternalDcoDecode( - raw as List); + ArcTokenWalletBoxTrait sse_decode_RustOpaque_ArcdynTokenWalletBoxTrait( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcTokenWalletBoxTraitImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - ArcTonWalletBoxTrait dco_decode_RustOpaque_ArcdynTonWalletBoxTrait( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ArcTonWalletBoxTraitImpl.frbInternalDcoDecode(raw as List); + ArcTonWalletBoxTrait sse_decode_RustOpaque_ArcdynTonWalletBoxTrait( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcTonWalletBoxTraitImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - ArcTransportBoxTrait dco_decode_RustOpaque_ArcdynTransportBoxTrait( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ArcTransportBoxTraitImpl.frbInternalDcoDecode(raw as List); + ArcTransportBoxTrait sse_decode_RustOpaque_ArcdynTransportBoxTrait( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcTransportBoxTraitImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected ArcUnsignedMessageBoxTrait - dco_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ArcUnsignedMessageBoxTraitImpl.frbInternalDcoDecode( - raw as List); + sse_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcUnsignedMessageBoxTraitImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - RustStreamSink - dco_decode_StreamSink_dart_call_stub_registred_Dco(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - throw UnimplementedError(); + ArcFnStringDartFnFutureOptionString + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnStringDartFnFutureOptionStringImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - RustStreamSink dco_decode_StreamSink_log_entry_Dco(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - throw UnimplementedError(); + ArcFnStringDartFnFuture + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnStringDartFnFutureImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - String dco_decode_String(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as String; + ArcFnStringDartFnFutureString + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnStringDartFnFutureStringImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - MyFormat dco_decode_TraitDef_MyFormat(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - throw UnimplementedError(); + ArcFnStringStringDartFnFuture + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnStringStringDartFnFutureImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - AccountsStorageImpl dco_decode_accounts_storage_impl(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return AccountsStorageImpl( - innerStorage: dco_decode_RustOpaque_ArcdynAccountsStorageBoxTrait(arr[0]), + ArcFnVecU8DartFnFutureVecU8 + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnVecU8DartFnFutureVecU8Impl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), ); } @protected - Bip39Entropy dco_decode_bip_39_entropy(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return Bip39Entropy.values[raw as int]; + ArcFnU16DartFnFutureVecU8 + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnU16DartFnFutureVecU8Impl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - Bip39MnemonicData dco_decode_bip_39_mnemonic_data(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 3) - throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); - return Bip39MnemonicData( - accountId: dco_decode_u_16(arr[0]), - path: dco_decode_bip_39_path(arr[1]), - entropy: dco_decode_bip_39_entropy(arr[2]), + ArcFnU16OptionI32VecU8DartFnFutureVecU8 + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnU16OptionI32VecU8DartFnFutureVecU8Impl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), ); } @protected - Bip39Path dco_decode_bip_39_path(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return Bip39Path.values[raw as int]; + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Impl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - bool dco_decode_bool(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as bool; + GenericContractSubscriptionHandlerImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return GenericContractSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - AccountsStorageImpl dco_decode_box_autoadd_accounts_storage_impl( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_accounts_storage_impl(raw); + GqlConnectionImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return GqlConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - Bip39MnemonicData dco_decode_box_autoadd_bip_39_mnemonic_data(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bip_39_mnemonic_data(raw); + JettonWalletSubscriptionHandlerImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return JettonWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + JrpcConnectionImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return JrpcConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + LedgerConnectionImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return LedgerConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + ProtoConnectionImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ProtoConnectionImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); + } + + @protected + StorageImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return StorageImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - bool dco_decode_box_autoadd_bool(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as bool; + TokenWalletSubscriptionHandlerImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return TokenWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - CallerTestClass dco_decode_box_autoadd_caller_test_class(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_caller_test_class(raw); + TonWalletSubscriptionHandlerImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return TonWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), + sse_decode_i_32(deserializer), + ); } @protected - DartCallStub dco_decode_box_autoadd_dart_call_stub(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_dart_call_stub(raw); + RustStreamSink sse_decode_StreamSink_log_entry_Dco( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + throw UnimplementedError('Unreachable ()'); } @protected - DynamicValue dco_decode_box_autoadd_dynamic_value(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_dynamic_value(raw); + String sse_decode_String(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_list_prim_u_8_strict(deserializer); + return utf8.decoder.convert(inner); } @protected - GenericContractDartWrapper - dco_decode_box_autoadd_generic_contract_dart_wrapper(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_generic_contract_dart_wrapper(raw); + AccountsStorageImpl sse_decode_accounts_storage_impl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerStorage = sse_decode_RustOpaque_ArcdynAccountsStorageBoxTrait( + deserializer, + ); + return AccountsStorageImpl(innerStorage: var_innerStorage); } @protected - GqlConnectionDartWrapper dco_decode_box_autoadd_gql_connection_dart_wrapper( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_gql_connection_dart_wrapper(raw); + Bip39Entropy sse_decode_bip_39_entropy(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return Bip39Entropy.values[inner]; } @protected - GqlTransportImpl dco_decode_box_autoadd_gql_transport_impl(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_gql_transport_impl(raw); + Bip39MnemonicData sse_decode_bip_39_mnemonic_data( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_accountId = sse_decode_u_16(deserializer); + var var_path = sse_decode_bip_39_path(deserializer); + var var_entropy = sse_decode_bip_39_entropy(deserializer); + return Bip39MnemonicData( + accountId: var_accountId, + path: var_path, + entropy: var_entropy, + ); } @protected - int dco_decode_box_autoadd_i_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; + Bip39Path sse_decode_bip_39_path(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return Bip39Path.values[inner]; } @protected - JettonWalletDartWrapper dco_decode_box_autoadd_jetton_wallet_dart_wrapper( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_jetton_wallet_dart_wrapper(raw); + bool sse_decode_bool(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint8() != 0; } @protected - JrpcConnectionDartWrapper dco_decode_box_autoadd_jrpc_connection_dart_wrapper( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_jrpc_connection_dart_wrapper(raw); + AccountsStorageImpl sse_decode_box_autoadd_accounts_storage_impl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_accounts_storage_impl(deserializer)); } @protected - JrpcTransportImpl dco_decode_box_autoadd_jrpc_transport_impl(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_jrpc_transport_impl(raw); + Bip39MnemonicData sse_decode_box_autoadd_bip_39_mnemonic_data( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bip_39_mnemonic_data(deserializer)); } @protected - KeySigner dco_decode_box_autoadd_key_signer(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_key_signer(raw); + bool sse_decode_box_autoadd_bool(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bool(deserializer)); } @protected - KeystoreDartWrapper dco_decode_box_autoadd_keystore_dart_wrapper( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_keystore_dart_wrapper(raw); + GenericContractDartWrapper + sse_decode_box_autoadd_generic_contract_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_generic_contract_dart_wrapper(deserializer)); } @protected - LedgerConnectionDartWrapper - dco_decode_box_autoadd_ledger_connection_dart_wrapper(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_ledger_connection_dart_wrapper(raw); + GqlConnectionDartWrapper sse_decode_box_autoadd_gql_connection_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_gql_connection_dart_wrapper(deserializer)); } @protected - MnemonicType dco_decode_box_autoadd_mnemonic_type(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_mnemonic_type(raw); + GqlTransportImpl sse_decode_box_autoadd_gql_transport_impl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_gql_transport_impl(deserializer)); } @protected - MyClass dco_decode_box_autoadd_my_class(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_my_class(raw); + int sse_decode_box_autoadd_i_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_i_32(deserializer)); } @protected - ProtoConnectionDartWrapper - dco_decode_box_autoadd_proto_connection_dart_wrapper(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_proto_connection_dart_wrapper(raw); + JettonWalletDartWrapper sse_decode_box_autoadd_jetton_wallet_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_jetton_wallet_dart_wrapper(deserializer)); } @protected - ProtoTransportImpl dco_decode_box_autoadd_proto_transport_impl(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_proto_transport_impl(raw); + JrpcConnectionDartWrapper sse_decode_box_autoadd_jrpc_connection_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_jrpc_connection_dart_wrapper(deserializer)); } @protected - StorageDartWrapper dco_decode_box_autoadd_storage_dart_wrapper(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_storage_dart_wrapper(raw); + JrpcTransportImpl sse_decode_box_autoadd_jrpc_transport_impl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_jrpc_transport_impl(deserializer)); } @protected - TokenWalletDartWrapper dco_decode_box_autoadd_token_wallet_dart_wrapper( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_token_wallet_dart_wrapper(raw); + KeySigner sse_decode_box_autoadd_key_signer(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_key_signer(deserializer)); } @protected - TonWalletDartWrapper dco_decode_box_autoadd_ton_wallet_dart_wrapper( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_ton_wallet_dart_wrapper(raw); + KeystoreDartWrapper sse_decode_box_autoadd_keystore_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_keystore_dart_wrapper(deserializer)); } @protected - int dco_decode_box_autoadd_u_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; + LedgerConnectionDartWrapper + sse_decode_box_autoadd_ledger_connection_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ledger_connection_dart_wrapper(deserializer)); } @protected - UnsignedMessageImpl dco_decode_box_autoadd_unsigned_message_impl( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_unsigned_message_impl(raw); + MnemonicType sse_decode_box_autoadd_mnemonic_type( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_mnemonic_type(deserializer)); } @protected - CallerTestClass dco_decode_caller_test_class(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return CallerTestClass( - instanceHash: dco_decode_String(arr[0]), - value: dco_decode_i_32(arr[1]), - ); + ProtoConnectionDartWrapper + sse_decode_box_autoadd_proto_connection_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_proto_connection_dart_wrapper(deserializer)); } @protected - DartCallStub dco_decode_dart_call_stub(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 4) - throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return DartCallStub( - instanceHash: dco_decode_String(arr[0]), - fnName: dco_decode_String(arr[1]), - args: dco_decode_list_dynamic_value(arr[2]), - namedArgs: dco_decode_list_dynamic_named_value(arr[3]), - ); + ProtoTransportImpl sse_decode_box_autoadd_proto_transport_impl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_proto_transport_impl(deserializer)); } @protected - DartCallStubRegistred dco_decode_dart_call_stub_registred(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return DartCallStubRegistred( - id: dco_decode_opt_String(arr[0]), - stub: dco_decode_dart_call_stub(arr[1]), - ); + StorageDartWrapper sse_decode_box_autoadd_storage_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_storage_dart_wrapper(deserializer)); } @protected - DynamicNamedValue dco_decode_dynamic_named_value(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return DynamicNamedValue( - name: dco_decode_String(arr[0]), - value: dco_decode_opt_box_autoadd_dynamic_value(arr[1]), - ); + TokenWalletDartWrapper sse_decode_box_autoadd_token_wallet_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_token_wallet_dart_wrapper(deserializer)); } @protected - DynamicValue dco_decode_dynamic_value(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return DynamicValue_U16( - dco_decode_u_16(raw[1]), - ); - case 1: - return DynamicValue_U32( - dco_decode_u_32(raw[1]), - ); - case 2: - return DynamicValue_I32( - dco_decode_i_32(raw[1]), - ); - case 3: - return DynamicValue_U64( - dco_decode_u_64(raw[1]), - ); - case 4: - return DynamicValue_I64( - dco_decode_i_64(raw[1]), - ); - case 5: - return DynamicValue_F32( - dco_decode_f_32(raw[1]), - ); - case 6: - return DynamicValue_F64( - dco_decode_f_64(raw[1]), - ); - case 7: - return DynamicValue_String( - dco_decode_String(raw[1]), - ); - case 8: - return DynamicValue_VecU8( - dco_decode_list_prim_u_8_strict(raw[1]), - ); - case 9: - return DynamicValue_MegaStruct( - dco_decode_String(raw[1]), - ); - case 10: - return DynamicValue_Error( - dco_decode_error_code(raw[1]), - ); - case 11: - return DynamicValue_None(); - default: - throw Exception("unreachable"); - } + TonWalletDartWrapper sse_decode_box_autoadd_ton_wallet_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ton_wallet_dart_wrapper(deserializer)); } @protected - ErrorCode dco_decode_error_code(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ErrorCode.values[raw as int]; + int sse_decode_box_autoadd_u_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_u_32(deserializer)); } @protected - double dco_decode_f_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as double; + UnsignedMessageImpl sse_decode_box_autoadd_unsigned_message_impl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_unsigned_message_impl(deserializer)); } @protected - double dco_decode_f_64(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as double; + GeneratedKeyG sse_decode_generated_key_g(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_words = sse_decode_list_String(deserializer); + var var_accountType = sse_decode_mnemonic_type(deserializer); + return GeneratedKeyG(words: var_words, accountType: var_accountType); } @protected - GeneratedKeyG dco_decode_generated_key_g(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return GeneratedKeyG( - words: dco_decode_list_String(arr[0]), - accountType: dco_decode_mnemonic_type(arr[1]), + GenericContractDartWrapper sse_decode_generic_contract_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerContract = sse_decode_RustOpaque_ArcdynGenericContractBoxTrait( + deserializer, ); + return GenericContractDartWrapper(innerContract: var_innerContract); } @protected - GenericContractDartWrapper dco_decode_generic_contract_dart_wrapper( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return GenericContractDartWrapper( - innerContract: - dco_decode_RustOpaque_ArcdynGenericContractBoxTrait(arr[0]), + GqlConnectionDartWrapper sse_decode_gql_connection_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerConnection = sse_decode_RustOpaque_ArcdynGqlConnectionBoxTrait( + deserializer, ); + return GqlConnectionDartWrapper.raw(innerConnection: var_innerConnection); } @protected - GqlConnectionDartWrapper dco_decode_gql_connection_dart_wrapper(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return GqlConnectionDartWrapper.raw( - innerConnection: - dco_decode_RustOpaque_ArcdynGqlConnectionBoxTrait(arr[0]), + GqlTransportImpl sse_decode_gql_transport_impl(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerTransport = sse_decode_RustOpaque_ArcdynTransportBoxTrait( + deserializer, ); + return GqlTransportImpl.raw(innerTransport: var_innerTransport); } @protected - GqlTransportImpl dco_decode_gql_transport_impl(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return GqlTransportImpl.raw( - innerTransport: dco_decode_RustOpaque_ArcdynTransportBoxTrait(arr[0]), - ); + int sse_decode_i_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getInt32(); } @protected - int dco_decode_i_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; + PlatformInt64 sse_decode_i_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getPlatformInt64(); } @protected - PlatformInt64 dco_decode_i_64(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dcoDecodeI64(raw); + int sse_decode_i_8(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getInt8(); } @protected - int dco_decode_i_8(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; + PlatformInt64 sse_decode_isize(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getPlatformInt64(); } @protected - JettonWalletDartWrapper dco_decode_jetton_wallet_dart_wrapper(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return JettonWalletDartWrapper( - innerWallet: dco_decode_RustOpaque_ArcdynJettonWalletBoxTrait(arr[0]), + JettonWalletDartWrapper sse_decode_jetton_wallet_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerWallet = sse_decode_RustOpaque_ArcdynJettonWalletBoxTrait( + deserializer, ); + return JettonWalletDartWrapper(innerWallet: var_innerWallet); } @protected - JrpcConnectionDartWrapper dco_decode_jrpc_connection_dart_wrapper( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return JrpcConnectionDartWrapper.raw( - innerConnection: - dco_decode_RustOpaque_ArcdynJrpcConnectionBoxTrait(arr[0]), - ); + JrpcConnectionDartWrapper sse_decode_jrpc_connection_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerConnection = + sse_decode_RustOpaque_ArcdynJrpcConnectionBoxTrait(deserializer); + return JrpcConnectionDartWrapper.raw(innerConnection: var_innerConnection); } @protected - JrpcTransportImpl dco_decode_jrpc_transport_impl(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return JrpcTransportImpl.raw( - innerTransport: dco_decode_RustOpaque_ArcdynTransportBoxTrait(arr[0]), + JrpcTransportImpl sse_decode_jrpc_transport_impl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerTransport = sse_decode_RustOpaque_ArcdynTransportBoxTrait( + deserializer, ); + return JrpcTransportImpl.raw(innerTransport: var_innerTransport); } @protected - KeySigner dco_decode_key_signer(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { + KeySigner sse_decode_key_signer(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { case 0: return KeySigner_Encrypted(); case 1: @@ -8273,1697 +14381,2265 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform case 2: return KeySigner_Ledger(); case 3: - return KeySigner_Stub( - dco_decode_bool(raw[1]), - ); + var var_field0 = sse_decode_bool(deserializer); + return KeySigner_Stub(var_field0); default: - throw Exception("unreachable"); + throw UnimplementedError(''); } } @protected - KeystoreDartWrapper dco_decode_keystore_dart_wrapper(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return KeystoreDartWrapper( - innerKeystore: dco_decode_RustOpaque_ArcdynKeyStoreApiBoxTrait(arr[0]), + KeystoreDartWrapper sse_decode_keystore_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerKeystore = sse_decode_RustOpaque_ArcdynKeyStoreApiBoxTrait( + deserializer, ); + return KeystoreDartWrapper(innerKeystore: var_innerKeystore); } @protected - LatestBlock dco_decode_latest_block(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 3) - throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); - return LatestBlock( - id: dco_decode_String(arr[0]), - endLt: dco_decode_u_64(arr[1]), - genUtime: dco_decode_u_32(arr[2]), - ); + LatestBlock sse_decode_latest_block(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_id = sse_decode_String(deserializer); + var var_endLt = sse_decode_u_64(deserializer); + var var_genUtime = sse_decode_u_32(deserializer); + return LatestBlock(id: var_id, endLt: var_endLt, genUtime: var_genUtime); } @protected - LedgerConnectionDartWrapper dco_decode_ledger_connection_dart_wrapper( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + LedgerConnectionDartWrapper sse_decode_ledger_connection_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerConnection = + sse_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait(deserializer); return LedgerConnectionDartWrapper.raw( - innerConnection: - dco_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait(arr[0]), + innerConnection: var_innerConnection, ); } @protected - LedgerConnectionImpl dco_decode_ledger_connection_impl(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return LedgerConnectionImpl.raw( - instanceHash: dco_decode_String(arr[0]), - ); - } + List sse_decode_list_String(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs - @protected - List dco_decode_list_String(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_String).toList(); + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_String(deserializer)); + } + return ans_; } @protected - List dco_decode_list_dynamic_named_value(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_dynamic_named_value).toList(); - } + List sse_decode_list_key_signer(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs - @protected - List dco_decode_list_dynamic_value(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_dynamic_value).toList(); + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_key_signer(deserializer)); + } + return ans_; } @protected - List dco_decode_list_key_signer(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_key_signer).toList(); - } + List sse_decode_list_opt_String(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs - @protected - List dco_decode_list_opt_String(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_opt_String).toList(); + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_opt_String(deserializer)); + } + return ans_; } @protected - List dco_decode_list_prim_i_32_loose(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as List; + List sse_decode_list_prim_i_32_loose(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var len_ = sse_decode_i_32(deserializer); + return deserializer.buffer.getInt32List(len_); } @protected - Int32List dco_decode_list_prim_i_32_strict(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as Int32List; + Int32List sse_decode_list_prim_i_32_strict(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var len_ = sse_decode_i_32(deserializer); + return deserializer.buffer.getInt32List(len_); } @protected - Uint8List dco_decode_list_prim_u_8_strict(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as Uint8List; + Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var len_ = sse_decode_i_32(deserializer); + return deserializer.buffer.getUint8List(len_); } @protected - List<(String, String)> dco_decode_list_record_string_string(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_record_string_string).toList(); + List<(String, String)> sse_decode_list_record_string_string( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = <(String, String)>[]; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_record_string_string(deserializer)); + } + return ans_; } @protected - LogEntry dco_decode_log_entry(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 5) - throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); + LogEntry sse_decode_log_entry(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_timeMillis = sse_decode_i_64(deserializer); + var var_level = sse_decode_log_level(deserializer); + var var_tag = sse_decode_String(deserializer); + var var_msg = sse_decode_String(deserializer); + var var_stack = sse_decode_opt_String(deserializer); return LogEntry( - timeMillis: dco_decode_i_64(arr[0]), - level: dco_decode_log_level(arr[1]), - tag: dco_decode_String(arr[2]), - msg: dco_decode_String(arr[3]), - stack: dco_decode_opt_String(arr[4]), + timeMillis: var_timeMillis, + level: var_level, + tag: var_tag, + msg: var_msg, + stack: var_stack, ); } @protected - LogLevel dco_decode_log_level(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return LogLevel.values[raw as int]; + LogLevel sse_decode_log_level(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return LogLevel.values[inner]; } @protected - MnemonicType dco_decode_mnemonic_type(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { + MnemonicType sse_decode_mnemonic_type(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { case 0: return MnemonicType_Legacy(); case 1: - return MnemonicType_Bip39( - dco_decode_box_autoadd_bip_39_mnemonic_data(raw[1]), + var var_field0 = sse_decode_box_autoadd_bip_39_mnemonic_data( + deserializer, ); + return MnemonicType_Bip39(var_field0); default: - throw Exception("unreachable"); + throw UnimplementedError(''); + } + } + + @protected + String? sse_decode_opt_String(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_String(deserializer)); + } else { + return null; + } + } + + @protected + bool? sse_decode_opt_box_autoadd_bool(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_bool(deserializer)); + } else { + return null; + } + } + + @protected + int? sse_decode_opt_box_autoadd_i_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_i_32(deserializer)); + } else { + return null; + } + } + + @protected + LedgerConnectionDartWrapper? + sse_decode_opt_box_autoadd_ledger_connection_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_ledger_connection_dart_wrapper( + deserializer, + )); + } else { + return null; + } + } + + @protected + int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_u_32(deserializer)); + } else { + return null; } } @protected - MyClass dco_decode_my_class(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return MyClass( - val: dco_decode_i_32(arr[0]), - ); + List? sse_decode_opt_list_String(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_list_String(deserializer)); + } else { + return null; + } } @protected - String? dco_decode_opt_String(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_String(raw); + PollingMethod sse_decode_polling_method(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return PollingMethod.values[inner]; } @protected - bool? dco_decode_opt_box_autoadd_bool(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_bool(raw); + ProtoConnectionDartWrapper sse_decode_proto_connection_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerConnection = + sse_decode_RustOpaque_ArcdynProtoConnectionBoxTrait(deserializer); + return ProtoConnectionDartWrapper.raw(innerConnection: var_innerConnection); } @protected - DynamicValue? dco_decode_opt_box_autoadd_dynamic_value(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_dynamic_value(raw); + ProtoTransportImpl sse_decode_proto_transport_impl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerTransport = sse_decode_RustOpaque_ArcdynTransportBoxTrait( + deserializer, + ); + return ProtoTransportImpl.raw(innerTransport: var_innerTransport); } @protected - int? dco_decode_opt_box_autoadd_i_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_i_32(raw); + (String, String) sse_decode_record_string_string( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_field0 = sse_decode_String(deserializer); + var var_field1 = sse_decode_String(deserializer); + return (var_field0, var_field1); } @protected - LedgerConnectionDartWrapper? - dco_decode_opt_box_autoadd_ledger_connection_dart_wrapper(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null - ? null - : dco_decode_box_autoadd_ledger_connection_dart_wrapper(raw); + SignatureParts sse_decode_signature_parts(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_low = sse_decode_String(deserializer); + var var_high = sse_decode_String(deserializer); + return SignatureParts(low: var_low, high: var_high); } @protected - int? dco_decode_opt_box_autoadd_u_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_u_32(raw); + SignedData sse_decode_signed_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_dataHash = sse_decode_String(deserializer); + var var_signature = sse_decode_String(deserializer); + var var_signatureHex = sse_decode_String(deserializer); + var var_signatureParts = sse_decode_signature_parts(deserializer); + return SignedData( + dataHash: var_dataHash, + signature: var_signature, + signatureHex: var_signatureHex, + signatureParts: var_signatureParts, + ); } @protected - List? dco_decode_opt_list_String(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_list_String(raw); + SignedDataRaw sse_decode_signed_data_raw(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_signature = sse_decode_String(deserializer); + var var_signatureHex = sse_decode_String(deserializer); + var var_signatureParts = sse_decode_signature_parts(deserializer); + return SignedDataRaw( + signature: var_signature, + signatureHex: var_signatureHex, + signatureParts: var_signatureParts, + ); } @protected - PollingMethod dco_decode_polling_method(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return PollingMethod.values[raw as int]; + StorageDartWrapper sse_decode_storage_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerStorage = sse_decode_RustOpaque_ArcdynStorageBoxTrait( + deserializer, + ); + return StorageDartWrapper.raw(innerStorage: var_innerStorage); } @protected - ProtoConnectionDartWrapper dco_decode_proto_connection_dart_wrapper( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return ProtoConnectionDartWrapper.raw( - innerConnection: - dco_decode_RustOpaque_ArcdynProtoConnectionBoxTrait(arr[0]), + TokenWalletDartWrapper sse_decode_token_wallet_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerWallet = sse_decode_RustOpaque_ArcdynTokenWalletBoxTrait( + deserializer, ); + return TokenWalletDartWrapper(innerWallet: var_innerWallet); } @protected - ProtoTransportImpl dco_decode_proto_transport_impl(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return ProtoTransportImpl.raw( - innerTransport: dco_decode_RustOpaque_ArcdynTransportBoxTrait(arr[0]), + TonWalletDartWrapper sse_decode_ton_wallet_dart_wrapper( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerWallet = sse_decode_RustOpaque_ArcdynTonWalletBoxTrait( + deserializer, ); + return TonWalletDartWrapper(innerWallet: var_innerWallet); } @protected - (String, String) dco_decode_record_string_string(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) { - throw Exception('Expected 2 elements, got ${arr.length}'); - } - return ( - dco_decode_String(arr[0]), - dco_decode_String(arr[1]), - ); + int sse_decode_u_16(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint16(); } @protected - SignatureParts dco_decode_signature_parts(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return SignatureParts( - low: dco_decode_String(arr[0]), - high: dco_decode_String(arr[1]), - ); + int sse_decode_u_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint32(); } @protected - SignedData dco_decode_signed_data(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 4) - throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return SignedData( - dataHash: dco_decode_String(arr[0]), - signature: dco_decode_String(arr[1]), - signatureHex: dco_decode_String(arr[2]), - signatureParts: dco_decode_signature_parts(arr[3]), - ); + BigInt sse_decode_u_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getBigUint64(); } @protected - SignedDataRaw dco_decode_signed_data_raw(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 3) - throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); - return SignedDataRaw( - signature: dco_decode_String(arr[0]), - signatureHex: dco_decode_String(arr[1]), - signatureParts: dco_decode_signature_parts(arr[2]), - ); + int sse_decode_u_8(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint8(); } @protected - StorageDartWrapper dco_decode_storage_dart_wrapper(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return StorageDartWrapper.raw( - innerStorage: dco_decode_RustOpaque_ArcdynStorageBoxTrait(arr[0]), - ); + void sse_decode_unit(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs } @protected - StorageImpl dco_decode_storage_impl(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return StorageImpl( - instanceHash: dco_decode_String(arr[0]), + UnsignedMessageImpl sse_decode_unsigned_message_impl( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_innerMessage = sse_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait( + deserializer, ); + return UnsignedMessageImpl(innerMessage: var_innerMessage); } @protected - TokenWalletDartWrapper dco_decode_token_wallet_dart_wrapper(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return TokenWalletDartWrapper( - innerWallet: dco_decode_RustOpaque_ArcdynTokenWalletBoxTrait(arr[0]), - ); + BigInt sse_decode_usize(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getBigUint64(); } @protected - TonWalletDartWrapper dco_decode_ton_wallet_dart_wrapper(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return TonWalletDartWrapper( - innerWallet: dco_decode_RustOpaque_ArcdynTonWalletBoxTrait(arr[0]), + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ArcFnStringDartFnFutureOptionString raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnStringDartFnFutureOptionStringImpl) + .frbInternalCstEncode(move: true); + } + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ArcFnStringDartFnFuture raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnStringDartFnFutureImpl).frbInternalCstEncode( + move: true, ); } @protected - int dco_decode_u_16(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ArcFnStringDartFnFutureString raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnStringDartFnFutureStringImpl).frbInternalCstEncode( + move: true, + ); } @protected - int dco_decode_u_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ArcFnStringStringDartFnFuture raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnStringStringDartFnFutureImpl).frbInternalCstEncode( + move: true, + ); } @protected - BigInt dco_decode_u_64(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dcoDecodeU64(raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + ArcFnVecU8DartFnFutureVecU8 raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnVecU8DartFnFutureVecU8Impl).frbInternalCstEncode( + move: true, + ); } @protected - int dco_decode_u_8(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + ArcFnU16DartFnFutureVecU8 raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnU16DartFnFutureVecU8Impl).frbInternalCstEncode( + move: true, + ); } @protected - void dco_decode_unit(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return; + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + ArcFnU16OptionI32VecU8DartFnFutureVecU8 raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnU16OptionI32VecU8DartFnFutureVecU8Impl) + .frbInternalCstEncode(move: true); } @protected - UnsignedMessageImpl dco_decode_unsigned_message_impl(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return UnsignedMessageImpl( - innerMessage: dco_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait(arr[0]), - ); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Impl) + .frbInternalCstEncode(move: true); } @protected - BigInt dco_decode_usize(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dcoDecodeU64(raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as GenericContractSubscriptionHandlerImplImpl) + .frbInternalCstEncode(move: true); } @protected - AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_String(deserializer); - return AnyhowException(inner); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as GqlConnectionImplImpl).frbInternalCstEncode(move: true); } @protected - Map sse_decode_Map_String_String_None( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_list_record_string_string(deserializer); - return Map.fromEntries(inner.map((e) => MapEntry(e.$1, e.$2))); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as JettonWalletSubscriptionHandlerImplImpl) + .frbInternalCstEncode(move: true); } @protected - ArcAccountsStorageBoxTrait - sse_decode_RustOpaque_ArcdynAccountsStorageBoxTrait( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ArcAccountsStorageBoxTraitImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as JrpcConnectionImplImpl).frbInternalCstEncode(move: true); } @protected - ArcGenericContractBoxTrait - sse_decode_RustOpaque_ArcdynGenericContractBoxTrait( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ArcGenericContractBoxTraitImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as LedgerConnectionImplImpl).frbInternalCstEncode(move: true); } @protected - ArcGqlConnectionBoxTrait sse_decode_RustOpaque_ArcdynGqlConnectionBoxTrait( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ArcGqlConnectionBoxTraitImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ProtoConnectionImplImpl).frbInternalCstEncode(move: true); } @protected - ArcJettonWalletBoxTrait sse_decode_RustOpaque_ArcdynJettonWalletBoxTrait( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ArcJettonWalletBoxTraitImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as StorageImplImpl).frbInternalCstEncode(move: true); } @protected - ArcJrpcConnectionBoxTrait sse_decode_RustOpaque_ArcdynJrpcConnectionBoxTrait( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ArcJrpcConnectionBoxTraitImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as TokenWalletSubscriptionHandlerImplImpl).frbInternalCstEncode( + move: true, + ); } @protected - ArcKeyStoreApiBoxTrait sse_decode_RustOpaque_ArcdynKeyStoreApiBoxTrait( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ArcKeyStoreApiBoxTraitImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as TonWalletSubscriptionHandlerImplImpl).frbInternalCstEncode( + move: true, + ); } @protected - ArcLedgerConnectionBoxTrait - sse_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ArcLedgerConnectionBoxTraitImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as GenericContractSubscriptionHandlerImplImpl) + .frbInternalCstEncode(move: false); } @protected - ArcProtoConnectionBoxTrait - sse_decode_RustOpaque_ArcdynProtoConnectionBoxTrait( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ArcProtoConnectionBoxTraitImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as GqlConnectionImplImpl).frbInternalCstEncode(move: false); } @protected - ArcStorageBoxTrait sse_decode_RustOpaque_ArcdynStorageBoxTrait( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ArcStorageBoxTraitImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as JettonWalletSubscriptionHandlerImplImpl) + .frbInternalCstEncode(move: false); } @protected - ArcTokenWalletBoxTrait sse_decode_RustOpaque_ArcdynTokenWalletBoxTrait( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ArcTokenWalletBoxTraitImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as JrpcConnectionImplImpl).frbInternalCstEncode(move: false); } @protected - ArcTonWalletBoxTrait sse_decode_RustOpaque_ArcdynTonWalletBoxTrait( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ArcTonWalletBoxTraitImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as LedgerConnectionImplImpl).frbInternalCstEncode(move: false); } @protected - ArcTransportBoxTrait sse_decode_RustOpaque_ArcdynTransportBoxTrait( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ArcTransportBoxTraitImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ProtoConnectionImplImpl).frbInternalCstEncode(move: false); } @protected - ArcUnsignedMessageBoxTrait - sse_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ArcUnsignedMessageBoxTraitImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as StorageImplImpl).frbInternalCstEncode(move: false); } @protected - RustStreamSink - sse_decode_StreamSink_dart_call_stub_registred_Dco( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - throw UnimplementedError('Unreachable ()'); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as TokenWalletSubscriptionHandlerImplImpl).frbInternalCstEncode( + move: false, + ); } @protected - RustStreamSink sse_decode_StreamSink_log_entry_Dco( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - throw UnimplementedError('Unreachable ()'); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as TonWalletSubscriptionHandlerImplImpl).frbInternalCstEncode( + move: false, + ); } @protected - String sse_decode_String(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_list_prim_u_8_strict(deserializer); - return utf8.decoder.convert(inner); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as GenericContractSubscriptionHandlerImplImpl) + .frbInternalCstEncode(move: false); } @protected - AccountsStorageImpl sse_decode_accounts_storage_impl( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerStorage = - sse_decode_RustOpaque_ArcdynAccountsStorageBoxTrait(deserializer); - return AccountsStorageImpl(innerStorage: var_innerStorage); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as GqlConnectionImplImpl).frbInternalCstEncode(move: false); } @protected - Bip39Entropy sse_decode_bip_39_entropy(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_i_32(deserializer); - return Bip39Entropy.values[inner]; + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as JettonWalletSubscriptionHandlerImplImpl) + .frbInternalCstEncode(move: false); } @protected - Bip39MnemonicData sse_decode_bip_39_mnemonic_data( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_accountId = sse_decode_u_16(deserializer); - var var_path = sse_decode_bip_39_path(deserializer); - var var_entropy = sse_decode_bip_39_entropy(deserializer); - return Bip39MnemonicData( - accountId: var_accountId, path: var_path, entropy: var_entropy); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as JrpcConnectionImplImpl).frbInternalCstEncode(move: false); } @protected - Bip39Path sse_decode_bip_39_path(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_i_32(deserializer); - return Bip39Path.values[inner]; + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as LedgerConnectionImplImpl).frbInternalCstEncode(move: false); } @protected - bool sse_decode_bool(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getUint8() != 0; + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ProtoConnectionImplImpl).frbInternalCstEncode(move: false); } @protected - AccountsStorageImpl sse_decode_box_autoadd_accounts_storage_impl( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_accounts_storage_impl(deserializer)); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as StorageImplImpl).frbInternalCstEncode(move: false); } @protected - Bip39MnemonicData sse_decode_box_autoadd_bip_39_mnemonic_data( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bip_39_mnemonic_data(deserializer)); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as TokenWalletSubscriptionHandlerImplImpl).frbInternalCstEncode( + move: false, + ); } @protected - bool sse_decode_box_autoadd_bool(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bool(deserializer)); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as TonWalletSubscriptionHandlerImplImpl).frbInternalCstEncode( + move: false, + ); } @protected - CallerTestClass sse_decode_box_autoadd_caller_test_class( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_caller_test_class(deserializer)); + PlatformPointer cst_encode_DartFn_Inputs_String_Output_String_AnyhowException( + FutureOr Function(String) raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_DartOpaque( + encode_DartFn_Inputs_String_Output_String_AnyhowException(raw), + ); } @protected - DartCallStub sse_decode_box_autoadd_dart_call_stub( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_dart_call_stub(deserializer)); + PlatformPointer + cst_encode_DartFn_Inputs_String_Output_opt_String_AnyhowException( + FutureOr Function(String) raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_DartOpaque( + encode_DartFn_Inputs_String_Output_opt_String_AnyhowException(raw), + ); } @protected - DynamicValue sse_decode_box_autoadd_dynamic_value( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_dynamic_value(deserializer)); + PlatformPointer cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + FutureOr Function(String) raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_DartOpaque( + encode_DartFn_Inputs_String_Output_unit_AnyhowException(raw), + ); } @protected - GenericContractDartWrapper - sse_decode_box_autoadd_generic_contract_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_generic_contract_dart_wrapper(deserializer)); + PlatformPointer + cst_encode_DartFn_Inputs_String_String_Output_unit_AnyhowException( + FutureOr Function(String, String) raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_DartOpaque( + encode_DartFn_Inputs_String_String_Output_unit_AnyhowException(raw), + ); } @protected - GqlConnectionDartWrapper sse_decode_box_autoadd_gql_connection_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_gql_connection_dart_wrapper(deserializer)); + PlatformPointer + cst_encode_DartFn_Inputs_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(Uint8List) raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_DartOpaque( + encode_DartFn_Inputs_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + raw, + ), + ); } @protected - GqlTransportImpl sse_decode_box_autoadd_gql_transport_impl( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_gql_transport_impl(deserializer)); + PlatformPointer + cst_encode_DartFn_Inputs_u_16_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int) raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_DartOpaque( + encode_DartFn_Inputs_u_16_Output_list_prim_u_8_strict_AnyhowException( + raw, + ), + ); } @protected - int sse_decode_box_autoadd_i_32(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_i_32(deserializer)); + PlatformPointer + cst_encode_DartFn_Inputs_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int, int?, Uint8List) raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_DartOpaque( + encode_DartFn_Inputs_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + raw, + ), + ); } @protected - JettonWalletDartWrapper sse_decode_box_autoadd_jetton_wallet_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_jetton_wallet_dart_wrapper(deserializer)); + PlatformPointer + cst_encode_DartFn_Inputs_u_16_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_String_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int, int, int?, Uint8List, String) raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_DartOpaque( + encode_DartFn_Inputs_u_16_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_String_Output_list_prim_u_8_strict_AnyhowException( + raw, + ), + ); } @protected - JrpcConnectionDartWrapper sse_decode_box_autoadd_jrpc_connection_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_jrpc_connection_dart_wrapper(deserializer)); + PlatformPointer cst_encode_DartOpaque(Object raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return encodeDartOpaque( + raw, + portManager.dartHandlerPort, + generalizedFrbRustBinding, + ); } @protected - JrpcTransportImpl sse_decode_box_autoadd_jrpc_transport_impl( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_jrpc_transport_impl(deserializer)); + int cst_encode_RustOpaque_ArcdynAccountsStorageBoxTrait( + ArcAccountsStorageBoxTrait raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcAccountsStorageBoxTraitImpl).frbInternalCstEncode(); } @protected - KeySigner sse_decode_box_autoadd_key_signer(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_key_signer(deserializer)); + int cst_encode_RustOpaque_ArcdynGenericContractBoxTrait( + ArcGenericContractBoxTrait raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcGenericContractBoxTraitImpl).frbInternalCstEncode(); } @protected - KeystoreDartWrapper sse_decode_box_autoadd_keystore_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_keystore_dart_wrapper(deserializer)); + int cst_encode_RustOpaque_ArcdynGqlConnectionBoxTrait( + ArcGqlConnectionBoxTrait raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcGqlConnectionBoxTraitImpl).frbInternalCstEncode(); } @protected - LedgerConnectionDartWrapper - sse_decode_box_autoadd_ledger_connection_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_ledger_connection_dart_wrapper(deserializer)); + int cst_encode_RustOpaque_ArcdynJettonWalletBoxTrait( + ArcJettonWalletBoxTrait raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcJettonWalletBoxTraitImpl).frbInternalCstEncode(); } @protected - MnemonicType sse_decode_box_autoadd_mnemonic_type( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_mnemonic_type(deserializer)); + int cst_encode_RustOpaque_ArcdynJrpcConnectionBoxTrait( + ArcJrpcConnectionBoxTrait raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcJrpcConnectionBoxTraitImpl).frbInternalCstEncode(); } @protected - MyClass sse_decode_box_autoadd_my_class(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_my_class(deserializer)); + int cst_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait( + ArcKeyStoreApiBoxTrait raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcKeyStoreApiBoxTraitImpl).frbInternalCstEncode(); } @protected - ProtoConnectionDartWrapper - sse_decode_box_autoadd_proto_connection_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_proto_connection_dart_wrapper(deserializer)); + int cst_encode_RustOpaque_ArcdynLedgerConnectionBoxTrait( + ArcLedgerConnectionBoxTrait raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcLedgerConnectionBoxTraitImpl).frbInternalCstEncode(); } @protected - ProtoTransportImpl sse_decode_box_autoadd_proto_transport_impl( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_proto_transport_impl(deserializer)); + int cst_encode_RustOpaque_ArcdynProtoConnectionBoxTrait( + ArcProtoConnectionBoxTrait raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcProtoConnectionBoxTraitImpl).frbInternalCstEncode(); } @protected - StorageDartWrapper sse_decode_box_autoadd_storage_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_storage_dart_wrapper(deserializer)); + int cst_encode_RustOpaque_ArcdynStorageBoxTrait(ArcStorageBoxTrait raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcStorageBoxTraitImpl).frbInternalCstEncode(); } @protected - TokenWalletDartWrapper sse_decode_box_autoadd_token_wallet_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_token_wallet_dart_wrapper(deserializer)); + int cst_encode_RustOpaque_ArcdynTokenWalletBoxTrait( + ArcTokenWalletBoxTrait raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcTokenWalletBoxTraitImpl).frbInternalCstEncode(); } @protected - TonWalletDartWrapper sse_decode_box_autoadd_ton_wallet_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_ton_wallet_dart_wrapper(deserializer)); + int cst_encode_RustOpaque_ArcdynTonWalletBoxTrait(ArcTonWalletBoxTrait raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcTonWalletBoxTraitImpl).frbInternalCstEncode(); } @protected - int sse_decode_box_autoadd_u_32(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_u_32(deserializer)); + int cst_encode_RustOpaque_ArcdynTransportBoxTrait(ArcTransportBoxTrait raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcTransportBoxTraitImpl).frbInternalCstEncode(); } @protected - UnsignedMessageImpl sse_decode_box_autoadd_unsigned_message_impl( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_unsigned_message_impl(deserializer)); + int cst_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait( + ArcUnsignedMessageBoxTrait raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcUnsignedMessageBoxTraitImpl).frbInternalCstEncode(); } @protected - CallerTestClass sse_decode_caller_test_class(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_instanceHash = sse_decode_String(deserializer); - var var_value = sse_decode_i_32(deserializer); - return CallerTestClass(instanceHash: var_instanceHash, value: var_value); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ArcFnStringDartFnFutureOptionString raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnStringDartFnFutureOptionStringImpl) + .frbInternalCstEncode(); } @protected - DartCallStub sse_decode_dart_call_stub(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_instanceHash = sse_decode_String(deserializer); - var var_fnName = sse_decode_String(deserializer); - var var_args = sse_decode_list_dynamic_value(deserializer); - var var_namedArgs = sse_decode_list_dynamic_named_value(deserializer); - return DartCallStub( - instanceHash: var_instanceHash, - fnName: var_fnName, - args: var_args, - namedArgs: var_namedArgs); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ArcFnStringDartFnFuture raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnStringDartFnFutureImpl).frbInternalCstEncode(); } @protected - DartCallStubRegistred sse_decode_dart_call_stub_registred( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_id = sse_decode_opt_String(deserializer); - var var_stub = sse_decode_dart_call_stub(deserializer); - return DartCallStubRegistred(id: var_id, stub: var_stub); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ArcFnStringDartFnFutureString raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnStringDartFnFutureStringImpl).frbInternalCstEncode(); } @protected - DynamicNamedValue sse_decode_dynamic_named_value( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_name = sse_decode_String(deserializer); - var var_value = sse_decode_opt_box_autoadd_dynamic_value(deserializer); - return DynamicNamedValue(name: var_name, value: var_value); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ArcFnStringStringDartFnFuture raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnStringStringDartFnFutureImpl).frbInternalCstEncode(); } @protected - DynamicValue sse_decode_dynamic_value(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - var var_field0 = sse_decode_u_16(deserializer); - return DynamicValue_U16(var_field0); - case 1: - var var_field0 = sse_decode_u_32(deserializer); - return DynamicValue_U32(var_field0); - case 2: - var var_field0 = sse_decode_i_32(deserializer); - return DynamicValue_I32(var_field0); - case 3: - var var_field0 = sse_decode_u_64(deserializer); - return DynamicValue_U64(var_field0); - case 4: - var var_field0 = sse_decode_i_64(deserializer); - return DynamicValue_I64(var_field0); - case 5: - var var_field0 = sse_decode_f_32(deserializer); - return DynamicValue_F32(var_field0); - case 6: - var var_field0 = sse_decode_f_64(deserializer); - return DynamicValue_F64(var_field0); - case 7: - var var_field0 = sse_decode_String(deserializer); - return DynamicValue_String(var_field0); - case 8: - var var_field0 = sse_decode_list_prim_u_8_strict(deserializer); - return DynamicValue_VecU8(var_field0); - case 9: - var var_field0 = sse_decode_String(deserializer); - return DynamicValue_MegaStruct(var_field0); - case 10: - var var_field0 = sse_decode_error_code(deserializer); - return DynamicValue_Error(var_field0); - case 11: - return DynamicValue_None(); - default: - throw UnimplementedError(''); - } + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + ArcFnVecU8DartFnFutureVecU8 raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnVecU8DartFnFutureVecU8Impl).frbInternalCstEncode(); } @protected - ErrorCode sse_decode_error_code(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_i_32(deserializer); - return ErrorCode.values[inner]; + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + ArcFnU16DartFnFutureVecU8 raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnU16DartFnFutureVecU8Impl).frbInternalCstEncode(); } @protected - double sse_decode_f_32(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getFloat32(); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + ArcFnU16OptionI32VecU8DartFnFutureVecU8 raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnU16OptionI32VecU8DartFnFutureVecU8Impl) + .frbInternalCstEncode(); } @protected - double sse_decode_f_64(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getFloat64(); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Impl) + .frbInternalCstEncode(); } @protected - GeneratedKeyG sse_decode_generated_key_g(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_words = sse_decode_list_String(deserializer); - var var_accountType = sse_decode_mnemonic_type(deserializer); - return GeneratedKeyG(words: var_words, accountType: var_accountType); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as GenericContractSubscriptionHandlerImplImpl) + .frbInternalCstEncode(); } @protected - GenericContractDartWrapper sse_decode_generic_contract_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerContract = - sse_decode_RustOpaque_ArcdynGenericContractBoxTrait(deserializer); - return GenericContractDartWrapper(innerContract: var_innerContract); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as GqlConnectionImplImpl).frbInternalCstEncode(); } @protected - GqlConnectionDartWrapper sse_decode_gql_connection_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerConnection = - sse_decode_RustOpaque_ArcdynGqlConnectionBoxTrait(deserializer); - return GqlConnectionDartWrapper.raw(innerConnection: var_innerConnection); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as JettonWalletSubscriptionHandlerImplImpl) + .frbInternalCstEncode(); } @protected - GqlTransportImpl sse_decode_gql_transport_impl(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerTransport = - sse_decode_RustOpaque_ArcdynTransportBoxTrait(deserializer); - return GqlTransportImpl.raw(innerTransport: var_innerTransport); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as JrpcConnectionImplImpl).frbInternalCstEncode(); } @protected - int sse_decode_i_32(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getInt32(); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as LedgerConnectionImplImpl).frbInternalCstEncode(); } @protected - PlatformInt64 sse_decode_i_64(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getPlatformInt64(); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as ProtoConnectionImplImpl).frbInternalCstEncode(); } @protected - int sse_decode_i_8(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getInt8(); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as StorageImplImpl).frbInternalCstEncode(); } @protected - JettonWalletDartWrapper sse_decode_jetton_wallet_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerWallet = - sse_decode_RustOpaque_ArcdynJettonWalletBoxTrait(deserializer); - return JettonWalletDartWrapper(innerWallet: var_innerWallet); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as TokenWalletSubscriptionHandlerImplImpl) + .frbInternalCstEncode(); } @protected - JrpcConnectionDartWrapper sse_decode_jrpc_connection_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerConnection = - sse_decode_RustOpaque_ArcdynJrpcConnectionBoxTrait(deserializer); - return JrpcConnectionDartWrapper.raw(innerConnection: var_innerConnection); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl raw, + ) { + // Codec=Cst (C-struct based), see doc to use other codecs + // ignore: invalid_use_of_internal_member + return (raw as TonWalletSubscriptionHandlerImplImpl).frbInternalCstEncode(); } @protected - JrpcTransportImpl sse_decode_jrpc_transport_impl( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerTransport = - sse_decode_RustOpaque_ArcdynTransportBoxTrait(deserializer); - return JrpcTransportImpl.raw(innerTransport: var_innerTransport); + int cst_encode_bip_39_entropy(Bip39Entropy raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); } @protected - KeySigner sse_decode_key_signer(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - return KeySigner_Encrypted(); - case 1: - return KeySigner_Derived(); - case 2: - return KeySigner_Ledger(); - case 3: - var var_field0 = sse_decode_bool(deserializer); - return KeySigner_Stub(var_field0); - default: - throw UnimplementedError(''); - } + int cst_encode_bip_39_path(Bip39Path raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); } @protected - KeystoreDartWrapper sse_decode_keystore_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerKeystore = - sse_decode_RustOpaque_ArcdynKeyStoreApiBoxTrait(deserializer); - return KeystoreDartWrapper(innerKeystore: var_innerKeystore); + bool cst_encode_bool(bool raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; } @protected - LatestBlock sse_decode_latest_block(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_id = sse_decode_String(deserializer); - var var_endLt = sse_decode_u_64(deserializer); - var var_genUtime = sse_decode_u_32(deserializer); - return LatestBlock(id: var_id, endLt: var_endLt, genUtime: var_genUtime); + int cst_encode_i_32(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; } @protected - LedgerConnectionDartWrapper sse_decode_ledger_connection_dart_wrapper( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerConnection = - sse_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait(deserializer); - return LedgerConnectionDartWrapper.raw( - innerConnection: var_innerConnection); + int cst_encode_i_8(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; } @protected - LedgerConnectionImpl sse_decode_ledger_connection_impl( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_instanceHash = sse_decode_String(deserializer); - return LedgerConnectionImpl.raw(instanceHash: var_instanceHash); + int cst_encode_log_level(LogLevel raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); } @protected - List sse_decode_list_String(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_String(deserializer)); - } - return ans_; + int cst_encode_polling_method(PollingMethod raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); } @protected - List sse_decode_list_dynamic_named_value( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_dynamic_named_value(deserializer)); - } - return ans_; + int cst_encode_u_16(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; } @protected - List sse_decode_list_dynamic_value( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_dynamic_value(deserializer)); - } - return ans_; + int cst_encode_u_32(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; } @protected - List sse_decode_list_key_signer(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_key_signer(deserializer)); - } - return ans_; + int cst_encode_u_8(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; } @protected - List sse_decode_list_opt_String(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = []; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_opt_String(deserializer)); - } - return ans_; + void cst_encode_unit(void raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; } @protected - List sse_decode_list_prim_i_32_loose(SseDeserializer deserializer) { + void sse_encode_AnyhowException( + AnyhowException self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var len_ = sse_decode_i_32(deserializer); - return deserializer.buffer.getInt32List(len_); + sse_encode_String(self.message, serializer); } @protected - Int32List sse_decode_list_prim_i_32_strict(SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ArcFnStringDartFnFutureOptionString self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var len_ = sse_decode_i_32(deserializer); - return deserializer.buffer.getInt32List(len_); + sse_encode_usize( + (self as ArcFnStringDartFnFutureOptionStringImpl).frbInternalSseEncode( + move: true, + ), + serializer, + ); } @protected - Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ArcFnStringDartFnFuture self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var len_ = sse_decode_i_32(deserializer); - return deserializer.buffer.getUint8List(len_); + sse_encode_usize( + (self as ArcFnStringDartFnFutureImpl).frbInternalSseEncode(move: true), + serializer, + ); } @protected - List<(String, String)> sse_decode_list_record_string_string( - SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ArcFnStringDartFnFutureString self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - - var len_ = sse_decode_i_32(deserializer); - var ans_ = <(String, String)>[]; - for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_record_string_string(deserializer)); - } - return ans_; + sse_encode_usize( + (self as ArcFnStringDartFnFutureStringImpl).frbInternalSseEncode( + move: true, + ), + serializer, + ); } @protected - LogEntry sse_decode_log_entry(SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ArcFnStringStringDartFnFuture self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_timeMillis = sse_decode_i_64(deserializer); - var var_level = sse_decode_log_level(deserializer); - var var_tag = sse_decode_String(deserializer); - var var_msg = sse_decode_String(deserializer); - var var_stack = sse_decode_opt_String(deserializer); - return LogEntry( - timeMillis: var_timeMillis, - level: var_level, - tag: var_tag, - msg: var_msg, - stack: var_stack); + sse_encode_usize( + (self as ArcFnStringStringDartFnFutureImpl).frbInternalSseEncode( + move: true, + ), + serializer, + ); } @protected - LogLevel sse_decode_log_level(SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + ArcFnVecU8DartFnFutureVecU8 self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_i_32(deserializer); - return LogLevel.values[inner]; + sse_encode_usize( + (self as ArcFnVecU8DartFnFutureVecU8Impl).frbInternalSseEncode( + move: true, + ), + serializer, + ); } @protected - MnemonicType sse_decode_mnemonic_type(SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + ArcFnU16DartFnFutureVecU8 self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - return MnemonicType_Legacy(); - case 1: - var var_field0 = - sse_decode_box_autoadd_bip_39_mnemonic_data(deserializer); - return MnemonicType_Bip39(var_field0); - default: - throw UnimplementedError(''); - } + sse_encode_usize( + (self as ArcFnU16DartFnFutureVecU8Impl).frbInternalSseEncode(move: true), + serializer, + ); } @protected - MyClass sse_decode_my_class(SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + ArcFnU16OptionI32VecU8DartFnFutureVecU8 self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_val = sse_decode_i_32(deserializer); - return MyClass(val: var_val); + sse_encode_usize( + (self as ArcFnU16OptionI32VecU8DartFnFutureVecU8Impl) + .frbInternalSseEncode(move: true), + serializer, + ); } @protected - String? sse_decode_opt_String(SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_String(deserializer)); - } else { - return null; - } + sse_encode_usize( + (self as ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Impl) + .frbInternalSseEncode(move: true), + serializer, + ); } @protected - bool? sse_decode_opt_box_autoadd_bool(SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_bool(deserializer)); - } else { - return null; - } + sse_encode_usize( + (self as GenericContractSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: true, + ), + serializer, + ); } @protected - DynamicValue? sse_decode_opt_box_autoadd_dynamic_value( - SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_dynamic_value(deserializer)); - } else { - return null; - } + sse_encode_usize( + (self as GqlConnectionImplImpl).frbInternalSseEncode(move: true), + serializer, + ); } @protected - int? sse_decode_opt_box_autoadd_i_32(SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_i_32(deserializer)); - } else { - return null; - } + sse_encode_usize( + (self as JettonWalletSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: true, + ), + serializer, + ); } @protected - LedgerConnectionDartWrapper? - sse_decode_opt_box_autoadd_ledger_connection_dart_wrapper( - SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_ledger_connection_dart_wrapper( - deserializer)); - } else { - return null; - } + sse_encode_usize( + (self as JrpcConnectionImplImpl).frbInternalSseEncode(move: true), + serializer, + ); } @protected - int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_box_autoadd_u_32(deserializer)); - } else { - return null; - } + sse_encode_usize( + (self as LedgerConnectionImplImpl).frbInternalSseEncode(move: true), + serializer, + ); } @protected - List? sse_decode_opt_list_String(SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_list_String(deserializer)); - } else { - return null; - } + sse_encode_usize( + (self as ProtoConnectionImplImpl).frbInternalSseEncode(move: true), + serializer, + ); } @protected - PollingMethod sse_decode_polling_method(SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_i_32(deserializer); - return PollingMethod.values[inner]; + sse_encode_usize( + (self as StorageImplImpl).frbInternalSseEncode(move: true), + serializer, + ); } @protected - ProtoConnectionDartWrapper sse_decode_proto_connection_dart_wrapper( - SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerConnection = - sse_decode_RustOpaque_ArcdynProtoConnectionBoxTrait(deserializer); - return ProtoConnectionDartWrapper.raw(innerConnection: var_innerConnection); + sse_encode_usize( + (self as TokenWalletSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: true, + ), + serializer, + ); } @protected - ProtoTransportImpl sse_decode_proto_transport_impl( - SseDeserializer deserializer) { + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerTransport = - sse_decode_RustOpaque_ArcdynTransportBoxTrait(deserializer); - return ProtoTransportImpl.raw(innerTransport: var_innerTransport); + sse_encode_usize( + (self as TonWalletSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: true, + ), + serializer, + ); } @protected - (String, String) sse_decode_record_string_string( - SseDeserializer deserializer) { + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_field0 = sse_decode_String(deserializer); - var var_field1 = sse_decode_String(deserializer); - return (var_field0, var_field1); + sse_encode_usize( + (self as GenericContractSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: false, + ), + serializer, + ); } @protected - SignatureParts sse_decode_signature_parts(SseDeserializer deserializer) { + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_low = sse_decode_String(deserializer); - var var_high = sse_decode_String(deserializer); - return SignatureParts(low: var_low, high: var_high); + sse_encode_usize( + (self as GqlConnectionImplImpl).frbInternalSseEncode(move: false), + serializer, + ); } @protected - SignedData sse_decode_signed_data(SseDeserializer deserializer) { + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_dataHash = sse_decode_String(deserializer); - var var_signature = sse_decode_String(deserializer); - var var_signatureHex = sse_decode_String(deserializer); - var var_signatureParts = sse_decode_signature_parts(deserializer); - return SignedData( - dataHash: var_dataHash, - signature: var_signature, - signatureHex: var_signatureHex, - signatureParts: var_signatureParts); + sse_encode_usize( + (self as JettonWalletSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: false, + ), + serializer, + ); } @protected - SignedDataRaw sse_decode_signed_data_raw(SseDeserializer deserializer) { + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_signature = sse_decode_String(deserializer); - var var_signatureHex = sse_decode_String(deserializer); - var var_signatureParts = sse_decode_signature_parts(deserializer); - return SignedDataRaw( - signature: var_signature, - signatureHex: var_signatureHex, - signatureParts: var_signatureParts); + sse_encode_usize( + (self as JrpcConnectionImplImpl).frbInternalSseEncode(move: false), + serializer, + ); } @protected - StorageDartWrapper sse_decode_storage_dart_wrapper( - SseDeserializer deserializer) { + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerStorage = - sse_decode_RustOpaque_ArcdynStorageBoxTrait(deserializer); - return StorageDartWrapper.raw(innerStorage: var_innerStorage); + sse_encode_usize( + (self as LedgerConnectionImplImpl).frbInternalSseEncode(move: false), + serializer, + ); } @protected - StorageImpl sse_decode_storage_impl(SseDeserializer deserializer) { + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_instanceHash = sse_decode_String(deserializer); - return StorageImpl(instanceHash: var_instanceHash); + sse_encode_usize( + (self as ProtoConnectionImplImpl).frbInternalSseEncode(move: false), + serializer, + ); } @protected - TokenWalletDartWrapper sse_decode_token_wallet_dart_wrapper( - SseDeserializer deserializer) { + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerWallet = - sse_decode_RustOpaque_ArcdynTokenWalletBoxTrait(deserializer); - return TokenWalletDartWrapper(innerWallet: var_innerWallet); + sse_encode_usize( + (self as StorageImplImpl).frbInternalSseEncode(move: false), + serializer, + ); } @protected - TonWalletDartWrapper sse_decode_ton_wallet_dart_wrapper( - SseDeserializer deserializer) { + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerWallet = - sse_decode_RustOpaque_ArcdynTonWalletBoxTrait(deserializer); - return TonWalletDartWrapper(innerWallet: var_innerWallet); + sse_encode_usize( + (self as TokenWalletSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: false, + ), + serializer, + ); } @protected - int sse_decode_u_16(SseDeserializer deserializer) { + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getUint16(); + sse_encode_usize( + (self as TonWalletSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: false, + ), + serializer, + ); } @protected - int sse_decode_u_32(SseDeserializer deserializer) { + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getUint32(); + sse_encode_usize( + (self as GenericContractSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: false, + ), + serializer, + ); } @protected - BigInt sse_decode_u_64(SseDeserializer deserializer) { + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getBigUint64(); + sse_encode_usize( + (self as GqlConnectionImplImpl).frbInternalSseEncode(move: false), + serializer, + ); } @protected - int sse_decode_u_8(SseDeserializer deserializer) { + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getUint8(); + sse_encode_usize( + (self as JettonWalletSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: false, + ), + serializer, + ); } @protected - void sse_decode_unit(SseDeserializer deserializer) { + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as JrpcConnectionImplImpl).frbInternalSseEncode(move: false), + serializer, + ); } @protected - UnsignedMessageImpl sse_decode_unsigned_message_impl( - SseDeserializer deserializer) { + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_innerMessage = - sse_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait(deserializer); - return UnsignedMessageImpl(innerMessage: var_innerMessage); + sse_encode_usize( + (self as LedgerConnectionImplImpl).frbInternalSseEncode(move: false), + serializer, + ); } @protected - BigInt sse_decode_usize(SseDeserializer deserializer) { + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getBigUint64(); + sse_encode_usize( + (self as ProtoConnectionImplImpl).frbInternalSseEncode(move: false), + serializer, + ); } @protected - int cst_encode_RustOpaque_ArcdynAccountsStorageBoxTrait( - ArcAccountsStorageBoxTrait raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as ArcAccountsStorageBoxTraitImpl).frbInternalCstEncode(); + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as StorageImplImpl).frbInternalSseEncode(move: false), + serializer, + ); } @protected - int cst_encode_RustOpaque_ArcdynGenericContractBoxTrait( - ArcGenericContractBoxTrait raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as ArcGenericContractBoxTraitImpl).frbInternalCstEncode(); + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as TokenWalletSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: false, + ), + serializer, + ); } @protected - int cst_encode_RustOpaque_ArcdynGqlConnectionBoxTrait( - ArcGqlConnectionBoxTrait raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as ArcGqlConnectionBoxTraitImpl).frbInternalCstEncode(); + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as TonWalletSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: false, + ), + serializer, + ); } @protected - int cst_encode_RustOpaque_ArcdynJettonWalletBoxTrait( - ArcJettonWalletBoxTrait raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as ArcJettonWalletBoxTraitImpl).frbInternalCstEncode(); + void sse_encode_DartFn_Inputs_String_Output_String_AnyhowException( + FutureOr Function(String) self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_DartOpaque( + encode_DartFn_Inputs_String_Output_String_AnyhowException(self), + serializer, + ); } @protected - int cst_encode_RustOpaque_ArcdynJrpcConnectionBoxTrait( - ArcJrpcConnectionBoxTrait raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as ArcJrpcConnectionBoxTraitImpl).frbInternalCstEncode(); + void sse_encode_DartFn_Inputs_String_Output_opt_String_AnyhowException( + FutureOr Function(String) self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_DartOpaque( + encode_DartFn_Inputs_String_Output_opt_String_AnyhowException(self), + serializer, + ); } @protected - int cst_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait( - ArcKeyStoreApiBoxTrait raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as ArcKeyStoreApiBoxTraitImpl).frbInternalCstEncode(); + void sse_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + FutureOr Function(String) self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_DartOpaque( + encode_DartFn_Inputs_String_Output_unit_AnyhowException(self), + serializer, + ); } @protected - int cst_encode_RustOpaque_ArcdynLedgerConnectionBoxTrait( - ArcLedgerConnectionBoxTrait raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as ArcLedgerConnectionBoxTraitImpl).frbInternalCstEncode(); + void sse_encode_DartFn_Inputs_String_String_Output_unit_AnyhowException( + FutureOr Function(String, String) self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_DartOpaque( + encode_DartFn_Inputs_String_String_Output_unit_AnyhowException(self), + serializer, + ); } @protected - int cst_encode_RustOpaque_ArcdynProtoConnectionBoxTrait( - ArcProtoConnectionBoxTrait raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as ArcProtoConnectionBoxTraitImpl).frbInternalCstEncode(); + void + sse_encode_DartFn_Inputs_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(Uint8List) self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_DartOpaque( + encode_DartFn_Inputs_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + self, + ), + serializer, + ); } @protected - int cst_encode_RustOpaque_ArcdynStorageBoxTrait(ArcStorageBoxTrait raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as ArcStorageBoxTraitImpl).frbInternalCstEncode(); + void + sse_encode_DartFn_Inputs_u_16_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int) self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_DartOpaque( + encode_DartFn_Inputs_u_16_Output_list_prim_u_8_strict_AnyhowException( + self, + ), + serializer, + ); } @protected - int cst_encode_RustOpaque_ArcdynTokenWalletBoxTrait( - ArcTokenWalletBoxTrait raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as ArcTokenWalletBoxTraitImpl).frbInternalCstEncode(); + void + sse_encode_DartFn_Inputs_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int, int?, Uint8List) self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_DartOpaque( + encode_DartFn_Inputs_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + self, + ), + serializer, + ); } @protected - int cst_encode_RustOpaque_ArcdynTonWalletBoxTrait(ArcTonWalletBoxTrait raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as ArcTonWalletBoxTraitImpl).frbInternalCstEncode(); + void + sse_encode_DartFn_Inputs_u_16_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_String_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int, int, int?, Uint8List, String) self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_DartOpaque( + encode_DartFn_Inputs_u_16_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_String_Output_list_prim_u_8_strict_AnyhowException( + self, + ), + serializer, + ); } @protected - int cst_encode_RustOpaque_ArcdynTransportBoxTrait(ArcTransportBoxTrait raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as ArcTransportBoxTraitImpl).frbInternalCstEncode(); + void sse_encode_DartOpaque(Object self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_isize( + PlatformPointerUtil.ptrToPlatformInt64( + encodeDartOpaque( + self, + portManager.dartHandlerPort, + generalizedFrbRustBinding, + ), + ), + serializer, + ); } @protected - int cst_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait( - ArcUnsignedMessageBoxTrait raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as ArcUnsignedMessageBoxTraitImpl).frbInternalCstEncode(); + void sse_encode_Map_String_String_None( + Map self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_record_string_string( + self.entries.map((e) => (e.key, e.value)).toList(), + serializer, + ); } @protected - int cst_encode_bip_39_entropy(Bip39Entropy raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_i_32(raw.index); + void sse_encode_RustOpaque_ArcdynAccountsStorageBoxTrait( + ArcAccountsStorageBoxTrait self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ArcAccountsStorageBoxTraitImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - int cst_encode_bip_39_path(Bip39Path raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_i_32(raw.index); + void sse_encode_RustOpaque_ArcdynGenericContractBoxTrait( + ArcGenericContractBoxTrait self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ArcGenericContractBoxTraitImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - bool cst_encode_bool(bool raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; + void sse_encode_RustOpaque_ArcdynGqlConnectionBoxTrait( + ArcGqlConnectionBoxTrait self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ArcGqlConnectionBoxTraitImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - int cst_encode_error_code(ErrorCode raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_i_32(raw.index); + void sse_encode_RustOpaque_ArcdynJettonWalletBoxTrait( + ArcJettonWalletBoxTrait self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ArcJettonWalletBoxTraitImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - double cst_encode_f_32(double raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; + void sse_encode_RustOpaque_ArcdynJrpcConnectionBoxTrait( + ArcJrpcConnectionBoxTrait self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ArcJrpcConnectionBoxTraitImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - double cst_encode_f_64(double raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; + void sse_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait( + ArcKeyStoreApiBoxTrait self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ArcKeyStoreApiBoxTraitImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - int cst_encode_i_32(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; + void sse_encode_RustOpaque_ArcdynLedgerConnectionBoxTrait( + ArcLedgerConnectionBoxTrait self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ArcLedgerConnectionBoxTraitImpl).frbInternalSseEncode( + move: null, + ), + serializer, + ); } @protected - int cst_encode_i_8(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; + void sse_encode_RustOpaque_ArcdynProtoConnectionBoxTrait( + ArcProtoConnectionBoxTrait self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ArcProtoConnectionBoxTraitImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - int cst_encode_log_level(LogLevel raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_i_32(raw.index); + void sse_encode_RustOpaque_ArcdynStorageBoxTrait( + ArcStorageBoxTrait self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ArcStorageBoxTraitImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - int cst_encode_polling_method(PollingMethod raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_i_32(raw.index); + void sse_encode_RustOpaque_ArcdynTokenWalletBoxTrait( + ArcTokenWalletBoxTrait self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ArcTokenWalletBoxTraitImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - int cst_encode_u_16(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; + void sse_encode_RustOpaque_ArcdynTonWalletBoxTrait( + ArcTonWalletBoxTrait self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ArcTonWalletBoxTraitImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - int cst_encode_u_32(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; + void sse_encode_RustOpaque_ArcdynTransportBoxTrait( + ArcTransportBoxTrait self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ArcTransportBoxTraitImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - int cst_encode_u_8(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; + void sse_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait( + ArcUnsignedMessageBoxTrait self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ArcUnsignedMessageBoxTraitImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - void cst_encode_unit(void raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ArcFnStringDartFnFutureOptionString self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as ArcFnStringDartFnFutureOptionStringImpl).frbInternalSseEncode( + move: null, + ), + serializer, + ); } @protected - void sse_encode_AnyhowException( - AnyhowException self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ArcFnStringDartFnFuture self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.message, serializer); + sse_encode_usize( + (self as ArcFnStringDartFnFutureImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - void sse_encode_Map_String_String_None( - Map self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ArcFnStringDartFnFutureString self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_list_record_string_string( - self.entries.map((e) => (e.key, e.value)).toList(), serializer); + sse_encode_usize( + (self as ArcFnStringDartFnFutureStringImpl).frbInternalSseEncode( + move: null, + ), + serializer, + ); } @protected - void sse_encode_RustOpaque_ArcdynAccountsStorageBoxTrait( - ArcAccountsStorageBoxTrait self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ArcFnStringStringDartFnFuture self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as ArcAccountsStorageBoxTraitImpl) - .frbInternalSseEncode(move: null), - serializer); + (self as ArcFnStringStringDartFnFutureImpl).frbInternalSseEncode( + move: null, + ), + serializer, + ); } @protected - void sse_encode_RustOpaque_ArcdynGenericContractBoxTrait( - ArcGenericContractBoxTrait self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + ArcFnVecU8DartFnFutureVecU8 self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as ArcGenericContractBoxTraitImpl) - .frbInternalSseEncode(move: null), - serializer); + (self as ArcFnVecU8DartFnFutureVecU8Impl).frbInternalSseEncode( + move: null, + ), + serializer, + ); } @protected - void sse_encode_RustOpaque_ArcdynGqlConnectionBoxTrait( - ArcGqlConnectionBoxTrait self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + ArcFnU16DartFnFutureVecU8 self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as ArcGqlConnectionBoxTraitImpl).frbInternalSseEncode(move: null), - serializer); + (self as ArcFnU16DartFnFutureVecU8Impl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - void sse_encode_RustOpaque_ArcdynJettonWalletBoxTrait( - ArcJettonWalletBoxTrait self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + ArcFnU16OptionI32VecU8DartFnFutureVecU8 self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as ArcJettonWalletBoxTraitImpl).frbInternalSseEncode(move: null), - serializer); + (self as ArcFnU16OptionI32VecU8DartFnFutureVecU8Impl) + .frbInternalSseEncode(move: null), + serializer, + ); } @protected - void sse_encode_RustOpaque_ArcdynJrpcConnectionBoxTrait( - ArcJrpcConnectionBoxTrait self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as ArcJrpcConnectionBoxTraitImpl) - .frbInternalSseEncode(move: null), - serializer); + (self as ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Impl) + .frbInternalSseEncode(move: null), + serializer, + ); } @protected - void sse_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait( - ArcKeyStoreApiBoxTrait self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as ArcKeyStoreApiBoxTraitImpl).frbInternalSseEncode(move: null), - serializer); + (self as GenericContractSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: null, + ), + serializer, + ); } @protected - void sse_encode_RustOpaque_ArcdynLedgerConnectionBoxTrait( - ArcLedgerConnectionBoxTrait self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as ArcLedgerConnectionBoxTraitImpl) - .frbInternalSseEncode(move: null), - serializer); + (self as GqlConnectionImplImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - void sse_encode_RustOpaque_ArcdynProtoConnectionBoxTrait( - ArcProtoConnectionBoxTrait self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as ArcProtoConnectionBoxTraitImpl) - .frbInternalSseEncode(move: null), - serializer); + (self as JettonWalletSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: null, + ), + serializer, + ); } @protected - void sse_encode_RustOpaque_ArcdynStorageBoxTrait( - ArcStorageBoxTrait self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as ArcStorageBoxTraitImpl).frbInternalSseEncode(move: null), - serializer); + (self as JrpcConnectionImplImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - void sse_encode_RustOpaque_ArcdynTokenWalletBoxTrait( - ArcTokenWalletBoxTrait self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as ArcTokenWalletBoxTraitImpl).frbInternalSseEncode(move: null), - serializer); + (self as LedgerConnectionImplImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - void sse_encode_RustOpaque_ArcdynTonWalletBoxTrait( - ArcTonWalletBoxTrait self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as ArcTonWalletBoxTraitImpl).frbInternalSseEncode(move: null), - serializer); + (self as ProtoConnectionImplImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - void sse_encode_RustOpaque_ArcdynTransportBoxTrait( - ArcTransportBoxTrait self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as ArcTransportBoxTraitImpl).frbInternalSseEncode(move: null), - serializer); + (self as StorageImplImpl).frbInternalSseEncode(move: null), + serializer, + ); } @protected - void sse_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait( - ArcUnsignedMessageBoxTrait self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as ArcUnsignedMessageBoxTraitImpl) - .frbInternalSseEncode(move: null), - serializer); + (self as TokenWalletSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: null, + ), + serializer, + ); } @protected - void sse_encode_StreamSink_dart_call_stub_registred_Dco( - RustStreamSink self, SseSerializer serializer) { + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String( - self.setupAndSerialize( - codec: DcoCodec( - decodeSuccessData: dco_decode_dart_call_stub_registred, - decodeErrorData: dco_decode_AnyhowException, - )), - serializer); + sse_encode_usize( + (self as TonWalletSubscriptionHandlerImplImpl).frbInternalSseEncode( + move: null, + ), + serializer, + ); } @protected void sse_encode_StreamSink_log_entry_Dco( - RustStreamSink self, SseSerializer serializer) { + RustStreamSink self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String( - self.setupAndSerialize( - codec: DcoCodec( + self.setupAndSerialize( + codec: DcoCodec( decodeSuccessData: dco_decode_log_entry, decodeErrorData: dco_decode_AnyhowException, - )), - serializer); + ), + ), + serializer, + ); } @protected @@ -9974,10 +16650,14 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_accounts_storage_impl( - AccountsStorageImpl self, SseSerializer serializer) { + AccountsStorageImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_RustOpaque_ArcdynAccountsStorageBoxTrait( - self.innerStorage, serializer); + self.innerStorage, + serializer, + ); } @protected @@ -9988,7 +16668,9 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_bip_39_mnemonic_data( - Bip39MnemonicData self, SseSerializer serializer) { + Bip39MnemonicData self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_u_16(self.accountId, serializer); sse_encode_bip_39_path(self.path, serializer); @@ -10009,14 +16691,18 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_box_autoadd_accounts_storage_impl( - AccountsStorageImpl self, SseSerializer serializer) { + AccountsStorageImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_accounts_storage_impl(self, serializer); } @protected void sse_encode_box_autoadd_bip_39_mnemonic_data( - Bip39MnemonicData self, SseSerializer serializer) { + Bip39MnemonicData self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_bip_39_mnemonic_data(self, serializer); } @@ -10027,44 +16713,29 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform sse_encode_bool(self, serializer); } - @protected - void sse_encode_box_autoadd_caller_test_class( - CallerTestClass self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_caller_test_class(self, serializer); - } - - @protected - void sse_encode_box_autoadd_dart_call_stub( - DartCallStub self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_dart_call_stub(self, serializer); - } - - @protected - void sse_encode_box_autoadd_dynamic_value( - DynamicValue self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_dynamic_value(self, serializer); - } - @protected void sse_encode_box_autoadd_generic_contract_dart_wrapper( - GenericContractDartWrapper self, SseSerializer serializer) { + GenericContractDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_generic_contract_dart_wrapper(self, serializer); } @protected void sse_encode_box_autoadd_gql_connection_dart_wrapper( - GqlConnectionDartWrapper self, SseSerializer serializer) { + GqlConnectionDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_gql_connection_dart_wrapper(self, serializer); } @protected void sse_encode_box_autoadd_gql_transport_impl( - GqlTransportImpl self, SseSerializer serializer) { + GqlTransportImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_gql_transport_impl(self, serializer); } @@ -10077,90 +16748,108 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_box_autoadd_jetton_wallet_dart_wrapper( - JettonWalletDartWrapper self, SseSerializer serializer) { + JettonWalletDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_jetton_wallet_dart_wrapper(self, serializer); } @protected void sse_encode_box_autoadd_jrpc_connection_dart_wrapper( - JrpcConnectionDartWrapper self, SseSerializer serializer) { + JrpcConnectionDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_jrpc_connection_dart_wrapper(self, serializer); } @protected void sse_encode_box_autoadd_jrpc_transport_impl( - JrpcTransportImpl self, SseSerializer serializer) { + JrpcTransportImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_jrpc_transport_impl(self, serializer); } @protected void sse_encode_box_autoadd_key_signer( - KeySigner self, SseSerializer serializer) { + KeySigner self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_key_signer(self, serializer); } @protected void sse_encode_box_autoadd_keystore_dart_wrapper( - KeystoreDartWrapper self, SseSerializer serializer) { + KeystoreDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_keystore_dart_wrapper(self, serializer); } @protected void sse_encode_box_autoadd_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper self, SseSerializer serializer) { + LedgerConnectionDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_ledger_connection_dart_wrapper(self, serializer); } @protected void sse_encode_box_autoadd_mnemonic_type( - MnemonicType self, SseSerializer serializer) { + MnemonicType self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_mnemonic_type(self, serializer); } - @protected - void sse_encode_box_autoadd_my_class(MyClass self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_my_class(self, serializer); - } - @protected void sse_encode_box_autoadd_proto_connection_dart_wrapper( - ProtoConnectionDartWrapper self, SseSerializer serializer) { + ProtoConnectionDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_proto_connection_dart_wrapper(self, serializer); } @protected void sse_encode_box_autoadd_proto_transport_impl( - ProtoTransportImpl self, SseSerializer serializer) { + ProtoTransportImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_proto_transport_impl(self, serializer); } @protected void sse_encode_box_autoadd_storage_dart_wrapper( - StorageDartWrapper self, SseSerializer serializer) { + StorageDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_storage_dart_wrapper(self, serializer); } @protected void sse_encode_box_autoadd_token_wallet_dart_wrapper( - TokenWalletDartWrapper self, SseSerializer serializer) { + TokenWalletDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_token_wallet_dart_wrapper(self, serializer); } @protected void sse_encode_box_autoadd_ton_wallet_dart_wrapper( - TonWalletDartWrapper self, SseSerializer serializer) { + TonWalletDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_ton_wallet_dart_wrapper(self, serializer); } @@ -10173,107 +16862,18 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_box_autoadd_unsigned_message_impl( - UnsignedMessageImpl self, SseSerializer serializer) { + UnsignedMessageImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_unsigned_message_impl(self, serializer); } - @protected - void sse_encode_caller_test_class( - CallerTestClass self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.instanceHash, serializer); - sse_encode_i_32(self.value, serializer); - } - - @protected - void sse_encode_dart_call_stub(DartCallStub self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.instanceHash, serializer); - sse_encode_String(self.fnName, serializer); - sse_encode_list_dynamic_value(self.args, serializer); - sse_encode_list_dynamic_named_value(self.namedArgs, serializer); - } - - @protected - void sse_encode_dart_call_stub_registred( - DartCallStubRegistred self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_opt_String(self.id, serializer); - sse_encode_dart_call_stub(self.stub, serializer); - } - - @protected - void sse_encode_dynamic_named_value( - DynamicNamedValue self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.name, serializer); - sse_encode_opt_box_autoadd_dynamic_value(self.value, serializer); - } - - @protected - void sse_encode_dynamic_value(DynamicValue self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case DynamicValue_U16(field0: final field0): - sse_encode_i_32(0, serializer); - sse_encode_u_16(field0, serializer); - case DynamicValue_U32(field0: final field0): - sse_encode_i_32(1, serializer); - sse_encode_u_32(field0, serializer); - case DynamicValue_I32(field0: final field0): - sse_encode_i_32(2, serializer); - sse_encode_i_32(field0, serializer); - case DynamicValue_U64(field0: final field0): - sse_encode_i_32(3, serializer); - sse_encode_u_64(field0, serializer); - case DynamicValue_I64(field0: final field0): - sse_encode_i_32(4, serializer); - sse_encode_i_64(field0, serializer); - case DynamicValue_F32(field0: final field0): - sse_encode_i_32(5, serializer); - sse_encode_f_32(field0, serializer); - case DynamicValue_F64(field0: final field0): - sse_encode_i_32(6, serializer); - sse_encode_f_64(field0, serializer); - case DynamicValue_String(field0: final field0): - sse_encode_i_32(7, serializer); - sse_encode_String(field0, serializer); - case DynamicValue_VecU8(field0: final field0): - sse_encode_i_32(8, serializer); - sse_encode_list_prim_u_8_strict(field0, serializer); - case DynamicValue_MegaStruct(field0: final field0): - sse_encode_i_32(9, serializer); - sse_encode_String(field0, serializer); - case DynamicValue_Error(field0: final field0): - sse_encode_i_32(10, serializer); - sse_encode_error_code(field0, serializer); - case DynamicValue_None(): - sse_encode_i_32(11, serializer); - } - } - - @protected - void sse_encode_error_code(ErrorCode self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.index, serializer); - } - - @protected - void sse_encode_f_32(double self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putFloat32(self); - } - - @protected - void sse_encode_f_64(double self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putFloat64(self); - } - @protected void sse_encode_generated_key_g( - GeneratedKeyG self, SseSerializer serializer) { + GeneratedKeyG self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_list_String(self.words, serializer); sse_encode_mnemonic_type(self.accountType, serializer); @@ -10281,26 +16881,38 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_generic_contract_dart_wrapper( - GenericContractDartWrapper self, SseSerializer serializer) { + GenericContractDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_RustOpaque_ArcdynGenericContractBoxTrait( - self.innerContract, serializer); + self.innerContract, + serializer, + ); } @protected void sse_encode_gql_connection_dart_wrapper( - GqlConnectionDartWrapper self, SseSerializer serializer) { + GqlConnectionDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_RustOpaque_ArcdynGqlConnectionBoxTrait( - self.innerConnection, serializer); + self.innerConnection, + serializer, + ); } @protected void sse_encode_gql_transport_impl( - GqlTransportImpl self, SseSerializer serializer) { + GqlTransportImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_RustOpaque_ArcdynTransportBoxTrait( - self.innerTransport, serializer); + self.innerTransport, + serializer, + ); } @protected @@ -10321,28 +16933,46 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform serializer.buffer.putInt8(self); } + @protected + void sse_encode_isize(PlatformInt64 self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putPlatformInt64(self); + } + @protected void sse_encode_jetton_wallet_dart_wrapper( - JettonWalletDartWrapper self, SseSerializer serializer) { + JettonWalletDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_RustOpaque_ArcdynJettonWalletBoxTrait( - self.innerWallet, serializer); + self.innerWallet, + serializer, + ); } @protected void sse_encode_jrpc_connection_dart_wrapper( - JrpcConnectionDartWrapper self, SseSerializer serializer) { + JrpcConnectionDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_RustOpaque_ArcdynJrpcConnectionBoxTrait( - self.innerConnection, serializer); + self.innerConnection, + serializer, + ); } @protected void sse_encode_jrpc_transport_impl( - JrpcTransportImpl self, SseSerializer serializer) { + JrpcTransportImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_RustOpaque_ArcdynTransportBoxTrait( - self.innerTransport, serializer); + self.innerTransport, + serializer, + ); } @protected @@ -10363,10 +16993,14 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_keystore_dart_wrapper( - KeystoreDartWrapper self, SseSerializer serializer) { + KeystoreDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait( - self.innerKeystore, serializer); + self.innerKeystore, + serializer, + ); } @protected @@ -10379,17 +17013,14 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper self, SseSerializer serializer) { + LedgerConnectionDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_RustOpaque_ArcdynLedgerConnectionBoxTrait( - self.innerConnection, serializer); - } - - @protected - void sse_encode_ledger_connection_impl( - LedgerConnectionImpl self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.instanceHash, serializer); + self.innerConnection, + serializer, + ); } @protected @@ -10401,29 +17032,11 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform } } - @protected - void sse_encode_list_dynamic_named_value( - List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_dynamic_named_value(item, serializer); - } - } - - @protected - void sse_encode_list_dynamic_value( - List self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.length, serializer); - for (final item in self) { - sse_encode_dynamic_value(item, serializer); - } - } - @protected void sse_encode_list_key_signer( - List self, SseSerializer serializer) { + List self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_i_32(self.length, serializer); for (final item in self) { @@ -10433,7 +17046,9 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_list_opt_String( - List self, SseSerializer serializer) { + List self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_i_32(self.length, serializer); for (final item in self) { @@ -10443,16 +17058,21 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_list_prim_i_32_loose( - List self, SseSerializer serializer) { + List self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_i_32(self.length, serializer); - serializer.buffer - .putInt32List(self is Int32List ? self : Int32List.fromList(self)); + serializer.buffer.putInt32List( + self is Int32List ? self : Int32List.fromList(self), + ); } @protected void sse_encode_list_prim_i_32_strict( - Int32List self, SseSerializer serializer) { + Int32List self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_i_32(self.length, serializer); serializer.buffer.putInt32List(self); @@ -10460,7 +17080,9 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_list_prim_u_8_strict( - Uint8List self, SseSerializer serializer) { + Uint8List self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_i_32(self.length, serializer); serializer.buffer.putUint8List(self); @@ -10468,7 +17090,9 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_list_record_string_string( - List<(String, String)> self, SseSerializer serializer) { + List<(String, String)> self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_i_32(self.length, serializer); for (final item in self) { @@ -10504,12 +17128,6 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform } } - @protected - void sse_encode_my_class(MyClass self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.val, serializer); - } - @protected void sse_encode_opt_String(String? self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -10530,17 +17148,6 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform } } - @protected - void sse_encode_opt_box_autoadd_dynamic_value( - DynamicValue? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_box_autoadd_dynamic_value(self, serializer); - } - } - @protected void sse_encode_opt_box_autoadd_i_32(int? self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -10553,7 +17160,9 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_opt_box_autoadd_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper? self, SseSerializer serializer) { + LedgerConnectionDartWrapper? self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_bool(self != null, serializer); @@ -10574,7 +17183,9 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_opt_list_String( - List? self, SseSerializer serializer) { + List? self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_bool(self != null, serializer); @@ -10591,23 +17202,33 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_proto_connection_dart_wrapper( - ProtoConnectionDartWrapper self, SseSerializer serializer) { + ProtoConnectionDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_RustOpaque_ArcdynProtoConnectionBoxTrait( - self.innerConnection, serializer); + self.innerConnection, + serializer, + ); } @protected void sse_encode_proto_transport_impl( - ProtoTransportImpl self, SseSerializer serializer) { + ProtoTransportImpl self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_RustOpaque_ArcdynTransportBoxTrait( - self.innerTransport, serializer); + self.innerTransport, + serializer, + ); } @protected void sse_encode_record_string_string( - (String, String) self, SseSerializer serializer) { + (String, String) self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.$1, serializer); sse_encode_String(self.$2, serializer); @@ -10615,7 +17236,9 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_signature_parts( - SignatureParts self, SseSerializer serializer) { + SignatureParts self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.low, serializer); sse_encode_String(self.high, serializer); @@ -10632,7 +17255,9 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_signed_data_raw( - SignedDataRaw self, SseSerializer serializer) { + SignedDataRaw self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.signature, serializer); sse_encode_String(self.signatureHex, serializer); @@ -10641,28 +17266,30 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform @protected void sse_encode_storage_dart_wrapper( - StorageDartWrapper self, SseSerializer serializer) { + StorageDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_RustOpaque_ArcdynStorageBoxTrait(self.innerStorage, serializer); } - @protected - void sse_encode_storage_impl(StorageImpl self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.instanceHash, serializer); - } - @protected void sse_encode_token_wallet_dart_wrapper( - TokenWalletDartWrapper self, SseSerializer serializer) { + TokenWalletDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_RustOpaque_ArcdynTokenWalletBoxTrait( - self.innerWallet, serializer); + self.innerWallet, + serializer, + ); } @protected void sse_encode_ton_wallet_dart_wrapper( - TonWalletDartWrapper self, SseSerializer serializer) { + TonWalletDartWrapper self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_RustOpaque_ArcdynTonWalletBoxTrait(self.innerWallet, serializer); } @@ -10691,45 +17318,291 @@ class NekotonBridgeApiImpl extends NekotonBridgeApiImplPlatform serializer.buffer.putUint8(self); } - @protected - void sse_encode_unit(void self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - } + @protected + void sse_encode_unit(void self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + } + + @protected + void sse_encode_unsigned_message_impl( + UnsignedMessageImpl self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait( + self.innerMessage, + serializer, + ); + } + + @protected + void sse_encode_usize(BigInt self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putBigUint64(self); + } +} + +@sealed +class ArcAccountsStorageBoxTraitImpl extends RustOpaque + implements ArcAccountsStorageBoxTrait { + // Not to be used by end users + ArcAccountsStorageBoxTraitImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + ArcAccountsStorageBoxTraitImpl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_ArcAccountsStorageBoxTrait, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcAccountsStorageBoxTrait, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcAccountsStorageBoxTraitPtr, + ); +} + +@sealed +class ArcFnStringDartFnFutureImpl extends RustOpaque + implements ArcFnStringDartFnFuture { + // Not to be used by end users + ArcFnStringDartFnFutureImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + ArcFnStringDartFnFutureImpl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_ArcFnStringDartFnFuture, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnStringDartFnFuture, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnStringDartFnFuturePtr, + ); +} + +@sealed +class ArcFnStringDartFnFutureOptionStringImpl extends RustOpaque + implements ArcFnStringDartFnFutureOptionString { + // Not to be used by end users + ArcFnStringDartFnFutureOptionStringImpl.frbInternalDcoDecode( + List wire, + ) : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + ArcFnStringDartFnFutureOptionStringImpl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_ArcFnStringDartFnFutureOptionString, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnStringDartFnFutureOptionString, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnStringDartFnFutureOptionStringPtr, + ); +} + +@sealed +class ArcFnStringDartFnFutureStringImpl extends RustOpaque + implements ArcFnStringDartFnFutureString { + // Not to be used by end users + ArcFnStringDartFnFutureStringImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + ArcFnStringDartFnFutureStringImpl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_ArcFnStringDartFnFutureString, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnStringDartFnFutureString, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnStringDartFnFutureStringPtr, + ); +} + +@sealed +class ArcFnStringStringDartFnFutureImpl extends RustOpaque + implements ArcFnStringStringDartFnFuture { + // Not to be used by end users + ArcFnStringStringDartFnFutureImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + ArcFnStringStringDartFnFutureImpl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_ArcFnStringStringDartFnFuture, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnStringStringDartFnFuture, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnStringStringDartFnFuturePtr, + ); +} + +@sealed +class ArcFnU16DartFnFutureVecU8Impl extends RustOpaque + implements ArcFnU16DartFnFutureVecU8 { + // Not to be used by end users + ArcFnU16DartFnFutureVecU8Impl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + ArcFnU16DartFnFutureVecU8Impl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_ArcFnU16DartFnFutureVecU8, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnU16DartFnFutureVecU8, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnU16DartFnFutureVecU8Ptr, + ); +} + +@sealed +class ArcFnU16OptionI32VecU8DartFnFutureVecU8Impl extends RustOpaque + implements ArcFnU16OptionI32VecU8DartFnFutureVecU8 { + // Not to be used by end users + ArcFnU16OptionI32VecU8DartFnFutureVecU8Impl.frbInternalDcoDecode( + List wire, + ) : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + ArcFnU16OptionI32VecU8DartFnFutureVecU8Impl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_ArcFnU16OptionI32VecU8DartFnFutureVecU8, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnU16OptionI32VecU8DartFnFutureVecU8, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnU16OptionI32VecU8DartFnFutureVecU8Ptr, + ); +} - @protected - void sse_encode_unsigned_message_impl( - UnsignedMessageImpl self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait( - self.innerMessage, serializer); - } +@sealed +class ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Impl extends RustOpaque + implements ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 { + // Not to be used by end users + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Impl.frbInternalDcoDecode( + List wire, + ) : super.frbInternalDcoDecode(wire, _kStaticData); - @protected - void sse_encode_usize(BigInt self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putBigUint64(self); - } + // Not to be used by end users + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Impl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Ptr, + ); } @sealed -class ArcAccountsStorageBoxTraitImpl extends RustOpaque - implements ArcAccountsStorageBoxTrait { +class ArcFnVecU8DartFnFutureVecU8Impl extends RustOpaque + implements ArcFnVecU8DartFnFutureVecU8 { // Not to be used by end users - ArcAccountsStorageBoxTraitImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); + ArcFnVecU8DartFnFutureVecU8Impl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users - ArcAccountsStorageBoxTraitImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + ArcFnVecU8DartFnFutureVecU8Impl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: NekotonBridge.instance.api - .rust_arc_increment_strong_count_ArcAccountsStorageBoxTrait, - rustArcDecrementStrongCount: NekotonBridge.instance.api - .rust_arc_decrement_strong_count_ArcAccountsStorageBoxTrait, - rustArcDecrementStrongCountPtr: NekotonBridge.instance.api - .rust_arc_decrement_strong_count_ArcAccountsStorageBoxTraitPtr, + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_ArcFnVecU8DartFnFutureVecU8, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnVecU8DartFnFutureVecU8, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ArcFnVecU8DartFnFutureVecU8Ptr, ); } @@ -10738,19 +17611,26 @@ class ArcGenericContractBoxTraitImpl extends RustOpaque implements ArcGenericContractBoxTrait { // Not to be used by end users ArcGenericContractBoxTraitImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); + : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users ArcGenericContractBoxTraitImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: NekotonBridge.instance.api + rustArcIncrementStrongCount: NekotonBridge + .instance + .api .rust_arc_increment_strong_count_ArcGenericContractBoxTrait, - rustArcDecrementStrongCount: NekotonBridge.instance.api + rustArcDecrementStrongCount: NekotonBridge + .instance + .api .rust_arc_decrement_strong_count_ArcGenericContractBoxTrait, - rustArcDecrementStrongCountPtr: NekotonBridge.instance.api + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api .rust_arc_decrement_strong_count_ArcGenericContractBoxTraitPtr, ); } @@ -10760,19 +17640,26 @@ class ArcGqlConnectionBoxTraitImpl extends RustOpaque implements ArcGqlConnectionBoxTrait { // Not to be used by end users ArcGqlConnectionBoxTraitImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); + : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users ArcGqlConnectionBoxTraitImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: NekotonBridge - .instance.api.rust_arc_increment_strong_count_ArcGqlConnectionBoxTrait, + .instance + .api + .rust_arc_increment_strong_count_ArcGqlConnectionBoxTrait, rustArcDecrementStrongCount: NekotonBridge - .instance.api.rust_arc_decrement_strong_count_ArcGqlConnectionBoxTrait, - rustArcDecrementStrongCountPtr: NekotonBridge.instance.api + .instance + .api + .rust_arc_decrement_strong_count_ArcGqlConnectionBoxTrait, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api .rust_arc_decrement_strong_count_ArcGqlConnectionBoxTraitPtr, ); } @@ -10782,19 +17669,26 @@ class ArcJettonWalletBoxTraitImpl extends RustOpaque implements ArcJettonWalletBoxTrait { // Not to be used by end users ArcJettonWalletBoxTraitImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); + : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users ArcJettonWalletBoxTraitImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: NekotonBridge - .instance.api.rust_arc_increment_strong_count_ArcJettonWalletBoxTrait, + .instance + .api + .rust_arc_increment_strong_count_ArcJettonWalletBoxTrait, rustArcDecrementStrongCount: NekotonBridge - .instance.api.rust_arc_decrement_strong_count_ArcJettonWalletBoxTrait, - rustArcDecrementStrongCountPtr: NekotonBridge.instance.api + .instance + .api + .rust_arc_decrement_strong_count_ArcJettonWalletBoxTrait, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api .rust_arc_decrement_strong_count_ArcJettonWalletBoxTraitPtr, ); } @@ -10804,19 +17698,26 @@ class ArcJrpcConnectionBoxTraitImpl extends RustOpaque implements ArcJrpcConnectionBoxTrait { // Not to be used by end users ArcJrpcConnectionBoxTraitImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); + : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users ArcJrpcConnectionBoxTraitImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: NekotonBridge - .instance.api.rust_arc_increment_strong_count_ArcJrpcConnectionBoxTrait, + .instance + .api + .rust_arc_increment_strong_count_ArcJrpcConnectionBoxTrait, rustArcDecrementStrongCount: NekotonBridge - .instance.api.rust_arc_decrement_strong_count_ArcJrpcConnectionBoxTrait, - rustArcDecrementStrongCountPtr: NekotonBridge.instance.api + .instance + .api + .rust_arc_decrement_strong_count_ArcJrpcConnectionBoxTrait, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api .rust_arc_decrement_strong_count_ArcJrpcConnectionBoxTraitPtr, ); } @@ -10826,20 +17727,27 @@ class ArcKeyStoreApiBoxTraitImpl extends RustOpaque implements ArcKeyStoreApiBoxTrait { // Not to be used by end users ArcKeyStoreApiBoxTraitImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); + : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users ArcKeyStoreApiBoxTraitImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: NekotonBridge - .instance.api.rust_arc_increment_strong_count_ArcKeyStoreApiBoxTrait, + .instance + .api + .rust_arc_increment_strong_count_ArcKeyStoreApiBoxTrait, rustArcDecrementStrongCount: NekotonBridge - .instance.api.rust_arc_decrement_strong_count_ArcKeyStoreApiBoxTrait, + .instance + .api + .rust_arc_decrement_strong_count_ArcKeyStoreApiBoxTrait, rustArcDecrementStrongCountPtr: NekotonBridge - .instance.api.rust_arc_decrement_strong_count_ArcKeyStoreApiBoxTraitPtr, + .instance + .api + .rust_arc_decrement_strong_count_ArcKeyStoreApiBoxTraitPtr, ); } @@ -10848,19 +17756,26 @@ class ArcLedgerConnectionBoxTraitImpl extends RustOpaque implements ArcLedgerConnectionBoxTrait { // Not to be used by end users ArcLedgerConnectionBoxTraitImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); + : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users ArcLedgerConnectionBoxTraitImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: NekotonBridge.instance.api + rustArcIncrementStrongCount: NekotonBridge + .instance + .api .rust_arc_increment_strong_count_ArcLedgerConnectionBoxTrait, - rustArcDecrementStrongCount: NekotonBridge.instance.api + rustArcDecrementStrongCount: NekotonBridge + .instance + .api .rust_arc_decrement_strong_count_ArcLedgerConnectionBoxTrait, - rustArcDecrementStrongCountPtr: NekotonBridge.instance.api + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api .rust_arc_decrement_strong_count_ArcLedgerConnectionBoxTraitPtr, ); } @@ -10870,19 +17785,26 @@ class ArcProtoConnectionBoxTraitImpl extends RustOpaque implements ArcProtoConnectionBoxTrait { // Not to be used by end users ArcProtoConnectionBoxTraitImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); + : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users ArcProtoConnectionBoxTraitImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: NekotonBridge.instance.api + rustArcIncrementStrongCount: NekotonBridge + .instance + .api .rust_arc_increment_strong_count_ArcProtoConnectionBoxTrait, - rustArcDecrementStrongCount: NekotonBridge.instance.api + rustArcDecrementStrongCount: NekotonBridge + .instance + .api .rust_arc_decrement_strong_count_ArcProtoConnectionBoxTrait, - rustArcDecrementStrongCountPtr: NekotonBridge.instance.api + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api .rust_arc_decrement_strong_count_ArcProtoConnectionBoxTraitPtr, ); } @@ -10891,20 +17813,27 @@ class ArcProtoConnectionBoxTraitImpl extends RustOpaque class ArcStorageBoxTraitImpl extends RustOpaque implements ArcStorageBoxTrait { // Not to be used by end users ArcStorageBoxTraitImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); + : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users ArcStorageBoxTraitImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: NekotonBridge - .instance.api.rust_arc_increment_strong_count_ArcStorageBoxTrait, + .instance + .api + .rust_arc_increment_strong_count_ArcStorageBoxTrait, rustArcDecrementStrongCount: NekotonBridge - .instance.api.rust_arc_decrement_strong_count_ArcStorageBoxTrait, + .instance + .api + .rust_arc_decrement_strong_count_ArcStorageBoxTrait, rustArcDecrementStrongCountPtr: NekotonBridge - .instance.api.rust_arc_decrement_strong_count_ArcStorageBoxTraitPtr, + .instance + .api + .rust_arc_decrement_strong_count_ArcStorageBoxTraitPtr, ); } @@ -10913,20 +17842,27 @@ class ArcTokenWalletBoxTraitImpl extends RustOpaque implements ArcTokenWalletBoxTrait { // Not to be used by end users ArcTokenWalletBoxTraitImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); + : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users ArcTokenWalletBoxTraitImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: NekotonBridge - .instance.api.rust_arc_increment_strong_count_ArcTokenWalletBoxTrait, + .instance + .api + .rust_arc_increment_strong_count_ArcTokenWalletBoxTrait, rustArcDecrementStrongCount: NekotonBridge - .instance.api.rust_arc_decrement_strong_count_ArcTokenWalletBoxTrait, + .instance + .api + .rust_arc_decrement_strong_count_ArcTokenWalletBoxTrait, rustArcDecrementStrongCountPtr: NekotonBridge - .instance.api.rust_arc_decrement_strong_count_ArcTokenWalletBoxTraitPtr, + .instance + .api + .rust_arc_decrement_strong_count_ArcTokenWalletBoxTraitPtr, ); } @@ -10935,20 +17871,27 @@ class ArcTonWalletBoxTraitImpl extends RustOpaque implements ArcTonWalletBoxTrait { // Not to be used by end users ArcTonWalletBoxTraitImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); + : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users ArcTonWalletBoxTraitImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: NekotonBridge - .instance.api.rust_arc_increment_strong_count_ArcTonWalletBoxTrait, + .instance + .api + .rust_arc_increment_strong_count_ArcTonWalletBoxTrait, rustArcDecrementStrongCount: NekotonBridge - .instance.api.rust_arc_decrement_strong_count_ArcTonWalletBoxTrait, + .instance + .api + .rust_arc_decrement_strong_count_ArcTonWalletBoxTrait, rustArcDecrementStrongCountPtr: NekotonBridge - .instance.api.rust_arc_decrement_strong_count_ArcTonWalletBoxTraitPtr, + .instance + .api + .rust_arc_decrement_strong_count_ArcTonWalletBoxTraitPtr, ); } @@ -10957,20 +17900,27 @@ class ArcTransportBoxTraitImpl extends RustOpaque implements ArcTransportBoxTrait { // Not to be used by end users ArcTransportBoxTraitImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); + : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users ArcTransportBoxTraitImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: NekotonBridge - .instance.api.rust_arc_increment_strong_count_ArcTransportBoxTrait, + .instance + .api + .rust_arc_increment_strong_count_ArcTransportBoxTrait, rustArcDecrementStrongCount: NekotonBridge - .instance.api.rust_arc_decrement_strong_count_ArcTransportBoxTrait, + .instance + .api + .rust_arc_decrement_strong_count_ArcTransportBoxTrait, rustArcDecrementStrongCountPtr: NekotonBridge - .instance.api.rust_arc_decrement_strong_count_ArcTransportBoxTraitPtr, + .instance + .api + .rust_arc_decrement_strong_count_ArcTransportBoxTraitPtr, ); } @@ -10979,19 +17929,597 @@ class ArcUnsignedMessageBoxTraitImpl extends RustOpaque implements ArcUnsignedMessageBoxTrait { // Not to be used by end users ArcUnsignedMessageBoxTraitImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); + : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users ArcUnsignedMessageBoxTraitImpl.frbInternalSseDecode( - BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: NekotonBridge.instance.api + rustArcIncrementStrongCount: NekotonBridge + .instance + .api .rust_arc_increment_strong_count_ArcUnsignedMessageBoxTrait, - rustArcDecrementStrongCount: NekotonBridge.instance.api + rustArcDecrementStrongCount: NekotonBridge + .instance + .api .rust_arc_decrement_strong_count_ArcUnsignedMessageBoxTrait, - rustArcDecrementStrongCountPtr: NekotonBridge.instance.api + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api .rust_arc_decrement_strong_count_ArcUnsignedMessageBoxTraitPtr, ); } + +@sealed +class GenericContractSubscriptionHandlerImplImpl extends RustOpaque + implements GenericContractSubscriptionHandlerImpl { + // Not to be used by end users + GenericContractSubscriptionHandlerImplImpl.frbInternalDcoDecode( + List wire, + ) : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + GenericContractSubscriptionHandlerImplImpl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_GenericContractSubscriptionHandlerImpl, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_GenericContractSubscriptionHandlerImpl, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_GenericContractSubscriptionHandlerImplPtr, + ); + + ArcFnStringDartFnFuture get onMessageExpired => NekotonBridge.instance.api + .crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnMessageExpired( + that: this, + ); + + ArcFnStringDartFnFuture get onMessageSent => NekotonBridge.instance.api + .crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnMessageSent( + that: this, + ); + + ArcFnStringDartFnFuture get onStateChanged => NekotonBridge.instance.api + .crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnStateChanged( + that: this, + ); + + ArcFnStringDartFnFuture get onTransactionsFound => NekotonBridge.instance.api + .crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorGetOnTransactionsFound( + that: this, + ); + + set onMessageExpired( + ArcFnStringDartFnFuture onMessageExpired, + ) => NekotonBridge.instance.api + .crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnMessageExpired( + that: this, + onMessageExpired: onMessageExpired, + ); + + set onMessageSent(ArcFnStringDartFnFuture onMessageSent) => NekotonBridge + .instance + .api + .crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnMessageSent( + that: this, + onMessageSent: onMessageSent, + ); + + set onStateChanged(ArcFnStringDartFnFuture onStateChanged) => NekotonBridge + .instance + .api + .crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnStateChanged( + that: this, + onStateChanged: onStateChanged, + ); + + set onTransactionsFound( + ArcFnStringDartFnFuture onTransactionsFound, + ) => NekotonBridge.instance.api + .crateApiMergedGenericContractSubscriptionHandlerImplAutoAccessorSetOnTransactionsFound( + that: this, + onTransactionsFound: onTransactionsFound, + ); +} + +@sealed +class GqlConnectionImplImpl extends RustOpaque implements GqlConnectionImpl { + // Not to be used by end users + GqlConnectionImplImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + GqlConnectionImplImpl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_GqlConnectionImpl, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_GqlConnectionImpl, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_GqlConnectionImplPtr, + ); + + bool get isLocal => NekotonBridge.instance.api + .crateApiMergedGqlConnectionImplAutoAccessorGetIsLocal(that: this); + + ArcFnStringDartFnFutureString get onPost => NekotonBridge.instance.api + .crateApiMergedGqlConnectionImplAutoAccessorGetOnPost(that: this); + + set isLocal(bool isLocal) => NekotonBridge.instance.api + .crateApiMergedGqlConnectionImplAutoAccessorSetIsLocal( + that: this, + isLocal: isLocal, + ); + + set onPost(ArcFnStringDartFnFutureString onPost) => NekotonBridge.instance.api + .crateApiMergedGqlConnectionImplAutoAccessorSetOnPost( + that: this, + onPost: onPost, + ); +} + +@sealed +class JettonWalletSubscriptionHandlerImplImpl extends RustOpaque + implements JettonWalletSubscriptionHandlerImpl { + // Not to be used by end users + JettonWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode( + List wire, + ) : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + JettonWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_JettonWalletSubscriptionHandlerImpl, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_JettonWalletSubscriptionHandlerImpl, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_JettonWalletSubscriptionHandlerImplPtr, + ); + + ArcFnStringDartFnFuture get onBalanceChanged => NekotonBridge.instance.api + .crateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorGetOnBalanceChanged( + that: this, + ); + + ArcFnStringDartFnFuture get onTransactionsFound => NekotonBridge.instance.api + .crateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFound( + that: this, + ); + + set onBalanceChanged( + ArcFnStringDartFnFuture onBalanceChanged, + ) => NekotonBridge.instance.api + .crateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorSetOnBalanceChanged( + that: this, + onBalanceChanged: onBalanceChanged, + ); + + set onTransactionsFound( + ArcFnStringDartFnFuture onTransactionsFound, + ) => NekotonBridge.instance.api + .crateApiMergedJettonWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFound( + that: this, + onTransactionsFound: onTransactionsFound, + ); +} + +@sealed +class JrpcConnectionImplImpl extends RustOpaque implements JrpcConnectionImpl { + // Not to be used by end users + JrpcConnectionImplImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + JrpcConnectionImplImpl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_JrpcConnectionImpl, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_JrpcConnectionImpl, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_JrpcConnectionImplPtr, + ); + + ArcFnStringDartFnFutureString get onPost => NekotonBridge.instance.api + .crateApiMergedJrpcConnectionImplAutoAccessorGetOnPost(that: this); + + set onPost(ArcFnStringDartFnFutureString onPost) => NekotonBridge.instance.api + .crateApiMergedJrpcConnectionImplAutoAccessorSetOnPost( + that: this, + onPost: onPost, + ); +} + +@sealed +class LedgerConnectionImplImpl extends RustOpaque + implements LedgerConnectionImpl { + // Not to be used by end users + LedgerConnectionImplImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + LedgerConnectionImplImpl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_LedgerConnectionImpl, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_LedgerConnectionImpl, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_LedgerConnectionImplPtr, + ); + + ArcFnU16DartFnFutureVecU8 get onGetPublicKey => NekotonBridge.instance.api + .crateApiMergedLedgerConnectionImplAutoAccessorGetOnGetPublicKey( + that: this, + ); + + ArcFnU16OptionI32VecU8DartFnFutureVecU8 get onSign => NekotonBridge + .instance + .api + .crateApiMergedLedgerConnectionImplAutoAccessorGetOnSign(that: this); + + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 get onSignTransaction => + NekotonBridge.instance.api + .crateApiMergedLedgerConnectionImplAutoAccessorGetOnSignTransaction( + that: this, + ); + + set onGetPublicKey(ArcFnU16DartFnFutureVecU8 onGetPublicKey) => NekotonBridge + .instance + .api + .crateApiMergedLedgerConnectionImplAutoAccessorSetOnGetPublicKey( + that: this, + onGetPublicKey: onGetPublicKey, + ); + + set onSign(ArcFnU16OptionI32VecU8DartFnFutureVecU8 onSign) => NekotonBridge + .instance + .api + .crateApiMergedLedgerConnectionImplAutoAccessorSetOnSign( + that: this, + onSign: onSign, + ); + + set onSignTransaction( + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 onSignTransaction, + ) => NekotonBridge.instance.api + .crateApiMergedLedgerConnectionImplAutoAccessorSetOnSignTransaction( + that: this, + onSignTransaction: onSignTransaction, + ); +} + +@sealed +class ProtoConnectionImplImpl extends RustOpaque + implements ProtoConnectionImpl { + // Not to be used by end users + ProtoConnectionImplImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + ProtoConnectionImplImpl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_ProtoConnectionImpl, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ProtoConnectionImpl, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_ProtoConnectionImplPtr, + ); + + ArcFnVecU8DartFnFutureVecU8 get onPost => NekotonBridge.instance.api + .crateApiMergedProtoConnectionImplAutoAccessorGetOnPost(that: this); + + set onPost(ArcFnVecU8DartFnFutureVecU8 onPost) => NekotonBridge.instance.api + .crateApiMergedProtoConnectionImplAutoAccessorSetOnPost( + that: this, + onPost: onPost, + ); +} + +@sealed +class StorageImplImpl extends RustOpaque implements StorageImpl { + // Not to be used by end users + StorageImplImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + StorageImplImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + NekotonBridge.instance.api.rust_arc_increment_strong_count_StorageImpl, + rustArcDecrementStrongCount: + NekotonBridge.instance.api.rust_arc_decrement_strong_count_StorageImpl, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_StorageImplPtr, + ); + + ArcFnStringDartFnFutureOptionString get onGet => NekotonBridge.instance.api + .crateApiMergedStorageImplAutoAccessorGetOnGet(that: this); + + ArcFnStringDartFnFuture get onRemove => NekotonBridge.instance.api + .crateApiMergedStorageImplAutoAccessorGetOnRemove(that: this); + + ArcFnStringDartFnFuture get onRemoveUnchecked => NekotonBridge.instance.api + .crateApiMergedStorageImplAutoAccessorGetOnRemoveUnchecked(that: this); + + ArcFnStringStringDartFnFuture get onSet => NekotonBridge.instance.api + .crateApiMergedStorageImplAutoAccessorGetOnSet(that: this); + + ArcFnStringStringDartFnFuture get onSetUnchecked => NekotonBridge.instance.api + .crateApiMergedStorageImplAutoAccessorGetOnSetUnchecked(that: this); + + set onGet(ArcFnStringDartFnFutureOptionString onGet) => NekotonBridge + .instance + .api + .crateApiMergedStorageImplAutoAccessorSetOnGet(that: this, onGet: onGet); + + set onRemove(ArcFnStringDartFnFuture onRemove) => NekotonBridge.instance.api + .crateApiMergedStorageImplAutoAccessorSetOnRemove( + that: this, + onRemove: onRemove, + ); + + set onRemoveUnchecked(ArcFnStringDartFnFuture onRemoveUnchecked) => + NekotonBridge.instance.api + .crateApiMergedStorageImplAutoAccessorSetOnRemoveUnchecked( + that: this, + onRemoveUnchecked: onRemoveUnchecked, + ); + + set onSet(ArcFnStringStringDartFnFuture onSet) => NekotonBridge.instance.api + .crateApiMergedStorageImplAutoAccessorSetOnSet(that: this, onSet: onSet); + + set onSetUnchecked(ArcFnStringStringDartFnFuture onSetUnchecked) => + NekotonBridge.instance.api + .crateApiMergedStorageImplAutoAccessorSetOnSetUnchecked( + that: this, + onSetUnchecked: onSetUnchecked, + ); +} + +@sealed +class TokenWalletSubscriptionHandlerImplImpl extends RustOpaque + implements TokenWalletSubscriptionHandlerImpl { + // Not to be used by end users + TokenWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode( + List wire, + ) : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + TokenWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_TokenWalletSubscriptionHandlerImpl, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_TokenWalletSubscriptionHandlerImpl, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_TokenWalletSubscriptionHandlerImplPtr, + ); + + ArcFnStringDartFnFuture get onBalanceChanged => NekotonBridge.instance.api + .crateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorGetOnBalanceChanged( + that: this, + ); + + ArcFnStringDartFnFuture get onTransactionsFound => NekotonBridge.instance.api + .crateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFound( + that: this, + ); + + set onBalanceChanged( + ArcFnStringDartFnFuture onBalanceChanged, + ) => NekotonBridge.instance.api + .crateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorSetOnBalanceChanged( + that: this, + onBalanceChanged: onBalanceChanged, + ); + + set onTransactionsFound( + ArcFnStringDartFnFuture onTransactionsFound, + ) => NekotonBridge.instance.api + .crateApiMergedTokenWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFound( + that: this, + onTransactionsFound: onTransactionsFound, + ); +} + +@sealed +class TonWalletSubscriptionHandlerImplImpl extends RustOpaque + implements TonWalletSubscriptionHandlerImpl { + // Not to be used by end users + TonWalletSubscriptionHandlerImplImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + TonWalletSubscriptionHandlerImplImpl.frbInternalSseDecode( + BigInt ptr, + int externalSizeOnNative, + ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_increment_strong_count_TonWalletSubscriptionHandlerImpl, + rustArcDecrementStrongCount: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_TonWalletSubscriptionHandlerImpl, + rustArcDecrementStrongCountPtr: NekotonBridge + .instance + .api + .rust_arc_decrement_strong_count_TonWalletSubscriptionHandlerImplPtr, + ); + + ArcFnStringDartFnFuture get onCustodiansChanged => NekotonBridge.instance.api + .crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnCustodiansChanged( + that: this, + ); + + ArcFnStringDartFnFuture get onDetailsChanged => NekotonBridge.instance.api + .crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnDetailsChanged( + that: this, + ); + + ArcFnStringDartFnFuture get onMessageExpired => NekotonBridge.instance.api + .crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnMessageExpired( + that: this, + ); + + ArcFnStringDartFnFuture get onMessageSent => NekotonBridge.instance.api + .crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnMessageSent( + that: this, + ); + + ArcFnStringDartFnFuture get onStateChanged => NekotonBridge.instance.api + .crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnStateChanged( + that: this, + ); + + ArcFnStringDartFnFuture get onTransactionsFound => NekotonBridge.instance.api + .crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnTransactionsFound( + that: this, + ); + + ArcFnStringDartFnFuture get onUnconfirmedTransactionsChanged => NekotonBridge + .instance + .api + .crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorGetOnUnconfirmedTransactionsChanged( + that: this, + ); + + set onCustodiansChanged( + ArcFnStringDartFnFuture onCustodiansChanged, + ) => NekotonBridge.instance.api + .crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnCustodiansChanged( + that: this, + onCustodiansChanged: onCustodiansChanged, + ); + + set onDetailsChanged( + ArcFnStringDartFnFuture onDetailsChanged, + ) => NekotonBridge.instance.api + .crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnDetailsChanged( + that: this, + onDetailsChanged: onDetailsChanged, + ); + + set onMessageExpired( + ArcFnStringDartFnFuture onMessageExpired, + ) => NekotonBridge.instance.api + .crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnMessageExpired( + that: this, + onMessageExpired: onMessageExpired, + ); + + set onMessageSent(ArcFnStringDartFnFuture onMessageSent) => NekotonBridge + .instance + .api + .crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnMessageSent( + that: this, + onMessageSent: onMessageSent, + ); + + set onStateChanged(ArcFnStringDartFnFuture onStateChanged) => NekotonBridge + .instance + .api + .crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnStateChanged( + that: this, + onStateChanged: onStateChanged, + ); + + set onTransactionsFound( + ArcFnStringDartFnFuture onTransactionsFound, + ) => NekotonBridge.instance.api + .crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnTransactionsFound( + that: this, + onTransactionsFound: onTransactionsFound, + ); + + set onUnconfirmedTransactionsChanged( + ArcFnStringDartFnFuture onUnconfirmedTransactionsChanged, + ) => NekotonBridge.instance.api + .crateApiMergedTonWalletSubscriptionHandlerImplAutoAccessorSetOnUnconfirmedTransactionsChanged( + that: this, + onUnconfirmedTransactionsChanged: onUnconfirmedTransactionsChanged, + ); +} diff --git a/packages/nekoton_bridge/lib/src/frb_generated.io.dart b/packages/nekoton_bridge/lib/src/frb_generated.io.dart index 7bed9694..d6d7f29c 100644 --- a/packages/nekoton_bridge/lib/src/frb_generated.io.dart +++ b/packages/nekoton_bridge/lib/src/frb_generated.io.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field @@ -8,10 +8,10 @@ import 'dart:async'; import 'dart:convert'; import 'dart:ffi' as ffi; import 'frb_generated.dart'; +import 'lib.dart'; import 'nekoton_wrapper/core/keystore/models.dart'; import 'nekoton_wrapper/crypto/models.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart'; -import 'utils/caller.dart'; import 'utils/logger.dart'; abstract class NekotonBridgeApiImplPlatform @@ -24,126 +24,553 @@ abstract class NekotonBridgeApiImplPlatform }); CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcAccountsStorageBoxTraitPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTraitPtr; + get rust_arc_decrement_strong_count_ArcAccountsStorageBoxTraitPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTraitPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcGenericContractBoxTraitPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTraitPtr; + get rust_arc_decrement_strong_count_ArcGenericContractBoxTraitPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTraitPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcGqlConnectionBoxTraitPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTraitPtr; + get rust_arc_decrement_strong_count_ArcGqlConnectionBoxTraitPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTraitPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcJettonWalletBoxTraitPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTraitPtr; + get rust_arc_decrement_strong_count_ArcJettonWalletBoxTraitPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTraitPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcJrpcConnectionBoxTraitPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTraitPtr; + get rust_arc_decrement_strong_count_ArcJrpcConnectionBoxTraitPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTraitPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcKeyStoreApiBoxTraitPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTraitPtr; + get rust_arc_decrement_strong_count_ArcKeyStoreApiBoxTraitPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTraitPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcLedgerConnectionBoxTraitPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTraitPtr; + get rust_arc_decrement_strong_count_ArcLedgerConnectionBoxTraitPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTraitPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcProtoConnectionBoxTraitPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTraitPtr; + get rust_arc_decrement_strong_count_ArcProtoConnectionBoxTraitPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTraitPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcStorageBoxTraitPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTraitPtr; + get rust_arc_decrement_strong_count_ArcStorageBoxTraitPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTraitPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcTokenWalletBoxTraitPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTraitPtr; + get rust_arc_decrement_strong_count_ArcTokenWalletBoxTraitPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTraitPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcTonWalletBoxTraitPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTraitPtr; + get rust_arc_decrement_strong_count_ArcTonWalletBoxTraitPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTraitPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcTransportBoxTraitPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTraitPtr; + get rust_arc_decrement_strong_count_ArcTransportBoxTraitPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTraitPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcUnsignedMessageBoxTraitPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTraitPtr; + get rust_arc_decrement_strong_count_ArcUnsignedMessageBoxTraitPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTraitPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnStringDartFnFutureOptionStringPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSyncPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnStringDartFnFuturePtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSyncPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnStringDartFnFutureStringPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSyncPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnStringStringDartFnFuturePtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSyncPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnVecU8DartFnFutureVecU8Ptr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSyncPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnU16DartFnFutureVecU8Ptr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSyncPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnU16OptionI32VecU8DartFnFutureVecU8Ptr => + wire._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSyncPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Ptr => + wire._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSyncPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_GenericContractSubscriptionHandlerImplPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImplPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_GqlConnectionImplPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImplPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_JettonWalletSubscriptionHandlerImplPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImplPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_JrpcConnectionImplPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImplPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_LedgerConnectionImplPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImplPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ProtoConnectionImplPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImplPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_StorageImplPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImplPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_TokenWalletSubscriptionHandlerImplPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImplPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_TonWalletSubscriptionHandlerImplPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImplPtr; @protected AnyhowException dco_decode_AnyhowException(dynamic raw); + @protected + ArcFnStringDartFnFutureOptionString + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + dynamic raw, + ); + + @protected + ArcFnStringDartFnFuture + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + dynamic raw, + ); + + @protected + ArcFnStringDartFnFutureString + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + dynamic raw, + ); + + @protected + ArcFnStringStringDartFnFuture + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + dynamic raw, + ); + + @protected + ArcFnVecU8DartFnFutureVecU8 + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + dynamic raw, + ); + + @protected + ArcFnU16DartFnFutureVecU8 + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + dynamic raw, + ); + + @protected + ArcFnU16OptionI32VecU8DartFnFutureVecU8 + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + dynamic raw, + ); + + @protected + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + dynamic raw, + ); + + @protected + GenericContractSubscriptionHandlerImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + GqlConnectionImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + dynamic raw, + ); + + @protected + JettonWalletSubscriptionHandlerImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + JrpcConnectionImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + dynamic raw, + ); + + @protected + LedgerConnectionImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + dynamic raw, + ); + + @protected + ProtoConnectionImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + dynamic raw, + ); + + @protected + StorageImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + dynamic raw, + ); + + @protected + TokenWalletSubscriptionHandlerImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + TonWalletSubscriptionHandlerImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + GenericContractSubscriptionHandlerImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + GqlConnectionImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + dynamic raw, + ); + + @protected + JettonWalletSubscriptionHandlerImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + JrpcConnectionImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + dynamic raw, + ); + + @protected + LedgerConnectionImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + dynamic raw, + ); + + @protected + ProtoConnectionImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + dynamic raw, + ); + + @protected + StorageImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + dynamic raw, + ); + + @protected + TokenWalletSubscriptionHandlerImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + TonWalletSubscriptionHandlerImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + GenericContractSubscriptionHandlerImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + GqlConnectionImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + dynamic raw, + ); + + @protected + JettonWalletSubscriptionHandlerImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + JrpcConnectionImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + dynamic raw, + ); + + @protected + LedgerConnectionImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + dynamic raw, + ); + + @protected + ProtoConnectionImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + dynamic raw, + ); + + @protected + StorageImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + dynamic raw, + ); + + @protected + TokenWalletSubscriptionHandlerImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + TonWalletSubscriptionHandlerImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + FutureOr Function(String) + dco_decode_DartFn_Inputs_String_Output_String_AnyhowException(dynamic raw); + + @protected + FutureOr Function(String) + dco_decode_DartFn_Inputs_String_Output_opt_String_AnyhowException( + dynamic raw, + ); + + @protected + FutureOr Function(String) + dco_decode_DartFn_Inputs_String_Output_unit_AnyhowException(dynamic raw); + + @protected + FutureOr Function(String, String) + dco_decode_DartFn_Inputs_String_String_Output_unit_AnyhowException( + dynamic raw, + ); + + @protected + FutureOr Function(Uint8List) + dco_decode_DartFn_Inputs_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + dynamic raw, + ); + + @protected + FutureOr Function(int) + dco_decode_DartFn_Inputs_u_16_Output_list_prim_u_8_strict_AnyhowException( + dynamic raw, + ); + + @protected + FutureOr Function(int, int?, Uint8List) + dco_decode_DartFn_Inputs_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + dynamic raw, + ); + + @protected + FutureOr Function(int, int, int?, Uint8List, String) + dco_decode_DartFn_Inputs_u_16_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_String_Output_list_prim_u_8_strict_AnyhowException( + dynamic raw, + ); + + @protected + Object dco_decode_DartOpaque(dynamic raw); + @protected Map dco_decode_Map_String_String_None(dynamic raw); @protected ArcAccountsStorageBoxTrait - dco_decode_RustOpaque_ArcdynAccountsStorageBoxTrait(dynamic raw); + dco_decode_RustOpaque_ArcdynAccountsStorageBoxTrait(dynamic raw); @protected ArcGenericContractBoxTrait - dco_decode_RustOpaque_ArcdynGenericContractBoxTrait(dynamic raw); + dco_decode_RustOpaque_ArcdynGenericContractBoxTrait(dynamic raw); @protected ArcGqlConnectionBoxTrait dco_decode_RustOpaque_ArcdynGqlConnectionBoxTrait( - dynamic raw); + dynamic raw, + ); @protected ArcJettonWalletBoxTrait dco_decode_RustOpaque_ArcdynJettonWalletBoxTrait( - dynamic raw); + dynamic raw, + ); @protected ArcJrpcConnectionBoxTrait dco_decode_RustOpaque_ArcdynJrpcConnectionBoxTrait( - dynamic raw); + dynamic raw, + ); @protected ArcKeyStoreApiBoxTrait dco_decode_RustOpaque_ArcdynKeyStoreApiBoxTrait( - dynamic raw); + dynamic raw, + ); @protected ArcLedgerConnectionBoxTrait - dco_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait(dynamic raw); + dco_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait(dynamic raw); @protected ArcProtoConnectionBoxTrait - dco_decode_RustOpaque_ArcdynProtoConnectionBoxTrait(dynamic raw); + dco_decode_RustOpaque_ArcdynProtoConnectionBoxTrait(dynamic raw); @protected ArcStorageBoxTrait dco_decode_RustOpaque_ArcdynStorageBoxTrait(dynamic raw); @protected ArcTokenWalletBoxTrait dco_decode_RustOpaque_ArcdynTokenWalletBoxTrait( - dynamic raw); + dynamic raw, + ); @protected ArcTonWalletBoxTrait dco_decode_RustOpaque_ArcdynTonWalletBoxTrait( - dynamic raw); + dynamic raw, + ); @protected ArcTransportBoxTrait dco_decode_RustOpaque_ArcdynTransportBoxTrait( - dynamic raw); + dynamic raw, + ); @protected ArcUnsignedMessageBoxTrait - dco_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait(dynamic raw); + dco_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait(dynamic raw); @protected - RustStreamSink - dco_decode_StreamSink_dart_call_stub_registred_Dco(dynamic raw); + ArcFnStringDartFnFutureOptionString + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + dynamic raw, + ); @protected - RustStreamSink dco_decode_StreamSink_log_entry_Dco(dynamic raw); + ArcFnStringDartFnFuture + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + dynamic raw, + ); @protected - String dco_decode_String(dynamic raw); + ArcFnStringDartFnFutureString + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + dynamic raw, + ); + + @protected + ArcFnStringStringDartFnFuture + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + dynamic raw, + ); + + @protected + ArcFnVecU8DartFnFutureVecU8 + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + dynamic raw, + ); @protected - MyFormat dco_decode_TraitDef_MyFormat(dynamic raw); + ArcFnU16DartFnFutureVecU8 + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + dynamic raw, + ); + + @protected + ArcFnU16OptionI32VecU8DartFnFutureVecU8 + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + dynamic raw, + ); + + @protected + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + dynamic raw, + ); + + @protected + GenericContractSubscriptionHandlerImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + GqlConnectionImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + dynamic raw, + ); + + @protected + JettonWalletSubscriptionHandlerImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + JrpcConnectionImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + dynamic raw, + ); + + @protected + LedgerConnectionImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + dynamic raw, + ); + + @protected + ProtoConnectionImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + dynamic raw, + ); + + @protected + StorageImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + dynamic raw, + ); + + @protected + TokenWalletSubscriptionHandlerImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + TonWalletSubscriptionHandlerImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + RustStreamSink dco_decode_StreamSink_log_entry_Dco(dynamic raw); + + @protected + String dco_decode_String(dynamic raw); @protected AccountsStorageImpl dco_decode_accounts_storage_impl(dynamic raw); @@ -169,22 +596,14 @@ abstract class NekotonBridgeApiImplPlatform @protected bool dco_decode_box_autoadd_bool(dynamic raw); - @protected - CallerTestClass dco_decode_box_autoadd_caller_test_class(dynamic raw); - - @protected - DartCallStub dco_decode_box_autoadd_dart_call_stub(dynamic raw); - - @protected - DynamicValue dco_decode_box_autoadd_dynamic_value(dynamic raw); - @protected GenericContractDartWrapper - dco_decode_box_autoadd_generic_contract_dart_wrapper(dynamic raw); + dco_decode_box_autoadd_generic_contract_dart_wrapper(dynamic raw); @protected GqlConnectionDartWrapper dco_decode_box_autoadd_gql_connection_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected GqlTransportImpl dco_decode_box_autoadd_gql_transport_impl(dynamic raw); @@ -194,11 +613,13 @@ abstract class NekotonBridgeApiImplPlatform @protected JettonWalletDartWrapper dco_decode_box_autoadd_jetton_wallet_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected JrpcConnectionDartWrapper dco_decode_box_autoadd_jrpc_connection_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected JrpcTransportImpl dco_decode_box_autoadd_jrpc_transport_impl(dynamic raw); @@ -211,17 +632,14 @@ abstract class NekotonBridgeApiImplPlatform @protected LedgerConnectionDartWrapper - dco_decode_box_autoadd_ledger_connection_dart_wrapper(dynamic raw); + dco_decode_box_autoadd_ledger_connection_dart_wrapper(dynamic raw); @protected MnemonicType dco_decode_box_autoadd_mnemonic_type(dynamic raw); - @protected - MyClass dco_decode_box_autoadd_my_class(dynamic raw); - @protected ProtoConnectionDartWrapper - dco_decode_box_autoadd_proto_connection_dart_wrapper(dynamic raw); + dco_decode_box_autoadd_proto_connection_dart_wrapper(dynamic raw); @protected ProtoTransportImpl dco_decode_box_autoadd_proto_transport_impl(dynamic raw); @@ -231,11 +649,13 @@ abstract class NekotonBridgeApiImplPlatform @protected TokenWalletDartWrapper dco_decode_box_autoadd_token_wallet_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected TonWalletDartWrapper dco_decode_box_autoadd_ton_wallet_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected int dco_decode_box_autoadd_u_32(dynamic raw); @@ -243,36 +663,13 @@ abstract class NekotonBridgeApiImplPlatform @protected UnsignedMessageImpl dco_decode_box_autoadd_unsigned_message_impl(dynamic raw); - @protected - CallerTestClass dco_decode_caller_test_class(dynamic raw); - - @protected - DartCallStub dco_decode_dart_call_stub(dynamic raw); - - @protected - DartCallStubRegistred dco_decode_dart_call_stub_registred(dynamic raw); - - @protected - DynamicNamedValue dco_decode_dynamic_named_value(dynamic raw); - - @protected - DynamicValue dco_decode_dynamic_value(dynamic raw); - - @protected - ErrorCode dco_decode_error_code(dynamic raw); - - @protected - double dco_decode_f_32(dynamic raw); - - @protected - double dco_decode_f_64(dynamic raw); - @protected GeneratedKeyG dco_decode_generated_key_g(dynamic raw); @protected GenericContractDartWrapper dco_decode_generic_contract_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected GqlConnectionDartWrapper dco_decode_gql_connection_dart_wrapper(dynamic raw); @@ -289,12 +686,16 @@ abstract class NekotonBridgeApiImplPlatform @protected int dco_decode_i_8(dynamic raw); + @protected + PlatformInt64 dco_decode_isize(dynamic raw); + @protected JettonWalletDartWrapper dco_decode_jetton_wallet_dart_wrapper(dynamic raw); @protected JrpcConnectionDartWrapper dco_decode_jrpc_connection_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected JrpcTransportImpl dco_decode_jrpc_transport_impl(dynamic raw); @@ -310,20 +711,12 @@ abstract class NekotonBridgeApiImplPlatform @protected LedgerConnectionDartWrapper dco_decode_ledger_connection_dart_wrapper( - dynamic raw); - - @protected - LedgerConnectionImpl dco_decode_ledger_connection_impl(dynamic raw); + dynamic raw, + ); @protected List dco_decode_list_String(dynamic raw); - @protected - List dco_decode_list_dynamic_named_value(dynamic raw); - - @protected - List dco_decode_list_dynamic_value(dynamic raw); - @protected List dco_decode_list_key_signer(dynamic raw); @@ -351,24 +744,18 @@ abstract class NekotonBridgeApiImplPlatform @protected MnemonicType dco_decode_mnemonic_type(dynamic raw); - @protected - MyClass dco_decode_my_class(dynamic raw); - @protected String? dco_decode_opt_String(dynamic raw); @protected bool? dco_decode_opt_box_autoadd_bool(dynamic raw); - @protected - DynamicValue? dco_decode_opt_box_autoadd_dynamic_value(dynamic raw); - @protected int? dco_decode_opt_box_autoadd_i_32(dynamic raw); @protected LedgerConnectionDartWrapper? - dco_decode_opt_box_autoadd_ledger_connection_dart_wrapper(dynamic raw); + dco_decode_opt_box_autoadd_ledger_connection_dart_wrapper(dynamic raw); @protected int? dco_decode_opt_box_autoadd_u_32(dynamic raw); @@ -381,7 +768,8 @@ abstract class NekotonBridgeApiImplPlatform @protected ProtoConnectionDartWrapper dco_decode_proto_connection_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected ProtoTransportImpl dco_decode_proto_transport_impl(dynamic raw); @@ -401,9 +789,6 @@ abstract class NekotonBridgeApiImplPlatform @protected StorageDartWrapper dco_decode_storage_dart_wrapper(dynamic raw); - @protected - StorageImpl dco_decode_storage_impl(dynamic raw); - @protected TokenWalletDartWrapper dco_decode_token_wallet_dart_wrapper(dynamic raw); @@ -435,283 +820,584 @@ abstract class NekotonBridgeApiImplPlatform AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer); @protected - Map sse_decode_Map_String_String_None( - SseDeserializer deserializer); + ArcFnStringDartFnFutureOptionString + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + SseDeserializer deserializer, + ); @protected - ArcAccountsStorageBoxTrait - sse_decode_RustOpaque_ArcdynAccountsStorageBoxTrait( - SseDeserializer deserializer); + ArcFnStringDartFnFuture + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + SseDeserializer deserializer, + ); @protected - ArcGenericContractBoxTrait - sse_decode_RustOpaque_ArcdynGenericContractBoxTrait( - SseDeserializer deserializer); + ArcFnStringDartFnFutureString + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + SseDeserializer deserializer, + ); @protected - ArcGqlConnectionBoxTrait sse_decode_RustOpaque_ArcdynGqlConnectionBoxTrait( - SseDeserializer deserializer); + ArcFnStringStringDartFnFuture + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + SseDeserializer deserializer, + ); @protected - ArcJettonWalletBoxTrait sse_decode_RustOpaque_ArcdynJettonWalletBoxTrait( - SseDeserializer deserializer); + ArcFnVecU8DartFnFutureVecU8 + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - ArcJrpcConnectionBoxTrait sse_decode_RustOpaque_ArcdynJrpcConnectionBoxTrait( - SseDeserializer deserializer); + ArcFnU16DartFnFutureVecU8 + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - ArcKeyStoreApiBoxTrait sse_decode_RustOpaque_ArcdynKeyStoreApiBoxTrait( - SseDeserializer deserializer); + ArcFnU16OptionI32VecU8DartFnFutureVecU8 + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - ArcLedgerConnectionBoxTrait - sse_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait( - SseDeserializer deserializer); + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - ArcProtoConnectionBoxTrait - sse_decode_RustOpaque_ArcdynProtoConnectionBoxTrait( - SseDeserializer deserializer); + GenericContractSubscriptionHandlerImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - ArcStorageBoxTrait sse_decode_RustOpaque_ArcdynStorageBoxTrait( - SseDeserializer deserializer); + GqlConnectionImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + SseDeserializer deserializer, + ); @protected - ArcTokenWalletBoxTrait sse_decode_RustOpaque_ArcdynTokenWalletBoxTrait( - SseDeserializer deserializer); + JettonWalletSubscriptionHandlerImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - ArcTonWalletBoxTrait sse_decode_RustOpaque_ArcdynTonWalletBoxTrait( - SseDeserializer deserializer); + JrpcConnectionImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + SseDeserializer deserializer, + ); @protected - ArcTransportBoxTrait sse_decode_RustOpaque_ArcdynTransportBoxTrait( - SseDeserializer deserializer); + LedgerConnectionImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + SseDeserializer deserializer, + ); @protected - ArcUnsignedMessageBoxTrait - sse_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait( - SseDeserializer deserializer); + ProtoConnectionImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + SseDeserializer deserializer, + ); @protected - RustStreamSink - sse_decode_StreamSink_dart_call_stub_registred_Dco( - SseDeserializer deserializer); + StorageImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + SseDeserializer deserializer, + ); @protected - RustStreamSink sse_decode_StreamSink_log_entry_Dco( - SseDeserializer deserializer); + TokenWalletSubscriptionHandlerImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - String sse_decode_String(SseDeserializer deserializer); + TonWalletSubscriptionHandlerImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - AccountsStorageImpl sse_decode_accounts_storage_impl( - SseDeserializer deserializer); + GenericContractSubscriptionHandlerImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - Bip39Entropy sse_decode_bip_39_entropy(SseDeserializer deserializer); + GqlConnectionImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + SseDeserializer deserializer, + ); @protected - Bip39MnemonicData sse_decode_bip_39_mnemonic_data( - SseDeserializer deserializer); + JettonWalletSubscriptionHandlerImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - Bip39Path sse_decode_bip_39_path(SseDeserializer deserializer); + JrpcConnectionImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + SseDeserializer deserializer, + ); @protected - bool sse_decode_bool(SseDeserializer deserializer); + LedgerConnectionImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + SseDeserializer deserializer, + ); @protected - AccountsStorageImpl sse_decode_box_autoadd_accounts_storage_impl( - SseDeserializer deserializer); + ProtoConnectionImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + SseDeserializer deserializer, + ); @protected - Bip39MnemonicData sse_decode_box_autoadd_bip_39_mnemonic_data( - SseDeserializer deserializer); + StorageImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + SseDeserializer deserializer, + ); @protected - bool sse_decode_box_autoadd_bool(SseDeserializer deserializer); + TokenWalletSubscriptionHandlerImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - CallerTestClass sse_decode_box_autoadd_caller_test_class( - SseDeserializer deserializer); + TonWalletSubscriptionHandlerImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - DartCallStub sse_decode_box_autoadd_dart_call_stub( - SseDeserializer deserializer); + GenericContractSubscriptionHandlerImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - DynamicValue sse_decode_box_autoadd_dynamic_value( - SseDeserializer deserializer); + GqlConnectionImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + SseDeserializer deserializer, + ); @protected - GenericContractDartWrapper - sse_decode_box_autoadd_generic_contract_dart_wrapper( - SseDeserializer deserializer); + JettonWalletSubscriptionHandlerImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - GqlConnectionDartWrapper sse_decode_box_autoadd_gql_connection_dart_wrapper( - SseDeserializer deserializer); + JrpcConnectionImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + SseDeserializer deserializer, + ); @protected - GqlTransportImpl sse_decode_box_autoadd_gql_transport_impl( - SseDeserializer deserializer); + LedgerConnectionImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + SseDeserializer deserializer, + ); @protected - int sse_decode_box_autoadd_i_32(SseDeserializer deserializer); + ProtoConnectionImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + SseDeserializer deserializer, + ); @protected - JettonWalletDartWrapper sse_decode_box_autoadd_jetton_wallet_dart_wrapper( - SseDeserializer deserializer); + StorageImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + SseDeserializer deserializer, + ); @protected - JrpcConnectionDartWrapper sse_decode_box_autoadd_jrpc_connection_dart_wrapper( - SseDeserializer deserializer); + TokenWalletSubscriptionHandlerImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - JrpcTransportImpl sse_decode_box_autoadd_jrpc_transport_impl( - SseDeserializer deserializer); + TonWalletSubscriptionHandlerImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - KeySigner sse_decode_box_autoadd_key_signer(SseDeserializer deserializer); + Object sse_decode_DartOpaque(SseDeserializer deserializer); @protected - KeystoreDartWrapper sse_decode_box_autoadd_keystore_dart_wrapper( - SseDeserializer deserializer); + Map sse_decode_Map_String_String_None( + SseDeserializer deserializer, + ); @protected - LedgerConnectionDartWrapper - sse_decode_box_autoadd_ledger_connection_dart_wrapper( - SseDeserializer deserializer); + ArcAccountsStorageBoxTrait + sse_decode_RustOpaque_ArcdynAccountsStorageBoxTrait( + SseDeserializer deserializer, + ); @protected - MnemonicType sse_decode_box_autoadd_mnemonic_type( - SseDeserializer deserializer); + ArcGenericContractBoxTrait + sse_decode_RustOpaque_ArcdynGenericContractBoxTrait( + SseDeserializer deserializer, + ); @protected - MyClass sse_decode_box_autoadd_my_class(SseDeserializer deserializer); + ArcGqlConnectionBoxTrait sse_decode_RustOpaque_ArcdynGqlConnectionBoxTrait( + SseDeserializer deserializer, + ); @protected - ProtoConnectionDartWrapper - sse_decode_box_autoadd_proto_connection_dart_wrapper( - SseDeserializer deserializer); + ArcJettonWalletBoxTrait sse_decode_RustOpaque_ArcdynJettonWalletBoxTrait( + SseDeserializer deserializer, + ); @protected - ProtoTransportImpl sse_decode_box_autoadd_proto_transport_impl( - SseDeserializer deserializer); + ArcJrpcConnectionBoxTrait sse_decode_RustOpaque_ArcdynJrpcConnectionBoxTrait( + SseDeserializer deserializer, + ); @protected - StorageDartWrapper sse_decode_box_autoadd_storage_dart_wrapper( - SseDeserializer deserializer); + ArcKeyStoreApiBoxTrait sse_decode_RustOpaque_ArcdynKeyStoreApiBoxTrait( + SseDeserializer deserializer, + ); @protected - TokenWalletDartWrapper sse_decode_box_autoadd_token_wallet_dart_wrapper( - SseDeserializer deserializer); + ArcLedgerConnectionBoxTrait + sse_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait( + SseDeserializer deserializer, + ); @protected - TonWalletDartWrapper sse_decode_box_autoadd_ton_wallet_dart_wrapper( - SseDeserializer deserializer); + ArcProtoConnectionBoxTrait + sse_decode_RustOpaque_ArcdynProtoConnectionBoxTrait( + SseDeserializer deserializer, + ); @protected - int sse_decode_box_autoadd_u_32(SseDeserializer deserializer); + ArcStorageBoxTrait sse_decode_RustOpaque_ArcdynStorageBoxTrait( + SseDeserializer deserializer, + ); @protected - UnsignedMessageImpl sse_decode_box_autoadd_unsigned_message_impl( - SseDeserializer deserializer); + ArcTokenWalletBoxTrait sse_decode_RustOpaque_ArcdynTokenWalletBoxTrait( + SseDeserializer deserializer, + ); @protected - CallerTestClass sse_decode_caller_test_class(SseDeserializer deserializer); + ArcTonWalletBoxTrait sse_decode_RustOpaque_ArcdynTonWalletBoxTrait( + SseDeserializer deserializer, + ); @protected - DartCallStub sse_decode_dart_call_stub(SseDeserializer deserializer); + ArcTransportBoxTrait sse_decode_RustOpaque_ArcdynTransportBoxTrait( + SseDeserializer deserializer, + ); @protected - DartCallStubRegistred sse_decode_dart_call_stub_registred( - SseDeserializer deserializer); + ArcUnsignedMessageBoxTrait + sse_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait( + SseDeserializer deserializer, + ); @protected - DynamicNamedValue sse_decode_dynamic_named_value( - SseDeserializer deserializer); + ArcFnStringDartFnFutureOptionString + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + SseDeserializer deserializer, + ); @protected - DynamicValue sse_decode_dynamic_value(SseDeserializer deserializer); + ArcFnStringDartFnFuture + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + SseDeserializer deserializer, + ); @protected - ErrorCode sse_decode_error_code(SseDeserializer deserializer); + ArcFnStringDartFnFutureString + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + SseDeserializer deserializer, + ); @protected - double sse_decode_f_32(SseDeserializer deserializer); + ArcFnStringStringDartFnFuture + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + SseDeserializer deserializer, + ); @protected - double sse_decode_f_64(SseDeserializer deserializer); + ArcFnVecU8DartFnFutureVecU8 + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - GeneratedKeyG sse_decode_generated_key_g(SseDeserializer deserializer); + ArcFnU16DartFnFutureVecU8 + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - GenericContractDartWrapper sse_decode_generic_contract_dart_wrapper( - SseDeserializer deserializer); + ArcFnU16OptionI32VecU8DartFnFutureVecU8 + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - GqlConnectionDartWrapper sse_decode_gql_connection_dart_wrapper( - SseDeserializer deserializer); + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - GqlTransportImpl sse_decode_gql_transport_impl(SseDeserializer deserializer); + GenericContractSubscriptionHandlerImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - int sse_decode_i_32(SseDeserializer deserializer); + GqlConnectionImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + SseDeserializer deserializer, + ); @protected - PlatformInt64 sse_decode_i_64(SseDeserializer deserializer); + JettonWalletSubscriptionHandlerImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); + + @protected + JrpcConnectionImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + SseDeserializer deserializer, + ); + + @protected + LedgerConnectionImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + SseDeserializer deserializer, + ); + + @protected + ProtoConnectionImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + SseDeserializer deserializer, + ); + + @protected + StorageImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + SseDeserializer deserializer, + ); + + @protected + TokenWalletSubscriptionHandlerImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); + + @protected + TonWalletSubscriptionHandlerImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); + + @protected + RustStreamSink sse_decode_StreamSink_log_entry_Dco( + SseDeserializer deserializer, + ); + + @protected + String sse_decode_String(SseDeserializer deserializer); + + @protected + AccountsStorageImpl sse_decode_accounts_storage_impl( + SseDeserializer deserializer, + ); + + @protected + Bip39Entropy sse_decode_bip_39_entropy(SseDeserializer deserializer); + + @protected + Bip39MnemonicData sse_decode_bip_39_mnemonic_data( + SseDeserializer deserializer, + ); + + @protected + Bip39Path sse_decode_bip_39_path(SseDeserializer deserializer); + + @protected + bool sse_decode_bool(SseDeserializer deserializer); + + @protected + AccountsStorageImpl sse_decode_box_autoadd_accounts_storage_impl( + SseDeserializer deserializer, + ); + + @protected + Bip39MnemonicData sse_decode_box_autoadd_bip_39_mnemonic_data( + SseDeserializer deserializer, + ); + + @protected + bool sse_decode_box_autoadd_bool(SseDeserializer deserializer); + + @protected + GenericContractDartWrapper + sse_decode_box_autoadd_generic_contract_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + GqlConnectionDartWrapper sse_decode_box_autoadd_gql_connection_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + GqlTransportImpl sse_decode_box_autoadd_gql_transport_impl( + SseDeserializer deserializer, + ); + + @protected + int sse_decode_box_autoadd_i_32(SseDeserializer deserializer); + + @protected + JettonWalletDartWrapper sse_decode_box_autoadd_jetton_wallet_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + JrpcConnectionDartWrapper sse_decode_box_autoadd_jrpc_connection_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + JrpcTransportImpl sse_decode_box_autoadd_jrpc_transport_impl( + SseDeserializer deserializer, + ); + + @protected + KeySigner sse_decode_box_autoadd_key_signer(SseDeserializer deserializer); + + @protected + KeystoreDartWrapper sse_decode_box_autoadd_keystore_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + LedgerConnectionDartWrapper + sse_decode_box_autoadd_ledger_connection_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + MnemonicType sse_decode_box_autoadd_mnemonic_type( + SseDeserializer deserializer, + ); + + @protected + ProtoConnectionDartWrapper + sse_decode_box_autoadd_proto_connection_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + ProtoTransportImpl sse_decode_box_autoadd_proto_transport_impl( + SseDeserializer deserializer, + ); + + @protected + StorageDartWrapper sse_decode_box_autoadd_storage_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + TokenWalletDartWrapper sse_decode_box_autoadd_token_wallet_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + TonWalletDartWrapper sse_decode_box_autoadd_ton_wallet_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + int sse_decode_box_autoadd_u_32(SseDeserializer deserializer); + + @protected + UnsignedMessageImpl sse_decode_box_autoadd_unsigned_message_impl( + SseDeserializer deserializer, + ); + + @protected + GeneratedKeyG sse_decode_generated_key_g(SseDeserializer deserializer); + + @protected + GenericContractDartWrapper sse_decode_generic_contract_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + GqlConnectionDartWrapper sse_decode_gql_connection_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + GqlTransportImpl sse_decode_gql_transport_impl(SseDeserializer deserializer); + + @protected + int sse_decode_i_32(SseDeserializer deserializer); + + @protected + PlatformInt64 sse_decode_i_64(SseDeserializer deserializer); @protected int sse_decode_i_8(SseDeserializer deserializer); + @protected + PlatformInt64 sse_decode_isize(SseDeserializer deserializer); + @protected JettonWalletDartWrapper sse_decode_jetton_wallet_dart_wrapper( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected JrpcConnectionDartWrapper sse_decode_jrpc_connection_dart_wrapper( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected JrpcTransportImpl sse_decode_jrpc_transport_impl( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected KeySigner sse_decode_key_signer(SseDeserializer deserializer); @protected KeystoreDartWrapper sse_decode_keystore_dart_wrapper( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected LatestBlock sse_decode_latest_block(SseDeserializer deserializer); @protected LedgerConnectionDartWrapper sse_decode_ledger_connection_dart_wrapper( - SseDeserializer deserializer); - - @protected - LedgerConnectionImpl sse_decode_ledger_connection_impl( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected List sse_decode_list_String(SseDeserializer deserializer); - @protected - List sse_decode_list_dynamic_named_value( - SseDeserializer deserializer); - - @protected - List sse_decode_list_dynamic_value( - SseDeserializer deserializer); - @protected List sse_decode_list_key_signer(SseDeserializer deserializer); @@ -729,7 +1415,8 @@ abstract class NekotonBridgeApiImplPlatform @protected List<(String, String)> sse_decode_list_record_string_string( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected LogEntry sse_decode_log_entry(SseDeserializer deserializer); @@ -740,26 +1427,20 @@ abstract class NekotonBridgeApiImplPlatform @protected MnemonicType sse_decode_mnemonic_type(SseDeserializer deserializer); - @protected - MyClass sse_decode_my_class(SseDeserializer deserializer); - @protected String? sse_decode_opt_String(SseDeserializer deserializer); @protected bool? sse_decode_opt_box_autoadd_bool(SseDeserializer deserializer); - @protected - DynamicValue? sse_decode_opt_box_autoadd_dynamic_value( - SseDeserializer deserializer); - @protected int? sse_decode_opt_box_autoadd_i_32(SseDeserializer deserializer); @protected LedgerConnectionDartWrapper? - sse_decode_opt_box_autoadd_ledger_connection_dart_wrapper( - SseDeserializer deserializer); + sse_decode_opt_box_autoadd_ledger_connection_dart_wrapper( + SseDeserializer deserializer, + ); @protected int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer); @@ -772,15 +1453,18 @@ abstract class NekotonBridgeApiImplPlatform @protected ProtoConnectionDartWrapper sse_decode_proto_connection_dart_wrapper( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected ProtoTransportImpl sse_decode_proto_transport_impl( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected (String, String) sse_decode_record_string_string( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected SignatureParts sse_decode_signature_parts(SseDeserializer deserializer); @@ -793,18 +1477,18 @@ abstract class NekotonBridgeApiImplPlatform @protected StorageDartWrapper sse_decode_storage_dart_wrapper( - SseDeserializer deserializer); - - @protected - StorageImpl sse_decode_storage_impl(SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected TokenWalletDartWrapper sse_decode_token_wallet_dart_wrapper( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected TonWalletDartWrapper sse_decode_ton_wallet_dart_wrapper( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected int sse_decode_u_16(SseDeserializer deserializer); @@ -823,47 +1507,41 @@ abstract class NekotonBridgeApiImplPlatform @protected UnsignedMessageImpl sse_decode_unsigned_message_impl( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected BigInt sse_decode_usize(SseDeserializer deserializer); @protected ffi.Pointer cst_encode_AnyhowException( - AnyhowException raw) { + AnyhowException raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs throw UnimplementedError(); } @protected ffi.Pointer - cst_encode_Map_String_String_None(Map raw) { + cst_encode_Map_String_String_None(Map raw) { // Codec=Cst (C-struct based), see doc to use other codecs return cst_encode_list_record_string_string( - raw.entries.map((e) => (e.key, e.value)).toList()); - } - - @protected - ffi.Pointer - cst_encode_StreamSink_dart_call_stub_registred_Dco( - RustStreamSink raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_String(raw.setupAndSerialize( - codec: DcoCodec( - decodeSuccessData: dco_decode_dart_call_stub_registred, - decodeErrorData: dco_decode_AnyhowException, - ))); + raw.entries.map((e) => (e.key, e.value)).toList(), + ); } @protected ffi.Pointer - cst_encode_StreamSink_log_entry_Dco(RustStreamSink raw) { + cst_encode_StreamSink_log_entry_Dco(RustStreamSink raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_String(raw.setupAndSerialize( + return cst_encode_String( + raw.setupAndSerialize( codec: DcoCodec( - decodeSuccessData: dco_decode_log_entry, - decodeErrorData: dco_decode_AnyhowException, - ))); + decodeSuccessData: dco_decode_log_entry, + decodeErrorData: dco_decode_AnyhowException, + ), + ), + ); } @protected @@ -874,7 +1552,7 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_box_autoadd_accounts_storage_impl(AccountsStorageImpl raw) { + cst_encode_box_autoadd_accounts_storage_impl(AccountsStorageImpl raw) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_accounts_storage_impl(); cst_api_fill_to_wire_accounts_storage_impl(raw, ptr.ref); @@ -883,7 +1561,7 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_box_autoadd_bip_39_mnemonic_data(Bip39MnemonicData raw) { + cst_encode_box_autoadd_bip_39_mnemonic_data(Bip39MnemonicData raw) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_bip_39_mnemonic_data(); cst_api_fill_to_wire_bip_39_mnemonic_data(raw, ptr.ref); @@ -896,37 +1574,11 @@ abstract class NekotonBridgeApiImplPlatform return wire.cst_new_box_autoadd_bool(cst_encode_bool(raw)); } - @protected - ffi.Pointer - cst_encode_box_autoadd_caller_test_class(CallerTestClass raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_caller_test_class(); - cst_api_fill_to_wire_caller_test_class(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_dart_call_stub( - DartCallStub raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_dart_call_stub(); - cst_api_fill_to_wire_dart_call_stub(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_dynamic_value( - DynamicValue raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_dynamic_value(); - cst_api_fill_to_wire_dynamic_value(raw, ptr.ref); - return ptr; - } - @protected ffi.Pointer - cst_encode_box_autoadd_generic_contract_dart_wrapper( - GenericContractDartWrapper raw) { + cst_encode_box_autoadd_generic_contract_dart_wrapper( + GenericContractDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_generic_contract_dart_wrapper(); cst_api_fill_to_wire_generic_contract_dart_wrapper(raw, ptr.ref); @@ -935,8 +1587,9 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_box_autoadd_gql_connection_dart_wrapper( - GqlConnectionDartWrapper raw) { + cst_encode_box_autoadd_gql_connection_dart_wrapper( + GqlConnectionDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_gql_connection_dart_wrapper(); cst_api_fill_to_wire_gql_connection_dart_wrapper(raw, ptr.ref); @@ -945,7 +1598,7 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_box_autoadd_gql_transport_impl(GqlTransportImpl raw) { + cst_encode_box_autoadd_gql_transport_impl(GqlTransportImpl raw) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_gql_transport_impl(); cst_api_fill_to_wire_gql_transport_impl(raw, ptr.ref); @@ -960,8 +1613,9 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_box_autoadd_jetton_wallet_dart_wrapper( - JettonWalletDartWrapper raw) { + cst_encode_box_autoadd_jetton_wallet_dart_wrapper( + JettonWalletDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_jetton_wallet_dart_wrapper(); cst_api_fill_to_wire_jetton_wallet_dart_wrapper(raw, ptr.ref); @@ -970,8 +1624,9 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_box_autoadd_jrpc_connection_dart_wrapper( - JrpcConnectionDartWrapper raw) { + cst_encode_box_autoadd_jrpc_connection_dart_wrapper( + JrpcConnectionDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_jrpc_connection_dart_wrapper(); cst_api_fill_to_wire_jrpc_connection_dart_wrapper(raw, ptr.ref); @@ -980,7 +1635,7 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_box_autoadd_jrpc_transport_impl(JrpcTransportImpl raw) { + cst_encode_box_autoadd_jrpc_transport_impl(JrpcTransportImpl raw) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_jrpc_transport_impl(); cst_api_fill_to_wire_jrpc_transport_impl(raw, ptr.ref); @@ -989,7 +1644,8 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer cst_encode_box_autoadd_key_signer( - KeySigner raw) { + KeySigner raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_key_signer(); cst_api_fill_to_wire_key_signer(raw, ptr.ref); @@ -998,7 +1654,7 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_box_autoadd_keystore_dart_wrapper(KeystoreDartWrapper raw) { + cst_encode_box_autoadd_keystore_dart_wrapper(KeystoreDartWrapper raw) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_keystore_dart_wrapper(); cst_api_fill_to_wire_keystore_dart_wrapper(raw, ptr.ref); @@ -1007,8 +1663,9 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_box_autoadd_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper raw) { + cst_encode_box_autoadd_ledger_connection_dart_wrapper( + LedgerConnectionDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_ledger_connection_dart_wrapper(); cst_api_fill_to_wire_ledger_connection_dart_wrapper(raw, ptr.ref); @@ -1017,25 +1674,19 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer cst_encode_box_autoadd_mnemonic_type( - MnemonicType raw) { + MnemonicType raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_mnemonic_type(); cst_api_fill_to_wire_mnemonic_type(raw, ptr.ref); return ptr; } - @protected - ffi.Pointer cst_encode_box_autoadd_my_class(MyClass raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_my_class(); - cst_api_fill_to_wire_my_class(raw, ptr.ref); - return ptr; - } - @protected ffi.Pointer - cst_encode_box_autoadd_proto_connection_dart_wrapper( - ProtoConnectionDartWrapper raw) { + cst_encode_box_autoadd_proto_connection_dart_wrapper( + ProtoConnectionDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_proto_connection_dart_wrapper(); cst_api_fill_to_wire_proto_connection_dart_wrapper(raw, ptr.ref); @@ -1044,7 +1695,7 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_box_autoadd_proto_transport_impl(ProtoTransportImpl raw) { + cst_encode_box_autoadd_proto_transport_impl(ProtoTransportImpl raw) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_proto_transport_impl(); cst_api_fill_to_wire_proto_transport_impl(raw, ptr.ref); @@ -1053,7 +1704,7 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_box_autoadd_storage_dart_wrapper(StorageDartWrapper raw) { + cst_encode_box_autoadd_storage_dart_wrapper(StorageDartWrapper raw) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_storage_dart_wrapper(); cst_api_fill_to_wire_storage_dart_wrapper(raw, ptr.ref); @@ -1062,8 +1713,7 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_box_autoadd_token_wallet_dart_wrapper( - TokenWalletDartWrapper raw) { + cst_encode_box_autoadd_token_wallet_dart_wrapper(TokenWalletDartWrapper raw) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_token_wallet_dart_wrapper(); cst_api_fill_to_wire_token_wallet_dart_wrapper(raw, ptr.ref); @@ -1072,7 +1722,7 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_box_autoadd_ton_wallet_dart_wrapper(TonWalletDartWrapper raw) { + cst_encode_box_autoadd_ton_wallet_dart_wrapper(TonWalletDartWrapper raw) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_ton_wallet_dart_wrapper(); cst_api_fill_to_wire_ton_wallet_dart_wrapper(raw, ptr.ref); @@ -1087,7 +1737,7 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_box_autoadd_unsigned_message_impl(UnsignedMessageImpl raw) { + cst_encode_box_autoadd_unsigned_message_impl(UnsignedMessageImpl raw) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_unsigned_message_impl(); cst_api_fill_to_wire_unsigned_message_impl(raw, ptr.ref); @@ -1101,40 +1751,25 @@ abstract class NekotonBridgeApiImplPlatform } @protected - ffi.Pointer cst_encode_list_String(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_String(raw.length); - for (var i = 0; i < raw.length; ++i) { - ans.ref.ptr[i] = cst_encode_String(raw[i]); - } - return ans; - } - - @protected - ffi.Pointer - cst_encode_list_dynamic_named_value(List raw) { + int cst_encode_isize(PlatformInt64 raw) { // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_dynamic_named_value(raw.length); - for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_dynamic_named_value(raw[i], ans.ref.ptr[i]); - } - return ans; + return raw.toInt(); } @protected - ffi.Pointer cst_encode_list_dynamic_value( - List raw) { + ffi.Pointer cst_encode_list_String(List raw) { // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_dynamic_value(raw.length); + final ans = wire.cst_new_list_String(raw.length); for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_dynamic_value(raw[i], ans.ref.ptr[i]); + ans.ref.ptr[i] = cst_encode_String(raw[i]); } return ans; } @protected ffi.Pointer cst_encode_list_key_signer( - List raw) { + List raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ans = wire.cst_new_list_key_signer(raw.length); for (var i = 0; i < raw.length; ++i) { @@ -1145,7 +1780,8 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer cst_encode_list_opt_String( - List raw) { + List raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ans = wire.cst_new_list_opt_String(raw.length); for (var i = 0; i < raw.length; ++i) { @@ -1156,7 +1792,8 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer cst_encode_list_prim_i_32_loose( - List raw) { + List raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ans = wire.cst_new_list_prim_i_32_loose(raw.length); ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); @@ -1165,7 +1802,8 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer cst_encode_list_prim_i_32_strict( - Int32List raw) { + Int32List raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ans = wire.cst_new_list_prim_i_32_strict(raw.length); ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); @@ -1174,7 +1812,8 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer cst_encode_list_prim_u_8_strict( - Uint8List raw) { + Uint8List raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ans = wire.cst_new_list_prim_u_8_strict(raw.length); ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); @@ -1183,7 +1822,7 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_list_record_string_string(List<(String, String)> raw) { + cst_encode_list_record_string_string(List<(String, String)> raw) { // Codec=Cst (C-struct based), see doc to use other codecs final ans = wire.cst_new_list_record_string_string(raw.length); for (var i = 0; i < raw.length; ++i) { @@ -1194,7 +1833,8 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer cst_encode_opt_String( - String? raw) { + String? raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return raw == null ? ffi.nullptr : cst_encode_String(raw); } @@ -1205,15 +1845,6 @@ abstract class NekotonBridgeApiImplPlatform return raw == null ? ffi.nullptr : cst_encode_box_autoadd_bool(raw); } - @protected - ffi.Pointer cst_encode_opt_box_autoadd_dynamic_value( - DynamicValue? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null - ? ffi.nullptr - : cst_encode_box_autoadd_dynamic_value(raw); - } - @protected ffi.Pointer cst_encode_opt_box_autoadd_i_32(int? raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1222,8 +1853,9 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer - cst_encode_opt_box_autoadd_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper? raw) { + cst_encode_opt_box_autoadd_ledger_connection_dart_wrapper( + LedgerConnectionDartWrapper? raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return raw == null ? ffi.nullptr @@ -1238,7 +1870,8 @@ abstract class NekotonBridgeApiImplPlatform @protected ffi.Pointer cst_encode_opt_list_String( - List? raw) { + List? raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return raw == null ? ffi.nullptr : cst_encode_list_String(raw); } @@ -1257,14 +1890,19 @@ abstract class NekotonBridgeApiImplPlatform @protected void cst_api_fill_to_wire_accounts_storage_impl( - AccountsStorageImpl apiObj, wire_cst_accounts_storage_impl wireObj) { + AccountsStorageImpl apiObj, + wire_cst_accounts_storage_impl wireObj, + ) { wireObj.inner_storage = cst_encode_RustOpaque_ArcdynAccountsStorageBoxTrait( - apiObj.innerStorage); + apiObj.innerStorage, + ); } @protected void cst_api_fill_to_wire_bip_39_mnemonic_data( - Bip39MnemonicData apiObj, wire_cst_bip_39_mnemonic_data wireObj) { + Bip39MnemonicData apiObj, + wire_cst_bip_39_mnemonic_data wireObj, + ) { wireObj.account_id = cst_encode_u_16(apiObj.accountId); wireObj.path = cst_encode_bip_39_path(apiObj.path); wireObj.entropy = cst_encode_bip_39_entropy(apiObj.entropy); @@ -1272,317 +1910,228 @@ abstract class NekotonBridgeApiImplPlatform @protected void cst_api_fill_to_wire_box_autoadd_accounts_storage_impl( - AccountsStorageImpl apiObj, - ffi.Pointer wireObj) { + AccountsStorageImpl apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_accounts_storage_impl(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_bip_39_mnemonic_data( - Bip39MnemonicData apiObj, - ffi.Pointer wireObj) { + Bip39MnemonicData apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_bip_39_mnemonic_data(apiObj, wireObj.ref); } - @protected - void cst_api_fill_to_wire_box_autoadd_caller_test_class( - CallerTestClass apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_caller_test_class(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_dart_call_stub( - DartCallStub apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_dart_call_stub(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_dynamic_value( - DynamicValue apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_dynamic_value(apiObj, wireObj.ref); - } - @protected void cst_api_fill_to_wire_box_autoadd_generic_contract_dart_wrapper( - GenericContractDartWrapper apiObj, - ffi.Pointer wireObj) { + GenericContractDartWrapper apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_generic_contract_dart_wrapper(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_gql_connection_dart_wrapper( - GqlConnectionDartWrapper apiObj, - ffi.Pointer wireObj) { + GqlConnectionDartWrapper apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_gql_connection_dart_wrapper(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_gql_transport_impl( - GqlTransportImpl apiObj, - ffi.Pointer wireObj) { + GqlTransportImpl apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_gql_transport_impl(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_jetton_wallet_dart_wrapper( - JettonWalletDartWrapper apiObj, - ffi.Pointer wireObj) { + JettonWalletDartWrapper apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_jetton_wallet_dart_wrapper(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_jrpc_connection_dart_wrapper( - JrpcConnectionDartWrapper apiObj, - ffi.Pointer wireObj) { + JrpcConnectionDartWrapper apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_jrpc_connection_dart_wrapper(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_jrpc_transport_impl( - JrpcTransportImpl apiObj, - ffi.Pointer wireObj) { + JrpcTransportImpl apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_jrpc_transport_impl(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_key_signer( - KeySigner apiObj, ffi.Pointer wireObj) { + KeySigner apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_key_signer(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_keystore_dart_wrapper( - KeystoreDartWrapper apiObj, - ffi.Pointer wireObj) { + KeystoreDartWrapper apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_keystore_dart_wrapper(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper apiObj, - ffi.Pointer wireObj) { + LedgerConnectionDartWrapper apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_ledger_connection_dart_wrapper(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_mnemonic_type( - MnemonicType apiObj, ffi.Pointer wireObj) { + MnemonicType apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_mnemonic_type(apiObj, wireObj.ref); } - @protected - void cst_api_fill_to_wire_box_autoadd_my_class( - MyClass apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_my_class(apiObj, wireObj.ref); - } - @protected void cst_api_fill_to_wire_box_autoadd_proto_connection_dart_wrapper( - ProtoConnectionDartWrapper apiObj, - ffi.Pointer wireObj) { + ProtoConnectionDartWrapper apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_proto_connection_dart_wrapper(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_proto_transport_impl( - ProtoTransportImpl apiObj, - ffi.Pointer wireObj) { + ProtoTransportImpl apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_proto_transport_impl(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_storage_dart_wrapper( - StorageDartWrapper apiObj, - ffi.Pointer wireObj) { + StorageDartWrapper apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_storage_dart_wrapper(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_token_wallet_dart_wrapper( - TokenWalletDartWrapper apiObj, - ffi.Pointer wireObj) { + TokenWalletDartWrapper apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_token_wallet_dart_wrapper(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_ton_wallet_dart_wrapper( - TonWalletDartWrapper apiObj, - ffi.Pointer wireObj) { + TonWalletDartWrapper apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_ton_wallet_dart_wrapper(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_box_autoadd_unsigned_message_impl( - UnsignedMessageImpl apiObj, - ffi.Pointer wireObj) { + UnsignedMessageImpl apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_unsigned_message_impl(apiObj, wireObj.ref); } @protected - void cst_api_fill_to_wire_caller_test_class( - CallerTestClass apiObj, wire_cst_caller_test_class wireObj) { - wireObj.instance_hash = cst_encode_String(apiObj.instanceHash); - wireObj.value = cst_encode_i_32(apiObj.value); + void cst_api_fill_to_wire_generated_key_g( + GeneratedKeyG apiObj, + wire_cst_generated_key_g wireObj, + ) { + wireObj.words = cst_encode_list_String(apiObj.words); + cst_api_fill_to_wire_mnemonic_type( + apiObj.accountType, + wireObj.account_type, + ); } @protected - void cst_api_fill_to_wire_dart_call_stub( - DartCallStub apiObj, wire_cst_dart_call_stub wireObj) { - wireObj.instance_hash = cst_encode_String(apiObj.instanceHash); - wireObj.fn_name = cst_encode_String(apiObj.fnName); - wireObj.args = cst_encode_list_dynamic_value(apiObj.args); - wireObj.named_args = cst_encode_list_dynamic_named_value(apiObj.namedArgs); + void cst_api_fill_to_wire_generic_contract_dart_wrapper( + GenericContractDartWrapper apiObj, + wire_cst_generic_contract_dart_wrapper wireObj, + ) { + wireObj.inner_contract = + cst_encode_RustOpaque_ArcdynGenericContractBoxTrait( + apiObj.innerContract, + ); } @protected - void cst_api_fill_to_wire_dart_call_stub_registred( - DartCallStubRegistred apiObj, wire_cst_dart_call_stub_registred wireObj) { - wireObj.id = cst_encode_opt_String(apiObj.id); - cst_api_fill_to_wire_dart_call_stub(apiObj.stub, wireObj.stub); + void cst_api_fill_to_wire_gql_connection_dart_wrapper( + GqlConnectionDartWrapper apiObj, + wire_cst_gql_connection_dart_wrapper wireObj, + ) { + wireObj.inner_connection = + cst_encode_RustOpaque_ArcdynGqlConnectionBoxTrait( + apiObj.innerConnection, + ); } @protected - void cst_api_fill_to_wire_dynamic_named_value( - DynamicNamedValue apiObj, wire_cst_dynamic_named_value wireObj) { - wireObj.name = cst_encode_String(apiObj.name); - wireObj.value = cst_encode_opt_box_autoadd_dynamic_value(apiObj.value); - } - - @protected - void cst_api_fill_to_wire_dynamic_value( - DynamicValue apiObj, wire_cst_dynamic_value wireObj) { - if (apiObj is DynamicValue_U16) { - var pre_field0 = cst_encode_u_16(apiObj.field0); - wireObj.tag = 0; - wireObj.kind.U16.field0 = pre_field0; - return; - } - if (apiObj is DynamicValue_U32) { - var pre_field0 = cst_encode_u_32(apiObj.field0); - wireObj.tag = 1; - wireObj.kind.U32.field0 = pre_field0; - return; - } - if (apiObj is DynamicValue_I32) { - var pre_field0 = cst_encode_i_32(apiObj.field0); - wireObj.tag = 2; - wireObj.kind.I32.field0 = pre_field0; - return; - } - if (apiObj is DynamicValue_U64) { - var pre_field0 = cst_encode_u_64(apiObj.field0); - wireObj.tag = 3; - wireObj.kind.U64.field0 = pre_field0; - return; - } - if (apiObj is DynamicValue_I64) { - var pre_field0 = cst_encode_i_64(apiObj.field0); - wireObj.tag = 4; - wireObj.kind.I64.field0 = pre_field0; - return; - } - if (apiObj is DynamicValue_F32) { - var pre_field0 = cst_encode_f_32(apiObj.field0); - wireObj.tag = 5; - wireObj.kind.F32.field0 = pre_field0; - return; - } - if (apiObj is DynamicValue_F64) { - var pre_field0 = cst_encode_f_64(apiObj.field0); - wireObj.tag = 6; - wireObj.kind.F64.field0 = pre_field0; - return; - } - if (apiObj is DynamicValue_String) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 7; - wireObj.kind.String.field0 = pre_field0; - return; - } - if (apiObj is DynamicValue_VecU8) { - var pre_field0 = cst_encode_list_prim_u_8_strict(apiObj.field0); - wireObj.tag = 8; - wireObj.kind.VecU8.field0 = pre_field0; - return; - } - if (apiObj is DynamicValue_MegaStruct) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 9; - wireObj.kind.MegaStruct.field0 = pre_field0; - return; - } - if (apiObj is DynamicValue_Error) { - var pre_field0 = cst_encode_error_code(apiObj.field0); - wireObj.tag = 10; - wireObj.kind.Error.field0 = pre_field0; - return; - } - if (apiObj is DynamicValue_None) { - wireObj.tag = 11; - return; - } - } - - @protected - void cst_api_fill_to_wire_generated_key_g( - GeneratedKeyG apiObj, wire_cst_generated_key_g wireObj) { - wireObj.words = cst_encode_list_String(apiObj.words); - cst_api_fill_to_wire_mnemonic_type( - apiObj.accountType, wireObj.account_type); - } - - @protected - void cst_api_fill_to_wire_generic_contract_dart_wrapper( - GenericContractDartWrapper apiObj, - wire_cst_generic_contract_dart_wrapper wireObj) { - wireObj.inner_contract = - cst_encode_RustOpaque_ArcdynGenericContractBoxTrait( - apiObj.innerContract); - } - - @protected - void cst_api_fill_to_wire_gql_connection_dart_wrapper( - GqlConnectionDartWrapper apiObj, - wire_cst_gql_connection_dart_wrapper wireObj) { - wireObj.inner_connection = - cst_encode_RustOpaque_ArcdynGqlConnectionBoxTrait( - apiObj.innerConnection); - } - - @protected - void cst_api_fill_to_wire_gql_transport_impl( - GqlTransportImpl apiObj, wire_cst_gql_transport_impl wireObj) { - wireObj.inner_transport = - cst_encode_RustOpaque_ArcdynTransportBoxTrait(apiObj.innerTransport); + void cst_api_fill_to_wire_gql_transport_impl( + GqlTransportImpl apiObj, + wire_cst_gql_transport_impl wireObj, + ) { + wireObj.inner_transport = cst_encode_RustOpaque_ArcdynTransportBoxTrait( + apiObj.innerTransport, + ); } @protected void cst_api_fill_to_wire_jetton_wallet_dart_wrapper( - JettonWalletDartWrapper apiObj, - wire_cst_jetton_wallet_dart_wrapper wireObj) { - wireObj.inner_wallet = - cst_encode_RustOpaque_ArcdynJettonWalletBoxTrait(apiObj.innerWallet); + JettonWalletDartWrapper apiObj, + wire_cst_jetton_wallet_dart_wrapper wireObj, + ) { + wireObj.inner_wallet = cst_encode_RustOpaque_ArcdynJettonWalletBoxTrait( + apiObj.innerWallet, + ); } @protected void cst_api_fill_to_wire_jrpc_connection_dart_wrapper( - JrpcConnectionDartWrapper apiObj, - wire_cst_jrpc_connection_dart_wrapper wireObj) { + JrpcConnectionDartWrapper apiObj, + wire_cst_jrpc_connection_dart_wrapper wireObj, + ) { wireObj.inner_connection = cst_encode_RustOpaque_ArcdynJrpcConnectionBoxTrait( - apiObj.innerConnection); + apiObj.innerConnection, + ); } @protected void cst_api_fill_to_wire_jrpc_transport_impl( - JrpcTransportImpl apiObj, wire_cst_jrpc_transport_impl wireObj) { - wireObj.inner_transport = - cst_encode_RustOpaque_ArcdynTransportBoxTrait(apiObj.innerTransport); + JrpcTransportImpl apiObj, + wire_cst_jrpc_transport_impl wireObj, + ) { + wireObj.inner_transport = cst_encode_RustOpaque_ArcdynTransportBoxTrait( + apiObj.innerTransport, + ); } @protected void cst_api_fill_to_wire_key_signer( - KeySigner apiObj, wire_cst_key_signer wireObj) { + KeySigner apiObj, + wire_cst_key_signer wireObj, + ) { if (apiObj is KeySigner_Encrypted) { wireObj.tag = 0; return; @@ -1605,14 +2154,19 @@ abstract class NekotonBridgeApiImplPlatform @protected void cst_api_fill_to_wire_keystore_dart_wrapper( - KeystoreDartWrapper apiObj, wire_cst_keystore_dart_wrapper wireObj) { - wireObj.inner_keystore = - cst_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait(apiObj.innerKeystore); + KeystoreDartWrapper apiObj, + wire_cst_keystore_dart_wrapper wireObj, + ) { + wireObj.inner_keystore = cst_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait( + apiObj.innerKeystore, + ); } @protected void cst_api_fill_to_wire_latest_block( - LatestBlock apiObj, wire_cst_latest_block wireObj) { + LatestBlock apiObj, + wire_cst_latest_block wireObj, + ) { wireObj.id = cst_encode_String(apiObj.id); wireObj.end_lt = cst_encode_u_64(apiObj.endLt); wireObj.gen_utime = cst_encode_u_32(apiObj.genUtime); @@ -1620,22 +2174,20 @@ abstract class NekotonBridgeApiImplPlatform @protected void cst_api_fill_to_wire_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper apiObj, - wire_cst_ledger_connection_dart_wrapper wireObj) { + LedgerConnectionDartWrapper apiObj, + wire_cst_ledger_connection_dart_wrapper wireObj, + ) { wireObj.inner_connection = cst_encode_RustOpaque_ArcdynLedgerConnectionBoxTrait( - apiObj.innerConnection); - } - - @protected - void cst_api_fill_to_wire_ledger_connection_impl( - LedgerConnectionImpl apiObj, wire_cst_ledger_connection_impl wireObj) { - wireObj.instance_hash = cst_encode_String(apiObj.instanceHash); + apiObj.innerConnection, + ); } @protected void cst_api_fill_to_wire_log_entry( - LogEntry apiObj, wire_cst_log_entry wireObj) { + LogEntry apiObj, + wire_cst_log_entry wireObj, + ) { wireObj.time_millis = cst_encode_i_64(apiObj.timeMillis); wireObj.level = cst_encode_log_level(apiObj.level); wireObj.tag = cst_encode_String(apiObj.tag); @@ -1645,638 +2197,2592 @@ abstract class NekotonBridgeApiImplPlatform @protected void cst_api_fill_to_wire_mnemonic_type( - MnemonicType apiObj, wire_cst_mnemonic_type wireObj) { + MnemonicType apiObj, + wire_cst_mnemonic_type wireObj, + ) { if (apiObj is MnemonicType_Legacy) { wireObj.tag = 0; return; } if (apiObj is MnemonicType_Bip39) { - var pre_field0 = - cst_encode_box_autoadd_bip_39_mnemonic_data(apiObj.field0); + var pre_field0 = cst_encode_box_autoadd_bip_39_mnemonic_data( + apiObj.field0, + ); wireObj.tag = 1; wireObj.kind.Bip39.field0 = pre_field0; return; } } - @protected - void cst_api_fill_to_wire_my_class( - MyClass apiObj, wire_cst_my_class wireObj) { - wireObj.val = cst_encode_i_32(apiObj.val); - } - @protected void cst_api_fill_to_wire_proto_connection_dart_wrapper( - ProtoConnectionDartWrapper apiObj, - wire_cst_proto_connection_dart_wrapper wireObj) { + ProtoConnectionDartWrapper apiObj, + wire_cst_proto_connection_dart_wrapper wireObj, + ) { wireObj.inner_connection = cst_encode_RustOpaque_ArcdynProtoConnectionBoxTrait( - apiObj.innerConnection); + apiObj.innerConnection, + ); } @protected void cst_api_fill_to_wire_proto_transport_impl( - ProtoTransportImpl apiObj, wire_cst_proto_transport_impl wireObj) { - wireObj.inner_transport = - cst_encode_RustOpaque_ArcdynTransportBoxTrait(apiObj.innerTransport); + ProtoTransportImpl apiObj, + wire_cst_proto_transport_impl wireObj, + ) { + wireObj.inner_transport = cst_encode_RustOpaque_ArcdynTransportBoxTrait( + apiObj.innerTransport, + ); } @protected void cst_api_fill_to_wire_record_string_string( - (String, String) apiObj, wire_cst_record_string_string wireObj) { + (String, String) apiObj, + wire_cst_record_string_string wireObj, + ) { wireObj.field0 = cst_encode_String(apiObj.$1); wireObj.field1 = cst_encode_String(apiObj.$2); } @protected void cst_api_fill_to_wire_signature_parts( - SignatureParts apiObj, wire_cst_signature_parts wireObj) { + SignatureParts apiObj, + wire_cst_signature_parts wireObj, + ) { wireObj.low = cst_encode_String(apiObj.low); wireObj.high = cst_encode_String(apiObj.high); } @protected void cst_api_fill_to_wire_signed_data( - SignedData apiObj, wire_cst_signed_data wireObj) { + SignedData apiObj, + wire_cst_signed_data wireObj, + ) { wireObj.data_hash = cst_encode_String(apiObj.dataHash); wireObj.signature = cst_encode_String(apiObj.signature); wireObj.signature_hex = cst_encode_String(apiObj.signatureHex); cst_api_fill_to_wire_signature_parts( - apiObj.signatureParts, wireObj.signature_parts); + apiObj.signatureParts, + wireObj.signature_parts, + ); } @protected void cst_api_fill_to_wire_signed_data_raw( - SignedDataRaw apiObj, wire_cst_signed_data_raw wireObj) { + SignedDataRaw apiObj, + wire_cst_signed_data_raw wireObj, + ) { wireObj.signature = cst_encode_String(apiObj.signature); wireObj.signature_hex = cst_encode_String(apiObj.signatureHex); cst_api_fill_to_wire_signature_parts( - apiObj.signatureParts, wireObj.signature_parts); + apiObj.signatureParts, + wireObj.signature_parts, + ); } @protected void cst_api_fill_to_wire_storage_dart_wrapper( - StorageDartWrapper apiObj, wire_cst_storage_dart_wrapper wireObj) { - wireObj.inner_storage = - cst_encode_RustOpaque_ArcdynStorageBoxTrait(apiObj.innerStorage); - } - - @protected - void cst_api_fill_to_wire_storage_impl( - StorageImpl apiObj, wire_cst_storage_impl wireObj) { - wireObj.instance_hash = cst_encode_String(apiObj.instanceHash); + StorageDartWrapper apiObj, + wire_cst_storage_dart_wrapper wireObj, + ) { + wireObj.inner_storage = cst_encode_RustOpaque_ArcdynStorageBoxTrait( + apiObj.innerStorage, + ); } @protected void cst_api_fill_to_wire_token_wallet_dart_wrapper( - TokenWalletDartWrapper apiObj, - wire_cst_token_wallet_dart_wrapper wireObj) { - wireObj.inner_wallet = - cst_encode_RustOpaque_ArcdynTokenWalletBoxTrait(apiObj.innerWallet); + TokenWalletDartWrapper apiObj, + wire_cst_token_wallet_dart_wrapper wireObj, + ) { + wireObj.inner_wallet = cst_encode_RustOpaque_ArcdynTokenWalletBoxTrait( + apiObj.innerWallet, + ); } @protected void cst_api_fill_to_wire_ton_wallet_dart_wrapper( - TonWalletDartWrapper apiObj, wire_cst_ton_wallet_dart_wrapper wireObj) { - wireObj.inner_wallet = - cst_encode_RustOpaque_ArcdynTonWalletBoxTrait(apiObj.innerWallet); + TonWalletDartWrapper apiObj, + wire_cst_ton_wallet_dart_wrapper wireObj, + ) { + wireObj.inner_wallet = cst_encode_RustOpaque_ArcdynTonWalletBoxTrait( + apiObj.innerWallet, + ); } @protected void cst_api_fill_to_wire_unsigned_message_impl( - UnsignedMessageImpl apiObj, wire_cst_unsigned_message_impl wireObj) { + UnsignedMessageImpl apiObj, + wire_cst_unsigned_message_impl wireObj, + ) { wireObj.inner_message = cst_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait( - apiObj.innerMessage); + apiObj.innerMessage, + ); } @protected - int cst_encode_RustOpaque_ArcdynAccountsStorageBoxTrait( - ArcAccountsStorageBoxTrait raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ArcFnStringDartFnFutureOptionString raw, + ); @protected - int cst_encode_RustOpaque_ArcdynGenericContractBoxTrait( - ArcGenericContractBoxTrait raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ArcFnStringDartFnFuture raw, + ); @protected - int cst_encode_RustOpaque_ArcdynGqlConnectionBoxTrait( - ArcGqlConnectionBoxTrait raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ArcFnStringDartFnFutureString raw, + ); @protected - int cst_encode_RustOpaque_ArcdynJettonWalletBoxTrait( - ArcJettonWalletBoxTrait raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ArcFnStringStringDartFnFuture raw, + ); @protected - int cst_encode_RustOpaque_ArcdynJrpcConnectionBoxTrait( - ArcJrpcConnectionBoxTrait raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + ArcFnVecU8DartFnFutureVecU8 raw, + ); @protected - int cst_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait( - ArcKeyStoreApiBoxTrait raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + ArcFnU16DartFnFutureVecU8 raw, + ); @protected - int cst_encode_RustOpaque_ArcdynLedgerConnectionBoxTrait( - ArcLedgerConnectionBoxTrait raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + ArcFnU16OptionI32VecU8DartFnFutureVecU8 raw, + ); @protected - int cst_encode_RustOpaque_ArcdynProtoConnectionBoxTrait( - ArcProtoConnectionBoxTrait raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 raw, + ); @protected - int cst_encode_RustOpaque_ArcdynStorageBoxTrait(ArcStorageBoxTrait raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl raw, + ); @protected - int cst_encode_RustOpaque_ArcdynTokenWalletBoxTrait( - ArcTokenWalletBoxTrait raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl raw, + ); @protected - int cst_encode_RustOpaque_ArcdynTonWalletBoxTrait(ArcTonWalletBoxTrait raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl raw, + ); @protected - int cst_encode_RustOpaque_ArcdynTransportBoxTrait(ArcTransportBoxTrait raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl raw, + ); @protected - int cst_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait( - ArcUnsignedMessageBoxTrait raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl raw, + ); @protected - int cst_encode_bip_39_entropy(Bip39Entropy raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl raw, + ); @protected - int cst_encode_bip_39_path(Bip39Path raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl raw, + ); @protected - bool cst_encode_bool(bool raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl raw, + ); @protected - int cst_encode_error_code(ErrorCode raw); + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl raw, + ); @protected - double cst_encode_f_32(double raw); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl raw, + ); @protected - double cst_encode_f_64(double raw); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl raw, + ); @protected - int cst_encode_i_32(int raw); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl raw, + ); @protected - int cst_encode_i_8(int raw); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl raw, + ); @protected - int cst_encode_log_level(LogLevel raw); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl raw, + ); @protected - int cst_encode_polling_method(PollingMethod raw); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl raw, + ); @protected - int cst_encode_u_16(int raw); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl raw, + ); @protected - int cst_encode_u_32(int raw); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl raw, + ); @protected - int cst_encode_u_8(int raw); + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl raw, + ); @protected - void cst_encode_unit(void raw); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl raw, + ); @protected - void sse_encode_AnyhowException( - AnyhowException self, SseSerializer serializer); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl raw, + ); @protected - void sse_encode_Map_String_String_None( - Map self, SseSerializer serializer); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl raw, + ); @protected - void sse_encode_RustOpaque_ArcdynAccountsStorageBoxTrait( - ArcAccountsStorageBoxTrait self, SseSerializer serializer); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl raw, + ); @protected - void sse_encode_RustOpaque_ArcdynGenericContractBoxTrait( - ArcGenericContractBoxTrait self, SseSerializer serializer); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl raw, + ); @protected - void sse_encode_RustOpaque_ArcdynGqlConnectionBoxTrait( - ArcGqlConnectionBoxTrait self, SseSerializer serializer); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl raw, + ); @protected - void sse_encode_RustOpaque_ArcdynJettonWalletBoxTrait( - ArcJettonWalletBoxTrait self, SseSerializer serializer); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl raw, + ); @protected - void sse_encode_RustOpaque_ArcdynJrpcConnectionBoxTrait( - ArcJrpcConnectionBoxTrait self, SseSerializer serializer); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl raw, + ); @protected - void sse_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait( - ArcKeyStoreApiBoxTrait self, SseSerializer serializer); + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl raw, + ); @protected - void sse_encode_RustOpaque_ArcdynLedgerConnectionBoxTrait( - ArcLedgerConnectionBoxTrait self, SseSerializer serializer); + PlatformPointer cst_encode_DartFn_Inputs_String_Output_String_AnyhowException( + FutureOr Function(String) raw, + ); @protected - void sse_encode_RustOpaque_ArcdynProtoConnectionBoxTrait( - ArcProtoConnectionBoxTrait self, SseSerializer serializer); + PlatformPointer + cst_encode_DartFn_Inputs_String_Output_opt_String_AnyhowException( + FutureOr Function(String) raw, + ); @protected - void sse_encode_RustOpaque_ArcdynStorageBoxTrait( - ArcStorageBoxTrait self, SseSerializer serializer); + PlatformPointer cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + FutureOr Function(String) raw, + ); @protected - void sse_encode_RustOpaque_ArcdynTokenWalletBoxTrait( - ArcTokenWalletBoxTrait self, SseSerializer serializer); + PlatformPointer + cst_encode_DartFn_Inputs_String_String_Output_unit_AnyhowException( + FutureOr Function(String, String) raw, + ); @protected - void sse_encode_RustOpaque_ArcdynTonWalletBoxTrait( - ArcTonWalletBoxTrait self, SseSerializer serializer); + PlatformPointer + cst_encode_DartFn_Inputs_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(Uint8List) raw, + ); @protected - void sse_encode_RustOpaque_ArcdynTransportBoxTrait( - ArcTransportBoxTrait self, SseSerializer serializer); + PlatformPointer + cst_encode_DartFn_Inputs_u_16_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int) raw, + ); @protected - void sse_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait( - ArcUnsignedMessageBoxTrait self, SseSerializer serializer); + PlatformPointer + cst_encode_DartFn_Inputs_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int, int?, Uint8List) raw, + ); @protected - void sse_encode_StreamSink_dart_call_stub_registred_Dco( - RustStreamSink self, SseSerializer serializer); + PlatformPointer + cst_encode_DartFn_Inputs_u_16_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_String_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int, int, int?, Uint8List, String) raw, + ); @protected - void sse_encode_StreamSink_log_entry_Dco( - RustStreamSink self, SseSerializer serializer); + PlatformPointer cst_encode_DartOpaque(Object raw); @protected - void sse_encode_String(String self, SseSerializer serializer); + int cst_encode_RustOpaque_ArcdynAccountsStorageBoxTrait( + ArcAccountsStorageBoxTrait raw, + ); @protected - void sse_encode_accounts_storage_impl( - AccountsStorageImpl self, SseSerializer serializer); + int cst_encode_RustOpaque_ArcdynGenericContractBoxTrait( + ArcGenericContractBoxTrait raw, + ); @protected - void sse_encode_bip_39_entropy(Bip39Entropy self, SseSerializer serializer); + int cst_encode_RustOpaque_ArcdynGqlConnectionBoxTrait( + ArcGqlConnectionBoxTrait raw, + ); @protected - void sse_encode_bip_39_mnemonic_data( - Bip39MnemonicData self, SseSerializer serializer); + int cst_encode_RustOpaque_ArcdynJettonWalletBoxTrait( + ArcJettonWalletBoxTrait raw, + ); @protected - void sse_encode_bip_39_path(Bip39Path self, SseSerializer serializer); + int cst_encode_RustOpaque_ArcdynJrpcConnectionBoxTrait( + ArcJrpcConnectionBoxTrait raw, + ); @protected - void sse_encode_bool(bool self, SseSerializer serializer); + int cst_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait( + ArcKeyStoreApiBoxTrait raw, + ); @protected - void sse_encode_box_autoadd_accounts_storage_impl( - AccountsStorageImpl self, SseSerializer serializer); + int cst_encode_RustOpaque_ArcdynLedgerConnectionBoxTrait( + ArcLedgerConnectionBoxTrait raw, + ); @protected - void sse_encode_box_autoadd_bip_39_mnemonic_data( - Bip39MnemonicData self, SseSerializer serializer); + int cst_encode_RustOpaque_ArcdynProtoConnectionBoxTrait( + ArcProtoConnectionBoxTrait raw, + ); @protected - void sse_encode_box_autoadd_bool(bool self, SseSerializer serializer); + int cst_encode_RustOpaque_ArcdynStorageBoxTrait(ArcStorageBoxTrait raw); @protected - void sse_encode_box_autoadd_caller_test_class( - CallerTestClass self, SseSerializer serializer); + int cst_encode_RustOpaque_ArcdynTokenWalletBoxTrait( + ArcTokenWalletBoxTrait raw, + ); @protected - void sse_encode_box_autoadd_dart_call_stub( - DartCallStub self, SseSerializer serializer); + int cst_encode_RustOpaque_ArcdynTonWalletBoxTrait(ArcTonWalletBoxTrait raw); @protected - void sse_encode_box_autoadd_dynamic_value( - DynamicValue self, SseSerializer serializer); + int cst_encode_RustOpaque_ArcdynTransportBoxTrait(ArcTransportBoxTrait raw); @protected - void sse_encode_box_autoadd_generic_contract_dart_wrapper( - GenericContractDartWrapper self, SseSerializer serializer); + int cst_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait( + ArcUnsignedMessageBoxTrait raw, + ); @protected - void sse_encode_box_autoadd_gql_connection_dart_wrapper( - GqlConnectionDartWrapper self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ArcFnStringDartFnFutureOptionString raw, + ); @protected - void sse_encode_box_autoadd_gql_transport_impl( - GqlTransportImpl self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ArcFnStringDartFnFuture raw, + ); @protected - void sse_encode_box_autoadd_i_32(int self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ArcFnStringDartFnFutureString raw, + ); @protected - void sse_encode_box_autoadd_jetton_wallet_dart_wrapper( - JettonWalletDartWrapper self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ArcFnStringStringDartFnFuture raw, + ); @protected - void sse_encode_box_autoadd_jrpc_connection_dart_wrapper( - JrpcConnectionDartWrapper self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + ArcFnVecU8DartFnFutureVecU8 raw, + ); @protected - void sse_encode_box_autoadd_jrpc_transport_impl( - JrpcTransportImpl self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + ArcFnU16DartFnFutureVecU8 raw, + ); @protected - void sse_encode_box_autoadd_key_signer( - KeySigner self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + ArcFnU16OptionI32VecU8DartFnFutureVecU8 raw, + ); @protected - void sse_encode_box_autoadd_keystore_dart_wrapper( - KeystoreDartWrapper self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 raw, + ); @protected - void sse_encode_box_autoadd_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl raw, + ); @protected - void sse_encode_box_autoadd_mnemonic_type( - MnemonicType self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl raw, + ); @protected - void sse_encode_box_autoadd_my_class(MyClass self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl raw, + ); @protected - void sse_encode_box_autoadd_proto_connection_dart_wrapper( - ProtoConnectionDartWrapper self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl raw, + ); @protected - void sse_encode_box_autoadd_proto_transport_impl( - ProtoTransportImpl self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl raw, + ); @protected - void sse_encode_box_autoadd_storage_dart_wrapper( - StorageDartWrapper self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl raw, + ); @protected - void sse_encode_box_autoadd_token_wallet_dart_wrapper( - TokenWalletDartWrapper self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl raw, + ); @protected - void sse_encode_box_autoadd_ton_wallet_dart_wrapper( - TonWalletDartWrapper self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl raw, + ); @protected - void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl raw, + ); @protected - void sse_encode_box_autoadd_unsigned_message_impl( - UnsignedMessageImpl self, SseSerializer serializer); + int cst_encode_bip_39_entropy(Bip39Entropy raw); @protected - void sse_encode_caller_test_class( - CallerTestClass self, SseSerializer serializer); + int cst_encode_bip_39_path(Bip39Path raw); @protected - void sse_encode_dart_call_stub(DartCallStub self, SseSerializer serializer); + bool cst_encode_bool(bool raw); @protected - void sse_encode_dart_call_stub_registred( - DartCallStubRegistred self, SseSerializer serializer); + int cst_encode_i_32(int raw); @protected - void sse_encode_dynamic_named_value( - DynamicNamedValue self, SseSerializer serializer); + int cst_encode_i_8(int raw); @protected - void sse_encode_dynamic_value(DynamicValue self, SseSerializer serializer); + int cst_encode_log_level(LogLevel raw); @protected - void sse_encode_error_code(ErrorCode self, SseSerializer serializer); + int cst_encode_polling_method(PollingMethod raw); @protected - void sse_encode_f_32(double self, SseSerializer serializer); + int cst_encode_u_16(int raw); @protected - void sse_encode_f_64(double self, SseSerializer serializer); + int cst_encode_u_32(int raw); @protected - void sse_encode_generated_key_g(GeneratedKeyG self, SseSerializer serializer); + int cst_encode_u_8(int raw); @protected - void sse_encode_generic_contract_dart_wrapper( - GenericContractDartWrapper self, SseSerializer serializer); + void cst_encode_unit(void raw); @protected - void sse_encode_gql_connection_dart_wrapper( - GqlConnectionDartWrapper self, SseSerializer serializer); + void sse_encode_AnyhowException( + AnyhowException self, + SseSerializer serializer, + ); @protected - void sse_encode_gql_transport_impl( - GqlTransportImpl self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ArcFnStringDartFnFutureOptionString self, + SseSerializer serializer, + ); @protected - void sse_encode_i_32(int self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ArcFnStringDartFnFuture self, + SseSerializer serializer, + ); @protected - void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ArcFnStringDartFnFutureString self, + SseSerializer serializer, + ); @protected - void sse_encode_i_8(int self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ArcFnStringStringDartFnFuture self, + SseSerializer serializer, + ); @protected - void sse_encode_jetton_wallet_dart_wrapper( - JettonWalletDartWrapper self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + ArcFnVecU8DartFnFutureVecU8 self, + SseSerializer serializer, + ); @protected - void sse_encode_jrpc_connection_dart_wrapper( - JrpcConnectionDartWrapper self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + ArcFnU16DartFnFutureVecU8 self, + SseSerializer serializer, + ); @protected - void sse_encode_jrpc_transport_impl( - JrpcTransportImpl self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + ArcFnU16OptionI32VecU8DartFnFutureVecU8 self, + SseSerializer serializer, + ); @protected - void sse_encode_key_signer(KeySigner self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 self, + SseSerializer serializer, + ); @protected - void sse_encode_keystore_dart_wrapper( - KeystoreDartWrapper self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_latest_block(LatestBlock self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_ledger_connection_impl( - LedgerConnectionImpl self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_list_String(List self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_list_dynamic_named_value( - List self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_list_dynamic_value( - List self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_list_key_signer( - List self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_list_opt_String(List self, SseSerializer serializer); + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_list_prim_i_32_loose( - List self, SseSerializer serializer); + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_list_prim_i_32_strict( - Int32List self, SseSerializer serializer); + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_list_prim_u_8_strict( - Uint8List self, SseSerializer serializer); + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_list_record_string_string( - List<(String, String)> self, SseSerializer serializer); + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_log_entry(LogEntry self, SseSerializer serializer); + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_log_level(LogLevel self, SseSerializer serializer); + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_mnemonic_type(MnemonicType self, SseSerializer serializer); + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_my_class(MyClass self, SseSerializer serializer); + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_opt_String(String? self, SseSerializer serializer); + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_opt_box_autoadd_bool(bool? self, SseSerializer serializer); + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_opt_box_autoadd_dynamic_value( - DynamicValue? self, SseSerializer serializer); + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_opt_box_autoadd_i_32(int? self, SseSerializer serializer); + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_opt_box_autoadd_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper? self, SseSerializer serializer); + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer); + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_opt_list_String(List? self, SseSerializer serializer); + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_polling_method(PollingMethod self, SseSerializer serializer); + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_proto_connection_dart_wrapper( - ProtoConnectionDartWrapper self, SseSerializer serializer); + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_proto_transport_impl( - ProtoTransportImpl self, SseSerializer serializer); + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_record_string_string( - (String, String) self, SseSerializer serializer); + void sse_encode_DartFn_Inputs_String_Output_String_AnyhowException( + FutureOr Function(String) self, + SseSerializer serializer, + ); @protected - void sse_encode_signature_parts( - SignatureParts self, SseSerializer serializer); + void sse_encode_DartFn_Inputs_String_Output_opt_String_AnyhowException( + FutureOr Function(String) self, + SseSerializer serializer, + ); @protected - void sse_encode_signed_data(SignedData self, SseSerializer serializer); + void sse_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + FutureOr Function(String) self, + SseSerializer serializer, + ); @protected - void sse_encode_signed_data_raw(SignedDataRaw self, SseSerializer serializer); + void sse_encode_DartFn_Inputs_String_String_Output_unit_AnyhowException( + FutureOr Function(String, String) self, + SseSerializer serializer, + ); @protected - void sse_encode_storage_dart_wrapper( - StorageDartWrapper self, SseSerializer serializer); + void + sse_encode_DartFn_Inputs_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(Uint8List) self, + SseSerializer serializer, + ); @protected - void sse_encode_storage_impl(StorageImpl self, SseSerializer serializer); + void + sse_encode_DartFn_Inputs_u_16_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int) self, + SseSerializer serializer, + ); @protected - void sse_encode_token_wallet_dart_wrapper( - TokenWalletDartWrapper self, SseSerializer serializer); + void + sse_encode_DartFn_Inputs_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int, int?, Uint8List) self, + SseSerializer serializer, + ); @protected - void sse_encode_ton_wallet_dart_wrapper( - TonWalletDartWrapper self, SseSerializer serializer); + void + sse_encode_DartFn_Inputs_u_16_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_String_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int, int, int?, Uint8List, String) self, + SseSerializer serializer, + ); @protected - void sse_encode_u_16(int self, SseSerializer serializer); + void sse_encode_DartOpaque(Object self, SseSerializer serializer); @protected - void sse_encode_u_32(int self, SseSerializer serializer); + void sse_encode_Map_String_String_None( + Map self, + SseSerializer serializer, + ); @protected - void sse_encode_u_64(BigInt self, SseSerializer serializer); + void sse_encode_RustOpaque_ArcdynAccountsStorageBoxTrait( + ArcAccountsStorageBoxTrait self, + SseSerializer serializer, + ); + + @protected + void sse_encode_RustOpaque_ArcdynGenericContractBoxTrait( + ArcGenericContractBoxTrait self, + SseSerializer serializer, + ); + + @protected + void sse_encode_RustOpaque_ArcdynGqlConnectionBoxTrait( + ArcGqlConnectionBoxTrait self, + SseSerializer serializer, + ); + + @protected + void sse_encode_RustOpaque_ArcdynJettonWalletBoxTrait( + ArcJettonWalletBoxTrait self, + SseSerializer serializer, + ); + + @protected + void sse_encode_RustOpaque_ArcdynJrpcConnectionBoxTrait( + ArcJrpcConnectionBoxTrait self, + SseSerializer serializer, + ); + + @protected + void sse_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait( + ArcKeyStoreApiBoxTrait self, + SseSerializer serializer, + ); + + @protected + void sse_encode_RustOpaque_ArcdynLedgerConnectionBoxTrait( + ArcLedgerConnectionBoxTrait self, + SseSerializer serializer, + ); + + @protected + void sse_encode_RustOpaque_ArcdynProtoConnectionBoxTrait( + ArcProtoConnectionBoxTrait self, + SseSerializer serializer, + ); + + @protected + void sse_encode_RustOpaque_ArcdynStorageBoxTrait( + ArcStorageBoxTrait self, + SseSerializer serializer, + ); + + @protected + void sse_encode_RustOpaque_ArcdynTokenWalletBoxTrait( + ArcTokenWalletBoxTrait self, + SseSerializer serializer, + ); + + @protected + void sse_encode_RustOpaque_ArcdynTonWalletBoxTrait( + ArcTonWalletBoxTrait self, + SseSerializer serializer, + ); + + @protected + void sse_encode_RustOpaque_ArcdynTransportBoxTrait( + ArcTransportBoxTrait self, + SseSerializer serializer, + ); + + @protected + void sse_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait( + ArcUnsignedMessageBoxTrait self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ArcFnStringDartFnFutureOptionString self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ArcFnStringDartFnFuture self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ArcFnStringDartFnFutureString self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ArcFnStringStringDartFnFuture self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + ArcFnVecU8DartFnFutureVecU8 self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + ArcFnU16DartFnFutureVecU8 self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + ArcFnU16OptionI32VecU8DartFnFutureVecU8 self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void sse_encode_StreamSink_log_entry_Dco( + RustStreamSink self, + SseSerializer serializer, + ); + + @protected + void sse_encode_String(String self, SseSerializer serializer); + + @protected + void sse_encode_accounts_storage_impl( + AccountsStorageImpl self, + SseSerializer serializer, + ); + + @protected + void sse_encode_bip_39_entropy(Bip39Entropy self, SseSerializer serializer); + + @protected + void sse_encode_bip_39_mnemonic_data( + Bip39MnemonicData self, + SseSerializer serializer, + ); + + @protected + void sse_encode_bip_39_path(Bip39Path self, SseSerializer serializer); + + @protected + void sse_encode_bool(bool self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_accounts_storage_impl( + AccountsStorageImpl self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_bip_39_mnemonic_data( + Bip39MnemonicData self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_bool(bool self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_generic_contract_dart_wrapper( + GenericContractDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_gql_connection_dart_wrapper( + GqlConnectionDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_gql_transport_impl( + GqlTransportImpl self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_i_32(int self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_jetton_wallet_dart_wrapper( + JettonWalletDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_jrpc_connection_dart_wrapper( + JrpcConnectionDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_jrpc_transport_impl( + JrpcTransportImpl self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_key_signer( + KeySigner self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_keystore_dart_wrapper( + KeystoreDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_ledger_connection_dart_wrapper( + LedgerConnectionDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_mnemonic_type( + MnemonicType self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_proto_connection_dart_wrapper( + ProtoConnectionDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_proto_transport_impl( + ProtoTransportImpl self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_storage_dart_wrapper( + StorageDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_token_wallet_dart_wrapper( + TokenWalletDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_ton_wallet_dart_wrapper( + TonWalletDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_unsigned_message_impl( + UnsignedMessageImpl self, + SseSerializer serializer, + ); + + @protected + void sse_encode_generated_key_g(GeneratedKeyG self, SseSerializer serializer); + + @protected + void sse_encode_generic_contract_dart_wrapper( + GenericContractDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_gql_connection_dart_wrapper( + GqlConnectionDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_gql_transport_impl( + GqlTransportImpl self, + SseSerializer serializer, + ); + + @protected + void sse_encode_i_32(int self, SseSerializer serializer); + + @protected + void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer); + + @protected + void sse_encode_i_8(int self, SseSerializer serializer); + + @protected + void sse_encode_isize(PlatformInt64 self, SseSerializer serializer); + + @protected + void sse_encode_jetton_wallet_dart_wrapper( + JettonWalletDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_jrpc_connection_dart_wrapper( + JrpcConnectionDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_jrpc_transport_impl( + JrpcTransportImpl self, + SseSerializer serializer, + ); + + @protected + void sse_encode_key_signer(KeySigner self, SseSerializer serializer); + + @protected + void sse_encode_keystore_dart_wrapper( + KeystoreDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_latest_block(LatestBlock self, SseSerializer serializer); + + @protected + void sse_encode_ledger_connection_dart_wrapper( + LedgerConnectionDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_list_String(List self, SseSerializer serializer); + + @protected + void sse_encode_list_key_signer( + List self, + SseSerializer serializer, + ); + + @protected + void sse_encode_list_opt_String(List self, SseSerializer serializer); + + @protected + void sse_encode_list_prim_i_32_loose( + List self, + SseSerializer serializer, + ); + + @protected + void sse_encode_list_prim_i_32_strict( + Int32List self, + SseSerializer serializer, + ); + + @protected + void sse_encode_list_prim_u_8_strict( + Uint8List self, + SseSerializer serializer, + ); + + @protected + void sse_encode_list_record_string_string( + List<(String, String)> self, + SseSerializer serializer, + ); + + @protected + void sse_encode_log_entry(LogEntry self, SseSerializer serializer); + + @protected + void sse_encode_log_level(LogLevel self, SseSerializer serializer); + + @protected + void sse_encode_mnemonic_type(MnemonicType self, SseSerializer serializer); + + @protected + void sse_encode_opt_String(String? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_bool(bool? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_i_32(int? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_ledger_connection_dart_wrapper( + LedgerConnectionDartWrapper? self, + SseSerializer serializer, + ); + + @protected + void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer); + + @protected + void sse_encode_opt_list_String(List? self, SseSerializer serializer); + + @protected + void sse_encode_polling_method(PollingMethod self, SseSerializer serializer); + + @protected + void sse_encode_proto_connection_dart_wrapper( + ProtoConnectionDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_proto_transport_impl( + ProtoTransportImpl self, + SseSerializer serializer, + ); + + @protected + void sse_encode_record_string_string( + (String, String) self, + SseSerializer serializer, + ); + + @protected + void sse_encode_signature_parts( + SignatureParts self, + SseSerializer serializer, + ); + + @protected + void sse_encode_signed_data(SignedData self, SseSerializer serializer); + + @protected + void sse_encode_signed_data_raw(SignedDataRaw self, SseSerializer serializer); + + @protected + void sse_encode_storage_dart_wrapper( + StorageDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_token_wallet_dart_wrapper( + TokenWalletDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_ton_wallet_dart_wrapper( + TonWalletDartWrapper self, + SseSerializer serializer, + ); + + @protected + void sse_encode_u_16(int self, SseSerializer serializer); + + @protected + void sse_encode_u_32(int self, SseSerializer serializer); + + @protected + void sse_encode_u_64(BigInt self, SseSerializer serializer); @protected void sse_encode_u_8(int self, SseSerializer serializer); - @protected - void sse_encode_unit(void self, SseSerializer serializer); + @protected + void sse_encode_unit(void self, SseSerializer serializer); + + @protected + void sse_encode_unsigned_message_impl( + UnsignedMessageImpl self, + SseSerializer serializer, + ); + + @protected + void sse_encode_usize(BigInt self, SseSerializer serializer); +} + +// Section: wire_class + +// ignore_for_file: camel_case_types, non_constant_identifier_names, avoid_positional_boolean_parameters, annotate_overrides, constant_identifier_names +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +// ignore_for_file: type=lint + +/// generated by flutter_rust_bridge +class NekotonBridgeWire implements BaseWire { + factory NekotonBridgeWire.fromExternalLibrary(ExternalLibrary lib) => + NekotonBridgeWire(lib.ffiDynamicLibrary); + + /// Holds the symbol lookup function. + final ffi.Pointer Function(String symbolName) + _lookup; + + /// The symbols are looked up in [dynamicLibrary]. + NekotonBridgeWire(ffi.DynamicLibrary dynamicLibrary) + : _lookup = dynamicLibrary.lookup; + + /// The symbols are looked up with [lookup]. + NekotonBridgeWire.fromLookup( + ffi.Pointer Function(String symbolName) lookup, + ) : _lookup = lookup; + + void store_dart_post_cobject(DartPostCObjectFnType ptr) { + return _store_dart_post_cobject(ptr); + } + + late final _store_dart_post_cobjectPtr = + _lookup>( + 'store_dart_post_cobject', + ); + late final _store_dart_post_cobject = _store_dart_post_cobjectPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_expired( + int that, + ) { + return _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_expired( + that, + ); + } + + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_expiredPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_expired', + ); + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_expired = + _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_expiredPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_sent( + int that, + ) { + return _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_sent( + that, + ); + } + + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_sentPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_sent', + ); + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_sent = + _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_sentPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_state_changed( + int that, + ) { + return _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_state_changed( + that, + ); + } + + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_state_changedPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_state_changed', + ); + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_state_changed = + _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_state_changedPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + int that, + ) { + return _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + that, + ); + } + + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_transactions_foundPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found', + ); + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found = + _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_transactions_foundPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_expired( + int that, + int on_message_expired, + ) { + return _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_expired( + that, + on_message_expired, + ); + } + + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_expiredPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_expired', + ); + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_expired = + _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_expiredPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_sent( + int that, + int on_message_sent, + ) { + return _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_sent( + that, + on_message_sent, + ); + } + + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_sentPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_sent', + ); + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_sent = + _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_sentPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_state_changed( + int that, + int on_state_changed, + ) { + return _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_state_changed( + that, + on_state_changed, + ); + } + + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_state_changedPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_state_changed', + ); + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_state_changed = + _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_state_changedPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + int that, + int on_transactions_found, + ) { + return _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + that, + on_transactions_found, + ); + } + + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_transactions_foundPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found', + ); + late final _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found = + _wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_transactions_foundPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_is_local( + int that, + ) { + return _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_is_local( + that, + ); + } + + late final _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_is_localPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_is_local', + ); + late final _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_is_local = + _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_is_localPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_on_post( + int that, + ) { + return _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_on_post( + that, + ); + } + + late final _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_on_postPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_on_post', + ); + late final _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_on_post = + _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_on_postPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_is_local( + int that, + bool is_local, + ) { + return _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_is_local( + that, + is_local, + ); + } + + late final _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_is_localPtr = + _lookup< + ffi.NativeFunction + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_is_local', + ); + late final _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_is_local = + _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_is_localPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_on_post( + int that, + int on_post, + ) { + return _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_on_post( + that, + on_post, + ); + } + + late final _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_on_postPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_on_post', + ); + late final _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_on_post = + _wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_on_postPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed( + int that, + ) { + return _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed( + that, + ); + } + + late final _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changedPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed', + ); + late final _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed = + _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changedPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + int that, + ) { + return _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + that, + ); + } + + late final _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_foundPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found', + ); + late final _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found = + _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_foundPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed( + int that, + int on_balance_changed, + ) { + return _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed( + that, + on_balance_changed, + ); + } + + late final _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changedPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed', + ); + late final _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed = + _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changedPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + int that, + int on_transactions_found, + ) { + return _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + that, + on_transactions_found, + ); + } + + late final _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_foundPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found', + ); + late final _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found = + _wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_foundPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_get_on_post( + int that, + ) { + return _wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_get_on_post( + that, + ); + } + + late final _wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_get_on_postPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_get_on_post', + ); + late final _wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_get_on_post = + _wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_get_on_postPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_set_on_post( + int that, + int on_post, + ) { + return _wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_set_on_post( + that, + on_post, + ); + } + + late final _wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_set_on_postPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_set_on_post', + ); + late final _wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_set_on_post = + _wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_set_on_postPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_get_public_key( + int that, + ) { + return _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_get_public_key( + that, + ); + } + + late final _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_get_public_keyPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_get_public_key', + ); + late final _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_get_public_key = + _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_get_public_keyPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign( + int that, + ) { + return _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign( + that, + ); + } + + late final _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_signPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign', + ); + late final _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign = + _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_signPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign_transaction( + int that, + ) { + return _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign_transaction( + that, + ); + } + + late final _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign_transactionPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign_transaction', + ); + late final _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign_transaction = + _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign_transactionPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_get_public_key( + int that, + int on_get_public_key, + ) { + return _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_get_public_key( + that, + on_get_public_key, + ); + } + + late final _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_get_public_keyPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_get_public_key', + ); + late final _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_get_public_key = + _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_get_public_keyPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign( + int that, + int on_sign, + ) { + return _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign( + that, + on_sign, + ); + } + + late final _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_signPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign', + ); + late final _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign = + _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_signPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign_transaction( + int that, + int on_sign_transaction, + ) { + return _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign_transaction( + that, + on_sign_transaction, + ); + } + + late final _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign_transactionPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign_transaction', + ); + late final _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign_transaction = + _wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign_transactionPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_get_on_post( + int that, + ) { + return _wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_get_on_post( + that, + ); + } + + late final _wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_get_on_postPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_get_on_post', + ); + late final _wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_get_on_post = + _wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_get_on_postPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_set_on_post( + int that, + int on_post, + ) { + return _wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_set_on_post( + that, + on_post, + ); + } + + late final _wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_set_on_postPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_set_on_post', + ); + late final _wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_set_on_post = + _wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_set_on_postPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_get(int that) { + return _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_get( + that, + ); + } + + late final _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_getPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_get', + ); + late final _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_get = + _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_getPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove(int that) { + return _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove( + that, + ); + } + + late final _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_removePtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove', + ); + late final _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove = + _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_removePtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove_unchecked( + int that, + ) { + return _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove_unchecked( + that, + ); + } + + late final _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove_uncheckedPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove_unchecked', + ); + late final _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove_unchecked = + _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove_uncheckedPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set(int that) { + return _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set( + that, + ); + } + + late final _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_setPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set', + ); + late final _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set = + _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_setPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set_unchecked( + int that, + ) { + return _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set_unchecked( + that, + ); + } + + late final _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set_uncheckedPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set_unchecked', + ); + late final _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set_unchecked = + _wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set_uncheckedPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_get( + int that, + int on_get, + ) { + return _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_get( + that, + on_get, + ); + } + + late final _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_getPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_get', + ); + late final _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_get = + _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_getPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove( + int that, + int on_remove, + ) { + return _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove( + that, + on_remove, + ); + } + + late final _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_removePtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove', + ); + late final _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove = + _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_removePtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove_unchecked( + int that, + int on_remove_unchecked, + ) { + return _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove_unchecked( + that, + on_remove_unchecked, + ); + } + + late final _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove_uncheckedPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove_unchecked', + ); + late final _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove_unchecked = + _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove_uncheckedPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set( + int that, + int on_set, + ) { + return _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set( + that, + on_set, + ); + } + + late final _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_setPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set', + ); + late final _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set = + _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_setPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set_unchecked( + int that, + int on_set_unchecked, + ) { + return _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set_unchecked( + that, + on_set_unchecked, + ); + } + + late final _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set_uncheckedPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set_unchecked', + ); + late final _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set_unchecked = + _wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set_uncheckedPtr + .asFunction(); + + void wire__crate__api__merged__StorageImpl_new( + int port_, + int on_get, + int on_set, + int on_set_unchecked, + int on_remove, + int on_remove_unchecked, + ) { + return _wire__crate__api__merged__StorageImpl_new( + port_, + on_get, + on_set, + on_set_unchecked, + on_remove, + on_remove_unchecked, + ); + } + + late final _wire__crate__api__merged__StorageImpl_newPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.UintPtr, + ffi.UintPtr, + ffi.UintPtr, + ffi.UintPtr, + ffi.UintPtr, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__StorageImpl_new'); + late final _wire__crate__api__merged__StorageImpl_new = + _wire__crate__api__merged__StorageImpl_newPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed( + int that, + ) { + return _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed( + that, + ); + } + + late final _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changedPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed', + ); + late final _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed = + _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changedPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + int that, + ) { + return _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + that, + ); + } + + late final _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_foundPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found', + ); + late final _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found = + _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_foundPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed( + int that, + int on_balance_changed, + ) { + return _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed( + that, + on_balance_changed, + ); + } + + late final _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changedPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed', + ); + late final _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed = + _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changedPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + int that, + int on_transactions_found, + ) { + return _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + that, + on_transactions_found, + ); + } + + late final _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_foundPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found', + ); + late final _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found = + _wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_foundPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_custodians_changed( + int that, + ) { + return _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_custodians_changed( + that, + ); + } + + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_custodians_changedPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_custodians_changed', + ); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_custodians_changed = + _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_custodians_changedPtr + .asFunction(); - @protected - void sse_encode_unsigned_message_impl( - UnsignedMessageImpl self, SseSerializer serializer); + WireSyncRust2DartDco + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_details_changed( + int that, + ) { + return _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_details_changed( + that, + ); + } - @protected - void sse_encode_usize(BigInt self, SseSerializer serializer); -} + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_details_changedPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_details_changed', + ); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_details_changed = + _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_details_changedPtr + .asFunction(); -// Section: wire_class + WireSyncRust2DartDco + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_expired( + int that, + ) { + return _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_expired( + that, + ); + } -// ignore_for_file: camel_case_types, non_constant_identifier_names, avoid_positional_boolean_parameters, annotate_overrides, constant_identifier_names -// AUTO GENERATED FILE, DO NOT EDIT. -// -// Generated by `package:ffigen`. -// ignore_for_file: type=lint + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_expiredPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_expired', + ); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_expired = + _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_expiredPtr + .asFunction(); -/// generated by flutter_rust_bridge -class NekotonBridgeWire implements BaseWire { - factory NekotonBridgeWire.fromExternalLibrary(ExternalLibrary lib) => - NekotonBridgeWire(lib.ffiDynamicLibrary); + WireSyncRust2DartDco + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_sent( + int that, + ) { + return _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_sent( + that, + ); + } - /// Holds the symbol lookup function. - final ffi.Pointer Function(String symbolName) - _lookup; + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_sentPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_sent', + ); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_sent = + _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_sentPtr + .asFunction(); - /// The symbols are looked up in [dynamicLibrary]. - NekotonBridgeWire(ffi.DynamicLibrary dynamicLibrary) - : _lookup = dynamicLibrary.lookup; + WireSyncRust2DartDco + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_state_changed( + int that, + ) { + return _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_state_changed( + that, + ); + } - /// The symbols are looked up with [lookup]. - NekotonBridgeWire.fromLookup( - ffi.Pointer Function(String symbolName) - lookup) - : _lookup = lookup; + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_state_changedPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_state_changed', + ); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_state_changed = + _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_state_changedPtr + .asFunction(); - void store_dart_post_cobject( - DartPostCObjectFnType ptr, + WireSyncRust2DartDco + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + int that, ) { - return _store_dart_post_cobject( - ptr, + return _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + that, ); } - late final _store_dart_post_cobjectPtr = - _lookup>( - 'store_dart_post_cobject'); - late final _store_dart_post_cobject = _store_dart_post_cobjectPtr - .asFunction(); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_foundPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found', + ); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found = + _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_foundPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_unconfirmed_transactions_changed( + int that, + ) { + return _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_unconfirmed_transactions_changed( + that, + ); + } + + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_unconfirmed_transactions_changedPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_unconfirmed_transactions_changed', + ); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_unconfirmed_transactions_changed = + _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_unconfirmed_transactions_changedPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_custodians_changed( + int that, + int on_custodians_changed, + ) { + return _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_custodians_changed( + that, + on_custodians_changed, + ); + } + + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_custodians_changedPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_custodians_changed', + ); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_custodians_changed = + _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_custodians_changedPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_details_changed( + int that, + int on_details_changed, + ) { + return _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_details_changed( + that, + on_details_changed, + ); + } + + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_details_changedPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_details_changed', + ); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_details_changed = + _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_details_changedPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_expired( + int that, + int on_message_expired, + ) { + return _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_expired( + that, + on_message_expired, + ); + } + + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_expiredPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_expired', + ); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_expired = + _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_expiredPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_sent( + int that, + int on_message_sent, + ) { + return _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_sent( + that, + on_message_sent, + ); + } + + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_sentPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_sent', + ); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_sent = + _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_sentPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_state_changed( + int that, + int on_state_changed, + ) { + return _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_state_changed( + that, + on_state_changed, + ); + } + + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_state_changedPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_state_changed', + ); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_state_changed = + _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_state_changedPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + int that, + int on_transactions_found, + ) { + return _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + that, + on_transactions_found, + ); + } + + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_foundPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found', + ); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found = + _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_foundPtr + .asFunction(); + + WireSyncRust2DartDco + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_unconfirmed_transactions_changed( + int that, + int on_unconfirmed_transactions_changed, + ) { + return _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_unconfirmed_transactions_changed( + that, + on_unconfirmed_transactions_changed, + ); + } + + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_unconfirmed_transactions_changedPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.UintPtr, ffi.UintPtr) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_unconfirmed_transactions_changed', + ); + late final _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_unconfirmed_transactions_changed = + _wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_unconfirmed_transactions_changedPtr + .asFunction(); void wire__crate__api__merged__accounts_storage_impl_add_account( int port_, @@ -2292,17 +4798,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__accounts_storage_impl_add_accountPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_add_account'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_add_account', + ); late final _wire__crate__api__merged__accounts_storage_impl_add_account = _wire__crate__api__merged__accounts_storage_impl_add_accountPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__accounts_storage_impl_add_accounts( int port_, @@ -2318,17 +4832,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__accounts_storage_impl_add_accountsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_add_accounts'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_add_accounts', + ); late final _wire__crate__api__merged__accounts_storage_impl_add_accounts = _wire__crate__api__merged__accounts_storage_impl_add_accountsPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__accounts_storage_impl_add_token_wallet( int port_, @@ -2348,23 +4870,29 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__accounts_storage_impl_add_token_walletPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_add_token_wallet'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_add_token_wallet', + ); late final _wire__crate__api__merged__accounts_storage_impl_add_token_wallet = _wire__crate__api__merged__accounts_storage_impl_add_token_walletPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__accounts_storage_impl_add_token_wallets( int port_, @@ -2384,42 +4912,53 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__accounts_storage_impl_add_token_walletsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_add_token_wallets'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_add_token_wallets', + ); late final _wire__crate__api__merged__accounts_storage_impl_add_token_wallets = _wire__crate__api__merged__accounts_storage_impl_add_token_walletsPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__accounts_storage_impl_clear( int port_, ffi.Pointer that, ) { - return _wire__crate__api__merged__accounts_storage_impl_clear( - port_, - that, - ); + return _wire__crate__api__merged__accounts_storage_impl_clear(port_, that); } - late final _wire__crate__api__merged__accounts_storage_impl_clearPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_clear'); + late final _wire__crate__api__merged__accounts_storage_impl_clearPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_clear', + ); late final _wire__crate__api__merged__accounts_storage_impl_clear = - _wire__crate__api__merged__accounts_storage_impl_clearPtr.asFunction< - void Function(int, ffi.Pointer)>(); + _wire__crate__api__merged__accounts_storage_impl_clearPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__accounts_storage_impl_get_entries( int port_, @@ -2433,53 +4972,68 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__accounts_storage_impl_get_entriesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_get_entries'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_get_entries', + ); late final _wire__crate__api__merged__accounts_storage_impl_get_entries = _wire__crate__api__merged__accounts_storage_impl_get_entriesPtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__accounts_storage_impl_new( int port_, ffi.Pointer storage, ) { - return _wire__crate__api__merged__accounts_storage_impl_new( - port_, - storage, - ); + return _wire__crate__api__merged__accounts_storage_impl_new(port_, storage); } - late final _wire__crate__api__merged__accounts_storage_impl_newPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_new'); + late final _wire__crate__api__merged__accounts_storage_impl_newPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_new', + ); late final _wire__crate__api__merged__accounts_storage_impl_new = - _wire__crate__api__merged__accounts_storage_impl_newPtr.asFunction< - void Function(int, ffi.Pointer)>(); + _wire__crate__api__merged__accounts_storage_impl_newPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__accounts_storage_impl_reload( int port_, ffi.Pointer that, ) { - return _wire__crate__api__merged__accounts_storage_impl_reload( - port_, - that, - ); + return _wire__crate__api__merged__accounts_storage_impl_reload(port_, that); } - late final _wire__crate__api__merged__accounts_storage_impl_reloadPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_reload'); + late final _wire__crate__api__merged__accounts_storage_impl_reloadPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_reload', + ); late final _wire__crate__api__merged__accounts_storage_impl_reload = - _wire__crate__api__merged__accounts_storage_impl_reloadPtr.asFunction< - void Function(int, ffi.Pointer)>(); + _wire__crate__api__merged__accounts_storage_impl_reloadPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__accounts_storage_impl_remove_account( int port_, @@ -2495,17 +5049,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__accounts_storage_impl_remove_accountPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_remove_account'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_remove_account', + ); late final _wire__crate__api__merged__accounts_storage_impl_remove_account = _wire__crate__api__merged__accounts_storage_impl_remove_accountPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__accounts_storage_impl_remove_accounts( int port_, @@ -2521,17 +5083,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__accounts_storage_impl_remove_accountsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_remove_accounts'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_remove_accounts', + ); late final _wire__crate__api__merged__accounts_storage_impl_remove_accounts = _wire__crate__api__merged__accounts_storage_impl_remove_accountsPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__accounts_storage_impl_remove_token_wallet( int port_, @@ -2551,23 +5121,29 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__accounts_storage_impl_remove_token_walletPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_remove_token_wallet'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_remove_token_wallet', + ); late final _wire__crate__api__merged__accounts_storage_impl_remove_token_wallet = _wire__crate__api__merged__accounts_storage_impl_remove_token_walletPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__accounts_storage_impl_remove_token_wallets( int port_, @@ -2587,23 +5163,29 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__accounts_storage_impl_remove_token_walletsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_remove_token_wallets'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_remove_token_wallets', + ); late final _wire__crate__api__merged__accounts_storage_impl_remove_token_wallets = _wire__crate__api__merged__accounts_storage_impl_remove_token_walletsPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__accounts_storage_impl_rename_account( int port_, @@ -2621,21 +5203,27 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__accounts_storage_impl_rename_accountPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_rename_account'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_rename_account', + ); late final _wire__crate__api__merged__accounts_storage_impl_rename_account = _wire__crate__api__merged__accounts_storage_impl_rename_accountPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__accounts_storage_impl_verify_data( int port_, @@ -2649,97 +5237,42 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__accounts_storage_impl_verify_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_verify_data'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__accounts_storage_impl_verify_data', + ); late final _wire__crate__api__merged__accounts_storage_impl_verify_data = _wire__crate__api__merged__accounts_storage_impl_verify_dataPtr .asFunction< - void Function(int, ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__merged__call_send_result( - ffi.Pointer id, - ffi.Pointer value, - ) { - return _wire__crate__api__merged__call_send_result( - id, - value, - ); - } - - late final _wire__crate__api__merged__call_send_resultPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__call_send_result'); - late final _wire__crate__api__merged__call_send_result = - _wire__crate__api__merged__call_send_resultPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__merged__caller_test_class_call_some_func( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__merged__caller_test_class_call_some_func( - port_, - that, - ); - } - - late final _wire__crate__api__merged__caller_test_class_call_some_funcPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__caller_test_class_call_some_func'); - late final _wire__crate__api__merged__caller_test_class_call_some_func = - _wire__crate__api__merged__caller_test_class_call_some_funcPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__merged__caller_test_class_new( - int port_, - ffi.Pointer instance_hash, - int value, - ) { - return _wire__crate__api__merged__caller_test_class_new( - port_, - instance_hash, - value, - ); - } - - late final _wire__crate__api__merged__caller_test_class_newPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Int32)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__caller_test_class_new'); - late final _wire__crate__api__merged__caller_test_class_new = - _wire__crate__api__merged__caller_test_class_newPtr.asFunction< - void Function( - int, ffi.Pointer, int)>(); + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__create_log_stream( int port_, ffi.Pointer s, ) { - return _wire__crate__api__merged__create_log_stream( - port_, - s, - ); + return _wire__crate__api__merged__create_log_stream(port_, s); } - late final _wire__crate__api__merged__create_log_streamPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__create_log_stream'); + late final _wire__crate__api__merged__create_log_streamPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__create_log_stream'); late final _wire__crate__api__merged__create_log_stream = - _wire__crate__api__merged__create_log_streamPtr.asFunction< - void Function(int, ffi.Pointer)>(); + _wire__crate__api__merged__create_log_streamPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__generic_contract_dart_wrapper_address( int port_, @@ -2753,15 +5286,23 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__generic_contract_dart_wrapper_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_address'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_address', + ); late final _wire__crate__api__merged__generic_contract_dart_wrapper_address = _wire__crate__api__merged__generic_contract_dart_wrapper_addressPtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__generic_contract_dart_wrapper_contract_state( int port_, @@ -2775,15 +5316,23 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__generic_contract_dart_wrapper_contract_statePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_contract_state'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_contract_state', + ); late final _wire__crate__api__merged__generic_contract_dart_wrapper_contract_state = _wire__crate__api__merged__generic_contract_dart_wrapper_contract_statePtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__generic_contract_dart_wrapper_estimate_fees( int port_, @@ -2799,22 +5348,28 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__generic_contract_dart_wrapper_estimate_feesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_estimate_fees'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_estimate_fees', + ); late final _wire__crate__api__merged__generic_contract_dart_wrapper_estimate_fees = _wire__crate__api__merged__generic_contract_dart_wrapper_estimate_feesPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void - wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locally( + wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locally( int port_, ffi.Pointer that, ffi.Pointer signed_message, @@ -2830,21 +5385,27 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locallyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locally'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locally', + ); late final _wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locally = _wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locallyPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__generic_contract_dart_wrapper_handle_block( int port_, @@ -2860,22 +5421,28 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__generic_contract_dart_wrapper_handle_blockPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_handle_block'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_handle_block', + ); late final _wire__crate__api__merged__generic_contract_dart_wrapper_handle_block = _wire__crate__api__merged__generic_contract_dart_wrapper_handle_blockPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void - wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactions( + wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactions( int port_, ffi.Pointer that, ) { @@ -2887,15 +5454,23 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactionsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactions'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactions', + ); late final _wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactions = _wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactionsPtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__generic_contract_dart_wrapper_polling_method( int port_, @@ -2909,18 +5484,26 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__generic_contract_dart_wrapper_polling_methodPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_polling_method'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_polling_method', + ); late final _wire__crate__api__merged__generic_contract_dart_wrapper_polling_method = _wire__crate__api__merged__generic_contract_dart_wrapper_polling_methodPtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ) + >(); void - wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactions( + wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactions( int port_, ffi.Pointer that, ffi.Pointer from_lt, @@ -2934,19 +5517,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactionsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactions'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactions', + ); late final _wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactions = _wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactionsPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__generic_contract_dart_wrapper_refresh( int port_, @@ -2960,15 +5549,23 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__generic_contract_dart_wrapper_refreshPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_refresh'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_refresh', + ); late final _wire__crate__api__merged__generic_contract_dart_wrapper_refresh = _wire__crate__api__merged__generic_contract_dart_wrapper_refreshPtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__generic_contract_dart_wrapper_send( int port_, @@ -2984,73 +5581,104 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__generic_contract_dart_wrapper_sendPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_send'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_send', + ); late final _wire__crate__api__merged__generic_contract_dart_wrapper_send = _wire__crate__api__merged__generic_contract_dart_wrapper_sendPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__generic_contract_dart_wrapper_subscribe( int port_, - ffi.Pointer instance_hash, ffi.Pointer address, bool preload_transactions, int transport, + ffi.Pointer on_message_sent, + ffi.Pointer on_message_expired, + ffi.Pointer on_state_changed, + ffi.Pointer on_transactions_found, ) { return _wire__crate__api__merged__generic_contract_dart_wrapper_subscribe( port_, - instance_hash, address, preload_transactions, transport, + on_message_sent, + on_message_expired, + on_state_changed, + on_transactions_found, ); } late final _wire__crate__api__merged__generic_contract_dart_wrapper_subscribePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.UintPtr)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_subscribe'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Bool, + ffi.UintPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__generic_contract_dart_wrapper_subscribe', + ); late final _wire__crate__api__merged__generic_contract_dart_wrapper_subscribe = _wire__crate__api__merged__generic_contract_dart_wrapper_subscribePtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer, bool, int)>(); + void Function( + int, + ffi.Pointer, + bool, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); WireSyncRust2DartDco - wire__crate__api__merged__gql_connection_dart_wrapper_new( + wire__crate__api__merged__gql_connection_dart_wrapper_new( bool is_local, - ffi.Pointer instance_hash, + ffi.Pointer on_post, ) { return _wire__crate__api__merged__gql_connection_dart_wrapper_new( is_local, - instance_hash, + on_post, ); } late final _wire__crate__api__merged__gql_connection_dart_wrapper_newPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Bool, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_connection_dart_wrapper_new'); + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Bool, ffi.Pointer) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_connection_dart_wrapper_new', + ); late final _wire__crate__api__merged__gql_connection_dart_wrapper_new = - _wire__crate__api__merged__gql_connection_dart_wrapper_newPtr.asFunction< - WireSyncRust2DartDco Function( - bool, ffi.Pointer)>(); + _wire__crate__api__merged__gql_connection_dart_wrapper_newPtr + .asFunction< + WireSyncRust2DartDco Function(bool, ffi.Pointer) + >(); void wire__crate__api__merged__gql_transport_impl_get_accounts_by_code_hash( int port_, @@ -3070,23 +5698,29 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__gql_transport_impl_get_accounts_by_code_hashPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Uint8, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_accounts_by_code_hash'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Uint8, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_accounts_by_code_hash', + ); late final _wire__crate__api__merged__gql_transport_impl_get_accounts_by_code_hash = _wire__crate__api__merged__gql_transport_impl_get_accounts_by_code_hashPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__gql_transport_impl_get_block( int port_, @@ -3100,17 +5734,27 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__gql_transport_impl_get_blockPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_block'); + late final _wire__crate__api__merged__gql_transport_impl_get_blockPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_block', + ); late final _wire__crate__api__merged__gql_transport_impl_get_block = - _wire__crate__api__merged__gql_transport_impl_get_blockPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + _wire__crate__api__merged__gql_transport_impl_get_blockPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__gql_transport_impl_get_blockchain_config( int port_, @@ -3126,15 +5770,21 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__gql_transport_impl_get_blockchain_configPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_blockchain_config'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Bool, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_blockchain_config', + ); late final _wire__crate__api__merged__gql_transport_impl_get_blockchain_config = _wire__crate__api__merged__gql_transport_impl_get_blockchain_configPtr .asFunction< - void Function( - int, ffi.Pointer, bool)>(); + void Function(int, ffi.Pointer, bool) + >(); void wire__crate__api__merged__gql_transport_impl_get_contract_state( int port_, @@ -3150,17 +5800,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__gql_transport_impl_get_contract_statePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_contract_state'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_contract_state', + ); late final _wire__crate__api__merged__gql_transport_impl_get_contract_state = _wire__crate__api__merged__gql_transport_impl_get_contract_statePtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__gql_transport_impl_get_dst_transaction( int port_, @@ -3176,17 +5834,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__gql_transport_impl_get_dst_transactionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_dst_transaction'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_dst_transaction', + ); late final _wire__crate__api__merged__gql_transport_impl_get_dst_transaction = _wire__crate__api__merged__gql_transport_impl_get_dst_transactionPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__gql_transport_impl_get_fee_factors( int port_, @@ -3202,15 +5868,21 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__gql_transport_impl_get_fee_factorsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_fee_factors'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Bool, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_fee_factors', + ); late final _wire__crate__api__merged__gql_transport_impl_get_fee_factors = _wire__crate__api__merged__gql_transport_impl_get_fee_factorsPtr .asFunction< - void Function( - int, ffi.Pointer, bool)>(); + void Function(int, ffi.Pointer, bool) + >(); void wire__crate__api__merged__gql_transport_impl_get_full_contract_state( int port_, @@ -3226,17 +5898,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__gql_transport_impl_get_full_contract_statePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_full_contract_state'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_full_contract_state', + ); late final _wire__crate__api__merged__gql_transport_impl_get_full_contract_state = _wire__crate__api__merged__gql_transport_impl_get_full_contract_statePtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__gql_transport_impl_get_latest_block( int port_, @@ -3252,17 +5932,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__gql_transport_impl_get_latest_blockPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_latest_block'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_latest_block', + ); late final _wire__crate__api__merged__gql_transport_impl_get_latest_block = _wire__crate__api__merged__gql_transport_impl_get_latest_blockPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__gql_transport_impl_get_network_id( int port_, @@ -3276,14 +5964,17 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__gql_transport_impl_get_network_idPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_network_id'); + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_network_id', + ); late final _wire__crate__api__merged__gql_transport_impl_get_network_id = _wire__crate__api__merged__gql_transport_impl_get_network_idPtr .asFunction< - void Function(int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__gql_transport_impl_get_signature_id( int port_, @@ -3297,14 +5988,17 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__gql_transport_impl_get_signature_idPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_signature_id'); + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_signature_id', + ); late final _wire__crate__api__merged__gql_transport_impl_get_signature_id = _wire__crate__api__merged__gql_transport_impl_get_signature_idPtr .asFunction< - void Function(int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__gql_transport_impl_get_transaction( int port_, @@ -3320,17 +6014,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__gql_transport_impl_get_transactionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_transaction'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_transaction', + ); late final _wire__crate__api__merged__gql_transport_impl_get_transaction = _wire__crate__api__merged__gql_transport_impl_get_transactionPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__gql_transport_impl_get_transactions( int port_, @@ -3350,41 +6052,53 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__gql_transport_impl_get_transactionsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Uint8)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_transactions'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Uint8, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_get_transactions', + ); late final _wire__crate__api__merged__gql_transport_impl_get_transactions = _wire__crate__api__merged__gql_transport_impl_get_transactionsPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__gql_transport_impl_new( ffi.Pointer gql_connection, ) { - return _wire__crate__api__merged__gql_transport_impl_new( - gql_connection, - ); + return _wire__crate__api__merged__gql_transport_impl_new(gql_connection); } - late final _wire__crate__api__merged__gql_transport_impl_newPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_new'); - late final _wire__crate__api__merged__gql_transport_impl_new = - _wire__crate__api__merged__gql_transport_impl_newPtr.asFunction< + late final _wire__crate__api__merged__gql_transport_impl_newPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_new', + ); + late final _wire__crate__api__merged__gql_transport_impl_new = + _wire__crate__api__merged__gql_transport_impl_newPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + >(); void wire__crate__api__merged__gql_transport_impl_simulate_transaction_tree( int port_, @@ -3404,23 +6118,29 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__gql_transport_impl_simulate_transaction_treePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_simulate_transaction_tree'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_simulate_transaction_tree', + ); late final _wire__crate__api__merged__gql_transport_impl_simulate_transaction_tree = _wire__crate__api__merged__gql_transport_impl_simulate_transaction_treePtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__gql_transport_impl_wait_for_next_block( int port_, @@ -3434,65 +6154,48 @@ class NekotonBridgeWire implements BaseWire { that, current_block_id, address, - timeout, - ); - } - - late final _wire__crate__api__merged__gql_transport_impl_wait_for_next_blockPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Uint64)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_wait_for_next_block'); - late final _wire__crate__api__merged__gql_transport_impl_wait_for_next_block = - _wire__crate__api__merged__gql_transport_impl_wait_for_next_blockPtr - .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - - void wire__crate__api__merged__init_caller( - int port_, - ffi.Pointer stream_sink, - ) { - return _wire__crate__api__merged__init_caller( - port_, - stream_sink, + timeout, ); } - late final _wire__crate__api__merged__init_callerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__init_caller'); - late final _wire__crate__api__merged__init_caller = - _wire__crate__api__merged__init_callerPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _wire__crate__api__merged__gql_transport_impl_wait_for_next_blockPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Uint64, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__gql_transport_impl_wait_for_next_block', + ); + late final _wire__crate__api__merged__gql_transport_impl_wait_for_next_block = + _wire__crate__api__merged__gql_transport_impl_wait_for_next_blockPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); void wire__crate__api__merged__init_logger( int port_, int level, bool mobile_logger, ) { - return _wire__crate__api__merged__init_logger( - port_, - level, - mobile_logger, - ); + return _wire__crate__api__merged__init_logger(port_, level, mobile_logger); } - late final _wire__crate__api__merged__init_loggerPtr = _lookup< - ffi - .NativeFunction>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__init_logger'); + late final _wire__crate__api__merged__init_loggerPtr = + _lookup< + ffi.NativeFunction + >('frbgen_nekoton_bridge_wire__crate__api__merged__init_logger'); late final _wire__crate__api__merged__init_logger = _wire__crate__api__merged__init_loggerPtr .asFunction(); @@ -3509,15 +6212,20 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_address'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_address', + ); late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_address = _wire__crate__api__merged__jetton_wallet_dart_wrapper_addressPtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__jetton_wallet_dart_wrapper_balance( int port_, @@ -3531,15 +6239,20 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_balancePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_balance'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_balance', + ); late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_balance = _wire__crate__api__merged__jetton_wallet_dart_wrapper_balancePtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__jetton_wallet_dart_wrapper_contract_state( int port_, @@ -3553,18 +6266,23 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_contract_statePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_contract_state'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_contract_state', + ); late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_contract_state = _wire__crate__api__merged__jetton_wallet_dart_wrapper_contract_statePtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); void - wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amount( + wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amount( int port_, ffi.Pointer that, ffi.Pointer destination, @@ -3578,22 +6296,28 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amountPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amount'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amount', + ); late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amount = _wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amountPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void - wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details( + wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details( int port_, int transport, ffi.Pointer token_root_address, @@ -3607,18 +6331,24 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_detailsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.UintPtr, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.UintPtr, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details', + ); late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details = _wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_detailsPtr .asFunction< - void Function( - int, int, ffi.Pointer)>(); + void Function(int, int, ffi.Pointer) + >(); void - wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet( + wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet( int port_, int transport, ffi.Pointer token_wallet_address, @@ -3632,18 +6362,24 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_walletPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.UintPtr, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.UintPtr, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet', + ); late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet = _wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_walletPtr .asFunction< - void Function( - int, int, ffi.Pointer)>(); + void Function(int, int, ffi.Pointer) + >(); void - wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_details( + wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_details( int port_, int transport, ffi.Pointer address, @@ -3657,15 +6393,21 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_detailsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.UintPtr, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_details'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.UintPtr, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_details', + ); late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_details = _wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_detailsPtr .asFunction< - void Function( - int, int, ffi.Pointer)>(); + void Function(int, int, ffi.Pointer) + >(); void wire__crate__api__merged__jetton_wallet_dart_wrapper_handle_block( int port_, @@ -3681,19 +6423,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_handle_blockPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_handle_block'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_handle_block', + ); late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_handle_block = _wire__crate__api__merged__jetton_wallet_dart_wrapper_handle_blockPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__jetton_wallet_dart_wrapper_owner( int port_, @@ -3707,17 +6455,23 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_ownerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_owner'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_owner', + ); late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_owner = - _wire__crate__api__merged__jetton_wallet_dart_wrapper_ownerPtr.asFunction< - void Function( - int, ffi.Pointer)>(); + _wire__crate__api__merged__jetton_wallet_dart_wrapper_ownerPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); void - wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactions( + wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactions( int port_, ffi.Pointer that, ffi.Pointer from_lt, @@ -3731,19 +6485,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactionsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactions'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactions', + ); late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactions = _wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactionsPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__jetton_wallet_dart_wrapper_prepare_transfer( int port_, @@ -3771,31 +6531,37 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_prepare_transferPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_prepare_transfer'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_prepare_transfer', + ); late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_prepare_transfer = _wire__crate__api__merged__jetton_wallet_dart_wrapper_prepare_transferPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__jetton_wallet_dart_wrapper_refresh( int port_, @@ -3809,75 +6575,87 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_refreshPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_refresh'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_refresh', + ); late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_refresh = _wire__crate__api__merged__jetton_wallet_dart_wrapper_refreshPtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__jetton_wallet_dart_wrapper_subscribe( int port_, - ffi.Pointer instance_hash, ffi.Pointer owner, ffi.Pointer root_token_contract, int transport, bool preload_transactions, + ffi.Pointer on_balance_changed, + ffi.Pointer on_transactions_found, ) { return _wire__crate__api__merged__jetton_wallet_dart_wrapper_subscribe( port_, - instance_hash, owner, root_token_contract, transport, preload_transactions, + on_balance_changed, + on_transactions_found, ); } late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_subscribePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UintPtr, - ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_subscribe'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.UintPtr, + ffi.Bool, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jetton_wallet_dart_wrapper_subscribe', + ); late final _wire__crate__api__merged__jetton_wallet_dart_wrapper_subscribe = _wire__crate__api__merged__jetton_wallet_dart_wrapper_subscribePtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - bool)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + bool, + ffi.Pointer, + ffi.Pointer, + ) + >(); WireSyncRust2DartDco - wire__crate__api__merged__jrpc_connection_dart_wrapper_new( - ffi.Pointer instance_hash, + wire__crate__api__merged__jrpc_connection_dart_wrapper_new( + ffi.Pointer on_post, ) { - return _wire__crate__api__merged__jrpc_connection_dart_wrapper_new( - instance_hash, - ); + return _wire__crate__api__merged__jrpc_connection_dart_wrapper_new(on_post); } late final _wire__crate__api__merged__jrpc_connection_dart_wrapper_newPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_connection_dart_wrapper_new'); + ffi.NativeFunction)> + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_connection_dart_wrapper_new', + ); late final _wire__crate__api__merged__jrpc_connection_dart_wrapper_new = - _wire__crate__api__merged__jrpc_connection_dart_wrapper_newPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); + _wire__crate__api__merged__jrpc_connection_dart_wrapper_newPtr + .asFunction)>(); void wire__crate__api__merged__jrpc_transport_impl_get_accounts_by_code_hash( int port_, @@ -3897,23 +6675,29 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jrpc_transport_impl_get_accounts_by_code_hashPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Uint8, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_accounts_by_code_hash'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Uint8, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_accounts_by_code_hash', + ); late final _wire__crate__api__merged__jrpc_transport_impl_get_accounts_by_code_hash = _wire__crate__api__merged__jrpc_transport_impl_get_accounts_by_code_hashPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__jrpc_transport_impl_get_blockchain_config( int port_, @@ -3929,15 +6713,21 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jrpc_transport_impl_get_blockchain_configPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_blockchain_config'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Bool, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_blockchain_config', + ); late final _wire__crate__api__merged__jrpc_transport_impl_get_blockchain_config = _wire__crate__api__merged__jrpc_transport_impl_get_blockchain_configPtr .asFunction< - void Function( - int, ffi.Pointer, bool)>(); + void Function(int, ffi.Pointer, bool) + >(); void wire__crate__api__merged__jrpc_transport_impl_get_contract_state( int port_, @@ -3953,17 +6743,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jrpc_transport_impl_get_contract_statePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_contract_state'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_contract_state', + ); late final _wire__crate__api__merged__jrpc_transport_impl_get_contract_state = _wire__crate__api__merged__jrpc_transport_impl_get_contract_statePtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__jrpc_transport_impl_get_dst_transaction( int port_, @@ -3979,17 +6777,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jrpc_transport_impl_get_dst_transactionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_dst_transaction'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_dst_transaction', + ); late final _wire__crate__api__merged__jrpc_transport_impl_get_dst_transaction = _wire__crate__api__merged__jrpc_transport_impl_get_dst_transactionPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__jrpc_transport_impl_get_fee_factors( int port_, @@ -4005,15 +6811,21 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jrpc_transport_impl_get_fee_factorsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_fee_factors'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Bool, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_fee_factors', + ); late final _wire__crate__api__merged__jrpc_transport_impl_get_fee_factors = _wire__crate__api__merged__jrpc_transport_impl_get_fee_factorsPtr .asFunction< - void Function( - int, ffi.Pointer, bool)>(); + void Function(int, ffi.Pointer, bool) + >(); void wire__crate__api__merged__jrpc_transport_impl_get_full_contract_state( int port_, @@ -4029,17 +6841,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jrpc_transport_impl_get_full_contract_statePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_full_contract_state'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_full_contract_state', + ); late final _wire__crate__api__merged__jrpc_transport_impl_get_full_contract_state = _wire__crate__api__merged__jrpc_transport_impl_get_full_contract_statePtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__jrpc_transport_impl_get_network_id( int port_, @@ -4053,14 +6873,20 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jrpc_transport_impl_get_network_idPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_network_id'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_network_id', + ); late final _wire__crate__api__merged__jrpc_transport_impl_get_network_id = _wire__crate__api__merged__jrpc_transport_impl_get_network_idPtr .asFunction< - void Function(int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__jrpc_transport_impl_get_signature_id( int port_, @@ -4074,14 +6900,20 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jrpc_transport_impl_get_signature_idPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_signature_id'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_signature_id', + ); late final _wire__crate__api__merged__jrpc_transport_impl_get_signature_id = _wire__crate__api__merged__jrpc_transport_impl_get_signature_idPtr .asFunction< - void Function(int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__jrpc_transport_impl_get_transaction( int port_, @@ -4097,17 +6929,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jrpc_transport_impl_get_transactionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_transaction'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_transaction', + ); late final _wire__crate__api__merged__jrpc_transport_impl_get_transaction = _wire__crate__api__merged__jrpc_transport_impl_get_transactionPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__jrpc_transport_impl_get_transactions( int port_, @@ -4127,41 +6967,53 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jrpc_transport_impl_get_transactionsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Uint8)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_transactions'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Uint8, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_get_transactions', + ); late final _wire__crate__api__merged__jrpc_transport_impl_get_transactions = _wire__crate__api__merged__jrpc_transport_impl_get_transactionsPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__jrpc_transport_impl_new( ffi.Pointer jrpc_connection, ) { - return _wire__crate__api__merged__jrpc_transport_impl_new( - jrpc_connection, - ); + return _wire__crate__api__merged__jrpc_transport_impl_new(jrpc_connection); } - late final _wire__crate__api__merged__jrpc_transport_impl_newPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_new'); - late final _wire__crate__api__merged__jrpc_transport_impl_new = - _wire__crate__api__merged__jrpc_transport_impl_newPtr.asFunction< + late final _wire__crate__api__merged__jrpc_transport_impl_newPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_new', + ); + late final _wire__crate__api__merged__jrpc_transport_impl_new = + _wire__crate__api__merged__jrpc_transport_impl_newPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + >(); void wire__crate__api__merged__jrpc_transport_impl_simulate_transaction_tree( int port_, @@ -4181,23 +7033,29 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__jrpc_transport_impl_simulate_transaction_treePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_simulate_transaction_tree'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__jrpc_transport_impl_simulate_transaction_tree', + ); late final _wire__crate__api__merged__jrpc_transport_impl_simulate_transaction_tree = _wire__crate__api__merged__jrpc_transport_impl_simulate_transaction_treePtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_add_key( int port_, @@ -4213,21 +7071,29 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__keystore_dart_wrapper_add_keyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_add_key'); + late final _wire__crate__api__merged__keystore_dart_wrapper_add_keyPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_add_key', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_add_key = - _wire__crate__api__merged__keystore_dart_wrapper_add_keyPtr.asFunction< - void Function( + _wire__crate__api__merged__keystore_dart_wrapper_add_keyPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_add_keys( int port_, @@ -4243,21 +7109,29 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__keystore_dart_wrapper_add_keysPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_add_keys'); + late final _wire__crate__api__merged__keystore_dart_wrapper_add_keysPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_add_keys', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_add_keys = - _wire__crate__api__merged__keystore_dart_wrapper_add_keysPtr.asFunction< - void Function( + _wire__crate__api__merged__keystore_dart_wrapper_add_keysPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_clear_keystore( int port_, @@ -4271,15 +7145,20 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__keystore_dart_wrapper_clear_keystorePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_clear_keystore'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_clear_keystore', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_clear_keystore = _wire__crate__api__merged__keystore_dart_wrapper_clear_keystorePtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__keystore_dart_wrapper_decrypt( int port_, @@ -4297,23 +7176,31 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__keystore_dart_wrapper_decryptPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_decrypt'); + late final _wire__crate__api__merged__keystore_dart_wrapper_decryptPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_decrypt', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_decrypt = - _wire__crate__api__merged__keystore_dart_wrapper_decryptPtr.asFunction< - void Function( + _wire__crate__api__merged__keystore_dart_wrapper_decryptPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_encrypt( int port_, @@ -4335,27 +7222,35 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__keystore_dart_wrapper_encryptPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_encrypt'); + late final _wire__crate__api__merged__keystore_dart_wrapper_encryptPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_encrypt', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_encrypt = - _wire__crate__api__merged__keystore_dart_wrapper_encryptPtr.asFunction< - void Function( + _wire__crate__api__merged__keystore_dart_wrapper_encryptPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_export_seed( int port_, @@ -4373,21 +7268,27 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__keystore_dart_wrapper_export_seedPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_export_seed'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_export_seed', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_export_seed = _wire__crate__api__merged__keystore_dart_wrapper_export_seedPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_get_entries( int port_, @@ -4401,15 +7302,20 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__keystore_dart_wrapper_get_entriesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_get_entries'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_get_entries', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_get_entries = _wire__crate__api__merged__keystore_dart_wrapper_get_entriesPtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__keystore_dart_wrapper_get_public_keys( int port_, @@ -4427,21 +7333,27 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__keystore_dart_wrapper_get_public_keysPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_get_public_keys'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_get_public_keys', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_get_public_keys = _wire__crate__api__merged__keystore_dart_wrapper_get_public_keysPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_is_password_cached( int port_, @@ -4459,18 +7371,27 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__keystore_dart_wrapper_is_password_cachedPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Uint64)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_is_password_cached'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Uint64, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_is_password_cached', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_is_password_cached = _wire__crate__api__merged__keystore_dart_wrapper_is_password_cachedPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer, int)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_new( int port_, @@ -4486,21 +7407,29 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__keystore_dart_wrapper_newPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_new'); + late final _wire__crate__api__merged__keystore_dart_wrapper_newPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_new', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_new = - _wire__crate__api__merged__keystore_dart_wrapper_newPtr.asFunction< - void Function( + _wire__crate__api__merged__keystore_dart_wrapper_newPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_reload_keystore( int port_, @@ -4514,15 +7443,20 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__keystore_dart_wrapper_reload_keystorePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_reload_keystore'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_reload_keystore', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_reload_keystore = _wire__crate__api__merged__keystore_dart_wrapper_reload_keystorePtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); void wire__crate__api__merged__keystore_dart_wrapper_remove_key( int port_, @@ -4538,16 +7472,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__keystore_dart_wrapper_remove_keyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_remove_key'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_remove_key', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_remove_key = - _wire__crate__api__merged__keystore_dart_wrapper_remove_keyPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + _wire__crate__api__merged__keystore_dart_wrapper_remove_keyPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_remove_keys( int port_, @@ -4563,17 +7506,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__keystore_dart_wrapper_remove_keysPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_remove_keys'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_remove_keys', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_remove_keys = _wire__crate__api__merged__keystore_dart_wrapper_remove_keysPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_sign( int port_, @@ -4593,25 +7544,33 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__keystore_dart_wrapper_signPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_sign'); + late final _wire__crate__api__merged__keystore_dart_wrapper_signPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_sign', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_sign = - _wire__crate__api__merged__keystore_dart_wrapper_signPtr.asFunction< - void Function( + _wire__crate__api__merged__keystore_dart_wrapper_signPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_sign_data( int port_, @@ -4633,24 +7592,31 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__keystore_dart_wrapper_sign_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_sign_data'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_sign_data', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_sign_data = - _wire__crate__api__merged__keystore_dart_wrapper_sign_dataPtr.asFunction< - void Function( + _wire__crate__api__merged__keystore_dart_wrapper_sign_dataPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_sign_data_raw( int port_, @@ -4672,25 +7638,31 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__keystore_dart_wrapper_sign_data_rawPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_sign_data_raw'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_sign_data_raw', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_sign_data_raw = _wire__crate__api__merged__keystore_dart_wrapper_sign_data_rawPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_update_key( int port_, @@ -4708,20 +7680,27 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__keystore_dart_wrapper_update_keyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_update_key'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_update_key', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_update_key = - _wire__crate__api__merged__keystore_dart_wrapper_update_keyPtr.asFunction< - void Function( + _wire__crate__api__merged__keystore_dart_wrapper_update_keyPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__keystore_dart_wrapper_verify_data( int port_, @@ -4739,131 +7718,106 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__keystore_dart_wrapper_verify_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_verify_data'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__keystore_dart_wrapper_verify_data', + ); late final _wire__crate__api__merged__keystore_dart_wrapper_verify_data = _wire__crate__api__merged__keystore_dart_wrapper_verify_dataPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); WireSyncRust2DartDco - wire__crate__api__merged__ledger_connection_dart_wrapper_new( - ffi.Pointer instance_hash, + wire__crate__api__merged__ledger_connection_dart_wrapper_new( + ffi.Pointer on_get_public_key, + ffi.Pointer on_sign, + ffi.Pointer on_sign_transaction, ) { return _wire__crate__api__merged__ledger_connection_dart_wrapper_new( - instance_hash, + on_get_public_key, + on_sign, + on_sign_transaction, ); } late final _wire__crate__api__merged__ledger_connection_dart_wrapper_newPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ledger_connection_dart_wrapper_new'); + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ledger_connection_dart_wrapper_new', + ); late final _wire__crate__api__merged__ledger_connection_dart_wrapper_new = _wire__crate__api__merged__ledger_connection_dart_wrapper_newPtr .asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__merged__ledger_connection_impl_new( - ffi.Pointer instance_hash, - ) { - return _wire__crate__api__merged__ledger_connection_impl_new( - instance_hash, - ); - } - - late final _wire__crate__api__merged__ledger_connection_impl_newPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ledger_connection_impl_new'); - late final _wire__crate__api__merged__ledger_connection_impl_new = - _wire__crate__api__merged__ledger_connection_impl_newPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); - - void wire__crate__api__merged__my_class_my_format( - int port_, - ffi.Pointer that, - ) { - return _wire__crate__api__merged__my_class_my_format( - port_, - that, - ); - } - - late final _wire__crate__api__merged__my_class_my_formatPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__my_class_my_format'); - late final _wire__crate__api__merged__my_class_my_format = - _wire__crate__api__merged__my_class_my_formatPtr - .asFunction)>(); - - void wire__crate__api__merged__my_class_new( - int port_, - int a, - ) { - return _wire__crate__api__merged__my_class_new( - port_, - a, - ); - } - - late final _wire__crate__api__merged__my_class_newPtr = - _lookup>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__my_class_new'); - late final _wire__crate__api__merged__my_class_new = - _wire__crate__api__merged__my_class_newPtr - .asFunction(); + WireSyncRust2DartDco Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_check_public_key( ffi.Pointer public_key, ) { - return _wire__crate__api__merged__nt_check_public_key( - public_key, - ); + return _wire__crate__api__merged__nt_check_public_key(public_key); } - late final _wire__crate__api__merged__nt_check_public_keyPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_check_public_key'); - late final _wire__crate__api__merged__nt_check_public_key = - _wire__crate__api__merged__nt_check_public_keyPtr.asFunction< + late final _wire__crate__api__merged__nt_check_public_keyPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_check_public_key'); + late final _wire__crate__api__merged__nt_check_public_key = + _wire__crate__api__merged__nt_check_public_keyPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_code_to_tvc( ffi.Pointer code, ) { - return _wire__crate__api__merged__nt_code_to_tvc( - code, - ); + return _wire__crate__api__merged__nt_code_to_tvc(code); } - late final _wire__crate__api__merged__nt_code_to_tvcPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_code_to_tvc'); - late final _wire__crate__api__merged__nt_code_to_tvc = - _wire__crate__api__merged__nt_code_to_tvcPtr.asFunction< + late final _wire__crate__api__merged__nt_code_to_tvcPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_code_to_tvc'); + late final _wire__crate__api__merged__nt_code_to_tvc = + _wire__crate__api__merged__nt_code_to_tvcPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + >(); void wire__crate__api__merged__nt_compute_storage_fee( int port_, @@ -4881,19 +7835,31 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_compute_storage_feePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Uint32, - ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_compute_storage_fee'); + late final _wire__crate__api__merged__nt_compute_storage_feePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Uint32, + ffi.Bool, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_compute_storage_fee', + ); late final _wire__crate__api__merged__nt_compute_storage_fee = - _wire__crate__api__merged__nt_compute_storage_feePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer, int, bool)>(); + _wire__crate__api__merged__nt_compute_storage_feePtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + bool, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_compute_ton_wallet_address( ffi.Pointer public_key, @@ -4907,19 +7873,27 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_compute_ton_wallet_addressPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int8)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_compute_ton_wallet_address'); - late final _wire__crate__api__merged__nt_compute_ton_wallet_address = - _wire__crate__api__merged__nt_compute_ton_wallet_addressPtr.asFunction< + late final _wire__crate__api__merged__nt_compute_ton_wallet_addressPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int8, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_compute_ton_wallet_address', + ); + late final _wire__crate__api__merged__nt_compute_ton_wallet_address = + _wire__crate__api__merged__nt_compute_ton_wallet_addressPtr + .asFunction< + WireSyncRust2DartDco Function( ffi.Pointer, ffi.Pointer, - int)>(); + int, + ) + >(); void wire__crate__api__merged__nt_create_external_message( int port_, @@ -4943,21 +7917,27 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_create_external_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Uint32)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_create_external_message'); + late final _wire__crate__api__merged__nt_create_external_messagePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Uint32, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_create_external_message', + ); late final _wire__crate__api__merged__nt_create_external_message = - _wire__crate__api__merged__nt_create_external_messagePtr.asFunction< - void Function( + _wire__crate__api__merged__nt_create_external_messagePtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, @@ -4965,7 +7945,9 @@ class NekotonBridgeWire implements BaseWire { ffi.Pointer, ffi.Pointer, ffi.Pointer, - int)>(); + int, + ) + >(); void wire__crate__api__merged__nt_create_external_message_without_signature( int port_, @@ -4989,27 +7971,33 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__nt_create_external_message_without_signaturePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Uint32)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_create_external_message_without_signature'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Uint32, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_create_external_message_without_signature', + ); late final _wire__crate__api__merged__nt_create_external_message_without_signature = _wire__crate__api__merged__nt_create_external_message_without_signaturePtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); void wire__crate__api__merged__nt_create_raw_external_message( int port_, @@ -5027,23 +8015,31 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_create_raw_external_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Uint32)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_create_raw_external_message'); + late final _wire__crate__api__merged__nt_create_raw_external_messagePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Uint32, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_create_raw_external_message', + ); late final _wire__crate__api__merged__nt_create_raw_external_message = - _wire__crate__api__merged__nt_create_raw_external_messagePtr.asFunction< - void Function( + _wire__crate__api__merged__nt_create_raw_external_messagePtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, ffi.Pointer, - int)>(); + int, + ) + >(); void wire__crate__api__merged__nt_decode_event( int port_, @@ -5059,21 +8055,27 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_decode_eventPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_decode_event'); + late final _wire__crate__api__merged__nt_decode_eventPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_decode_event'); late final _wire__crate__api__merged__nt_decode_event = - _wire__crate__api__merged__nt_decode_eventPtr.asFunction< - void Function( + _wire__crate__api__merged__nt_decode_eventPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__nt_decode_input( int port_, @@ -5091,23 +8093,29 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_decode_inputPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_decode_input'); + late final _wire__crate__api__merged__nt_decode_inputPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_decode_input'); late final _wire__crate__api__merged__nt_decode_input = - _wire__crate__api__merged__nt_decode_inputPtr.asFunction< - void Function( + _wire__crate__api__merged__nt_decode_inputPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, ffi.Pointer, - bool)>(); + bool, + ) + >(); void wire__crate__api__merged__nt_decode_output( int port_, @@ -5123,21 +8131,27 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_decode_outputPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_decode_output'); + late final _wire__crate__api__merged__nt_decode_outputPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_decode_output'); late final _wire__crate__api__merged__nt_decode_output = - _wire__crate__api__merged__nt_decode_outputPtr.asFunction< - void Function( + _wire__crate__api__merged__nt_decode_outputPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__nt_decode_transaction( int port_, @@ -5153,21 +8167,29 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_decode_transactionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_decode_transaction'); + late final _wire__crate__api__merged__nt_decode_transactionPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_decode_transaction', + ); late final _wire__crate__api__merged__nt_decode_transaction = - _wire__crate__api__merged__nt_decode_transactionPtr.asFunction< - void Function( + _wire__crate__api__merged__nt_decode_transactionPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__nt_decode_transaction_events( int port_, @@ -5181,17 +8203,27 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_decode_transaction_eventsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_decode_transaction_events'); + late final _wire__crate__api__merged__nt_decode_transaction_eventsPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_decode_transaction_events', + ); late final _wire__crate__api__merged__nt_decode_transaction_events = - _wire__crate__api__merged__nt_decode_transaction_eventsPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + _wire__crate__api__merged__nt_decode_transaction_eventsPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_derive_from_phrase( ffi.Pointer phrase, @@ -5203,37 +8235,50 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_derive_from_phrasePtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_derive_from_phrase'); - late final _wire__crate__api__merged__nt_derive_from_phrase = - _wire__crate__api__merged__nt_derive_from_phrasePtr.asFunction< + late final _wire__crate__api__merged__nt_derive_from_phrasePtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_derive_from_phrase', + ); + late final _wire__crate__api__merged__nt_derive_from_phrase = + _wire__crate__api__merged__nt_derive_from_phrasePtr + .asFunction< + WireSyncRust2DartDco Function( ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_encode_comment( ffi.Pointer comment, bool plain, ) { - return _wire__crate__api__merged__nt_encode_comment( - comment, - plain, - ); + return _wire__crate__api__merged__nt_encode_comment(comment, plain); } - late final _wire__crate__api__merged__nt_encode_commentPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_encode_comment'); - late final _wire__crate__api__merged__nt_encode_comment = - _wire__crate__api__merged__nt_encode_commentPtr.asFunction< + late final _wire__crate__api__merged__nt_encode_commentPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer, bool)>(); + ffi.Pointer, + ffi.Bool, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_encode_comment'); + late final _wire__crate__api__merged__nt_encode_comment = + _wire__crate__api__merged__nt_encode_commentPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + bool, + ) + >(); void wire__crate__api__merged__nt_encode_internal_input( int port_, @@ -5249,21 +8294,29 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_encode_internal_inputPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_encode_internal_input'); + late final _wire__crate__api__merged__nt_encode_internal_inputPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_encode_internal_input', + ); late final _wire__crate__api__merged__nt_encode_internal_input = - _wire__crate__api__merged__nt_encode_internal_inputPtr.asFunction< - void Function( + _wire__crate__api__merged__nt_encode_internal_inputPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__nt_encode_internal_message( int port_, @@ -5287,21 +8340,27 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_encode_internal_messagePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_encode_internal_message'); + late final _wire__crate__api__merged__nt_encode_internal_messagePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_encode_internal_message', + ); late final _wire__crate__api__merged__nt_encode_internal_message = - _wire__crate__api__merged__nt_encode_internal_messagePtr.asFunction< - void Function( + _wire__crate__api__merged__nt_encode_internal_messagePtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, @@ -5309,7 +8368,9 @@ class NekotonBridgeWire implements BaseWire { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__nt_execute_local( int port_, @@ -5333,21 +8394,25 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_execute_localPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Uint32, - ffi.Bool, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_execute_local'); + late final _wire__crate__api__merged__nt_execute_localPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Uint32, + ffi.Bool, + ffi.Pointer, + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_execute_local'); late final _wire__crate__api__merged__nt_execute_local = - _wire__crate__api__merged__nt_execute_localPtr.asFunction< - void Function( + _wire__crate__api__merged__nt_execute_localPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, @@ -5355,96 +8420,119 @@ class NekotonBridgeWire implements BaseWire { int, bool, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_extract_public_key( ffi.Pointer boc, ) { - return _wire__crate__api__merged__nt_extract_public_key( - boc, - ); + return _wire__crate__api__merged__nt_extract_public_key(boc); } - late final _wire__crate__api__merged__nt_extract_public_keyPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_extract_public_key'); - late final _wire__crate__api__merged__nt_extract_public_key = - _wire__crate__api__merged__nt_extract_public_keyPtr.asFunction< + late final _wire__crate__api__merged__nt_extract_public_keyPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_extract_public_key', + ); + late final _wire__crate__api__merged__nt_extract_public_key = + _wire__crate__api__merged__nt_extract_public_keyPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_generate_key( ffi.Pointer account_type, ) { - return _wire__crate__api__merged__nt_generate_key( - account_type, - ); + return _wire__crate__api__merged__nt_generate_key(account_type); } - late final _wire__crate__api__merged__nt_generate_keyPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_generate_key'); + late final _wire__crate__api__merged__nt_generate_keyPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_generate_key'); late final _wire__crate__api__merged__nt_generate_key = - _wire__crate__api__merged__nt_generate_keyPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); + _wire__crate__api__merged__nt_generate_keyPtr + .asFunction< + WireSyncRust2DartDco Function(ffi.Pointer) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_get_boc_hash( ffi.Pointer boc, ) { - return _wire__crate__api__merged__nt_get_boc_hash( - boc, - ); + return _wire__crate__api__merged__nt_get_boc_hash(boc); } - late final _wire__crate__api__merged__nt_get_boc_hashPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_get_boc_hash'); - late final _wire__crate__api__merged__nt_get_boc_hash = - _wire__crate__api__merged__nt_get_boc_hashPtr.asFunction< + late final _wire__crate__api__merged__nt_get_boc_hashPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_get_boc_hash'); + late final _wire__crate__api__merged__nt_get_boc_hash = + _wire__crate__api__merged__nt_get_boc_hashPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_get_code_salt( ffi.Pointer code, ) { - return _wire__crate__api__merged__nt_get_code_salt( - code, - ); + return _wire__crate__api__merged__nt_get_code_salt(code); } - late final _wire__crate__api__merged__nt_get_code_saltPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_get_code_salt'); - late final _wire__crate__api__merged__nt_get_code_salt = - _wire__crate__api__merged__nt_get_code_saltPtr.asFunction< + late final _wire__crate__api__merged__nt_get_code_saltPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_get_code_salt'); + late final _wire__crate__api__merged__nt_get_code_salt = + _wire__crate__api__merged__nt_get_code_saltPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_get_contract_type_number( ffi.Pointer wallet_type, ) { - return _wire__crate__api__merged__nt_get_contract_type_number( - wallet_type, - ); + return _wire__crate__api__merged__nt_get_contract_type_number(wallet_type); } - late final _wire__crate__api__merged__nt_get_contract_type_numberPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_get_contract_type_number'); - late final _wire__crate__api__merged__nt_get_contract_type_number = - _wire__crate__api__merged__nt_get_contract_type_numberPtr.asFunction< + late final _wire__crate__api__merged__nt_get_contract_type_numberPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_get_contract_type_number', + ); + late final _wire__crate__api__merged__nt_get_contract_type_number = + _wire__crate__api__merged__nt_get_contract_type_numberPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + >(); void wire__crate__api__merged__nt_get_expected_address( int port_, @@ -5464,43 +8552,55 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_get_expected_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Int8, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_get_expected_address'); + late final _wire__crate__api__merged__nt_get_expected_addressPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Int8, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_get_expected_address', + ); late final _wire__crate__api__merged__nt_get_expected_address = - _wire__crate__api__merged__nt_get_expected_addressPtr.asFunction< - void Function( + _wire__crate__api__merged__nt_get_expected_addressPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, int, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_get_hints( ffi.Pointer input, ) { - return _wire__crate__api__merged__nt_get_hints( - input, - ); + return _wire__crate__api__merged__nt_get_hints(input); } - late final _wire__crate__api__merged__nt_get_hintsPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_get_hints'); - late final _wire__crate__api__merged__nt_get_hints = - _wire__crate__api__merged__nt_get_hintsPtr.asFunction< + late final _wire__crate__api__merged__nt_get_hintsPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_get_hints'); + late final _wire__crate__api__merged__nt_get_hints = + _wire__crate__api__merged__nt_get_hintsPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + >(); void wire__crate__api__merged__nt_make_full_account_boc( int port_, @@ -5512,36 +8612,47 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_make_full_account_bocPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_make_full_account_boc'); + late final _wire__crate__api__merged__nt_make_full_account_bocPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_make_full_account_boc', + ); late final _wire__crate__api__merged__nt_make_full_account_boc = - _wire__crate__api__merged__nt_make_full_account_bocPtr.asFunction< - void Function(int, ffi.Pointer)>(); + _wire__crate__api__merged__nt_make_full_account_bocPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_merge_tvc( ffi.Pointer code, ffi.Pointer data, ) { - return _wire__crate__api__merged__nt_merge_tvc( - code, - data, - ); + return _wire__crate__api__merged__nt_merge_tvc(code, data); } - late final _wire__crate__api__merged__nt_merge_tvcPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_merge_tvc'); - late final _wire__crate__api__merged__nt_merge_tvc = - _wire__crate__api__merged__nt_merge_tvcPtr.asFunction< + late final _wire__crate__api__merged__nt_merge_tvcPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_merge_tvc'); + late final _wire__crate__api__merged__nt_merge_tvc = + _wire__crate__api__merged__nt_merge_tvcPtr + .asFunction< + WireSyncRust2DartDco Function( ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_pack_address( ffi.Pointer address, @@ -5555,17 +8666,25 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_pack_addressPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, - ffi.Bool, - ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_pack_address'); - late final _wire__crate__api__merged__nt_pack_address = - _wire__crate__api__merged__nt_pack_addressPtr.asFunction< + late final _wire__crate__api__merged__nt_pack_addressPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer, bool, bool)>(); + ffi.Pointer, + ffi.Bool, + ffi.Bool, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_pack_address'); + late final _wire__crate__api__merged__nt_pack_address = + _wire__crate__api__merged__nt_pack_addressPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + bool, + bool, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_pack_into_cell( ffi.Pointer params, @@ -5579,19 +8698,25 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_pack_into_cellPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_pack_into_cell'); - late final _wire__crate__api__merged__nt_pack_into_cell = - _wire__crate__api__merged__nt_pack_into_cellPtr.asFunction< + late final _wire__crate__api__merged__nt_pack_into_cellPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_pack_into_cell'); + late final _wire__crate__api__merged__nt_pack_into_cell = + _wire__crate__api__merged__nt_pack_into_cellPtr + .asFunction< + WireSyncRust2DartDco Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_pack_std_smc_addr( ffi.Pointer addr, @@ -5605,72 +8730,95 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_pack_std_smc_addrPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, - ffi.Bool, - ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_pack_std_smc_addr'); - late final _wire__crate__api__merged__nt_pack_std_smc_addr = - _wire__crate__api__merged__nt_pack_std_smc_addrPtr.asFunction< + late final _wire__crate__api__merged__nt_pack_std_smc_addrPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer, bool, bool)>(); + ffi.Pointer, + ffi.Bool, + ffi.Bool, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_pack_std_smc_addr'); + late final _wire__crate__api__merged__nt_pack_std_smc_addr = + _wire__crate__api__merged__nt_pack_std_smc_addrPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + bool, + bool, + ) + >(); void wire__crate__api__merged__nt_parse_full_account_boc( int port_, ffi.Pointer account, ) { - return _wire__crate__api__merged__nt_parse_full_account_boc( - port_, - account, - ); + return _wire__crate__api__merged__nt_parse_full_account_boc(port_, account); } - late final _wire__crate__api__merged__nt_parse_full_account_bocPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_parse_full_account_boc'); + late final _wire__crate__api__merged__nt_parse_full_account_bocPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_parse_full_account_boc', + ); late final _wire__crate__api__merged__nt_parse_full_account_boc = - _wire__crate__api__merged__nt_parse_full_account_bocPtr.asFunction< - void Function(int, ffi.Pointer)>(); + _wire__crate__api__merged__nt_parse_full_account_bocPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_parse_known_payload( ffi.Pointer payload, ) { - return _wire__crate__api__merged__nt_parse_known_payload( - payload, - ); + return _wire__crate__api__merged__nt_parse_known_payload(payload); } - late final _wire__crate__api__merged__nt_parse_known_payloadPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_parse_known_payload'); - late final _wire__crate__api__merged__nt_parse_known_payload = - _wire__crate__api__merged__nt_parse_known_payloadPtr.asFunction< + late final _wire__crate__api__merged__nt_parse_known_payloadPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_parse_known_payload', + ); + late final _wire__crate__api__merged__nt_parse_known_payload = + _wire__crate__api__merged__nt_parse_known_payloadPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_repack_address( ffi.Pointer address, ) { - return _wire__crate__api__merged__nt_repack_address( - address, - ); + return _wire__crate__api__merged__nt_repack_address(address); } - late final _wire__crate__api__merged__nt_repack_addressPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_repack_address'); - late final _wire__crate__api__merged__nt_repack_address = - _wire__crate__api__merged__nt_repack_addressPtr.asFunction< + late final _wire__crate__api__merged__nt_repack_addressPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_repack_address'); + late final _wire__crate__api__merged__nt_repack_address = + _wire__crate__api__merged__nt_repack_addressPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + >(); void wire__crate__api__merged__nt_run_getter( int port_, @@ -5692,27 +8840,33 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_run_getterPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_run_getter'); + late final _wire__crate__api__merged__nt_run_getterPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_run_getter'); late final _wire__crate__api__merged__nt_run_getter = - _wire__crate__api__merged__nt_run_getterPtr.asFunction< - void Function( + _wire__crate__api__merged__nt_run_getterPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__nt_run_local( int port_, @@ -5736,21 +8890,25 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_run_localPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_run_local'); + late final _wire__crate__api__merged__nt_run_localPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_run_local'); late final _wire__crate__api__merged__nt_run_local = - _wire__crate__api__merged__nt_run_localPtr.asFunction< - void Function( + _wire__crate__api__merged__nt_run_localPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, @@ -5758,7 +8916,9 @@ class NekotonBridgeWire implements BaseWire { ffi.Pointer, bool, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__nt_run_local_with_libs( int port_, @@ -5786,23 +8946,29 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_run_local_with_libsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.UintPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer, - ffi.Uint8, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_run_local_with_libs'); + late final _wire__crate__api__merged__nt_run_local_with_libsPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.UintPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Uint8, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_run_local_with_libs', + ); late final _wire__crate__api__merged__nt_run_local_with_libs = - _wire__crate__api__merged__nt_run_local_with_libsPtr.asFunction< - void Function( + _wire__crate__api__merged__nt_run_local_with_libsPtr + .asFunction< + void Function( int, int, ffi.Pointer, @@ -5812,47 +8978,56 @@ class NekotonBridgeWire implements BaseWire { bool, ffi.Pointer, int, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_set_code_salt( ffi.Pointer code, ffi.Pointer salt, ) { - return _wire__crate__api__merged__nt_set_code_salt( - code, - salt, - ); + return _wire__crate__api__merged__nt_set_code_salt(code, salt); } - late final _wire__crate__api__merged__nt_set_code_saltPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_set_code_salt'); - late final _wire__crate__api__merged__nt_set_code_salt = - _wire__crate__api__merged__nt_set_code_saltPtr.asFunction< + late final _wire__crate__api__merged__nt_set_code_saltPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_set_code_salt'); + late final _wire__crate__api__merged__nt_set_code_salt = + _wire__crate__api__merged__nt_set_code_saltPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_split_tvc( ffi.Pointer tvc, ) { - return _wire__crate__api__merged__nt_split_tvc( - tvc, - ); + return _wire__crate__api__merged__nt_split_tvc(tvc); } - late final _wire__crate__api__merged__nt_split_tvcPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_split_tvc'); - late final _wire__crate__api__merged__nt_split_tvc = - _wire__crate__api__merged__nt_split_tvcPtr.asFunction< + late final _wire__crate__api__merged__nt_split_tvcPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_split_tvc'); + late final _wire__crate__api__merged__nt_split_tvc = + _wire__crate__api__merged__nt_split_tvcPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + >(); void wire__crate__api__merged__nt_unpack_contract_fields( int port_, @@ -5868,18 +9043,29 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_unpack_contract_fieldsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_unpack_contract_fields'); + late final _wire__crate__api__merged__nt_unpack_contract_fieldsPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_unpack_contract_fields', + ); late final _wire__crate__api__merged__nt_unpack_contract_fields = - _wire__crate__api__merged__nt_unpack_contract_fieldsPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer, bool)>(); + _wire__crate__api__merged__nt_unpack_contract_fieldsPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + bool, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_unpack_from_cell( ffi.Pointer params, @@ -5895,21 +9081,27 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_unpack_from_cellPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_unpack_from_cell'); - late final _wire__crate__api__merged__nt_unpack_from_cell = - _wire__crate__api__merged__nt_unpack_from_cellPtr.asFunction< + late final _wire__crate__api__merged__nt_unpack_from_cellPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_unpack_from_cell'); + late final _wire__crate__api__merged__nt_unpack_from_cell = + _wire__crate__api__merged__nt_unpack_from_cellPtr + .asFunction< + WireSyncRust2DartDco Function( ffi.Pointer, ffi.Pointer, bool, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__merged__nt_unpack_init_data( int port_, @@ -5923,17 +9115,25 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_unpack_init_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_unpack_init_data'); + late final _wire__crate__api__merged__nt_unpack_init_dataPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_unpack_init_data'); late final _wire__crate__api__merged__nt_unpack_init_data = - _wire__crate__api__merged__nt_unpack_init_dataPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + _wire__crate__api__merged__nt_unpack_init_dataPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_unpack_std_smc_addr( ffi.Pointer packed, @@ -5945,33 +9145,47 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_unpack_std_smc_addrPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_unpack_std_smc_addr'); - late final _wire__crate__api__merged__nt_unpack_std_smc_addr = - _wire__crate__api__merged__nt_unpack_std_smc_addrPtr.asFunction< + late final _wire__crate__api__merged__nt_unpack_std_smc_addrPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer, bool)>(); + ffi.Pointer, + ffi.Bool, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_unpack_std_smc_addr', + ); + late final _wire__crate__api__merged__nt_unpack_std_smc_addr = + _wire__crate__api__merged__nt_unpack_std_smc_addrPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + bool, + ) + >(); WireSyncRust2DartDco wire__crate__api__merged__nt_validate_address( ffi.Pointer address, ) { - return _wire__crate__api__merged__nt_validate_address( - address, - ); + return _wire__crate__api__merged__nt_validate_address(address); } - late final _wire__crate__api__merged__nt_validate_addressPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_validate_address'); - late final _wire__crate__api__merged__nt_validate_address = - _wire__crate__api__merged__nt_validate_addressPtr.asFunction< + late final _wire__crate__api__merged__nt_validate_addressPtr = + _lookup< + ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_validate_address'); + late final _wire__crate__api__merged__nt_validate_address = + _wire__crate__api__merged__nt_validate_addressPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + >(); void wire__crate__api__merged__nt_verify_signature( int port_, @@ -5989,44 +9203,48 @@ class NekotonBridgeWire implements BaseWire { ); } - late final _wire__crate__api__merged__nt_verify_signaturePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__nt_verify_signature'); + late final _wire__crate__api__merged__nt_verify_signaturePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('frbgen_nekoton_bridge_wire__crate__api__merged__nt_verify_signature'); late final _wire__crate__api__merged__nt_verify_signature = - _wire__crate__api__merged__nt_verify_signaturePtr.asFunction< - void Function( + _wire__crate__api__merged__nt_verify_signaturePtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); WireSyncRust2DartDco - wire__crate__api__merged__proto_connection_dart_wrapper_new( - ffi.Pointer instance_hash, + wire__crate__api__merged__proto_connection_dart_wrapper_new( + ffi.Pointer on_post, ) { return _wire__crate__api__merged__proto_connection_dart_wrapper_new( - instance_hash, + on_post, ); } late final _wire__crate__api__merged__proto_connection_dart_wrapper_newPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_connection_dart_wrapper_new'); + ffi.NativeFunction)> + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_connection_dart_wrapper_new', + ); late final _wire__crate__api__merged__proto_connection_dart_wrapper_new = _wire__crate__api__merged__proto_connection_dart_wrapper_newPtr - .asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); + .asFunction)>(); void wire__crate__api__merged__proto_transport_impl_get_accounts_by_code_hash( int port_, @@ -6046,23 +9264,29 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__proto_transport_impl_get_accounts_by_code_hashPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Uint8, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_accounts_by_code_hash'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Uint8, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_accounts_by_code_hash', + ); late final _wire__crate__api__merged__proto_transport_impl_get_accounts_by_code_hash = _wire__crate__api__merged__proto_transport_impl_get_accounts_by_code_hashPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__proto_transport_impl_get_blockchain_config( int port_, @@ -6078,15 +9302,21 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__proto_transport_impl_get_blockchain_configPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_blockchain_config'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Bool, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_blockchain_config', + ); late final _wire__crate__api__merged__proto_transport_impl_get_blockchain_config = _wire__crate__api__merged__proto_transport_impl_get_blockchain_configPtr .asFunction< - void Function( - int, ffi.Pointer, bool)>(); + void Function(int, ffi.Pointer, bool) + >(); void wire__crate__api__merged__proto_transport_impl_get_contract_state( int port_, @@ -6102,17 +9332,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__proto_transport_impl_get_contract_statePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_contract_state'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_contract_state', + ); late final _wire__crate__api__merged__proto_transport_impl_get_contract_state = _wire__crate__api__merged__proto_transport_impl_get_contract_statePtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__proto_transport_impl_get_dst_transaction( int port_, @@ -6128,17 +9366,25 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__proto_transport_impl_get_dst_transactionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_dst_transaction'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_dst_transaction', + ); late final _wire__crate__api__merged__proto_transport_impl_get_dst_transaction = _wire__crate__api__merged__proto_transport_impl_get_dst_transactionPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__merged__proto_transport_impl_get_fee_factors( int port_, @@ -6154,2522 +9400,3195 @@ class NekotonBridgeWire implements BaseWire { late final _wire__crate__api__merged__proto_transport_impl_get_fee_factorsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_fee_factors'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Bool, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_fee_factors', + ); late final _wire__crate__api__merged__proto_transport_impl_get_fee_factors = _wire__crate__api__merged__proto_transport_impl_get_fee_factorsPtr .asFunction< - void Function( - int, ffi.Pointer, bool)>(); + void Function(int, ffi.Pointer, bool) + >(); void wire__crate__api__merged__proto_transport_impl_get_full_contract_state( int port_, ffi.Pointer that, ffi.Pointer address, ) { - return _wire__crate__api__merged__proto_transport_impl_get_full_contract_state( + return _wire__crate__api__merged__proto_transport_impl_get_full_contract_state( + port_, + that, + address, + ); + } + + late final _wire__crate__api__merged__proto_transport_impl_get_full_contract_statePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_full_contract_state', + ); + late final _wire__crate__api__merged__proto_transport_impl_get_full_contract_state = + _wire__crate__api__merged__proto_transport_impl_get_full_contract_statePtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + void wire__crate__api__merged__proto_transport_impl_get_network_id( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__merged__proto_transport_impl_get_network_id( + port_, + that, + ); + } + + late final _wire__crate__api__merged__proto_transport_impl_get_network_idPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_network_id', + ); + late final _wire__crate__api__merged__proto_transport_impl_get_network_id = + _wire__crate__api__merged__proto_transport_impl_get_network_idPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); + + void wire__crate__api__merged__proto_transport_impl_get_signature_id( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__merged__proto_transport_impl_get_signature_id( + port_, + that, + ); + } + + late final _wire__crate__api__merged__proto_transport_impl_get_signature_idPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_signature_id', + ); + late final _wire__crate__api__merged__proto_transport_impl_get_signature_id = + _wire__crate__api__merged__proto_transport_impl_get_signature_idPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); + + void wire__crate__api__merged__proto_transport_impl_get_transaction( + int port_, + ffi.Pointer that, + ffi.Pointer hash, + ) { + return _wire__crate__api__merged__proto_transport_impl_get_transaction( + port_, + that, + hash, + ); + } + + late final _wire__crate__api__merged__proto_transport_impl_get_transactionPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_transaction', + ); + late final _wire__crate__api__merged__proto_transport_impl_get_transaction = + _wire__crate__api__merged__proto_transport_impl_get_transactionPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + void wire__crate__api__merged__proto_transport_impl_get_transactions( + int port_, + ffi.Pointer that, + ffi.Pointer address, + ffi.Pointer from_lt, + int count, + ) { + return _wire__crate__api__merged__proto_transport_impl_get_transactions( + port_, + that, + address, + from_lt, + count, + ); + } + + late final _wire__crate__api__merged__proto_transport_impl_get_transactionsPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Uint8, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_transactions', + ); + late final _wire__crate__api__merged__proto_transport_impl_get_transactions = + _wire__crate__api__merged__proto_transport_impl_get_transactionsPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); + + WireSyncRust2DartDco wire__crate__api__merged__proto_transport_impl_new( + ffi.Pointer proto_connection, + ) { + return _wire__crate__api__merged__proto_transport_impl_new( + proto_connection, + ); + } + + late final _wire__crate__api__merged__proto_transport_impl_newPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_new', + ); + late final _wire__crate__api__merged__proto_transport_impl_new = + _wire__crate__api__merged__proto_transport_impl_newPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ) + >(); + + void wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree( + int port_, + ffi.Pointer that, + ffi.Pointer signed_message, + ffi.Pointer ignored_compute_phase_codes, + ffi.Pointer ignored_action_phase_codes, + ) { + return _wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree( + port_, + that, + signed_message, + ignored_compute_phase_codes, + ignored_action_phase_codes, + ); + } + + late final _wire__crate__api__merged__proto_transport_impl_simulate_transaction_treePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree', + ); + late final _wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree = + _wire__crate__api__merged__proto_transport_impl_simulate_transaction_treePtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + void wire__crate__api__merged__set_clock_offset(int port_, int offset_ms) { + return _wire__crate__api__merged__set_clock_offset(port_, offset_ms); + } + + late final _wire__crate__api__merged__set_clock_offsetPtr = + _lookup>( + 'frbgen_nekoton_bridge_wire__crate__api__merged__set_clock_offset', + ); + late final _wire__crate__api__merged__set_clock_offset = + _wire__crate__api__merged__set_clock_offsetPtr + .asFunction(); + + WireSyncRust2DartDco wire__crate__api__merged__storage_dart_wrapper_new( + ffi.Pointer on_get, + ffi.Pointer on_set, + ffi.Pointer on_set_unchecked, + ffi.Pointer on_remove, + ffi.Pointer on_remove_unchecked, + ) { + return _wire__crate__api__merged__storage_dart_wrapper_new( + on_get, + on_set, + on_set_unchecked, + on_remove, + on_remove_unchecked, + ); + } + + late final _wire__crate__api__merged__storage_dart_wrapper_newPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__storage_dart_wrapper_new', + ); + late final _wire__crate__api__merged__storage_dart_wrapper_new = + _wire__crate__api__merged__storage_dart_wrapper_newPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + void wire__crate__api__merged__token_wallet_dart_wrapper_address( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__merged__token_wallet_dart_wrapper_address( + port_, + that, + ); + } + + late final _wire__crate__api__merged__token_wallet_dart_wrapper_addressPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_address', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_address = + _wire__crate__api__merged__token_wallet_dart_wrapper_addressPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); + + void wire__crate__api__merged__token_wallet_dart_wrapper_balance( + int port_, + ffi.Pointer that, + ) { + return _wire__crate__api__merged__token_wallet_dart_wrapper_balance( port_, that, - address, ); } - late final _wire__crate__api__merged__proto_transport_impl_get_full_contract_statePtr = + late final _wire__crate__api__merged__token_wallet_dart_wrapper_balancePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_full_contract_state'); - late final _wire__crate__api__merged__proto_transport_impl_get_full_contract_state = - _wire__crate__api__merged__proto_transport_impl_get_full_contract_statePtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_balance', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_balance = + _wire__crate__api__merged__token_wallet_dart_wrapper_balancePtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__proto_transport_impl_get_network_id( + void wire__crate__api__merged__token_wallet_dart_wrapper_contract_state( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire__crate__api__merged__proto_transport_impl_get_network_id( + return _wire__crate__api__merged__token_wallet_dart_wrapper_contract_state( port_, that, ); } - late final _wire__crate__api__merged__proto_transport_impl_get_network_idPtr = + late final _wire__crate__api__merged__token_wallet_dart_wrapper_contract_statePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_network_id'); - late final _wire__crate__api__merged__proto_transport_impl_get_network_id = - _wire__crate__api__merged__proto_transport_impl_get_network_idPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_contract_state', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_contract_state = + _wire__crate__api__merged__token_wallet_dart_wrapper_contract_statePtr .asFunction< - void Function(int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__proto_transport_impl_get_signature_id( + void + wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount( int port_, - ffi.Pointer that, + ffi.Pointer that, + ffi.Pointer destination, + ffi.Pointer amount, + bool notify_receiver, + ffi.Pointer payload, ) { - return _wire__crate__api__merged__proto_transport_impl_get_signature_id( + return _wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount( port_, that, + destination, + amount, + notify_receiver, + payload, ); } - late final _wire__crate__api__merged__proto_transport_impl_get_signature_idPtr = + late final _wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amountPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_signature_id'); - late final _wire__crate__api__merged__proto_transport_impl_get_signature_id = - _wire__crate__api__merged__proto_transport_impl_get_signature_idPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount = + _wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amountPtr .asFunction< - void Function(int, ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__proto_transport_impl_get_transaction( + void + wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details( int port_, - ffi.Pointer that, - ffi.Pointer hash, + int transport, + ffi.Pointer token_root_address, ) { - return _wire__crate__api__merged__proto_transport_impl_get_transaction( + return _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details( port_, - that, - hash, + transport, + token_root_address, ); } - late final _wire__crate__api__merged__proto_transport_impl_get_transactionPtr = + late final _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_detailsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_transaction'); - late final _wire__crate__api__merged__proto_transport_impl_get_transaction = - _wire__crate__api__merged__proto_transport_impl_get_transactionPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.UintPtr, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details = + _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_detailsPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function(int, int, ffi.Pointer) + >(); - void wire__crate__api__merged__proto_transport_impl_get_transactions( + void + wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet( int port_, - ffi.Pointer that, - ffi.Pointer address, - ffi.Pointer from_lt, - int count, + int transport, + ffi.Pointer token_wallet_address, ) { - return _wire__crate__api__merged__proto_transport_impl_get_transactions( + return _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet( port_, - that, - address, - from_lt, - count, + transport, + token_wallet_address, ); } - late final _wire__crate__api__merged__proto_transport_impl_get_transactionsPtr = + late final _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_walletPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Uint8)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_get_transactions'); - late final _wire__crate__api__merged__proto_transport_impl_get_transactions = - _wire__crate__api__merged__proto_transport_impl_get_transactionsPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.UintPtr, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet = + _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_walletPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + void Function(int, int, ffi.Pointer) + >(); - WireSyncRust2DartDco wire__crate__api__merged__proto_transport_impl_new( - ffi.Pointer proto_connection, + void + wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details( + int port_, + int transport, + ffi.Pointer address, ) { - return _wire__crate__api__merged__proto_transport_impl_new( - proto_connection, + return _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details( + port_, + transport, + address, ); } - late final _wire__crate__api__merged__proto_transport_impl_newPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_new'); - late final _wire__crate__api__merged__proto_transport_impl_new = - _wire__crate__api__merged__proto_transport_impl_newPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_detailsPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.UintPtr, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details = + _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_detailsPtr + .asFunction< + void Function(int, int, ffi.Pointer) + >(); - void wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree( + void wire__crate__api__merged__token_wallet_dart_wrapper_handle_block( int port_, - ffi.Pointer that, - ffi.Pointer signed_message, - ffi.Pointer ignored_compute_phase_codes, - ffi.Pointer ignored_action_phase_codes, + ffi.Pointer that, + ffi.Pointer block, ) { - return _wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree( + return _wire__crate__api__merged__token_wallet_dart_wrapper_handle_block( port_, that, - signed_message, - ignored_compute_phase_codes, - ignored_action_phase_codes, + block, ); } - late final _wire__crate__api__merged__proto_transport_impl_simulate_transaction_treePtr = + late final _wire__crate__api__merged__token_wallet_dart_wrapper_handle_blockPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree'); - late final _wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree = - _wire__crate__api__merged__proto_transport_impl_simulate_transaction_treePtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_handle_block', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_handle_block = + _wire__crate__api__merged__token_wallet_dart_wrapper_handle_blockPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__set_clock_offset( + void wire__crate__api__merged__token_wallet_dart_wrapper_owner( int port_, - int offset_ms, + ffi.Pointer that, ) { - return _wire__crate__api__merged__set_clock_offset( + return _wire__crate__api__merged__token_wallet_dart_wrapper_owner( port_, - offset_ms, + that, ); } - late final _wire__crate__api__merged__set_clock_offsetPtr = - _lookup>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__set_clock_offset'); - late final _wire__crate__api__merged__set_clock_offset = - _wire__crate__api__merged__set_clock_offsetPtr - .asFunction(); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_ownerPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_owner', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_owner = + _wire__crate__api__merged__token_wallet_dart_wrapper_ownerPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__simple_adder( + void wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions( int port_, - int a, - int b, + ffi.Pointer that, + ffi.Pointer from_lt, ) { - return _wire__crate__api__merged__simple_adder( + return _wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions( port_, - a, - b, + that, + from_lt, ); } - late final _wire__crate__api__merged__simple_adderPtr = _lookup< - ffi - .NativeFunction>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__simple_adder'); - late final _wire__crate__api__merged__simple_adder = - _wire__crate__api__merged__simple_adderPtr - .asFunction(); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactionsPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions = + _wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactionsPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); - WireSyncRust2DartDco wire__crate__api__merged__simple_adder_sync( - int a, - int b, + void wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer( + int port_, + ffi.Pointer that, + ffi.Pointer destination, + ffi.Pointer amount, + bool notify_receiver, + ffi.Pointer attached_amount, + ffi.Pointer payload, + ffi.Pointer remaining_gas_to, ) { - return _wire__crate__api__merged__simple_adder_sync( - a, - b, + return _wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer( + port_, + that, + destination, + amount, + notify_receiver, + attached_amount, + payload, + remaining_gas_to, ); } - late final _wire__crate__api__merged__simple_adder_syncPtr = _lookup< - ffi - .NativeFunction>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__simple_adder_sync'); - late final _wire__crate__api__merged__simple_adder_sync = - _wire__crate__api__merged__simple_adder_syncPtr - .asFunction(); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transferPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer = + _wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transferPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__simple_call_dart( + void wire__crate__api__merged__token_wallet_dart_wrapper_refresh( int port_, + ffi.Pointer that, ) { - return _wire__crate__api__merged__simple_call_dart( + return _wire__crate__api__merged__token_wallet_dart_wrapper_refresh( port_, + that, ); } - late final _wire__crate__api__merged__simple_call_dartPtr = - _lookup>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_dart'); - late final _wire__crate__api__merged__simple_call_dart = - _wire__crate__api__merged__simple_call_dartPtr - .asFunction(); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_refreshPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_refresh', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_refresh = + _wire__crate__api__merged__token_wallet_dart_wrapper_refreshPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__simple_call_func0( + void wire__crate__api__merged__token_wallet_dart_wrapper_subscribe( int port_, - bool need_result, + ffi.Pointer owner, + ffi.Pointer root_token_contract, + int transport, + bool preload_transactions, + ffi.Pointer on_balance_changed, + ffi.Pointer on_transactions_found, ) { - return _wire__crate__api__merged__simple_call_func0( + return _wire__crate__api__merged__token_wallet_dart_wrapper_subscribe( port_, - need_result, + owner, + root_token_contract, + transport, + preload_transactions, + on_balance_changed, + on_transactions_found, ); } - late final _wire__crate__api__merged__simple_call_func0Ptr = - _lookup>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_func0'); - late final _wire__crate__api__merged__simple_call_func0 = - _wire__crate__api__merged__simple_call_func0Ptr - .asFunction(); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_subscribePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.UintPtr, + ffi.Bool, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_subscribe', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_subscribe = + _wire__crate__api__merged__token_wallet_dart_wrapper_subscribePtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + bool, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__simple_call_func1( + void wire__crate__api__merged__token_wallet_dart_wrapper_symbol( int port_, - bool need_result, + ffi.Pointer that, ) { - return _wire__crate__api__merged__simple_call_func1( + return _wire__crate__api__merged__token_wallet_dart_wrapper_symbol( port_, - need_result, + that, ); } - late final _wire__crate__api__merged__simple_call_func1Ptr = - _lookup>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_func1'); - late final _wire__crate__api__merged__simple_call_func1 = - _wire__crate__api__merged__simple_call_func1Ptr - .asFunction(); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_symbolPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_symbol', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_symbol = + _wire__crate__api__merged__token_wallet_dart_wrapper_symbolPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__simple_call_func2( + void wire__crate__api__merged__token_wallet_dart_wrapper_version( int port_, + ffi.Pointer that, ) { - return _wire__crate__api__merged__simple_call_func2( + return _wire__crate__api__merged__token_wallet_dart_wrapper_version( port_, + that, ); } - late final _wire__crate__api__merged__simple_call_func2Ptr = - _lookup>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_func2'); - late final _wire__crate__api__merged__simple_call_func2 = - _wire__crate__api__merged__simple_call_func2Ptr - .asFunction(); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_versionPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_version', + ); + late final _wire__crate__api__merged__token_wallet_dart_wrapper_version = + _wire__crate__api__merged__token_wallet_dart_wrapper_versionPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__simple_call_func3( + void wire__crate__api__merged__ton_wallet_dart_wrapper_address( int port_, + ffi.Pointer that, ) { - return _wire__crate__api__merged__simple_call_func3( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_address( port_, + that, ); } - late final _wire__crate__api__merged__simple_call_func3Ptr = - _lookup>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__simple_call_func3'); - late final _wire__crate__api__merged__simple_call_func3 = - _wire__crate__api__merged__simple_call_func3Ptr - .asFunction(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_addressPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_address', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_address = + _wire__crate__api__merged__ton_wallet_dart_wrapper_addressPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__simple_log( + void + wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload( int port_, - ffi.Pointer string, + ffi.Pointer payload, + ffi.Pointer base64_signature, ) { - return _wire__crate__api__merged__simple_log( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload( port_, - string, + payload, + base64_signature, ); } - late final _wire__crate__api__merged__simple_logPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__simple_log'); - late final _wire__crate__api__merged__simple_log = - _wire__crate__api__merged__simple_logPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payloadPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload = + _wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payloadPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__simple_panic( + void wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state( int port_, + ffi.Pointer that, ) { - return _wire__crate__api__merged__simple_panic( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state( port_, + that, ); } - late final _wire__crate__api__merged__simple_panicPtr = - _lookup>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__simple_panic'); - late final _wire__crate__api__merged__simple_panic = - _wire__crate__api__merged__simple_panicPtr - .asFunction(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_contract_statePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state = + _wire__crate__api__merged__ton_wallet_dart_wrapper_contract_statePtr + .asFunction< + void Function(int, ffi.Pointer) + >(); - WireSyncRust2DartDco wire__crate__api__merged__storage_dart_wrapper_new( - ffi.Pointer instance_hash, + void wire__crate__api__merged__ton_wallet_dart_wrapper_custodians( + int port_, + ffi.Pointer that, ) { - return _wire__crate__api__merged__storage_dart_wrapper_new( - instance_hash, + return _wire__crate__api__merged__ton_wallet_dart_wrapper_custodians( + port_, + that, ); } - late final _wire__crate__api__merged__storage_dart_wrapper_newPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__storage_dart_wrapper_new'); - late final _wire__crate__api__merged__storage_dart_wrapper_new = - _wire__crate__api__merged__storage_dart_wrapper_newPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_custodiansPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_custodians', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_custodians = + _wire__crate__api__merged__ton_wallet_dart_wrapper_custodiansPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__storage_impl_new( + void wire__crate__api__merged__ton_wallet_dart_wrapper_details( int port_, - ffi.Pointer instance_hash, + ffi.Pointer that, ) { - return _wire__crate__api__merged__storage_impl_new( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_details( port_, - instance_hash, + that, ); } - late final _wire__crate__api__merged__storage_impl_newPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__storage_impl_new'); - late final _wire__crate__api__merged__storage_impl_new = - _wire__crate__api__merged__storage_impl_newPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_detailsPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_details', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_details = + _wire__crate__api__merged__ton_wallet_dart_wrapper_detailsPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__stub_call_dart( + void wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_fees( int port_, - ffi.Pointer stub, + ffi.Pointer that, + ffi.Pointer signed_message, + ffi.Pointer execution_options, ) { - return _wire__crate__api__merged__stub_call_dart( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_fees( port_, - stub, + that, + signed_message, + execution_options, ); } - late final _wire__crate__api__merged__stub_call_dartPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__stub_call_dart'); - late final _wire__crate__api__merged__stub_call_dart = - _wire__crate__api__merged__stub_call_dartPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_feesPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_fees', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_fees = + _wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_feesPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__stub_dcs( + void wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets( int port_, + int transport, + ffi.Pointer public_key, + int workchain_id, + ffi.Pointer wallet_types, ) { - return _wire__crate__api__merged__stub_dcs( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets( port_, + transport, + public_key, + workchain_id, + wallet_types, ); } - late final _wire__crate__api__merged__stub_dcsPtr = - _lookup>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__stub_dcs'); - late final _wire__crate__api__merged__stub_dcs = - _wire__crate__api__merged__stub_dcsPtr.asFunction(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_walletsPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.UintPtr, + ffi.Pointer, + ffi.Int8, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets = + _wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_walletsPtr + .asFunction< + void Function( + int, + int, + ffi.Pointer, + int, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__stub_dv( + void wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians( int port_, + int transport, + ffi.Pointer address, ) { - return _wire__crate__api__merged__stub_dv( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians( port_, + transport, + address, ); } - late final _wire__crate__api__merged__stub_dvPtr = - _lookup>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__stub_dv'); - late final _wire__crate__api__merged__stub_dv = - _wire__crate__api__merged__stub_dvPtr.asFunction(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodiansPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.UintPtr, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians = + _wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodiansPtr + .asFunction< + void Function(int, int, ffi.Pointer) + >(); - void wire__crate__api__merged__test_caller_call_test0_async( + void + wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info( int port_, - ffi.Pointer string, - bool need_result, + int transport, + ffi.Pointer address, ) { - return _wire__crate__api__merged__test_caller_call_test0_async( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info( port_, - string, - need_result, + transport, + address, ); } - late final _wire__crate__api__merged__test_caller_call_test0_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__test_caller_call_test0_async'); - late final _wire__crate__api__merged__test_caller_call_test0_async = - _wire__crate__api__merged__test_caller_call_test0_asyncPtr.asFunction< - void Function( - int, ffi.Pointer, bool)>(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_infoPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.UintPtr, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info = + _wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_infoPtr + .asFunction< + void Function(int, int, ffi.Pointer) + >(); - WireSyncRust2DartDco wire__crate__api__merged__test_caller_call_test0_sync( - ffi.Pointer string, - bool need_result, + void wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno( + int port_, + ffi.Pointer that, + ffi.Pointer raw_current_state, + ffi.Pointer public_key, ) { - return _wire__crate__api__merged__test_caller_call_test0_sync( - string, - need_result, + return _wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno( + port_, + that, + raw_current_state, + public_key, ); } - late final _wire__crate__api__merged__test_caller_call_test0_syncPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__test_caller_call_test0_sync'); - late final _wire__crate__api__merged__test_caller_call_test0_sync = - _wire__crate__api__merged__test_caller_call_test0_syncPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, bool)>(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqnoPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno = + _wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqnoPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__test_caller_call_test1_async( + void wire__crate__api__merged__ton_wallet_dart_wrapper_handle_block( int port_, - ffi.Pointer string, - bool need_result, + ffi.Pointer that, + ffi.Pointer block, ) { - return _wire__crate__api__merged__test_caller_call_test1_async( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_handle_block( port_, - string, - need_result, + that, + block, ); } - late final _wire__crate__api__merged__test_caller_call_test1_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__test_caller_call_test1_async'); - late final _wire__crate__api__merged__test_caller_call_test1_async = - _wire__crate__api__merged__test_caller_call_test1_asyncPtr.asFunction< - void Function( - int, ffi.Pointer, bool)>(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_handle_blockPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_handle_block', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_handle_block = + _wire__crate__api__merged__ton_wallet_dart_wrapper_handle_blockPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__test_logger_debug( + void wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init( int port_, - ffi.Pointer string, + ffi.Pointer that, ) { - return _wire__crate__api__merged__test_logger_debug( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init( port_, - string, + that, ); } - late final _wire__crate__api__merged__test_logger_debugPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_debug'); - late final _wire__crate__api__merged__test_logger_debug = - _wire__crate__api__merged__test_logger_debugPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_initPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init = + _wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_initPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__test_logger_error( + void wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions( int port_, - ffi.Pointer string, + ffi.Pointer that, ) { - return _wire__crate__api__merged__test_logger_error( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions( port_, - string, + that, ); } - late final _wire__crate__api__merged__test_logger_errorPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_error'); - late final _wire__crate__api__merged__test_logger_error = - _wire__crate__api__merged__test_logger_errorPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactionsPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions = + _wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactionsPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__test_logger_info( + void wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method( int port_, - ffi.Pointer string, + ffi.Pointer that, ) { - return _wire__crate__api__merged__test_logger_info( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method( port_, - string, + that, ); } - late final _wire__crate__api__merged__test_logger_infoPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_info'); - late final _wire__crate__api__merged__test_logger_info = - _wire__crate__api__merged__test_logger_infoPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_polling_methodPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method = + _wire__crate__api__merged__ton_wallet_dart_wrapper_polling_methodPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__test_logger_panic( + void wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions( int port_, - ffi.Pointer string, + ffi.Pointer that, + ffi.Pointer from_lt, ) { - return _wire__crate__api__merged__test_logger_panic( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions( port_, - string, + that, + from_lt, ); } - late final _wire__crate__api__merged__test_logger_panicPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_panic'); - late final _wire__crate__api__merged__test_logger_panic = - _wire__crate__api__merged__test_logger_panicPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactionsPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions = + _wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactionsPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__test_logger_warn( + void + wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction( int port_, - ffi.Pointer string, + ffi.Pointer that, + ffi.Pointer contract_state, + ffi.Pointer public_key, + ffi.Pointer transaction_id, + ffi.Pointer expiration, ) { - return _wire__crate__api__merged__test_logger_warn( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction( port_, - string, + that, + contract_state, + public_key, + transaction_id, + expiration, ); } - late final _wire__crate__api__merged__test_logger_warnPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__test_logger_warn'); - late final _wire__crate__api__merged__test_logger_warn = - _wire__crate__api__merged__test_logger_warnPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transactionPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction = + _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transactionPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__token_wallet_dart_wrapper_address( + void wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy( int port_, - ffi.Pointer that, + ffi.Pointer that, + ffi.Pointer expiration, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_address( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy( port_, that, + expiration, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_addressPtr = + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deployPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_address'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_address = - _wire__crate__api__merged__token_wallet_dart_wrapper_addressPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy = + _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deployPtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__token_wallet_dart_wrapper_balance( + void + wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners( int port_, - ffi.Pointer that, + ffi.Pointer that, + ffi.Pointer expiration, + ffi.Pointer custodians, + int req_confirms, + ffi.Pointer expiration_time, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_balance( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners( port_, that, + expiration, + custodians, + req_confirms, + expiration_time, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_balancePtr = + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_ownersPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_balance'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_balance = - _wire__crate__api__merged__token_wallet_dart_wrapper_balancePtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Uint8, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners = + _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_ownersPtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__token_wallet_dart_wrapper_contract_state( + void + wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body( int port_, - ffi.Pointer that, + ffi.Pointer that, + ffi.Pointer expiration, + ffi.Pointer params, + bool is_internal_flow, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_contract_state( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body( port_, that, + expiration, + params, + is_internal_flow, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_contract_statePtr = + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_bodyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_contract_state'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_contract_state = - _wire__crate__api__merged__token_wallet_dart_wrapper_contract_statePtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body = + _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_bodyPtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ) + >(); - void - wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount( + void wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer( int port_, - ffi.Pointer that, - ffi.Pointer destination, - ffi.Pointer amount, - bool notify_receiver, - ffi.Pointer payload, + ffi.Pointer that, + ffi.Pointer contract_state, + ffi.Pointer public_key, + ffi.Pointer expiration, + ffi.Pointer params, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer( port_, that, - destination, - amount, - notify_receiver, - payload, + contract_state, + public_key, + expiration, + params, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amountPtr = + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transferPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount = - _wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amountPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer = + _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transferPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); void - wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details( + wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body( int port_, - int transport, - ffi.Pointer token_root_address, + ffi.Pointer that, + ffi.Pointer contract_state, + ffi.Pointer public_key, + ffi.Pointer expiration, + ffi.Pointer params, + bool is_internal_flow, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body( port_, - transport, - token_root_address, + that, + contract_state, + public_key, + expiration, + params, + is_internal_flow, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_detailsPtr = + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_bodyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.UintPtr, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details = - _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_detailsPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body = + _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_bodyPtr .asFunction< - void Function( - int, int, ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ) + >(); - void - wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet( + void wire__crate__api__merged__ton_wallet_dart_wrapper_public_key( int port_, - int transport, - ffi.Pointer token_wallet_address, + ffi.Pointer that, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_public_key( port_, - transport, - token_wallet_address, + that, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_walletPtr = + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_public_keyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.UintPtr, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet = - _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_walletPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_public_key', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_public_key = + _wire__crate__api__merged__ton_wallet_dart_wrapper_public_keyPtr .asFunction< - void Function( - int, int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); - void - wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details( + void wire__crate__api__merged__ton_wallet_dart_wrapper_refresh( int port_, - int transport, - ffi.Pointer address, + ffi.Pointer that, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_refresh( port_, - transport, - address, + that, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_detailsPtr = + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_refreshPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.UintPtr, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details = - _wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_detailsPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_refresh', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_refresh = + _wire__crate__api__merged__ton_wallet_dart_wrapper_refreshPtr .asFunction< - void Function( - int, int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__token_wallet_dart_wrapper_handle_block( + void wire__crate__api__merged__ton_wallet_dart_wrapper_send( int port_, - ffi.Pointer that, - ffi.Pointer block, + ffi.Pointer that, + ffi.Pointer signed_message, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_handle_block( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_send( port_, that, - block, + signed_message, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_handle_blockPtr = + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_sendPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_handle_block'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_handle_block = - _wire__crate__api__merged__token_wallet_dart_wrapper_handle_blockPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_send', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_send = + _wire__crate__api__merged__ton_wallet_dart_wrapper_sendPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__token_wallet_dart_wrapper_owner( + void wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe( int port_, - ffi.Pointer that, + int workchain_id, + ffi.Pointer public_key, + ffi.Pointer wallet_type, + int transport, + ffi.Pointer on_message_sent, + ffi.Pointer on_message_expired, + ffi.Pointer on_state_changed, + ffi.Pointer on_transactions_found, + ffi.Pointer on_details_changed, + ffi.Pointer on_custodians_changed, + ffi.Pointer on_unconfirmed_transactions_changed, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_owner( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe( port_, - that, + workchain_id, + public_key, + wallet_type, + transport, + on_message_sent, + on_message_expired, + on_state_changed, + on_transactions_found, + on_details_changed, + on_custodians_changed, + on_unconfirmed_transactions_changed, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_ownerPtr = + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_owner'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_owner = - _wire__crate__api__merged__token_wallet_dart_wrapper_ownerPtr.asFunction< - void Function( - int, ffi.Pointer)>(); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Int8, + ffi.Pointer, + ffi.Pointer, + ffi.UintPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe = + _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribePtr + .asFunction< + void Function( + int, + int, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions( + void wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address( int port_, - ffi.Pointer that, - ffi.Pointer from_lt, + ffi.Pointer address, + int transport, + ffi.Pointer on_message_sent, + ffi.Pointer on_message_expired, + ffi.Pointer on_state_changed, + ffi.Pointer on_transactions_found, + ffi.Pointer on_details_changed, + ffi.Pointer on_custodians_changed, + ffi.Pointer on_unconfirmed_transactions_changed, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address( port_, - that, - from_lt, + address, + transport, + on_message_sent, + on_message_expired, + on_state_changed, + on_transactions_found, + on_details_changed, + on_custodians_changed, + on_unconfirmed_transactions_changed, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactionsPtr = + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions = - _wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactionsPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.UintPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address = + _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_addressPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer( + void wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing( int port_, - ffi.Pointer that, - ffi.Pointer destination, - ffi.Pointer amount, - bool notify_receiver, - ffi.Pointer attached_amount, - ffi.Pointer payload, - ffi.Pointer remaining_gas_to, + ffi.Pointer existing_wallet, + int transport, + ffi.Pointer on_message_sent, + ffi.Pointer on_message_expired, + ffi.Pointer on_state_changed, + ffi.Pointer on_transactions_found, + ffi.Pointer on_details_changed, + ffi.Pointer on_custodians_changed, + ffi.Pointer on_unconfirmed_transactions_changed, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing( port_, - that, - destination, - amount, - notify_receiver, - attached_amount, - payload, - remaining_gas_to, + existing_wallet, + transport, + on_message_sent, + on_message_expired, + on_state_changed, + on_transactions_found, + on_details_changed, + on_custodians_changed, + on_unconfirmed_transactions_changed, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transferPtr = + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existingPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer = - _wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transferPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.UintPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing = + _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existingPtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__token_wallet_dart_wrapper_refresh( + void + wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_refresh( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions( port_, that, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_refreshPtr = + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactionsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_refresh'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_refresh = - _wire__crate__api__merged__token_wallet_dart_wrapper_refreshPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions = + _wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactionsPtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__token_wallet_dart_wrapper_subscribe( + void wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_type( int port_, - ffi.Pointer instance_hash, - ffi.Pointer owner, - ffi.Pointer root_token_contract, - int transport, - bool preload_transactions, + ffi.Pointer that, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_subscribe( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_type( port_, - instance_hash, - owner, - root_token_contract, - transport, - preload_transactions, + that, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_subscribePtr = + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_typePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UintPtr, - ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_subscribe'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_subscribe = - _wire__crate__api__merged__token_wallet_dart_wrapper_subscribePtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_type', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_type = + _wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_typePtr .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - bool)>(); + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__token_wallet_dart_wrapper_symbol( + void wire__crate__api__merged__ton_wallet_dart_wrapper_workchain( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_symbol( + return _wire__crate__api__merged__ton_wallet_dart_wrapper_workchain( port_, that, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_symbolPtr = + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_workchainPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_symbol'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_symbol = - _wire__crate__api__merged__token_wallet_dart_wrapper_symbolPtr.asFunction< - void Function( - int, ffi.Pointer)>(); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_workchain', + ); + late final _wire__crate__api__merged__ton_wallet_dart_wrapper_workchain = + _wire__crate__api__merged__ton_wallet_dart_wrapper_workchainPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__token_wallet_dart_wrapper_version( + void wire__crate__api__merged__unsigned_message_impl_expire_at( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire__crate__api__merged__token_wallet_dart_wrapper_version( + return _wire__crate__api__merged__unsigned_message_impl_expire_at( port_, that, ); } - late final _wire__crate__api__merged__token_wallet_dart_wrapper_versionPtr = + late final _wire__crate__api__merged__unsigned_message_impl_expire_atPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__token_wallet_dart_wrapper_version'); - late final _wire__crate__api__merged__token_wallet_dart_wrapper_version = - _wire__crate__api__merged__token_wallet_dart_wrapper_versionPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__unsigned_message_impl_expire_at', + ); + late final _wire__crate__api__merged__unsigned_message_impl_expire_at = + _wire__crate__api__merged__unsigned_message_impl_expire_atPtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_address( + void wire__crate__api__merged__unsigned_message_impl_hash( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_address( - port_, - that, - ); + return _wire__crate__api__merged__unsigned_message_impl_hash(port_, that); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_addressPtr = + late final _wire__crate__api__merged__unsigned_message_impl_hashPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_address'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_address = - _wire__crate__api__merged__ton_wallet_dart_wrapper_addressPtr.asFunction< - void Function(int, ffi.Pointer)>(); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__unsigned_message_impl_hash', + ); + late final _wire__crate__api__merged__unsigned_message_impl_hash = + _wire__crate__api__merged__unsigned_message_impl_hashPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); - void - wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload( + void wire__crate__api__merged__unsigned_message_impl_refresh_timeout( int port_, - ffi.Pointer payload, - ffi.Pointer base64_signature, + ffi.Pointer that, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload( + return _wire__crate__api__merged__unsigned_message_impl_refresh_timeout( port_, - payload, - base64_signature, + that, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payloadPtr = + late final _wire__crate__api__merged__unsigned_message_impl_refresh_timeoutPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload = - _wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payloadPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__unsigned_message_impl_refresh_timeout', + ); + late final _wire__crate__api__merged__unsigned_message_impl_refresh_timeout = + _wire__crate__api__merged__unsigned_message_impl_refresh_timeoutPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state( + void wire__crate__api__merged__unsigned_message_impl_sign( int port_, - ffi.Pointer that, + ffi.Pointer that, + ffi.Pointer signature, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state( + return _wire__crate__api__merged__unsigned_message_impl_sign( port_, that, + signature, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_contract_statePtr = + late final _wire__crate__api__merged__unsigned_message_impl_signPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state = - _wire__crate__api__merged__ton_wallet_dart_wrapper_contract_statePtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__unsigned_message_impl_sign', + ); + late final _wire__crate__api__merged__unsigned_message_impl_sign = + _wire__crate__api__merged__unsigned_message_impl_signPtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_custodians( + void wire__crate__api__merged__unsigned_message_impl_sign_fake( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_custodians( + return _wire__crate__api__merged__unsigned_message_impl_sign_fake( port_, that, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_custodiansPtr = + late final _wire__crate__api__merged__unsigned_message_impl_sign_fakePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_custodians'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_custodians = - _wire__crate__api__merged__ton_wallet_dart_wrapper_custodiansPtr + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_nekoton_bridge_wire__crate__api__merged__unsigned_message_impl_sign_fake', + ); + late final _wire__crate__api__merged__unsigned_message_impl_sign_fake = + _wire__crate__api__merged__unsigned_message_impl_sign_fakePtr .asFunction< - void Function( - int, ffi.Pointer)>(); + void Function(int, ffi.Pointer) + >(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_details( - int port_, - ffi.Pointer that, + void rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_details( - port_, - that, + return _rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_detailsPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_details'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_details = - _wire__crate__api__merged__ton_wallet_dart_wrapper_detailsPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait', + ); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait = + _rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_fees( - int port_, - ffi.Pointer that, - ffi.Pointer signed_message, - ffi.Pointer execution_options, + void rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_fees( - port_, - that, - signed_message, - execution_options, + return _rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_feesPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_fees'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_fees = - _wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_feesPtr - .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait = + _rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets( - int port_, - int transport, - ffi.Pointer public_key, - int workchain_id, - ffi.Pointer wallet_types, + void rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets( - port_, - transport, - public_key, - workchain_id, - wallet_types, + return _rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_walletsPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.UintPtr, - ffi.Pointer, - ffi.Int8, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets = - _wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_walletsPtr - .asFunction< - void Function( - int, - int, - ffi.Pointer, - int, - ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait', + ); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait = + _rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians( - int port_, - int transport, - ffi.Pointer address, + void rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians( - port_, - transport, - address, + return _rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodiansPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.UintPtr, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians = - _wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodiansPtr - .asFunction< - void Function( - int, int, ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait = + _rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTraitPtr + .asFunction)>(); - void - wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info( - int port_, - int transport, - ffi.Pointer address, + void rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info( - port_, - transport, - address, + return _rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_infoPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.UintPtr, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info = - _wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_infoPtr - .asFunction< - void Function( - int, int, ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait', + ); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait = + _rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno( - int port_, - ffi.Pointer that, - ffi.Pointer raw_current_state, - ffi.Pointer public_key, + void rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno( - port_, - that, - raw_current_state, - public_key, + return _rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqnoPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno = - _wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqnoPtr - .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait = + _rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_handle_block( - int port_, - ffi.Pointer that, - ffi.Pointer block, + void rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_handle_block( - port_, - that, - block, + return _rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_handle_blockPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_handle_block'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_handle_block = - _wire__crate__api__merged__ton_wallet_dart_wrapper_handle_blockPtr - .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait', + ); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait = + _rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init( - int port_, - ffi.Pointer that, + void rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init( - port_, - that, + return _rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_initPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init = - _wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_initPtr - .asFunction< - void Function( - int, ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait = + _rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions( - int port_, - ffi.Pointer that, + void rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions( - port_, - that, + return _rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait', + ); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait = + _rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTraitPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait = + _rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTraitPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait', + ); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait = + _rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTraitPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactionsPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions = - _wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactionsPtr - .asFunction< - void Function( - int, ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait = + _rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method( - int port_, - ffi.Pointer that, + void + rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method( - port_, - that, + return _rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_polling_methodPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method = - _wire__crate__api__merged__ton_wallet_dart_wrapper_polling_methodPtr - .asFunction< - void Function( - int, ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait', + ); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait = + _rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions( - int port_, - ffi.Pointer that, - ffi.Pointer from_lt, + void + rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions( - port_, - that, - from_lt, + return _rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactionsPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions = - _wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactionsPtr - .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait = + _rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTraitPtr + .asFunction)>(); - void - wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction( - int port_, - ffi.Pointer that, - ffi.Pointer contract_state, - ffi.Pointer public_key, - ffi.Pointer transaction_id, - ffi.Pointer expiration, + void rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction( - port_, - that, - contract_state, - public_key, - transaction_id, - expiration, + return _rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transactionPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction = - _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transactionPtr - .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait', + ); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait = + _rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy( - int port_, - ffi.Pointer that, - ffi.Pointer expiration, + void rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy( - port_, - that, - expiration, + return _rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deployPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy = - _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deployPtr - .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait = + _rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTraitPtr + .asFunction)>(); - void - wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners( - int port_, - ffi.Pointer that, - ffi.Pointer expiration, - ffi.Pointer custodians, - int req_confirms, - ffi.Pointer expiration_time, + void rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners( - port_, - that, - expiration, - custodians, - req_confirms, - expiration_time, + return _rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_ownersPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Uint8, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners = - _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_ownersPtr - .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait', + ); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait = + _rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTraitPtr + .asFunction)>(); - void - wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body( - int port_, - ffi.Pointer that, - ffi.Pointer expiration, - ffi.Pointer params, - bool is_internal_flow, + void rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body( - port_, - that, - expiration, - params, - is_internal_flow, + return _rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_bodyPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body = - _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_bodyPtr - .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait = + _rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer( - int port_, - ffi.Pointer that, - ffi.Pointer contract_state, - ffi.Pointer public_key, - ffi.Pointer expiration, - ffi.Pointer params, + void rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer( - port_, - that, - contract_state, - public_key, - expiration, - params, + return _rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transferPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer = - _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transferPtr - .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait', + ); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait = + _rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTraitPtr + .asFunction)>(); - void - wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body( - int port_, - ffi.Pointer that, - ffi.Pointer contract_state, - ffi.Pointer public_key, - ffi.Pointer expiration, - ffi.Pointer params, - bool is_internal_flow, + void rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body( - port_, - that, - contract_state, - public_key, - expiration, - params, - is_internal_flow, + return _rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_bodyPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body = - _wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_bodyPtr - .asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait = + _rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_public_key( - int port_, - ffi.Pointer that, + void rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_public_key( - port_, - that, + return _rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_public_keyPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_public_key'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_public_key = - _wire__crate__api__merged__ton_wallet_dart_wrapper_public_keyPtr - .asFunction< - void Function( - int, ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait', + ); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait = + _rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_refresh( - int port_, - ffi.Pointer that, + void rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_refresh( - port_, - that, + return _rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_refreshPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_refresh'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_refresh = - _wire__crate__api__merged__ton_wallet_dart_wrapper_refreshPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__merged__ton_wallet_dart_wrapper_send( - int port_, - ffi.Pointer that, - ffi.Pointer signed_message, + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait = + _rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTraitPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_send( - port_, - that, - signed_message, + return _rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_sendPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_send'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_send = - _wire__crate__api__merged__ton_wallet_dart_wrapper_sendPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait', + ); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait = + _rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe( - int port_, - ffi.Pointer instance_hash, - int workchain_id, - ffi.Pointer public_key, - ffi.Pointer wallet_type, - int transport, + void rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe( - port_, - instance_hash, - workchain_id, - public_key, - wallet_type, - transport, + return _rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribePtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Int8, - ffi.Pointer, - ffi.Pointer, - ffi.UintPtr)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe = - _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribePtr - .asFunction< - void Function( - int, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - int)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait = + _rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address( - int port_, - ffi.Pointer instance_hash, - ffi.Pointer address, - int transport, + void rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address( - port_, - instance_hash, - address, - transport, + return _rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_addressPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.UintPtr)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address = - _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_addressPtr - .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer, int)>(); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait', + ); + late final _rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait = + _rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTraitPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing( - int port_, - ffi.Pointer instance_hash, - ffi.Pointer existing_wallet, - int transport, + void rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing( - port_, - instance_hash, - existing_wallet, - transport, + return _rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existingPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.UintPtr)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing = - _wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existingPtr - .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer, int)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTraitPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait = + _rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTraitPtr + .asFunction)>(); void - wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions( - int port_, - ffi.Pointer that, + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions( - port_, - that, + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactionsPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions = - _wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactionsPtr - .asFunction< - void Function( - int, ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSyncPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSyncPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_type( - int port_, - ffi.Pointer that, + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_type( - port_, - that, + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_typePtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_type'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_type = - _wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_typePtr - .asFunction< - void Function( - int, ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSyncPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSyncPtr + .asFunction)>(); - void wire__crate__api__merged__ton_wallet_dart_wrapper_workchain( - int port_, - ffi.Pointer that, + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__ton_wallet_dart_wrapper_workchain( - port_, - that, + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ptr, ); } - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_workchainPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__ton_wallet_dart_wrapper_workchain'); - late final _wire__crate__api__merged__ton_wallet_dart_wrapper_workchain = - _wire__crate__api__merged__ton_wallet_dart_wrapper_workchainPtr - .asFunction< - void Function( - int, ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSyncPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSyncPtr + .asFunction)>(); - void wire__crate__api__merged__unsigned_message_impl_expire_at( - int port_, - ffi.Pointer that, + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__unsigned_message_impl_expire_at( - port_, - that, + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ptr, ); } - late final _wire__crate__api__merged__unsigned_message_impl_expire_atPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__unsigned_message_impl_expire_at'); - late final _wire__crate__api__merged__unsigned_message_impl_expire_at = - _wire__crate__api__merged__unsigned_message_impl_expire_atPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSyncPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSyncPtr + .asFunction)>(); - void wire__crate__api__merged__unsigned_message_impl_hash( - int port_, - ffi.Pointer that, + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__unsigned_message_impl_hash( - port_, - that, + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ptr, ); } - late final _wire__crate__api__merged__unsigned_message_impl_hashPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__unsigned_message_impl_hash'); - late final _wire__crate__api__merged__unsigned_message_impl_hash = - _wire__crate__api__merged__unsigned_message_impl_hashPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSyncPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSyncPtr + .asFunction)>(); - void wire__crate__api__merged__unsigned_message_impl_refresh_timeout( - int port_, - ffi.Pointer that, + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__unsigned_message_impl_refresh_timeout( - port_, - that, + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ptr, ); } - late final _wire__crate__api__merged__unsigned_message_impl_refresh_timeoutPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__unsigned_message_impl_refresh_timeout'); - late final _wire__crate__api__merged__unsigned_message_impl_refresh_timeout = - _wire__crate__api__merged__unsigned_message_impl_refresh_timeoutPtr - .asFunction< - void Function( - int, ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSyncPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSyncPtr + .asFunction)>(); - void wire__crate__api__merged__unsigned_message_impl_sign( - int port_, - ffi.Pointer that, - ffi.Pointer signature, + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__unsigned_message_impl_sign( - port_, - that, - signature, + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ptr, ); } - late final _wire__crate__api__merged__unsigned_message_impl_signPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__unsigned_message_impl_sign'); - late final _wire__crate__api__merged__unsigned_message_impl_sign = - _wire__crate__api__merged__unsigned_message_impl_signPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSyncPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSyncPtr + .asFunction)>(); - void wire__crate__api__merged__unsigned_message_impl_sign_fake( - int port_, - ffi.Pointer that, + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ffi.Pointer ptr, ) { - return _wire__crate__api__merged__unsigned_message_impl_sign_fake( - port_, - that, + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ptr, ); } - late final _wire__crate__api__merged__unsigned_message_impl_sign_fakePtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_nekoton_bridge_wire__crate__api__merged__unsigned_message_impl_sign_fake'); - late final _wire__crate__api__merged__unsigned_message_impl_sign_fake = - _wire__crate__api__merged__unsigned_message_impl_sign_fakePtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSyncPtr = + _lookup)>>( + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSyncPtr + .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTraitPtr = + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSyncPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait'); - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait = - _rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSyncPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTraitPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSyncPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait'); - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait = - _rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSyncPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTraitPtr = + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSyncPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait'); - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait = - _rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSyncPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTraitPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSyncPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait'); - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait = - _rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSyncPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTraitPtr = + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSyncPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait'); - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait = - _rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSyncPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTraitPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSyncPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait'); - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait = - _rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSyncPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTraitPtr = + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSyncPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait'); - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait = - _rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSyncPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTraitPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSyncPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait'); - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait = - _rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSyncPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTraitPtr = + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait'); - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait = - _rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImplPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTraitPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait'); - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait = - _rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImplPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTraitPtr = + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait'); - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait = - _rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImplPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTraitPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait'); - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait = - _rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImplPtr .asFunction)>(); void - rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTraitPtr = + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait'); - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait = - _rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImplPtr .asFunction)>(); void - rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTraitPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait'); - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait = - _rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImplPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTraitPtr = + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait'); - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait = - _rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImplPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTraitPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait'); - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait = - _rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImplPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait( + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait( + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTraitPtr = + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait'); - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait = - _rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImplPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait( + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait( + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTraitPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait'); - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait = - _rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImplPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTraitPtr = + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait'); - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait = - _rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImplPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTraitPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait'); - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait = - _rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImplPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait( + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait( + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTraitPtr = + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait'); - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait = - _rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImplPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait( + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait( + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTraitPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait'); - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait = - _rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImplPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait( + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait( + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTraitPtr = + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait'); - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait = - _rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImplPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait( + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait( + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTraitPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait'); - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait = - _rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImplPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTraitPtr = + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait'); - late final _rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait = - _rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl', + ); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImplPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTraitPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImplPtr = _lookup)>>( - 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait'); - late final _rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait = - _rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTraitPtr + 'frbgen_nekoton_bridge_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl', + ); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImplPtr .asFunction)>(); ffi.Pointer - cst_new_box_autoadd_accounts_storage_impl() { + cst_new_box_autoadd_accounts_storage_impl() { return _cst_new_box_autoadd_accounts_storage_impl(); } - late final _cst_new_box_autoadd_accounts_storage_implPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_accounts_storage_impl'); + late final _cst_new_box_autoadd_accounts_storage_implPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >('frbgen_nekoton_bridge_cst_new_box_autoadd_accounts_storage_impl'); late final _cst_new_box_autoadd_accounts_storage_impl = _cst_new_box_autoadd_accounts_storage_implPtr .asFunction Function()>(); ffi.Pointer - cst_new_box_autoadd_bip_39_mnemonic_data() { + cst_new_box_autoadd_bip_39_mnemonic_data() { return _cst_new_box_autoadd_bip_39_mnemonic_data(); } - late final _cst_new_box_autoadd_bip_39_mnemonic_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_bip_39_mnemonic_data'); + late final _cst_new_box_autoadd_bip_39_mnemonic_dataPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >('frbgen_nekoton_bridge_cst_new_box_autoadd_bip_39_mnemonic_data'); late final _cst_new_box_autoadd_bip_39_mnemonic_data = _cst_new_box_autoadd_bip_39_mnemonic_dataPtr .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_bool( - bool value, - ) { - return _cst_new_box_autoadd_bool( - value, - ); + ffi.Pointer cst_new_box_autoadd_bool(bool value) { + return _cst_new_box_autoadd_bool(value); } late final _cst_new_box_autoadd_boolPtr = _lookup Function(ffi.Bool)>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_bool'); + 'frbgen_nekoton_bridge_cst_new_box_autoadd_bool', + ); late final _cst_new_box_autoadd_bool = _cst_new_box_autoadd_boolPtr .asFunction Function(bool)>(); - ffi.Pointer - cst_new_box_autoadd_caller_test_class() { - return _cst_new_box_autoadd_caller_test_class(); - } - - late final _cst_new_box_autoadd_caller_test_classPtr = _lookup< - ffi - .NativeFunction Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_caller_test_class'); - late final _cst_new_box_autoadd_caller_test_class = - _cst_new_box_autoadd_caller_test_classPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_dart_call_stub() { - return _cst_new_box_autoadd_dart_call_stub(); - } - - late final _cst_new_box_autoadd_dart_call_stubPtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_dart_call_stub'); - late final _cst_new_box_autoadd_dart_call_stub = - _cst_new_box_autoadd_dart_call_stubPtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_dynamic_value() { - return _cst_new_box_autoadd_dynamic_value(); - } - - late final _cst_new_box_autoadd_dynamic_valuePtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_dynamic_value'); - late final _cst_new_box_autoadd_dynamic_value = - _cst_new_box_autoadd_dynamic_valuePtr - .asFunction Function()>(); - ffi.Pointer - cst_new_box_autoadd_generic_contract_dart_wrapper() { + cst_new_box_autoadd_generic_contract_dart_wrapper() { return _cst_new_box_autoadd_generic_contract_dart_wrapper(); } - late final _cst_new_box_autoadd_generic_contract_dart_wrapperPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_generic_contract_dart_wrapper'); + late final _cst_new_box_autoadd_generic_contract_dart_wrapperPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >( + 'frbgen_nekoton_bridge_cst_new_box_autoadd_generic_contract_dart_wrapper', + ); late final _cst_new_box_autoadd_generic_contract_dart_wrapper = - _cst_new_box_autoadd_generic_contract_dart_wrapperPtr.asFunction< - ffi.Pointer Function()>(); + _cst_new_box_autoadd_generic_contract_dart_wrapperPtr + .asFunction< + ffi.Pointer Function() + >(); ffi.Pointer - cst_new_box_autoadd_gql_connection_dart_wrapper() { + cst_new_box_autoadd_gql_connection_dart_wrapper() { return _cst_new_box_autoadd_gql_connection_dart_wrapper(); } - late final _cst_new_box_autoadd_gql_connection_dart_wrapperPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_gql_connection_dart_wrapper'); + late final _cst_new_box_autoadd_gql_connection_dart_wrapperPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >( + 'frbgen_nekoton_bridge_cst_new_box_autoadd_gql_connection_dart_wrapper', + ); late final _cst_new_box_autoadd_gql_connection_dart_wrapper = - _cst_new_box_autoadd_gql_connection_dart_wrapperPtr.asFunction< - ffi.Pointer Function()>(); + _cst_new_box_autoadd_gql_connection_dart_wrapperPtr + .asFunction< + ffi.Pointer Function() + >(); ffi.Pointer - cst_new_box_autoadd_gql_transport_impl() { + cst_new_box_autoadd_gql_transport_impl() { return _cst_new_box_autoadd_gql_transport_impl(); } - late final _cst_new_box_autoadd_gql_transport_implPtr = _lookup< - ffi - .NativeFunction Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_gql_transport_impl'); + late final _cst_new_box_autoadd_gql_transport_implPtr = + _lookup< + ffi.NativeFunction Function()> + >('frbgen_nekoton_bridge_cst_new_box_autoadd_gql_transport_impl'); late final _cst_new_box_autoadd_gql_transport_impl = _cst_new_box_autoadd_gql_transport_implPtr .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_i_32( - int value, - ) { - return _cst_new_box_autoadd_i_32( - value, - ); + ffi.Pointer cst_new_box_autoadd_i_32(int value) { + return _cst_new_box_autoadd_i_32(value); } late final _cst_new_box_autoadd_i_32Ptr = _lookup Function(ffi.Int32)>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_i_32'); + 'frbgen_nekoton_bridge_cst_new_box_autoadd_i_32', + ); late final _cst_new_box_autoadd_i_32 = _cst_new_box_autoadd_i_32Ptr .asFunction Function(int)>(); ffi.Pointer - cst_new_box_autoadd_jetton_wallet_dart_wrapper() { + cst_new_box_autoadd_jetton_wallet_dart_wrapper() { return _cst_new_box_autoadd_jetton_wallet_dart_wrapper(); } - late final _cst_new_box_autoadd_jetton_wallet_dart_wrapperPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_jetton_wallet_dart_wrapper'); + late final _cst_new_box_autoadd_jetton_wallet_dart_wrapperPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >('frbgen_nekoton_bridge_cst_new_box_autoadd_jetton_wallet_dart_wrapper'); late final _cst_new_box_autoadd_jetton_wallet_dart_wrapper = - _cst_new_box_autoadd_jetton_wallet_dart_wrapperPtr.asFunction< - ffi.Pointer Function()>(); + _cst_new_box_autoadd_jetton_wallet_dart_wrapperPtr + .asFunction< + ffi.Pointer Function() + >(); ffi.Pointer - cst_new_box_autoadd_jrpc_connection_dart_wrapper() { + cst_new_box_autoadd_jrpc_connection_dart_wrapper() { return _cst_new_box_autoadd_jrpc_connection_dart_wrapper(); } - late final _cst_new_box_autoadd_jrpc_connection_dart_wrapperPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_jrpc_connection_dart_wrapper'); + late final _cst_new_box_autoadd_jrpc_connection_dart_wrapperPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >( + 'frbgen_nekoton_bridge_cst_new_box_autoadd_jrpc_connection_dart_wrapper', + ); late final _cst_new_box_autoadd_jrpc_connection_dart_wrapper = - _cst_new_box_autoadd_jrpc_connection_dart_wrapperPtr.asFunction< - ffi.Pointer Function()>(); + _cst_new_box_autoadd_jrpc_connection_dart_wrapperPtr + .asFunction< + ffi.Pointer Function() + >(); ffi.Pointer - cst_new_box_autoadd_jrpc_transport_impl() { + cst_new_box_autoadd_jrpc_transport_impl() { return _cst_new_box_autoadd_jrpc_transport_impl(); } - late final _cst_new_box_autoadd_jrpc_transport_implPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_jrpc_transport_impl'); + late final _cst_new_box_autoadd_jrpc_transport_implPtr = + _lookup< + ffi.NativeFunction Function()> + >('frbgen_nekoton_bridge_cst_new_box_autoadd_jrpc_transport_impl'); late final _cst_new_box_autoadd_jrpc_transport_impl = _cst_new_box_autoadd_jrpc_transport_implPtr .asFunction Function()>(); @@ -8680,290 +12599,267 @@ class NekotonBridgeWire implements BaseWire { late final _cst_new_box_autoadd_key_signerPtr = _lookup Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_key_signer'); + 'frbgen_nekoton_bridge_cst_new_box_autoadd_key_signer', + ); late final _cst_new_box_autoadd_key_signer = _cst_new_box_autoadd_key_signerPtr .asFunction Function()>(); ffi.Pointer - cst_new_box_autoadd_keystore_dart_wrapper() { + cst_new_box_autoadd_keystore_dart_wrapper() { return _cst_new_box_autoadd_keystore_dart_wrapper(); } - late final _cst_new_box_autoadd_keystore_dart_wrapperPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_keystore_dart_wrapper'); + late final _cst_new_box_autoadd_keystore_dart_wrapperPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >('frbgen_nekoton_bridge_cst_new_box_autoadd_keystore_dart_wrapper'); late final _cst_new_box_autoadd_keystore_dart_wrapper = _cst_new_box_autoadd_keystore_dart_wrapperPtr .asFunction Function()>(); ffi.Pointer - cst_new_box_autoadd_ledger_connection_dart_wrapper() { + cst_new_box_autoadd_ledger_connection_dart_wrapper() { return _cst_new_box_autoadd_ledger_connection_dart_wrapper(); } - late final _cst_new_box_autoadd_ledger_connection_dart_wrapperPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_ledger_connection_dart_wrapper'); + late final _cst_new_box_autoadd_ledger_connection_dart_wrapperPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >( + 'frbgen_nekoton_bridge_cst_new_box_autoadd_ledger_connection_dart_wrapper', + ); late final _cst_new_box_autoadd_ledger_connection_dart_wrapper = - _cst_new_box_autoadd_ledger_connection_dart_wrapperPtr.asFunction< - ffi.Pointer Function()>(); + _cst_new_box_autoadd_ledger_connection_dart_wrapperPtr + .asFunction< + ffi.Pointer Function() + >(); ffi.Pointer cst_new_box_autoadd_mnemonic_type() { return _cst_new_box_autoadd_mnemonic_type(); } - late final _cst_new_box_autoadd_mnemonic_typePtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_mnemonic_type'); + late final _cst_new_box_autoadd_mnemonic_typePtr = + _lookup< + ffi.NativeFunction Function()> + >('frbgen_nekoton_bridge_cst_new_box_autoadd_mnemonic_type'); late final _cst_new_box_autoadd_mnemonic_type = _cst_new_box_autoadd_mnemonic_typePtr .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_my_class() { - return _cst_new_box_autoadd_my_class(); - } - - late final _cst_new_box_autoadd_my_classPtr = - _lookup Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_my_class'); - late final _cst_new_box_autoadd_my_class = _cst_new_box_autoadd_my_classPtr - .asFunction Function()>(); - ffi.Pointer - cst_new_box_autoadd_proto_connection_dart_wrapper() { + cst_new_box_autoadd_proto_connection_dart_wrapper() { return _cst_new_box_autoadd_proto_connection_dart_wrapper(); } - late final _cst_new_box_autoadd_proto_connection_dart_wrapperPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_proto_connection_dart_wrapper'); + late final _cst_new_box_autoadd_proto_connection_dart_wrapperPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >( + 'frbgen_nekoton_bridge_cst_new_box_autoadd_proto_connection_dart_wrapper', + ); late final _cst_new_box_autoadd_proto_connection_dart_wrapper = - _cst_new_box_autoadd_proto_connection_dart_wrapperPtr.asFunction< - ffi.Pointer Function()>(); + _cst_new_box_autoadd_proto_connection_dart_wrapperPtr + .asFunction< + ffi.Pointer Function() + >(); ffi.Pointer - cst_new_box_autoadd_proto_transport_impl() { + cst_new_box_autoadd_proto_transport_impl() { return _cst_new_box_autoadd_proto_transport_impl(); } - late final _cst_new_box_autoadd_proto_transport_implPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_proto_transport_impl'); + late final _cst_new_box_autoadd_proto_transport_implPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >('frbgen_nekoton_bridge_cst_new_box_autoadd_proto_transport_impl'); late final _cst_new_box_autoadd_proto_transport_impl = _cst_new_box_autoadd_proto_transport_implPtr .asFunction Function()>(); ffi.Pointer - cst_new_box_autoadd_storage_dart_wrapper() { + cst_new_box_autoadd_storage_dart_wrapper() { return _cst_new_box_autoadd_storage_dart_wrapper(); } - late final _cst_new_box_autoadd_storage_dart_wrapperPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_storage_dart_wrapper'); + late final _cst_new_box_autoadd_storage_dart_wrapperPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >('frbgen_nekoton_bridge_cst_new_box_autoadd_storage_dart_wrapper'); late final _cst_new_box_autoadd_storage_dart_wrapper = _cst_new_box_autoadd_storage_dart_wrapperPtr .asFunction Function()>(); ffi.Pointer - cst_new_box_autoadd_token_wallet_dart_wrapper() { + cst_new_box_autoadd_token_wallet_dart_wrapper() { return _cst_new_box_autoadd_token_wallet_dart_wrapper(); } - late final _cst_new_box_autoadd_token_wallet_dart_wrapperPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_token_wallet_dart_wrapper'); + late final _cst_new_box_autoadd_token_wallet_dart_wrapperPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >('frbgen_nekoton_bridge_cst_new_box_autoadd_token_wallet_dart_wrapper'); late final _cst_new_box_autoadd_token_wallet_dart_wrapper = - _cst_new_box_autoadd_token_wallet_dart_wrapperPtr.asFunction< - ffi.Pointer Function()>(); + _cst_new_box_autoadd_token_wallet_dart_wrapperPtr + .asFunction< + ffi.Pointer Function() + >(); ffi.Pointer - cst_new_box_autoadd_ton_wallet_dart_wrapper() { + cst_new_box_autoadd_ton_wallet_dart_wrapper() { return _cst_new_box_autoadd_ton_wallet_dart_wrapper(); } - late final _cst_new_box_autoadd_ton_wallet_dart_wrapperPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_ton_wallet_dart_wrapper'); + late final _cst_new_box_autoadd_ton_wallet_dart_wrapperPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >('frbgen_nekoton_bridge_cst_new_box_autoadd_ton_wallet_dart_wrapper'); late final _cst_new_box_autoadd_ton_wallet_dart_wrapper = - _cst_new_box_autoadd_ton_wallet_dart_wrapperPtr.asFunction< - ffi.Pointer Function()>(); + _cst_new_box_autoadd_ton_wallet_dart_wrapperPtr + .asFunction< + ffi.Pointer Function() + >(); - ffi.Pointer cst_new_box_autoadd_u_32( - int value, - ) { - return _cst_new_box_autoadd_u_32( - value, - ); + ffi.Pointer cst_new_box_autoadd_u_32(int value) { + return _cst_new_box_autoadd_u_32(value); } late final _cst_new_box_autoadd_u_32Ptr = _lookup Function(ffi.Uint32)>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_u_32'); + 'frbgen_nekoton_bridge_cst_new_box_autoadd_u_32', + ); late final _cst_new_box_autoadd_u_32 = _cst_new_box_autoadd_u_32Ptr .asFunction Function(int)>(); ffi.Pointer - cst_new_box_autoadd_unsigned_message_impl() { + cst_new_box_autoadd_unsigned_message_impl() { return _cst_new_box_autoadd_unsigned_message_impl(); } - late final _cst_new_box_autoadd_unsigned_message_implPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_nekoton_bridge_cst_new_box_autoadd_unsigned_message_impl'); + late final _cst_new_box_autoadd_unsigned_message_implPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >('frbgen_nekoton_bridge_cst_new_box_autoadd_unsigned_message_impl'); late final _cst_new_box_autoadd_unsigned_message_impl = _cst_new_box_autoadd_unsigned_message_implPtr .asFunction Function()>(); - ffi.Pointer cst_new_list_String( - int len, - ) { - return _cst_new_list_String( - len, - ); + ffi.Pointer cst_new_list_String(int len) { + return _cst_new_list_String(len); } - late final _cst_new_list_StringPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_nekoton_bridge_cst_new_list_String'); + late final _cst_new_list_StringPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Int32) + > + >('frbgen_nekoton_bridge_cst_new_list_String'); late final _cst_new_list_String = _cst_new_list_StringPtr .asFunction Function(int)>(); - ffi.Pointer - cst_new_list_dynamic_named_value( - int len, - ) { - return _cst_new_list_dynamic_named_value( - len, - ); - } - - late final _cst_new_list_dynamic_named_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>( - 'frbgen_nekoton_bridge_cst_new_list_dynamic_named_value'); - late final _cst_new_list_dynamic_named_value = - _cst_new_list_dynamic_named_valuePtr.asFunction< - ffi.Pointer Function(int)>(); - - ffi.Pointer cst_new_list_dynamic_value( - int len, - ) { - return _cst_new_list_dynamic_value( - len, - ); - } - - late final _cst_new_list_dynamic_valuePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_nekoton_bridge_cst_new_list_dynamic_value'); - late final _cst_new_list_dynamic_value = _cst_new_list_dynamic_valuePtr - .asFunction Function(int)>(); - - ffi.Pointer cst_new_list_key_signer( - int len, - ) { - return _cst_new_list_key_signer( - len, - ); + ffi.Pointer cst_new_list_key_signer(int len) { + return _cst_new_list_key_signer(len); } - late final _cst_new_list_key_signerPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_nekoton_bridge_cst_new_list_key_signer'); + late final _cst_new_list_key_signerPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Int32) + > + >('frbgen_nekoton_bridge_cst_new_list_key_signer'); late final _cst_new_list_key_signer = _cst_new_list_key_signerPtr .asFunction Function(int)>(); - ffi.Pointer cst_new_list_opt_String( - int len, - ) { - return _cst_new_list_opt_String( - len, - ); + ffi.Pointer cst_new_list_opt_String(int len) { + return _cst_new_list_opt_String(len); } - late final _cst_new_list_opt_StringPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_nekoton_bridge_cst_new_list_opt_String'); + late final _cst_new_list_opt_StringPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Int32) + > + >('frbgen_nekoton_bridge_cst_new_list_opt_String'); late final _cst_new_list_opt_String = _cst_new_list_opt_StringPtr .asFunction Function(int)>(); ffi.Pointer cst_new_list_prim_i_32_loose( int len, ) { - return _cst_new_list_prim_i_32_loose( - len, - ); + return _cst_new_list_prim_i_32_loose(len); } - late final _cst_new_list_prim_i_32_loosePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Int32)>>( - 'frbgen_nekoton_bridge_cst_new_list_prim_i_32_loose'); + late final _cst_new_list_prim_i_32_loosePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Int32) + > + >('frbgen_nekoton_bridge_cst_new_list_prim_i_32_loose'); late final _cst_new_list_prim_i_32_loose = _cst_new_list_prim_i_32_loosePtr .asFunction Function(int)>(); ffi.Pointer cst_new_list_prim_i_32_strict( int len, ) { - return _cst_new_list_prim_i_32_strict( - len, - ); + return _cst_new_list_prim_i_32_strict(len); } - late final _cst_new_list_prim_i_32_strictPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Int32)>>( - 'frbgen_nekoton_bridge_cst_new_list_prim_i_32_strict'); + late final _cst_new_list_prim_i_32_strictPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Int32) + > + >('frbgen_nekoton_bridge_cst_new_list_prim_i_32_strict'); late final _cst_new_list_prim_i_32_strict = _cst_new_list_prim_i_32_strictPtr .asFunction Function(int)>(); ffi.Pointer cst_new_list_prim_u_8_strict( int len, ) { - return _cst_new_list_prim_u_8_strict( - len, - ); + return _cst_new_list_prim_u_8_strict(len); } - late final _cst_new_list_prim_u_8_strictPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Int32)>>( - 'frbgen_nekoton_bridge_cst_new_list_prim_u_8_strict'); + late final _cst_new_list_prim_u_8_strictPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Int32) + > + >('frbgen_nekoton_bridge_cst_new_list_prim_u_8_strict'); late final _cst_new_list_prim_u_8_strict = _cst_new_list_prim_u_8_strictPtr .asFunction Function(int)>(); ffi.Pointer - cst_new_list_record_string_string( - int len, - ) { - return _cst_new_list_record_string_string( - len, - ); + cst_new_list_record_string_string(int len) { + return _cst_new_list_record_string_string(len); } - late final _cst_new_list_record_string_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>( - 'frbgen_nekoton_bridge_cst_new_list_record_string_string'); + late final _cst_new_list_record_string_stringPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Int32) + > + >('frbgen_nekoton_bridge_cst_new_list_record_string_string'); late final _cst_new_list_record_string_string = - _cst_new_list_record_string_stringPtr.asFunction< - ffi.Pointer Function(int)>(); + _cst_new_list_record_string_stringPtr + .asFunction< + ffi.Pointer Function(int) + >(); int dummy_method_to_enforce_bundling() { return _dummy_method_to_enforce_bundling(); @@ -8971,19 +12867,20 @@ class NekotonBridgeWire implements BaseWire { late final _dummy_method_to_enforce_bundlingPtr = _lookup>( - 'dummy_method_to_enforce_bundling'); + 'dummy_method_to_enforce_bundling', + ); late final _dummy_method_to_enforce_bundling = _dummy_method_to_enforce_bundlingPtr.asFunction(); } typedef DartPort = ffi.Int64; typedef DartDartPort = int; -typedef DartPostCObjectFnTypeFunction = ffi.Bool Function( - DartPort port_id, ffi.Pointer message); -typedef DartDartPostCObjectFnTypeFunction = bool Function( - DartDartPort port_id, ffi.Pointer message); -typedef DartPostCObjectFnType - = ffi.Pointer>; +typedef DartPostCObjectFnTypeFunction = + ffi.Bool Function(DartPort port_id, ffi.Pointer message); +typedef DartDartPostCObjectFnTypeFunction = + bool Function(DartDartPort port_id, ffi.Pointer message); +typedef DartPostCObjectFnType = + ffi.Pointer>; final class wire_cst_accounts_storage_impl extends ffi.Struct { @ffi.UintPtr() @@ -9009,96 +12906,6 @@ final class wire_cst_storage_dart_wrapper extends ffi.Struct { external int inner_storage; } -final class wire_cst_DynamicValue_U16 extends ffi.Struct { - @ffi.Uint16() - external int field0; -} - -final class wire_cst_DynamicValue_U32 extends ffi.Struct { - @ffi.Uint32() - external int field0; -} - -final class wire_cst_DynamicValue_I32 extends ffi.Struct { - @ffi.Int32() - external int field0; -} - -final class wire_cst_DynamicValue_U64 extends ffi.Struct { - @ffi.Uint64() - external int field0; -} - -final class wire_cst_DynamicValue_I64 extends ffi.Struct { - @ffi.Int64() - external int field0; -} - -final class wire_cst_DynamicValue_F32 extends ffi.Struct { - @ffi.Float() - external double field0; -} - -final class wire_cst_DynamicValue_F64 extends ffi.Struct { - @ffi.Double() - external double field0; -} - -final class wire_cst_DynamicValue_String extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_DynamicValue_VecU8 extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_DynamicValue_MegaStruct extends ffi.Struct { - external ffi.Pointer field0; -} - -final class wire_cst_DynamicValue_Error extends ffi.Struct { - @ffi.Int32() - external int field0; -} - -final class DynamicValueKind extends ffi.Union { - external wire_cst_DynamicValue_U16 U16; - - external wire_cst_DynamicValue_U32 U32; - - external wire_cst_DynamicValue_I32 I32; - - external wire_cst_DynamicValue_U64 U64; - - external wire_cst_DynamicValue_I64 I64; - - external wire_cst_DynamicValue_F32 F32; - - external wire_cst_DynamicValue_F64 F64; - - external wire_cst_DynamicValue_String String; - - external wire_cst_DynamicValue_VecU8 VecU8; - - external wire_cst_DynamicValue_MegaStruct MegaStruct; - - external wire_cst_DynamicValue_Error Error; -} - -final class wire_cst_dynamic_value extends ffi.Struct { - @ffi.Int32() - external int tag; - - external DynamicValueKind kind; -} - -final class wire_cst_caller_test_class extends ffi.Struct { - external ffi.Pointer instance_hash; - - @ffi.Int32() - external int value; -} - final class wire_cst_generic_contract_dart_wrapper extends ffi.Struct { @ffi.UintPtr() external int inner_contract; @@ -9174,11 +12981,6 @@ final class wire_cst_unsigned_message_impl extends ffi.Struct { external int inner_message; } -final class wire_cst_my_class extends ffi.Struct { - @ffi.Int32() - external int val; -} - final class wire_cst_bip_39_mnemonic_data extends ffi.Struct { @ffi.Uint16() external int account_id; @@ -9228,36 +13030,6 @@ final class wire_cst_proto_connection_dart_wrapper extends ffi.Struct { external int inner_connection; } -final class wire_cst_list_dynamic_value extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_dynamic_named_value extends ffi.Struct { - external ffi.Pointer name; - - external ffi.Pointer value; -} - -final class wire_cst_list_dynamic_named_value extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_dart_call_stub extends ffi.Struct { - external ffi.Pointer instance_hash; - - external ffi.Pointer fn_name; - - external ffi.Pointer args; - - external ffi.Pointer named_args; -} - final class wire_cst_token_wallet_dart_wrapper extends ffi.Struct { @ffi.UintPtr() external int inner_wallet; @@ -9282,12 +13054,6 @@ final class wire_cst_list_prim_i_32_strict extends ffi.Struct { external int len; } -final class wire_cst_dart_call_stub_registred extends ffi.Struct { - external ffi.Pointer id; - - external wire_cst_dart_call_stub stub; -} - final class wire_cst_generated_key_g extends ffi.Struct { external ffi.Pointer words; @@ -9304,10 +13070,6 @@ final class wire_cst_latest_block extends ffi.Struct { external int gen_utime; } -final class wire_cst_ledger_connection_impl extends ffi.Struct { - external ffi.Pointer instance_hash; -} - final class wire_cst_log_entry extends ffi.Struct { @ffi.Int64() external int time_millis; @@ -9345,7 +13107,3 @@ final class wire_cst_signed_data_raw extends ffi.Struct { external wire_cst_signature_parts signature_parts; } - -final class wire_cst_storage_impl extends ffi.Struct { - external ffi.Pointer instance_hash; -} diff --git a/packages/nekoton_bridge/lib/src/frb_generated.web.dart b/packages/nekoton_bridge/lib/src/frb_generated.web.dart index 423ef14f..ac579cd8 100644 --- a/packages/nekoton_bridge/lib/src/frb_generated.web.dart +++ b/packages/nekoton_bridge/lib/src/frb_generated.web.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field @@ -10,10 +10,10 @@ import 'api/merged.dart'; import 'dart:async'; import 'dart:convert'; import 'frb_generated.dart'; +import 'lib.dart'; import 'nekoton_wrapper/core/keystore/models.dart'; import 'nekoton_wrapper/crypto/models.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_web.dart'; -import 'utils/caller.dart'; import 'utils/logger.dart'; abstract class NekotonBridgeApiImplPlatform @@ -26,126 +26,553 @@ abstract class NekotonBridgeApiImplPlatform }); CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcAccountsStorageBoxTraitPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait; + get rust_arc_decrement_strong_count_ArcAccountsStorageBoxTraitPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcGenericContractBoxTraitPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait; + get rust_arc_decrement_strong_count_ArcGenericContractBoxTraitPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcGqlConnectionBoxTraitPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait; + get rust_arc_decrement_strong_count_ArcGqlConnectionBoxTraitPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcJettonWalletBoxTraitPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait; + get rust_arc_decrement_strong_count_ArcJettonWalletBoxTraitPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcJrpcConnectionBoxTraitPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait; + get rust_arc_decrement_strong_count_ArcJrpcConnectionBoxTraitPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcKeyStoreApiBoxTraitPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait; + get rust_arc_decrement_strong_count_ArcKeyStoreApiBoxTraitPtr => + wire.rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcLedgerConnectionBoxTraitPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait; + get rust_arc_decrement_strong_count_ArcLedgerConnectionBoxTraitPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcProtoConnectionBoxTraitPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait; + get rust_arc_decrement_strong_count_ArcProtoConnectionBoxTraitPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcStorageBoxTraitPtr => - wire.rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait; + get rust_arc_decrement_strong_count_ArcStorageBoxTraitPtr => + wire.rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcTokenWalletBoxTraitPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait; + get rust_arc_decrement_strong_count_ArcTokenWalletBoxTraitPtr => + wire.rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcTonWalletBoxTraitPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait; + get rust_arc_decrement_strong_count_ArcTonWalletBoxTraitPtr => + wire.rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcTransportBoxTraitPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait; + get rust_arc_decrement_strong_count_ArcTransportBoxTraitPtr => + wire.rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ArcUnsignedMessageBoxTraitPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait; + get rust_arc_decrement_strong_count_ArcUnsignedMessageBoxTraitPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnStringDartFnFutureOptionStringPtr => + wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnStringDartFnFuturePtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnStringDartFnFutureStringPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnStringStringDartFnFuturePtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnVecU8DartFnFutureVecU8Ptr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnU16DartFnFutureVecU8Ptr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnU16OptionI32VecU8DartFnFutureVecU8Ptr => + wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8Ptr => + wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_GenericContractSubscriptionHandlerImplPtr => + wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_GqlConnectionImplPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_JettonWalletSubscriptionHandlerImplPtr => + wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_JrpcConnectionImplPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_LedgerConnectionImplPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ProtoConnectionImplPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_StorageImplPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_TokenWalletSubscriptionHandlerImplPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_TonWalletSubscriptionHandlerImplPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl; @protected AnyhowException dco_decode_AnyhowException(dynamic raw); + @protected + ArcFnStringDartFnFutureOptionString + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + dynamic raw, + ); + + @protected + ArcFnStringDartFnFuture + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + dynamic raw, + ); + + @protected + ArcFnStringDartFnFutureString + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + dynamic raw, + ); + + @protected + ArcFnStringStringDartFnFuture + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + dynamic raw, + ); + + @protected + ArcFnVecU8DartFnFutureVecU8 + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + dynamic raw, + ); + + @protected + ArcFnU16DartFnFutureVecU8 + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + dynamic raw, + ); + + @protected + ArcFnU16OptionI32VecU8DartFnFutureVecU8 + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + dynamic raw, + ); + + @protected + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + dynamic raw, + ); + + @protected + GenericContractSubscriptionHandlerImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + GqlConnectionImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + dynamic raw, + ); + + @protected + JettonWalletSubscriptionHandlerImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + JrpcConnectionImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + dynamic raw, + ); + + @protected + LedgerConnectionImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + dynamic raw, + ); + + @protected + ProtoConnectionImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + dynamic raw, + ); + + @protected + StorageImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + dynamic raw, + ); + + @protected + TokenWalletSubscriptionHandlerImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + TonWalletSubscriptionHandlerImpl + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + GenericContractSubscriptionHandlerImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + GqlConnectionImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + dynamic raw, + ); + + @protected + JettonWalletSubscriptionHandlerImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + JrpcConnectionImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + dynamic raw, + ); + + @protected + LedgerConnectionImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + dynamic raw, + ); + + @protected + ProtoConnectionImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + dynamic raw, + ); + + @protected + StorageImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + dynamic raw, + ); + + @protected + TokenWalletSubscriptionHandlerImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + TonWalletSubscriptionHandlerImpl + dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + GenericContractSubscriptionHandlerImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + GqlConnectionImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + dynamic raw, + ); + + @protected + JettonWalletSubscriptionHandlerImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + JrpcConnectionImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + dynamic raw, + ); + + @protected + LedgerConnectionImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + dynamic raw, + ); + + @protected + ProtoConnectionImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + dynamic raw, + ); + + @protected + StorageImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + dynamic raw, + ); + + @protected + TokenWalletSubscriptionHandlerImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + TonWalletSubscriptionHandlerImpl + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + FutureOr Function(String) + dco_decode_DartFn_Inputs_String_Output_String_AnyhowException(dynamic raw); + + @protected + FutureOr Function(String) + dco_decode_DartFn_Inputs_String_Output_opt_String_AnyhowException( + dynamic raw, + ); + + @protected + FutureOr Function(String) + dco_decode_DartFn_Inputs_String_Output_unit_AnyhowException(dynamic raw); + + @protected + FutureOr Function(String, String) + dco_decode_DartFn_Inputs_String_String_Output_unit_AnyhowException( + dynamic raw, + ); + + @protected + FutureOr Function(Uint8List) + dco_decode_DartFn_Inputs_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + dynamic raw, + ); + + @protected + FutureOr Function(int) + dco_decode_DartFn_Inputs_u_16_Output_list_prim_u_8_strict_AnyhowException( + dynamic raw, + ); + + @protected + FutureOr Function(int, int?, Uint8List) + dco_decode_DartFn_Inputs_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + dynamic raw, + ); + + @protected + FutureOr Function(int, int, int?, Uint8List, String) + dco_decode_DartFn_Inputs_u_16_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_String_Output_list_prim_u_8_strict_AnyhowException( + dynamic raw, + ); + + @protected + Object dco_decode_DartOpaque(dynamic raw); + @protected Map dco_decode_Map_String_String_None(dynamic raw); @protected ArcAccountsStorageBoxTrait - dco_decode_RustOpaque_ArcdynAccountsStorageBoxTrait(dynamic raw); + dco_decode_RustOpaque_ArcdynAccountsStorageBoxTrait(dynamic raw); @protected ArcGenericContractBoxTrait - dco_decode_RustOpaque_ArcdynGenericContractBoxTrait(dynamic raw); + dco_decode_RustOpaque_ArcdynGenericContractBoxTrait(dynamic raw); @protected ArcGqlConnectionBoxTrait dco_decode_RustOpaque_ArcdynGqlConnectionBoxTrait( - dynamic raw); + dynamic raw, + ); @protected ArcJettonWalletBoxTrait dco_decode_RustOpaque_ArcdynJettonWalletBoxTrait( - dynamic raw); + dynamic raw, + ); @protected ArcJrpcConnectionBoxTrait dco_decode_RustOpaque_ArcdynJrpcConnectionBoxTrait( - dynamic raw); + dynamic raw, + ); @protected ArcKeyStoreApiBoxTrait dco_decode_RustOpaque_ArcdynKeyStoreApiBoxTrait( - dynamic raw); + dynamic raw, + ); @protected ArcLedgerConnectionBoxTrait - dco_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait(dynamic raw); + dco_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait(dynamic raw); @protected ArcProtoConnectionBoxTrait - dco_decode_RustOpaque_ArcdynProtoConnectionBoxTrait(dynamic raw); + dco_decode_RustOpaque_ArcdynProtoConnectionBoxTrait(dynamic raw); @protected ArcStorageBoxTrait dco_decode_RustOpaque_ArcdynStorageBoxTrait(dynamic raw); @protected ArcTokenWalletBoxTrait dco_decode_RustOpaque_ArcdynTokenWalletBoxTrait( - dynamic raw); + dynamic raw, + ); @protected ArcTonWalletBoxTrait dco_decode_RustOpaque_ArcdynTonWalletBoxTrait( - dynamic raw); + dynamic raw, + ); @protected ArcTransportBoxTrait dco_decode_RustOpaque_ArcdynTransportBoxTrait( - dynamic raw); + dynamic raw, + ); @protected ArcUnsignedMessageBoxTrait - dco_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait(dynamic raw); + dco_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait(dynamic raw); @protected - RustStreamSink - dco_decode_StreamSink_dart_call_stub_registred_Dco(dynamic raw); + ArcFnStringDartFnFutureOptionString + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + dynamic raw, + ); @protected - RustStreamSink dco_decode_StreamSink_log_entry_Dco(dynamic raw); + ArcFnStringDartFnFuture + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + dynamic raw, + ); @protected - String dco_decode_String(dynamic raw); + ArcFnStringDartFnFutureString + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + dynamic raw, + ); + + @protected + ArcFnStringStringDartFnFuture + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + dynamic raw, + ); + + @protected + ArcFnVecU8DartFnFutureVecU8 + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + dynamic raw, + ); @protected - MyFormat dco_decode_TraitDef_MyFormat(dynamic raw); + ArcFnU16DartFnFutureVecU8 + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + dynamic raw, + ); + + @protected + ArcFnU16OptionI32VecU8DartFnFutureVecU8 + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + dynamic raw, + ); + + @protected + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + dynamic raw, + ); + + @protected + GenericContractSubscriptionHandlerImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + GqlConnectionImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + dynamic raw, + ); + + @protected + JettonWalletSubscriptionHandlerImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + JrpcConnectionImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + dynamic raw, + ); + + @protected + LedgerConnectionImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + dynamic raw, + ); + + @protected + ProtoConnectionImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + dynamic raw, + ); + + @protected + StorageImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + dynamic raw, + ); + + @protected + TokenWalletSubscriptionHandlerImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + TonWalletSubscriptionHandlerImpl + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + dynamic raw, + ); + + @protected + RustStreamSink dco_decode_StreamSink_log_entry_Dco(dynamic raw); + + @protected + String dco_decode_String(dynamic raw); @protected AccountsStorageImpl dco_decode_accounts_storage_impl(dynamic raw); @@ -171,22 +598,14 @@ abstract class NekotonBridgeApiImplPlatform @protected bool dco_decode_box_autoadd_bool(dynamic raw); - @protected - CallerTestClass dco_decode_box_autoadd_caller_test_class(dynamic raw); - - @protected - DartCallStub dco_decode_box_autoadd_dart_call_stub(dynamic raw); - - @protected - DynamicValue dco_decode_box_autoadd_dynamic_value(dynamic raw); - @protected GenericContractDartWrapper - dco_decode_box_autoadd_generic_contract_dart_wrapper(dynamic raw); + dco_decode_box_autoadd_generic_contract_dart_wrapper(dynamic raw); @protected GqlConnectionDartWrapper dco_decode_box_autoadd_gql_connection_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected GqlTransportImpl dco_decode_box_autoadd_gql_transport_impl(dynamic raw); @@ -196,11 +615,13 @@ abstract class NekotonBridgeApiImplPlatform @protected JettonWalletDartWrapper dco_decode_box_autoadd_jetton_wallet_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected JrpcConnectionDartWrapper dco_decode_box_autoadd_jrpc_connection_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected JrpcTransportImpl dco_decode_box_autoadd_jrpc_transport_impl(dynamic raw); @@ -213,17 +634,14 @@ abstract class NekotonBridgeApiImplPlatform @protected LedgerConnectionDartWrapper - dco_decode_box_autoadd_ledger_connection_dart_wrapper(dynamic raw); + dco_decode_box_autoadd_ledger_connection_dart_wrapper(dynamic raw); @protected MnemonicType dco_decode_box_autoadd_mnemonic_type(dynamic raw); - @protected - MyClass dco_decode_box_autoadd_my_class(dynamic raw); - @protected ProtoConnectionDartWrapper - dco_decode_box_autoadd_proto_connection_dart_wrapper(dynamic raw); + dco_decode_box_autoadd_proto_connection_dart_wrapper(dynamic raw); @protected ProtoTransportImpl dco_decode_box_autoadd_proto_transport_impl(dynamic raw); @@ -233,11 +651,13 @@ abstract class NekotonBridgeApiImplPlatform @protected TokenWalletDartWrapper dco_decode_box_autoadd_token_wallet_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected TonWalletDartWrapper dco_decode_box_autoadd_ton_wallet_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected int dco_decode_box_autoadd_u_32(dynamic raw); @@ -245,36 +665,13 @@ abstract class NekotonBridgeApiImplPlatform @protected UnsignedMessageImpl dco_decode_box_autoadd_unsigned_message_impl(dynamic raw); - @protected - CallerTestClass dco_decode_caller_test_class(dynamic raw); - - @protected - DartCallStub dco_decode_dart_call_stub(dynamic raw); - - @protected - DartCallStubRegistred dco_decode_dart_call_stub_registred(dynamic raw); - - @protected - DynamicNamedValue dco_decode_dynamic_named_value(dynamic raw); - - @protected - DynamicValue dco_decode_dynamic_value(dynamic raw); - - @protected - ErrorCode dco_decode_error_code(dynamic raw); - - @protected - double dco_decode_f_32(dynamic raw); - - @protected - double dco_decode_f_64(dynamic raw); - @protected GeneratedKeyG dco_decode_generated_key_g(dynamic raw); @protected GenericContractDartWrapper dco_decode_generic_contract_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected GqlConnectionDartWrapper dco_decode_gql_connection_dart_wrapper(dynamic raw); @@ -291,12 +688,16 @@ abstract class NekotonBridgeApiImplPlatform @protected int dco_decode_i_8(dynamic raw); + @protected + PlatformInt64 dco_decode_isize(dynamic raw); + @protected JettonWalletDartWrapper dco_decode_jetton_wallet_dart_wrapper(dynamic raw); @protected JrpcConnectionDartWrapper dco_decode_jrpc_connection_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected JrpcTransportImpl dco_decode_jrpc_transport_impl(dynamic raw); @@ -312,20 +713,12 @@ abstract class NekotonBridgeApiImplPlatform @protected LedgerConnectionDartWrapper dco_decode_ledger_connection_dart_wrapper( - dynamic raw); - - @protected - LedgerConnectionImpl dco_decode_ledger_connection_impl(dynamic raw); + dynamic raw, + ); @protected List dco_decode_list_String(dynamic raw); - @protected - List dco_decode_list_dynamic_named_value(dynamic raw); - - @protected - List dco_decode_list_dynamic_value(dynamic raw); - @protected List dco_decode_list_key_signer(dynamic raw); @@ -353,24 +746,18 @@ abstract class NekotonBridgeApiImplPlatform @protected MnemonicType dco_decode_mnemonic_type(dynamic raw); - @protected - MyClass dco_decode_my_class(dynamic raw); - @protected String? dco_decode_opt_String(dynamic raw); @protected bool? dco_decode_opt_box_autoadd_bool(dynamic raw); - @protected - DynamicValue? dco_decode_opt_box_autoadd_dynamic_value(dynamic raw); - @protected int? dco_decode_opt_box_autoadd_i_32(dynamic raw); @protected LedgerConnectionDartWrapper? - dco_decode_opt_box_autoadd_ledger_connection_dart_wrapper(dynamic raw); + dco_decode_opt_box_autoadd_ledger_connection_dart_wrapper(dynamic raw); @protected int? dco_decode_opt_box_autoadd_u_32(dynamic raw); @@ -383,7 +770,8 @@ abstract class NekotonBridgeApiImplPlatform @protected ProtoConnectionDartWrapper dco_decode_proto_connection_dart_wrapper( - dynamic raw); + dynamic raw, + ); @protected ProtoTransportImpl dco_decode_proto_transport_impl(dynamic raw); @@ -403,9 +791,6 @@ abstract class NekotonBridgeApiImplPlatform @protected StorageDartWrapper dco_decode_storage_dart_wrapper(dynamic raw); - @protected - StorageImpl dco_decode_storage_impl(dynamic raw); - @protected TokenWalletDartWrapper dco_decode_token_wallet_dart_wrapper(dynamic raw); @@ -437,283 +822,584 @@ abstract class NekotonBridgeApiImplPlatform AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer); @protected - Map sse_decode_Map_String_String_None( - SseDeserializer deserializer); + ArcFnStringDartFnFutureOptionString + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + SseDeserializer deserializer, + ); @protected - ArcAccountsStorageBoxTrait - sse_decode_RustOpaque_ArcdynAccountsStorageBoxTrait( - SseDeserializer deserializer); + ArcFnStringDartFnFuture + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + SseDeserializer deserializer, + ); @protected - ArcGenericContractBoxTrait - sse_decode_RustOpaque_ArcdynGenericContractBoxTrait( - SseDeserializer deserializer); + ArcFnStringDartFnFutureString + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + SseDeserializer deserializer, + ); @protected - ArcGqlConnectionBoxTrait sse_decode_RustOpaque_ArcdynGqlConnectionBoxTrait( - SseDeserializer deserializer); + ArcFnStringStringDartFnFuture + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + SseDeserializer deserializer, + ); @protected - ArcJettonWalletBoxTrait sse_decode_RustOpaque_ArcdynJettonWalletBoxTrait( - SseDeserializer deserializer); + ArcFnVecU8DartFnFutureVecU8 + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - ArcJrpcConnectionBoxTrait sse_decode_RustOpaque_ArcdynJrpcConnectionBoxTrait( - SseDeserializer deserializer); + ArcFnU16DartFnFutureVecU8 + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - ArcKeyStoreApiBoxTrait sse_decode_RustOpaque_ArcdynKeyStoreApiBoxTrait( - SseDeserializer deserializer); + ArcFnU16OptionI32VecU8DartFnFutureVecU8 + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - ArcLedgerConnectionBoxTrait - sse_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait( - SseDeserializer deserializer); + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - ArcProtoConnectionBoxTrait - sse_decode_RustOpaque_ArcdynProtoConnectionBoxTrait( - SseDeserializer deserializer); + GenericContractSubscriptionHandlerImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - ArcStorageBoxTrait sse_decode_RustOpaque_ArcdynStorageBoxTrait( - SseDeserializer deserializer); + GqlConnectionImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + SseDeserializer deserializer, + ); @protected - ArcTokenWalletBoxTrait sse_decode_RustOpaque_ArcdynTokenWalletBoxTrait( - SseDeserializer deserializer); + JettonWalletSubscriptionHandlerImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - ArcTonWalletBoxTrait sse_decode_RustOpaque_ArcdynTonWalletBoxTrait( - SseDeserializer deserializer); + JrpcConnectionImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + SseDeserializer deserializer, + ); @protected - ArcTransportBoxTrait sse_decode_RustOpaque_ArcdynTransportBoxTrait( - SseDeserializer deserializer); + LedgerConnectionImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + SseDeserializer deserializer, + ); @protected - ArcUnsignedMessageBoxTrait - sse_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait( - SseDeserializer deserializer); + ProtoConnectionImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + SseDeserializer deserializer, + ); @protected - RustStreamSink - sse_decode_StreamSink_dart_call_stub_registred_Dco( - SseDeserializer deserializer); + StorageImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + SseDeserializer deserializer, + ); @protected - RustStreamSink sse_decode_StreamSink_log_entry_Dco( - SseDeserializer deserializer); + TokenWalletSubscriptionHandlerImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - String sse_decode_String(SseDeserializer deserializer); + TonWalletSubscriptionHandlerImpl + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - AccountsStorageImpl sse_decode_accounts_storage_impl( - SseDeserializer deserializer); + GenericContractSubscriptionHandlerImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - Bip39Entropy sse_decode_bip_39_entropy(SseDeserializer deserializer); + GqlConnectionImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + SseDeserializer deserializer, + ); @protected - Bip39MnemonicData sse_decode_bip_39_mnemonic_data( - SseDeserializer deserializer); + JettonWalletSubscriptionHandlerImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - Bip39Path sse_decode_bip_39_path(SseDeserializer deserializer); + JrpcConnectionImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + SseDeserializer deserializer, + ); @protected - bool sse_decode_bool(SseDeserializer deserializer); + LedgerConnectionImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + SseDeserializer deserializer, + ); @protected - AccountsStorageImpl sse_decode_box_autoadd_accounts_storage_impl( - SseDeserializer deserializer); + ProtoConnectionImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + SseDeserializer deserializer, + ); @protected - Bip39MnemonicData sse_decode_box_autoadd_bip_39_mnemonic_data( - SseDeserializer deserializer); + StorageImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + SseDeserializer deserializer, + ); @protected - bool sse_decode_box_autoadd_bool(SseDeserializer deserializer); + TokenWalletSubscriptionHandlerImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - CallerTestClass sse_decode_box_autoadd_caller_test_class( - SseDeserializer deserializer); + TonWalletSubscriptionHandlerImpl + sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - DartCallStub sse_decode_box_autoadd_dart_call_stub( - SseDeserializer deserializer); + GenericContractSubscriptionHandlerImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - DynamicValue sse_decode_box_autoadd_dynamic_value( - SseDeserializer deserializer); + GqlConnectionImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + SseDeserializer deserializer, + ); @protected - GenericContractDartWrapper - sse_decode_box_autoadd_generic_contract_dart_wrapper( - SseDeserializer deserializer); + JettonWalletSubscriptionHandlerImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - GqlConnectionDartWrapper sse_decode_box_autoadd_gql_connection_dart_wrapper( - SseDeserializer deserializer); + JrpcConnectionImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + SseDeserializer deserializer, + ); @protected - GqlTransportImpl sse_decode_box_autoadd_gql_transport_impl( - SseDeserializer deserializer); + LedgerConnectionImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + SseDeserializer deserializer, + ); @protected - int sse_decode_box_autoadd_i_32(SseDeserializer deserializer); + ProtoConnectionImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + SseDeserializer deserializer, + ); @protected - JettonWalletDartWrapper sse_decode_box_autoadd_jetton_wallet_dart_wrapper( - SseDeserializer deserializer); + StorageImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + SseDeserializer deserializer, + ); @protected - JrpcConnectionDartWrapper sse_decode_box_autoadd_jrpc_connection_dart_wrapper( - SseDeserializer deserializer); + TokenWalletSubscriptionHandlerImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - JrpcTransportImpl sse_decode_box_autoadd_jrpc_transport_impl( - SseDeserializer deserializer); + TonWalletSubscriptionHandlerImpl + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - KeySigner sse_decode_box_autoadd_key_signer(SseDeserializer deserializer); + Object sse_decode_DartOpaque(SseDeserializer deserializer); @protected - KeystoreDartWrapper sse_decode_box_autoadd_keystore_dart_wrapper( - SseDeserializer deserializer); + Map sse_decode_Map_String_String_None( + SseDeserializer deserializer, + ); @protected - LedgerConnectionDartWrapper - sse_decode_box_autoadd_ledger_connection_dart_wrapper( - SseDeserializer deserializer); + ArcAccountsStorageBoxTrait + sse_decode_RustOpaque_ArcdynAccountsStorageBoxTrait( + SseDeserializer deserializer, + ); @protected - MnemonicType sse_decode_box_autoadd_mnemonic_type( - SseDeserializer deserializer); + ArcGenericContractBoxTrait + sse_decode_RustOpaque_ArcdynGenericContractBoxTrait( + SseDeserializer deserializer, + ); @protected - MyClass sse_decode_box_autoadd_my_class(SseDeserializer deserializer); + ArcGqlConnectionBoxTrait sse_decode_RustOpaque_ArcdynGqlConnectionBoxTrait( + SseDeserializer deserializer, + ); @protected - ProtoConnectionDartWrapper - sse_decode_box_autoadd_proto_connection_dart_wrapper( - SseDeserializer deserializer); + ArcJettonWalletBoxTrait sse_decode_RustOpaque_ArcdynJettonWalletBoxTrait( + SseDeserializer deserializer, + ); @protected - ProtoTransportImpl sse_decode_box_autoadd_proto_transport_impl( - SseDeserializer deserializer); + ArcJrpcConnectionBoxTrait sse_decode_RustOpaque_ArcdynJrpcConnectionBoxTrait( + SseDeserializer deserializer, + ); @protected - StorageDartWrapper sse_decode_box_autoadd_storage_dart_wrapper( - SseDeserializer deserializer); + ArcKeyStoreApiBoxTrait sse_decode_RustOpaque_ArcdynKeyStoreApiBoxTrait( + SseDeserializer deserializer, + ); @protected - TokenWalletDartWrapper sse_decode_box_autoadd_token_wallet_dart_wrapper( - SseDeserializer deserializer); + ArcLedgerConnectionBoxTrait + sse_decode_RustOpaque_ArcdynLedgerConnectionBoxTrait( + SseDeserializer deserializer, + ); @protected - TonWalletDartWrapper sse_decode_box_autoadd_ton_wallet_dart_wrapper( - SseDeserializer deserializer); + ArcProtoConnectionBoxTrait + sse_decode_RustOpaque_ArcdynProtoConnectionBoxTrait( + SseDeserializer deserializer, + ); @protected - int sse_decode_box_autoadd_u_32(SseDeserializer deserializer); + ArcStorageBoxTrait sse_decode_RustOpaque_ArcdynStorageBoxTrait( + SseDeserializer deserializer, + ); @protected - UnsignedMessageImpl sse_decode_box_autoadd_unsigned_message_impl( - SseDeserializer deserializer); + ArcTokenWalletBoxTrait sse_decode_RustOpaque_ArcdynTokenWalletBoxTrait( + SseDeserializer deserializer, + ); @protected - CallerTestClass sse_decode_caller_test_class(SseDeserializer deserializer); + ArcTonWalletBoxTrait sse_decode_RustOpaque_ArcdynTonWalletBoxTrait( + SseDeserializer deserializer, + ); @protected - DartCallStub sse_decode_dart_call_stub(SseDeserializer deserializer); + ArcTransportBoxTrait sse_decode_RustOpaque_ArcdynTransportBoxTrait( + SseDeserializer deserializer, + ); @protected - DartCallStubRegistred sse_decode_dart_call_stub_registred( - SseDeserializer deserializer); + ArcUnsignedMessageBoxTrait + sse_decode_RustOpaque_ArcdynUnsignedMessageBoxTrait( + SseDeserializer deserializer, + ); @protected - DynamicNamedValue sse_decode_dynamic_named_value( - SseDeserializer deserializer); + ArcFnStringDartFnFutureOptionString + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + SseDeserializer deserializer, + ); @protected - DynamicValue sse_decode_dynamic_value(SseDeserializer deserializer); + ArcFnStringDartFnFuture + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + SseDeserializer deserializer, + ); @protected - ErrorCode sse_decode_error_code(SseDeserializer deserializer); + ArcFnStringDartFnFutureString + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + SseDeserializer deserializer, + ); @protected - double sse_decode_f_32(SseDeserializer deserializer); + ArcFnStringStringDartFnFuture + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + SseDeserializer deserializer, + ); @protected - double sse_decode_f_64(SseDeserializer deserializer); + ArcFnVecU8DartFnFutureVecU8 + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - GeneratedKeyG sse_decode_generated_key_g(SseDeserializer deserializer); + ArcFnU16DartFnFutureVecU8 + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - GenericContractDartWrapper sse_decode_generic_contract_dart_wrapper( - SseDeserializer deserializer); + ArcFnU16OptionI32VecU8DartFnFutureVecU8 + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - GqlConnectionDartWrapper sse_decode_gql_connection_dart_wrapper( - SseDeserializer deserializer); + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + SseDeserializer deserializer, + ); @protected - GqlTransportImpl sse_decode_gql_transport_impl(SseDeserializer deserializer); + GenericContractSubscriptionHandlerImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); @protected - int sse_decode_i_32(SseDeserializer deserializer); + GqlConnectionImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + SseDeserializer deserializer, + ); @protected - PlatformInt64 sse_decode_i_64(SseDeserializer deserializer); + JettonWalletSubscriptionHandlerImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); + + @protected + JrpcConnectionImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + SseDeserializer deserializer, + ); + + @protected + LedgerConnectionImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + SseDeserializer deserializer, + ); + + @protected + ProtoConnectionImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + SseDeserializer deserializer, + ); + + @protected + StorageImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + SseDeserializer deserializer, + ); + + @protected + TokenWalletSubscriptionHandlerImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); + + @protected + TonWalletSubscriptionHandlerImpl + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + SseDeserializer deserializer, + ); + + @protected + RustStreamSink sse_decode_StreamSink_log_entry_Dco( + SseDeserializer deserializer, + ); + + @protected + String sse_decode_String(SseDeserializer deserializer); + + @protected + AccountsStorageImpl sse_decode_accounts_storage_impl( + SseDeserializer deserializer, + ); + + @protected + Bip39Entropy sse_decode_bip_39_entropy(SseDeserializer deserializer); + + @protected + Bip39MnemonicData sse_decode_bip_39_mnemonic_data( + SseDeserializer deserializer, + ); + + @protected + Bip39Path sse_decode_bip_39_path(SseDeserializer deserializer); + + @protected + bool sse_decode_bool(SseDeserializer deserializer); + + @protected + AccountsStorageImpl sse_decode_box_autoadd_accounts_storage_impl( + SseDeserializer deserializer, + ); + + @protected + Bip39MnemonicData sse_decode_box_autoadd_bip_39_mnemonic_data( + SseDeserializer deserializer, + ); + + @protected + bool sse_decode_box_autoadd_bool(SseDeserializer deserializer); + + @protected + GenericContractDartWrapper + sse_decode_box_autoadd_generic_contract_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + GqlConnectionDartWrapper sse_decode_box_autoadd_gql_connection_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + GqlTransportImpl sse_decode_box_autoadd_gql_transport_impl( + SseDeserializer deserializer, + ); + + @protected + int sse_decode_box_autoadd_i_32(SseDeserializer deserializer); + + @protected + JettonWalletDartWrapper sse_decode_box_autoadd_jetton_wallet_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + JrpcConnectionDartWrapper sse_decode_box_autoadd_jrpc_connection_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + JrpcTransportImpl sse_decode_box_autoadd_jrpc_transport_impl( + SseDeserializer deserializer, + ); + + @protected + KeySigner sse_decode_box_autoadd_key_signer(SseDeserializer deserializer); + + @protected + KeystoreDartWrapper sse_decode_box_autoadd_keystore_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + LedgerConnectionDartWrapper + sse_decode_box_autoadd_ledger_connection_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + MnemonicType sse_decode_box_autoadd_mnemonic_type( + SseDeserializer deserializer, + ); + + @protected + ProtoConnectionDartWrapper + sse_decode_box_autoadd_proto_connection_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + ProtoTransportImpl sse_decode_box_autoadd_proto_transport_impl( + SseDeserializer deserializer, + ); + + @protected + StorageDartWrapper sse_decode_box_autoadd_storage_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + TokenWalletDartWrapper sse_decode_box_autoadd_token_wallet_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + TonWalletDartWrapper sse_decode_box_autoadd_ton_wallet_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + int sse_decode_box_autoadd_u_32(SseDeserializer deserializer); + + @protected + UnsignedMessageImpl sse_decode_box_autoadd_unsigned_message_impl( + SseDeserializer deserializer, + ); + + @protected + GeneratedKeyG sse_decode_generated_key_g(SseDeserializer deserializer); + + @protected + GenericContractDartWrapper sse_decode_generic_contract_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + GqlConnectionDartWrapper sse_decode_gql_connection_dart_wrapper( + SseDeserializer deserializer, + ); + + @protected + GqlTransportImpl sse_decode_gql_transport_impl(SseDeserializer deserializer); + + @protected + int sse_decode_i_32(SseDeserializer deserializer); + + @protected + PlatformInt64 sse_decode_i_64(SseDeserializer deserializer); @protected int sse_decode_i_8(SseDeserializer deserializer); + @protected + PlatformInt64 sse_decode_isize(SseDeserializer deserializer); + @protected JettonWalletDartWrapper sse_decode_jetton_wallet_dart_wrapper( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected JrpcConnectionDartWrapper sse_decode_jrpc_connection_dart_wrapper( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected JrpcTransportImpl sse_decode_jrpc_transport_impl( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected KeySigner sse_decode_key_signer(SseDeserializer deserializer); @protected KeystoreDartWrapper sse_decode_keystore_dart_wrapper( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected LatestBlock sse_decode_latest_block(SseDeserializer deserializer); @protected LedgerConnectionDartWrapper sse_decode_ledger_connection_dart_wrapper( - SseDeserializer deserializer); - - @protected - LedgerConnectionImpl sse_decode_ledger_connection_impl( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected List sse_decode_list_String(SseDeserializer deserializer); - @protected - List sse_decode_list_dynamic_named_value( - SseDeserializer deserializer); - - @protected - List sse_decode_list_dynamic_value( - SseDeserializer deserializer); - @protected List sse_decode_list_key_signer(SseDeserializer deserializer); @@ -731,7 +1417,8 @@ abstract class NekotonBridgeApiImplPlatform @protected List<(String, String)> sse_decode_list_record_string_string( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected LogEntry sse_decode_log_entry(SseDeserializer deserializer); @@ -742,26 +1429,20 @@ abstract class NekotonBridgeApiImplPlatform @protected MnemonicType sse_decode_mnemonic_type(SseDeserializer deserializer); - @protected - MyClass sse_decode_my_class(SseDeserializer deserializer); - @protected String? sse_decode_opt_String(SseDeserializer deserializer); @protected bool? sse_decode_opt_box_autoadd_bool(SseDeserializer deserializer); - @protected - DynamicValue? sse_decode_opt_box_autoadd_dynamic_value( - SseDeserializer deserializer); - @protected int? sse_decode_opt_box_autoadd_i_32(SseDeserializer deserializer); @protected LedgerConnectionDartWrapper? - sse_decode_opt_box_autoadd_ledger_connection_dart_wrapper( - SseDeserializer deserializer); + sse_decode_opt_box_autoadd_ledger_connection_dart_wrapper( + SseDeserializer deserializer, + ); @protected int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer); @@ -774,15 +1455,18 @@ abstract class NekotonBridgeApiImplPlatform @protected ProtoConnectionDartWrapper sse_decode_proto_connection_dart_wrapper( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected ProtoTransportImpl sse_decode_proto_transport_impl( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected (String, String) sse_decode_record_string_string( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected SignatureParts sse_decode_signature_parts(SseDeserializer deserializer); @@ -795,18 +1479,18 @@ abstract class NekotonBridgeApiImplPlatform @protected StorageDartWrapper sse_decode_storage_dart_wrapper( - SseDeserializer deserializer); - - @protected - StorageImpl sse_decode_storage_impl(SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected TokenWalletDartWrapper sse_decode_token_wallet_dart_wrapper( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected TonWalletDartWrapper sse_decode_ton_wallet_dart_wrapper( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected int sse_decode_u_16(SseDeserializer deserializer); @@ -825,7 +1509,8 @@ abstract class NekotonBridgeApiImplPlatform @protected UnsignedMessageImpl sse_decode_unsigned_message_impl( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected BigInt sse_decode_usize(SseDeserializer deserializer); @@ -840,28 +1525,21 @@ abstract class NekotonBridgeApiImplPlatform JSAny cst_encode_Map_String_String_None(Map raw) { // Codec=Cst (C-struct based), see doc to use other codecs return cst_encode_list_record_string_string( - raw.entries.map((e) => (e.key, e.value)).toList()); - } - - @protected - String cst_encode_StreamSink_dart_call_stub_registred_Dco( - RustStreamSink raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_String(raw.setupAndSerialize( - codec: DcoCodec( - decodeSuccessData: dco_decode_dart_call_stub_registred, - decodeErrorData: dco_decode_AnyhowException, - ))); + raw.entries.map((e) => (e.key, e.value)).toList(), + ); } @protected String cst_encode_StreamSink_log_entry_Dco(RustStreamSink raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_String(raw.setupAndSerialize( + return cst_encode_String( + raw.setupAndSerialize( codec: DcoCodec( - decodeSuccessData: dco_decode_log_entry, - decodeErrorData: dco_decode_AnyhowException, - ))); + decodeSuccessData: dco_decode_log_entry, + decodeErrorData: dco_decode_AnyhowException, + ), + ), + ); } @protected @@ -874,7 +1552,7 @@ abstract class NekotonBridgeApiImplPlatform JSAny cst_encode_accounts_storage_impl(AccountsStorageImpl raw) { // Codec=Cst (C-struct based), see doc to use other codecs return [ - cst_encode_RustOpaque_ArcdynAccountsStorageBoxTrait(raw.innerStorage) + cst_encode_RustOpaque_ArcdynAccountsStorageBoxTrait(raw.innerStorage), ].jsify()!; } @@ -884,7 +1562,7 @@ abstract class NekotonBridgeApiImplPlatform return [ cst_encode_u_16(raw.accountId), cst_encode_bip_39_path(raw.path), - cst_encode_bip_39_entropy(raw.entropy) + cst_encode_bip_39_entropy(raw.entropy), ].jsify()!; } @@ -906,34 +1584,18 @@ abstract class NekotonBridgeApiImplPlatform return cst_encode_bool(raw); } - @protected - JSAny cst_encode_box_autoadd_caller_test_class(CallerTestClass raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_caller_test_class(raw); - } - - @protected - JSAny cst_encode_box_autoadd_dart_call_stub(DartCallStub raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_dart_call_stub(raw); - } - - @protected - JSAny cst_encode_box_autoadd_dynamic_value(DynamicValue raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_dynamic_value(raw); - } - @protected JSAny cst_encode_box_autoadd_generic_contract_dart_wrapper( - GenericContractDartWrapper raw) { + GenericContractDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return cst_encode_generic_contract_dart_wrapper(raw); } @protected JSAny cst_encode_box_autoadd_gql_connection_dart_wrapper( - GqlConnectionDartWrapper raw) { + GqlConnectionDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return cst_encode_gql_connection_dart_wrapper(raw); } @@ -952,14 +1614,16 @@ abstract class NekotonBridgeApiImplPlatform @protected JSAny cst_encode_box_autoadd_jetton_wallet_dart_wrapper( - JettonWalletDartWrapper raw) { + JettonWalletDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return cst_encode_jetton_wallet_dart_wrapper(raw); } @protected JSAny cst_encode_box_autoadd_jrpc_connection_dart_wrapper( - JrpcConnectionDartWrapper raw) { + JrpcConnectionDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return cst_encode_jrpc_connection_dart_wrapper(raw); } @@ -984,7 +1648,8 @@ abstract class NekotonBridgeApiImplPlatform @protected JSAny cst_encode_box_autoadd_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper raw) { + LedgerConnectionDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return cst_encode_ledger_connection_dart_wrapper(raw); } @@ -995,15 +1660,10 @@ abstract class NekotonBridgeApiImplPlatform return cst_encode_mnemonic_type(raw); } - @protected - JSAny cst_encode_box_autoadd_my_class(MyClass raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_my_class(raw); - } - @protected JSAny cst_encode_box_autoadd_proto_connection_dart_wrapper( - ProtoConnectionDartWrapper raw) { + ProtoConnectionDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return cst_encode_proto_connection_dart_wrapper(raw); } @@ -1022,14 +1682,16 @@ abstract class NekotonBridgeApiImplPlatform @protected JSAny cst_encode_box_autoadd_token_wallet_dart_wrapper( - TokenWalletDartWrapper raw) { + TokenWalletDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return cst_encode_token_wallet_dart_wrapper(raw); } @protected JSAny cst_encode_box_autoadd_ton_wallet_dart_wrapper( - TonWalletDartWrapper raw) { + TonWalletDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return cst_encode_ton_wallet_dart_wrapper(raw); } @@ -1046,98 +1708,22 @@ abstract class NekotonBridgeApiImplPlatform return cst_encode_unsigned_message_impl(raw); } - @protected - JSAny cst_encode_caller_test_class(CallerTestClass raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_String(raw.instanceHash), cst_encode_i_32(raw.value)] - .jsify()!; - } - - @protected - JSAny cst_encode_dart_call_stub(DartCallStub raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_String(raw.instanceHash), - cst_encode_String(raw.fnName), - cst_encode_list_dynamic_value(raw.args), - cst_encode_list_dynamic_named_value(raw.namedArgs) - ].jsify()!; - } - - @protected - JSAny cst_encode_dart_call_stub_registred(DartCallStubRegistred raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_opt_String(raw.id), cst_encode_dart_call_stub(raw.stub)] - .jsify()!; - } - - @protected - JSAny cst_encode_dynamic_named_value(DynamicNamedValue raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_String(raw.name), - cst_encode_opt_box_autoadd_dynamic_value(raw.value) - ].jsify()!; - } - - @protected - JSAny cst_encode_dynamic_value(DynamicValue raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - if (raw is DynamicValue_U16) { - return [0, cst_encode_u_16(raw.field0)].jsify()!; - } - if (raw is DynamicValue_U32) { - return [1, cst_encode_u_32(raw.field0)].jsify()!; - } - if (raw is DynamicValue_I32) { - return [2, cst_encode_i_32(raw.field0)].jsify()!; - } - if (raw is DynamicValue_U64) { - return [3, cst_encode_u_64(raw.field0)].jsify()!; - } - if (raw is DynamicValue_I64) { - return [4, cst_encode_i_64(raw.field0)].jsify()!; - } - if (raw is DynamicValue_F32) { - return [5, cst_encode_f_32(raw.field0)].jsify()!; - } - if (raw is DynamicValue_F64) { - return [6, cst_encode_f_64(raw.field0)].jsify()!; - } - if (raw is DynamicValue_String) { - return [7, cst_encode_String(raw.field0)].jsify()!; - } - if (raw is DynamicValue_VecU8) { - return [8, cst_encode_list_prim_u_8_strict(raw.field0)].jsify()!; - } - if (raw is DynamicValue_MegaStruct) { - return [9, cst_encode_String(raw.field0)].jsify()!; - } - if (raw is DynamicValue_Error) { - return [10, cst_encode_error_code(raw.field0)].jsify()!; - } - if (raw is DynamicValue_None) { - return [11].jsify()!; - } - - throw Exception('unreachable'); - } - @protected JSAny cst_encode_generated_key_g(GeneratedKeyG raw) { // Codec=Cst (C-struct based), see doc to use other codecs return [ cst_encode_list_String(raw.words), - cst_encode_mnemonic_type(raw.accountType) + cst_encode_mnemonic_type(raw.accountType), ].jsify()!; } @protected JSAny cst_encode_generic_contract_dart_wrapper( - GenericContractDartWrapper raw) { + GenericContractDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return [ - cst_encode_RustOpaque_ArcdynGenericContractBoxTrait(raw.innerContract) + cst_encode_RustOpaque_ArcdynGenericContractBoxTrait(raw.innerContract), ].jsify()!; } @@ -1145,15 +1731,16 @@ abstract class NekotonBridgeApiImplPlatform JSAny cst_encode_gql_connection_dart_wrapper(GqlConnectionDartWrapper raw) { // Codec=Cst (C-struct based), see doc to use other codecs return [ - cst_encode_RustOpaque_ArcdynGqlConnectionBoxTrait(raw.innerConnection) + cst_encode_RustOpaque_ArcdynGqlConnectionBoxTrait(raw.innerConnection), ].jsify()!; } @protected JSAny cst_encode_gql_transport_impl(GqlTransportImpl raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_ArcdynTransportBoxTrait(raw.innerTransport)] - .jsify()!; + return [ + cst_encode_RustOpaque_ArcdynTransportBoxTrait(raw.innerTransport), + ].jsify()!; } @protected @@ -1162,26 +1749,34 @@ abstract class NekotonBridgeApiImplPlatform return castNativeBigInt(raw); } + @protected + JSAny cst_encode_isize(PlatformInt64 raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return castNativeBigInt(raw); + } + @protected JSAny cst_encode_jetton_wallet_dart_wrapper(JettonWalletDartWrapper raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_ArcdynJettonWalletBoxTrait(raw.innerWallet)] - .jsify()!; + return [ + cst_encode_RustOpaque_ArcdynJettonWalletBoxTrait(raw.innerWallet), + ].jsify()!; } @protected JSAny cst_encode_jrpc_connection_dart_wrapper(JrpcConnectionDartWrapper raw) { // Codec=Cst (C-struct based), see doc to use other codecs return [ - cst_encode_RustOpaque_ArcdynJrpcConnectionBoxTrait(raw.innerConnection) + cst_encode_RustOpaque_ArcdynJrpcConnectionBoxTrait(raw.innerConnection), ].jsify()!; } @protected JSAny cst_encode_jrpc_transport_impl(JrpcTransportImpl raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_ArcdynTransportBoxTrait(raw.innerTransport)] - .jsify()!; + return [ + cst_encode_RustOpaque_ArcdynTransportBoxTrait(raw.innerTransport), + ].jsify()!; } @protected @@ -1206,8 +1801,9 @@ abstract class NekotonBridgeApiImplPlatform @protected JSAny cst_encode_keystore_dart_wrapper(KeystoreDartWrapper raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait(raw.innerKeystore)] - .jsify()!; + return [ + cst_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait(raw.innerKeystore), + ].jsify()!; } @protected @@ -1216,43 +1812,26 @@ abstract class NekotonBridgeApiImplPlatform return [ cst_encode_String(raw.id), cst_encode_u_64(raw.endLt), - cst_encode_u_32(raw.genUtime) + cst_encode_u_32(raw.genUtime), ].jsify()!; } @protected JSAny cst_encode_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper raw) { + LedgerConnectionDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return [ - cst_encode_RustOpaque_ArcdynLedgerConnectionBoxTrait(raw.innerConnection) + cst_encode_RustOpaque_ArcdynLedgerConnectionBoxTrait(raw.innerConnection), ].jsify()!; } - @protected - JSAny cst_encode_ledger_connection_impl(LedgerConnectionImpl raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_String(raw.instanceHash)].jsify()!; - } - @protected JSAny cst_encode_list_String(List raw) { // Codec=Cst (C-struct based), see doc to use other codecs return raw.map(cst_encode_String).toList().jsify()!; } - @protected - JSAny cst_encode_list_dynamic_named_value(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw.map(cst_encode_dynamic_named_value).toList().jsify()!; - } - - @protected - JSAny cst_encode_list_dynamic_value(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw.map(cst_encode_dynamic_value).toList().jsify()!; - } - @protected JSAny cst_encode_list_key_signer(List raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1297,7 +1876,7 @@ abstract class NekotonBridgeApiImplPlatform cst_encode_log_level(raw.level), cst_encode_String(raw.tag), cst_encode_String(raw.msg), - cst_encode_opt_String(raw.stack) + cst_encode_opt_String(raw.stack), ].jsify()!; } @@ -1308,19 +1887,15 @@ abstract class NekotonBridgeApiImplPlatform return [0].jsify()!; } if (raw is MnemonicType_Bip39) { - return [1, cst_encode_box_autoadd_bip_39_mnemonic_data(raw.field0)] - .jsify()!; + return [ + 1, + cst_encode_box_autoadd_bip_39_mnemonic_data(raw.field0), + ].jsify()!; } throw Exception('unreachable'); } - @protected - JSAny cst_encode_my_class(MyClass raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_i_32(raw.val)].jsify()!; - } - @protected String? cst_encode_opt_String(String? raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1333,12 +1908,6 @@ abstract class NekotonBridgeApiImplPlatform return raw == null ? null : cst_encode_box_autoadd_bool(raw); } - @protected - JSAny? cst_encode_opt_box_autoadd_dynamic_value(DynamicValue? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_dynamic_value(raw); - } - @protected int? cst_encode_opt_box_autoadd_i_32(int? raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1347,7 +1916,8 @@ abstract class NekotonBridgeApiImplPlatform @protected JSAny? cst_encode_opt_box_autoadd_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper? raw) { + LedgerConnectionDartWrapper? raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return raw == null ? null @@ -1368,18 +1938,20 @@ abstract class NekotonBridgeApiImplPlatform @protected JSAny cst_encode_proto_connection_dart_wrapper( - ProtoConnectionDartWrapper raw) { + ProtoConnectionDartWrapper raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return [ - cst_encode_RustOpaque_ArcdynProtoConnectionBoxTrait(raw.innerConnection) + cst_encode_RustOpaque_ArcdynProtoConnectionBoxTrait(raw.innerConnection), ].jsify()!; } @protected JSAny cst_encode_proto_transport_impl(ProtoTransportImpl raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_ArcdynTransportBoxTrait(raw.innerTransport)] - .jsify()!; + return [ + cst_encode_RustOpaque_ArcdynTransportBoxTrait(raw.innerTransport), + ].jsify()!; } @protected @@ -1401,7 +1973,7 @@ abstract class NekotonBridgeApiImplPlatform cst_encode_String(raw.dataHash), cst_encode_String(raw.signature), cst_encode_String(raw.signatureHex), - cst_encode_signature_parts(raw.signatureParts) + cst_encode_signature_parts(raw.signatureParts), ].jsify()!; } @@ -1411,35 +1983,32 @@ abstract class NekotonBridgeApiImplPlatform return [ cst_encode_String(raw.signature), cst_encode_String(raw.signatureHex), - cst_encode_signature_parts(raw.signatureParts) + cst_encode_signature_parts(raw.signatureParts), ].jsify()!; } @protected JSAny cst_encode_storage_dart_wrapper(StorageDartWrapper raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_ArcdynStorageBoxTrait(raw.innerStorage)] - .jsify()!; - } - - @protected - JSAny cst_encode_storage_impl(StorageImpl raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_String(raw.instanceHash)].jsify()!; + return [ + cst_encode_RustOpaque_ArcdynStorageBoxTrait(raw.innerStorage), + ].jsify()!; } @protected JSAny cst_encode_token_wallet_dart_wrapper(TokenWalletDartWrapper raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_ArcdynTokenWalletBoxTrait(raw.innerWallet)] - .jsify()!; + return [ + cst_encode_RustOpaque_ArcdynTokenWalletBoxTrait(raw.innerWallet), + ].jsify()!; } @protected JSAny cst_encode_ton_wallet_dart_wrapper(TonWalletDartWrapper raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_ArcdynTonWalletBoxTrait(raw.innerWallet)] - .jsify()!; + return [ + cst_encode_RustOpaque_ArcdynTonWalletBoxTrait(raw.innerWallet), + ].jsify()!; } @protected @@ -1452,7 +2021,7 @@ abstract class NekotonBridgeApiImplPlatform JSAny cst_encode_unsigned_message_impl(UnsignedMessageImpl raw) { // Codec=Cst (C-struct based), see doc to use other codecs return [ - cst_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait(raw.innerMessage) + cst_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait(raw.innerMessage), ].jsify()!; } @@ -1462,44 +2031,312 @@ abstract class NekotonBridgeApiImplPlatform return castNativeBigInt(raw); } + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ArcFnStringDartFnFutureOptionString raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ArcFnStringDartFnFuture raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ArcFnStringDartFnFutureString raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ArcFnStringStringDartFnFuture raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + ArcFnVecU8DartFnFutureVecU8 raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + ArcFnU16DartFnFutureVecU8 raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + ArcFnU16OptionI32VecU8DartFnFutureVecU8 raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl raw, + ); + + @protected + int + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl raw, + ); + + @protected + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl raw, + ); + + @protected + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl raw, + ); + + @protected + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl raw, + ); + + @protected + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl raw, + ); + + @protected + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl raw, + ); + + @protected + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl raw, + ); + + @protected + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl raw, + ); + + @protected + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl raw, + ); + + @protected + int + cst_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl raw, + ); + + @protected + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl raw, + ); + + @protected + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl raw, + ); + + @protected + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl raw, + ); + + @protected + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl raw, + ); + + @protected + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl raw, + ); + + @protected + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl raw, + ); + + @protected + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl raw, + ); + + @protected + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl raw, + ); + + @protected + int + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl raw, + ); + + @protected + PlatformPointer cst_encode_DartFn_Inputs_String_Output_String_AnyhowException( + FutureOr Function(String) raw, + ); + + @protected + PlatformPointer + cst_encode_DartFn_Inputs_String_Output_opt_String_AnyhowException( + FutureOr Function(String) raw, + ); + + @protected + PlatformPointer cst_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + FutureOr Function(String) raw, + ); + + @protected + PlatformPointer + cst_encode_DartFn_Inputs_String_String_Output_unit_AnyhowException( + FutureOr Function(String, String) raw, + ); + + @protected + PlatformPointer + cst_encode_DartFn_Inputs_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(Uint8List) raw, + ); + + @protected + PlatformPointer + cst_encode_DartFn_Inputs_u_16_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int) raw, + ); + + @protected + PlatformPointer + cst_encode_DartFn_Inputs_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int, int?, Uint8List) raw, + ); + + @protected + PlatformPointer + cst_encode_DartFn_Inputs_u_16_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_String_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int, int, int?, Uint8List, String) raw, + ); + + @protected + PlatformPointer cst_encode_DartOpaque(Object raw); + @protected int cst_encode_RustOpaque_ArcdynAccountsStorageBoxTrait( - ArcAccountsStorageBoxTrait raw); + ArcAccountsStorageBoxTrait raw, + ); @protected int cst_encode_RustOpaque_ArcdynGenericContractBoxTrait( - ArcGenericContractBoxTrait raw); + ArcGenericContractBoxTrait raw, + ); @protected int cst_encode_RustOpaque_ArcdynGqlConnectionBoxTrait( - ArcGqlConnectionBoxTrait raw); + ArcGqlConnectionBoxTrait raw, + ); @protected int cst_encode_RustOpaque_ArcdynJettonWalletBoxTrait( - ArcJettonWalletBoxTrait raw); + ArcJettonWalletBoxTrait raw, + ); @protected int cst_encode_RustOpaque_ArcdynJrpcConnectionBoxTrait( - ArcJrpcConnectionBoxTrait raw); + ArcJrpcConnectionBoxTrait raw, + ); @protected int cst_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait( - ArcKeyStoreApiBoxTrait raw); + ArcKeyStoreApiBoxTrait raw, + ); @protected int cst_encode_RustOpaque_ArcdynLedgerConnectionBoxTrait( - ArcLedgerConnectionBoxTrait raw); + ArcLedgerConnectionBoxTrait raw, + ); @protected int cst_encode_RustOpaque_ArcdynProtoConnectionBoxTrait( - ArcProtoConnectionBoxTrait raw); + ArcProtoConnectionBoxTrait raw, + ); @protected int cst_encode_RustOpaque_ArcdynStorageBoxTrait(ArcStorageBoxTrait raw); @protected int cst_encode_RustOpaque_ArcdynTokenWalletBoxTrait( - ArcTokenWalletBoxTrait raw); + ArcTokenWalletBoxTrait raw, + ); @protected int cst_encode_RustOpaque_ArcdynTonWalletBoxTrait(ArcTonWalletBoxTrait raw); @@ -1509,25 +2346,119 @@ abstract class NekotonBridgeApiImplPlatform @protected int cst_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait( - ArcUnsignedMessageBoxTrait raw); + ArcUnsignedMessageBoxTrait raw, + ); @protected - int cst_encode_bip_39_entropy(Bip39Entropy raw); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ArcFnStringDartFnFutureOptionString raw, + ); @protected - int cst_encode_bip_39_path(Bip39Path raw); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ArcFnStringDartFnFuture raw, + ); @protected - bool cst_encode_bool(bool raw); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ArcFnStringDartFnFutureString raw, + ); + + @protected + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ArcFnStringStringDartFnFuture raw, + ); + + @protected + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + ArcFnVecU8DartFnFutureVecU8 raw, + ); + + @protected + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + ArcFnU16DartFnFutureVecU8 raw, + ); + + @protected + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + ArcFnU16OptionI32VecU8DartFnFutureVecU8 raw, + ); + + @protected + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 raw, + ); @protected - int cst_encode_error_code(ErrorCode raw); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl raw, + ); @protected - double cst_encode_f_32(double raw); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl raw, + ); @protected - double cst_encode_f_64(double raw); + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl raw, + ); + + @protected + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl raw, + ); + + @protected + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl raw, + ); + + @protected + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl raw, + ); + + @protected + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl raw, + ); + + @protected + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl raw, + ); + + @protected + int + cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl raw, + ); + + @protected + int cst_encode_bip_39_entropy(Bip39Entropy raw); + + @protected + int cst_encode_bip_39_path(Bip39Path raw); + + @protected + bool cst_encode_bool(bool raw); @protected int cst_encode_i_32(int raw); @@ -1555,229 +2486,680 @@ abstract class NekotonBridgeApiImplPlatform @protected void sse_encode_AnyhowException( - AnyhowException self, SseSerializer serializer); + AnyhowException self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ArcFnStringDartFnFutureOptionString self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ArcFnStringDartFnFuture self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ArcFnStringDartFnFutureString self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ArcFnStringStringDartFnFuture self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + ArcFnVecU8DartFnFutureVecU8 self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + ArcFnU16DartFnFutureVecU8 self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + ArcFnU16OptionI32VecU8DartFnFutureVecU8 self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void sse_encode_DartFn_Inputs_String_Output_String_AnyhowException( + FutureOr Function(String) self, + SseSerializer serializer, + ); + + @protected + void sse_encode_DartFn_Inputs_String_Output_opt_String_AnyhowException( + FutureOr Function(String) self, + SseSerializer serializer, + ); + + @protected + void sse_encode_DartFn_Inputs_String_Output_unit_AnyhowException( + FutureOr Function(String) self, + SseSerializer serializer, + ); + + @protected + void sse_encode_DartFn_Inputs_String_String_Output_unit_AnyhowException( + FutureOr Function(String, String) self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_DartFn_Inputs_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(Uint8List) self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_DartFn_Inputs_u_16_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int) self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_DartFn_Inputs_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int, int?, Uint8List) self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_DartFn_Inputs_u_16_u_16_opt_box_autoadd_i_32_list_prim_u_8_strict_String_Output_list_prim_u_8_strict_AnyhowException( + FutureOr Function(int, int, int?, Uint8List, String) self, + SseSerializer serializer, + ); + + @protected + void sse_encode_DartOpaque(Object self, SseSerializer serializer); @protected void sse_encode_Map_String_String_None( - Map self, SseSerializer serializer); + Map self, + SseSerializer serializer, + ); @protected void sse_encode_RustOpaque_ArcdynAccountsStorageBoxTrait( - ArcAccountsStorageBoxTrait self, SseSerializer serializer); + ArcAccountsStorageBoxTrait self, + SseSerializer serializer, + ); @protected void sse_encode_RustOpaque_ArcdynGenericContractBoxTrait( - ArcGenericContractBoxTrait self, SseSerializer serializer); + ArcGenericContractBoxTrait self, + SseSerializer serializer, + ); @protected void sse_encode_RustOpaque_ArcdynGqlConnectionBoxTrait( - ArcGqlConnectionBoxTrait self, SseSerializer serializer); + ArcGqlConnectionBoxTrait self, + SseSerializer serializer, + ); @protected void sse_encode_RustOpaque_ArcdynJettonWalletBoxTrait( - ArcJettonWalletBoxTrait self, SseSerializer serializer); + ArcJettonWalletBoxTrait self, + SseSerializer serializer, + ); @protected void sse_encode_RustOpaque_ArcdynJrpcConnectionBoxTrait( - ArcJrpcConnectionBoxTrait self, SseSerializer serializer); + ArcJrpcConnectionBoxTrait self, + SseSerializer serializer, + ); @protected void sse_encode_RustOpaque_ArcdynKeyStoreApiBoxTrait( - ArcKeyStoreApiBoxTrait self, SseSerializer serializer); + ArcKeyStoreApiBoxTrait self, + SseSerializer serializer, + ); @protected void sse_encode_RustOpaque_ArcdynLedgerConnectionBoxTrait( - ArcLedgerConnectionBoxTrait self, SseSerializer serializer); + ArcLedgerConnectionBoxTrait self, + SseSerializer serializer, + ); @protected void sse_encode_RustOpaque_ArcdynProtoConnectionBoxTrait( - ArcProtoConnectionBoxTrait self, SseSerializer serializer); + ArcProtoConnectionBoxTrait self, + SseSerializer serializer, + ); @protected void sse_encode_RustOpaque_ArcdynStorageBoxTrait( - ArcStorageBoxTrait self, SseSerializer serializer); + ArcStorageBoxTrait self, + SseSerializer serializer, + ); @protected void sse_encode_RustOpaque_ArcdynTokenWalletBoxTrait( - ArcTokenWalletBoxTrait self, SseSerializer serializer); + ArcTokenWalletBoxTrait self, + SseSerializer serializer, + ); @protected void sse_encode_RustOpaque_ArcdynTonWalletBoxTrait( - ArcTonWalletBoxTrait self, SseSerializer serializer); + ArcTonWalletBoxTrait self, + SseSerializer serializer, + ); @protected void sse_encode_RustOpaque_ArcdynTransportBoxTrait( - ArcTransportBoxTrait self, SseSerializer serializer); + ArcTransportBoxTrait self, + SseSerializer serializer, + ); @protected void sse_encode_RustOpaque_ArcdynUnsignedMessageBoxTrait( - ArcUnsignedMessageBoxTrait self, SseSerializer serializer); + ArcUnsignedMessageBoxTrait self, + SseSerializer serializer, + ); @protected - void sse_encode_StreamSink_dart_call_stub_registred_Dco( - RustStreamSink self, SseSerializer serializer); + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ArcFnStringDartFnFutureOptionString self, + SseSerializer serializer, + ); @protected - void sse_encode_StreamSink_log_entry_Dco( - RustStreamSink self, SseSerializer serializer); + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ArcFnStringDartFnFuture self, + SseSerializer serializer, + ); @protected - void sse_encode_String(String self, SseSerializer serializer); + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ArcFnStringDartFnFutureString self, + SseSerializer serializer, + ); @protected - void sse_encode_accounts_storage_impl( - AccountsStorageImpl self, SseSerializer serializer); + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ArcFnStringStringDartFnFuture self, + SseSerializer serializer, + ); @protected - void sse_encode_bip_39_entropy(Bip39Entropy self, SseSerializer serializer); + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + ArcFnVecU8DartFnFutureVecU8 self, + SseSerializer serializer, + ); @protected - void sse_encode_bip_39_mnemonic_data( - Bip39MnemonicData self, SseSerializer serializer); + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + ArcFnU16DartFnFutureVecU8 self, + SseSerializer serializer, + ); @protected - void sse_encode_bip_39_path(Bip39Path self, SseSerializer serializer); + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + ArcFnU16OptionI32VecU8DartFnFutureVecU8 self, + SseSerializer serializer, + ); @protected - void sse_encode_bool(bool self, SseSerializer serializer); + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 self, + SseSerializer serializer, + ); @protected - void sse_encode_box_autoadd_accounts_storage_impl( - AccountsStorageImpl self, SseSerializer serializer); + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + GenericContractSubscriptionHandlerImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_box_autoadd_bip_39_mnemonic_data( - Bip39MnemonicData self, SseSerializer serializer); + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + GqlConnectionImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_box_autoadd_bool(bool self, SseSerializer serializer); + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + JettonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + JrpcConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + LedgerConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ProtoConnectionImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + StorageImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + TokenWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void + sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + TonWalletSubscriptionHandlerImpl self, + SseSerializer serializer, + ); + + @protected + void sse_encode_StreamSink_log_entry_Dco( + RustStreamSink self, + SseSerializer serializer, + ); + + @protected + void sse_encode_String(String self, SseSerializer serializer); + + @protected + void sse_encode_accounts_storage_impl( + AccountsStorageImpl self, + SseSerializer serializer, + ); + + @protected + void sse_encode_bip_39_entropy(Bip39Entropy self, SseSerializer serializer); + + @protected + void sse_encode_bip_39_mnemonic_data( + Bip39MnemonicData self, + SseSerializer serializer, + ); + + @protected + void sse_encode_bip_39_path(Bip39Path self, SseSerializer serializer); + + @protected + void sse_encode_bool(bool self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_caller_test_class( - CallerTestClass self, SseSerializer serializer); + void sse_encode_box_autoadd_accounts_storage_impl( + AccountsStorageImpl self, + SseSerializer serializer, + ); @protected - void sse_encode_box_autoadd_dart_call_stub( - DartCallStub self, SseSerializer serializer); + void sse_encode_box_autoadd_bip_39_mnemonic_data( + Bip39MnemonicData self, + SseSerializer serializer, + ); @protected - void sse_encode_box_autoadd_dynamic_value( - DynamicValue self, SseSerializer serializer); + void sse_encode_box_autoadd_bool(bool self, SseSerializer serializer); @protected void sse_encode_box_autoadd_generic_contract_dart_wrapper( - GenericContractDartWrapper self, SseSerializer serializer); + GenericContractDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_gql_connection_dart_wrapper( - GqlConnectionDartWrapper self, SseSerializer serializer); + GqlConnectionDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_gql_transport_impl( - GqlTransportImpl self, SseSerializer serializer); + GqlTransportImpl self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_i_32(int self, SseSerializer serializer); @protected void sse_encode_box_autoadd_jetton_wallet_dart_wrapper( - JettonWalletDartWrapper self, SseSerializer serializer); + JettonWalletDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_jrpc_connection_dart_wrapper( - JrpcConnectionDartWrapper self, SseSerializer serializer); + JrpcConnectionDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_jrpc_transport_impl( - JrpcTransportImpl self, SseSerializer serializer); + JrpcTransportImpl self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_key_signer( - KeySigner self, SseSerializer serializer); + KeySigner self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_keystore_dart_wrapper( - KeystoreDartWrapper self, SseSerializer serializer); + KeystoreDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper self, SseSerializer serializer); + LedgerConnectionDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_mnemonic_type( - MnemonicType self, SseSerializer serializer); - - @protected - void sse_encode_box_autoadd_my_class(MyClass self, SseSerializer serializer); + MnemonicType self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_proto_connection_dart_wrapper( - ProtoConnectionDartWrapper self, SseSerializer serializer); + ProtoConnectionDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_proto_transport_impl( - ProtoTransportImpl self, SseSerializer serializer); + ProtoTransportImpl self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_storage_dart_wrapper( - StorageDartWrapper self, SseSerializer serializer); + StorageDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_token_wallet_dart_wrapper( - TokenWalletDartWrapper self, SseSerializer serializer); + TokenWalletDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_ton_wallet_dart_wrapper( - TonWalletDartWrapper self, SseSerializer serializer); + TonWalletDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer); @protected void sse_encode_box_autoadd_unsigned_message_impl( - UnsignedMessageImpl self, SseSerializer serializer); - - @protected - void sse_encode_caller_test_class( - CallerTestClass self, SseSerializer serializer); - - @protected - void sse_encode_dart_call_stub(DartCallStub self, SseSerializer serializer); - - @protected - void sse_encode_dart_call_stub_registred( - DartCallStubRegistred self, SseSerializer serializer); - - @protected - void sse_encode_dynamic_named_value( - DynamicNamedValue self, SseSerializer serializer); - - @protected - void sse_encode_dynamic_value(DynamicValue self, SseSerializer serializer); - - @protected - void sse_encode_error_code(ErrorCode self, SseSerializer serializer); - - @protected - void sse_encode_f_32(double self, SseSerializer serializer); - - @protected - void sse_encode_f_64(double self, SseSerializer serializer); + UnsignedMessageImpl self, + SseSerializer serializer, + ); @protected void sse_encode_generated_key_g(GeneratedKeyG self, SseSerializer serializer); @protected void sse_encode_generic_contract_dart_wrapper( - GenericContractDartWrapper self, SseSerializer serializer); + GenericContractDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_gql_connection_dart_wrapper( - GqlConnectionDartWrapper self, SseSerializer serializer); + GqlConnectionDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_gql_transport_impl( - GqlTransportImpl self, SseSerializer serializer); + GqlTransportImpl self, + SseSerializer serializer, + ); @protected void sse_encode_i_32(int self, SseSerializer serializer); @@ -1788,69 +3170,80 @@ abstract class NekotonBridgeApiImplPlatform @protected void sse_encode_i_8(int self, SseSerializer serializer); + @protected + void sse_encode_isize(PlatformInt64 self, SseSerializer serializer); + @protected void sse_encode_jetton_wallet_dart_wrapper( - JettonWalletDartWrapper self, SseSerializer serializer); + JettonWalletDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_jrpc_connection_dart_wrapper( - JrpcConnectionDartWrapper self, SseSerializer serializer); + JrpcConnectionDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_jrpc_transport_impl( - JrpcTransportImpl self, SseSerializer serializer); + JrpcTransportImpl self, + SseSerializer serializer, + ); @protected void sse_encode_key_signer(KeySigner self, SseSerializer serializer); @protected void sse_encode_keystore_dart_wrapper( - KeystoreDartWrapper self, SseSerializer serializer); + KeystoreDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_latest_block(LatestBlock self, SseSerializer serializer); @protected void sse_encode_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper self, SseSerializer serializer); - - @protected - void sse_encode_ledger_connection_impl( - LedgerConnectionImpl self, SseSerializer serializer); + LedgerConnectionDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_list_String(List self, SseSerializer serializer); - @protected - void sse_encode_list_dynamic_named_value( - List self, SseSerializer serializer); - - @protected - void sse_encode_list_dynamic_value( - List self, SseSerializer serializer); - @protected void sse_encode_list_key_signer( - List self, SseSerializer serializer); + List self, + SseSerializer serializer, + ); @protected void sse_encode_list_opt_String(List self, SseSerializer serializer); @protected void sse_encode_list_prim_i_32_loose( - List self, SseSerializer serializer); + List self, + SseSerializer serializer, + ); @protected void sse_encode_list_prim_i_32_strict( - Int32List self, SseSerializer serializer); + Int32List self, + SseSerializer serializer, + ); @protected void sse_encode_list_prim_u_8_strict( - Uint8List self, SseSerializer serializer); + Uint8List self, + SseSerializer serializer, + ); @protected void sse_encode_list_record_string_string( - List<(String, String)> self, SseSerializer serializer); + List<(String, String)> self, + SseSerializer serializer, + ); @protected void sse_encode_log_entry(LogEntry self, SseSerializer serializer); @@ -1861,25 +3254,20 @@ abstract class NekotonBridgeApiImplPlatform @protected void sse_encode_mnemonic_type(MnemonicType self, SseSerializer serializer); - @protected - void sse_encode_my_class(MyClass self, SseSerializer serializer); - @protected void sse_encode_opt_String(String? self, SseSerializer serializer); @protected void sse_encode_opt_box_autoadd_bool(bool? self, SseSerializer serializer); - @protected - void sse_encode_opt_box_autoadd_dynamic_value( - DynamicValue? self, SseSerializer serializer); - @protected void sse_encode_opt_box_autoadd_i_32(int? self, SseSerializer serializer); @protected void sse_encode_opt_box_autoadd_ledger_connection_dart_wrapper( - LedgerConnectionDartWrapper? self, SseSerializer serializer); + LedgerConnectionDartWrapper? self, + SseSerializer serializer, + ); @protected void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer); @@ -1892,19 +3280,27 @@ abstract class NekotonBridgeApiImplPlatform @protected void sse_encode_proto_connection_dart_wrapper( - ProtoConnectionDartWrapper self, SseSerializer serializer); + ProtoConnectionDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_proto_transport_impl( - ProtoTransportImpl self, SseSerializer serializer); + ProtoTransportImpl self, + SseSerializer serializer, + ); @protected void sse_encode_record_string_string( - (String, String) self, SseSerializer serializer); + (String, String) self, + SseSerializer serializer, + ); @protected void sse_encode_signature_parts( - SignatureParts self, SseSerializer serializer); + SignatureParts self, + SseSerializer serializer, + ); @protected void sse_encode_signed_data(SignedData self, SseSerializer serializer); @@ -1914,18 +3310,21 @@ abstract class NekotonBridgeApiImplPlatform @protected void sse_encode_storage_dart_wrapper( - StorageDartWrapper self, SseSerializer serializer); - - @protected - void sse_encode_storage_impl(StorageImpl self, SseSerializer serializer); + StorageDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_token_wallet_dart_wrapper( - TokenWalletDartWrapper self, SseSerializer serializer); + TokenWalletDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_ton_wallet_dart_wrapper( - TonWalletDartWrapper self, SseSerializer serializer); + TonWalletDartWrapper self, + SseSerializer serializer, + ); @protected void sse_encode_u_16(int self, SseSerializer serializer); @@ -1944,7 +3343,9 @@ abstract class NekotonBridgeApiImplPlatform @protected void sse_encode_unsigned_message_impl( - UnsignedMessageImpl self, SseSerializer serializer); + UnsignedMessageImpl self, + SseSerializer serializer, + ); @protected void sse_encode_usize(BigInt self, SseSerializer serializer); @@ -1955,1670 +3356,3153 @@ abstract class NekotonBridgeApiImplPlatform class NekotonBridgeWire implements BaseWire { NekotonBridgeWire.fromExternalLibrary(ExternalLibrary lib); + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_expired( + int that, + ) => wasmModule + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_expired( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_sent( + int that, + ) => wasmModule + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_sent( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_state_changed( + int that, + ) => wasmModule + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_state_changed( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + int that, + ) => wasmModule + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_expired( + int that, + int on_message_expired, + ) => wasmModule + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_expired( + that, + on_message_expired, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_sent( + int that, + int on_message_sent, + ) => wasmModule + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_sent( + that, + on_message_sent, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_state_changed( + int that, + int on_state_changed, + ) => wasmModule + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_state_changed( + that, + on_state_changed, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + int that, + int on_transactions_found, + ) => wasmModule + .wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + that, + on_transactions_found, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_is_local( + int that, + ) => wasmModule + .wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_is_local( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_on_post( + int that, + ) => wasmModule + .wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_on_post( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_is_local( + int that, + bool is_local, + ) => wasmModule + .wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_is_local( + that, + is_local, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_on_post( + int that, + int on_post, + ) => wasmModule + .wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_on_post( + that, + on_post, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed( + int that, + ) => wasmModule + .wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + int that, + ) => wasmModule + .wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed( + int that, + int on_balance_changed, + ) => wasmModule + .wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed( + that, + on_balance_changed, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + int that, + int on_transactions_found, + ) => wasmModule + .wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + that, + on_transactions_found, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_get_on_post( + int that, + ) => wasmModule + .wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_get_on_post( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_set_on_post( + int that, + int on_post, + ) => wasmModule + .wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_set_on_post( + that, + on_post, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_get_public_key( + int that, + ) => wasmModule + .wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_get_public_key( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign( + int that, + ) => wasmModule + .wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign_transaction( + int that, + ) => wasmModule + .wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign_transaction( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_get_public_key( + int that, + int on_get_public_key, + ) => wasmModule + .wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_get_public_key( + that, + on_get_public_key, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign( + int that, + int on_sign, + ) => wasmModule + .wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign( + that, + on_sign, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign_transaction( + int that, + int on_sign_transaction, + ) => wasmModule + .wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign_transaction( + that, + on_sign_transaction, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_get_on_post( + int that, + ) => wasmModule + .wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_get_on_post( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_set_on_post( + int that, + int on_post, + ) => wasmModule + .wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_set_on_post( + that, + on_post, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_get(int that) => + wasmModule.wire__crate__api__merged__StorageImpl_auto_accessor_get_on_get( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove(int that) => + wasmModule + .wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove_unchecked( + int that, + ) => wasmModule + .wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove_unchecked( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set(int that) => + wasmModule.wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set_unchecked( + int that, + ) => wasmModule + .wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set_unchecked( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_get( + int that, + int on_get, + ) => + wasmModule.wire__crate__api__merged__StorageImpl_auto_accessor_set_on_get( + that, + on_get, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove( + int that, + int on_remove, + ) => wasmModule + .wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove( + that, + on_remove, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove_unchecked( + int that, + int on_remove_unchecked, + ) => wasmModule + .wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove_unchecked( + that, + on_remove_unchecked, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set( + int that, + int on_set, + ) => + wasmModule.wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set( + that, + on_set, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set_unchecked( + int that, + int on_set_unchecked, + ) => wasmModule + .wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set_unchecked( + that, + on_set_unchecked, + ); + + void wire__crate__api__merged__StorageImpl_new( + NativePortType port_, + int on_get, + int on_set, + int on_set_unchecked, + int on_remove, + int on_remove_unchecked, + ) => wasmModule.wire__crate__api__merged__StorageImpl_new( + port_, + on_get, + on_set, + on_set_unchecked, + on_remove, + on_remove_unchecked, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed( + int that, + ) => wasmModule + .wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + int that, + ) => wasmModule + .wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed( + int that, + int on_balance_changed, + ) => wasmModule + .wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed( + that, + on_balance_changed, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + int that, + int on_transactions_found, + ) => wasmModule + .wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + that, + on_transactions_found, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_custodians_changed( + int that, + ) => wasmModule + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_custodians_changed( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_details_changed( + int that, + ) => wasmModule + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_details_changed( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_expired( + int that, + ) => wasmModule + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_expired( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_sent( + int that, + ) => wasmModule + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_sent( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_state_changed( + int that, + ) => wasmModule + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_state_changed( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + int that, + ) => wasmModule + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_unconfirmed_transactions_changed( + int that, + ) => wasmModule + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_unconfirmed_transactions_changed( + that, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_custodians_changed( + int that, + int on_custodians_changed, + ) => wasmModule + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_custodians_changed( + that, + on_custodians_changed, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_details_changed( + int that, + int on_details_changed, + ) => wasmModule + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_details_changed( + that, + on_details_changed, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_expired( + int that, + int on_message_expired, + ) => wasmModule + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_expired( + that, + on_message_expired, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_sent( + int that, + int on_message_sent, + ) => wasmModule + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_sent( + that, + on_message_sent, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_state_changed( + int that, + int on_state_changed, + ) => wasmModule + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_state_changed( + that, + on_state_changed, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + int that, + int on_transactions_found, + ) => wasmModule + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + that, + on_transactions_found, + ); + + JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_unconfirmed_transactions_changed( + int that, + int on_unconfirmed_transactions_changed, + ) => wasmModule + .wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_unconfirmed_transactions_changed( + that, + on_unconfirmed_transactions_changed, + ); + void wire__crate__api__merged__accounts_storage_impl_add_account( - NativePortType port_, JSAny that, String account) => - wasmModule.wire__crate__api__merged__accounts_storage_impl_add_account( - port_, that, account); + NativePortType port_, + JSAny that, + String account, + ) => wasmModule.wire__crate__api__merged__accounts_storage_impl_add_account( + port_, + that, + account, + ); void wire__crate__api__merged__accounts_storage_impl_add_accounts( - NativePortType port_, JSAny that, String accounts) => - wasmModule.wire__crate__api__merged__accounts_storage_impl_add_accounts( - port_, that, accounts); + NativePortType port_, + JSAny that, + String accounts, + ) => wasmModule.wire__crate__api__merged__accounts_storage_impl_add_accounts( + port_, + that, + accounts, + ); void wire__crate__api__merged__accounts_storage_impl_add_token_wallet( - NativePortType port_, - JSAny that, - String account_address, - String network_group, - String root_token_contract) => - wasmModule - .wire__crate__api__merged__accounts_storage_impl_add_token_wallet( - port_, that, account_address, network_group, root_token_contract); + NativePortType port_, + JSAny that, + String account_address, + String network_group, + String root_token_contract, + ) => wasmModule + .wire__crate__api__merged__accounts_storage_impl_add_token_wallet( + port_, + that, + account_address, + network_group, + root_token_contract, + ); void wire__crate__api__merged__accounts_storage_impl_add_token_wallets( - NativePortType port_, - JSAny that, - String account_address, - String network_group, - JSAny root_token_contracts) => - wasmModule - .wire__crate__api__merged__accounts_storage_impl_add_token_wallets( - port_, - that, - account_address, - network_group, - root_token_contracts); + NativePortType port_, + JSAny that, + String account_address, + String network_group, + JSAny root_token_contracts, + ) => wasmModule + .wire__crate__api__merged__accounts_storage_impl_add_token_wallets( + port_, + that, + account_address, + network_group, + root_token_contracts, + ); void wire__crate__api__merged__accounts_storage_impl_clear( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__accounts_storage_impl_clear( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__accounts_storage_impl_clear( + port_, + that, + ); void wire__crate__api__merged__accounts_storage_impl_get_entries( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__accounts_storage_impl_get_entries( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__accounts_storage_impl_get_entries( + port_, + that, + ); void wire__crate__api__merged__accounts_storage_impl_new( - NativePortType port_, JSAny storage) => - wasmModule.wire__crate__api__merged__accounts_storage_impl_new( - port_, storage); + NativePortType port_, + JSAny storage, + ) => wasmModule.wire__crate__api__merged__accounts_storage_impl_new( + port_, + storage, + ); void wire__crate__api__merged__accounts_storage_impl_reload( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__accounts_storage_impl_reload( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__accounts_storage_impl_reload( + port_, + that, + ); void wire__crate__api__merged__accounts_storage_impl_remove_account( - NativePortType port_, JSAny that, String account_address) => + NativePortType port_, + JSAny that, + String account_address, + ) => wasmModule.wire__crate__api__merged__accounts_storage_impl_remove_account( - port_, that, account_address); + port_, + that, + account_address, + ); void wire__crate__api__merged__accounts_storage_impl_remove_accounts( - NativePortType port_, JSAny that, JSAny account_addresses) => - wasmModule - .wire__crate__api__merged__accounts_storage_impl_remove_accounts( - port_, that, account_addresses); + NativePortType port_, + JSAny that, + JSAny account_addresses, + ) => wasmModule + .wire__crate__api__merged__accounts_storage_impl_remove_accounts( + port_, + that, + account_addresses, + ); void wire__crate__api__merged__accounts_storage_impl_remove_token_wallet( - NativePortType port_, - JSAny that, - String account_address, - String network_group, - String root_token_contract) => - wasmModule - .wire__crate__api__merged__accounts_storage_impl_remove_token_wallet( - port_, that, account_address, network_group, root_token_contract); + NativePortType port_, + JSAny that, + String account_address, + String network_group, + String root_token_contract, + ) => wasmModule + .wire__crate__api__merged__accounts_storage_impl_remove_token_wallet( + port_, + that, + account_address, + network_group, + root_token_contract, + ); void wire__crate__api__merged__accounts_storage_impl_remove_token_wallets( - NativePortType port_, - JSAny that, - String account_address, - String network_group, - JSAny root_token_contracts) => - wasmModule - .wire__crate__api__merged__accounts_storage_impl_remove_token_wallets( - port_, - that, - account_address, - network_group, - root_token_contracts); + NativePortType port_, + JSAny that, + String account_address, + String network_group, + JSAny root_token_contracts, + ) => wasmModule + .wire__crate__api__merged__accounts_storage_impl_remove_token_wallets( + port_, + that, + account_address, + network_group, + root_token_contracts, + ); void wire__crate__api__merged__accounts_storage_impl_rename_account( - NativePortType port_, - JSAny that, - String account_address, - String name) => + NativePortType port_, + JSAny that, + String account_address, + String name, + ) => wasmModule.wire__crate__api__merged__accounts_storage_impl_rename_account( - port_, that, account_address, name); + port_, + that, + account_address, + name, + ); void wire__crate__api__merged__accounts_storage_impl_verify_data( - NativePortType port_, String data) => - wasmModule.wire__crate__api__merged__accounts_storage_impl_verify_data( - port_, data); - - JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__call_send_result(String id, JSAny value) => - wasmModule.wire__crate__api__merged__call_send_result(id, value); - - void wire__crate__api__merged__caller_test_class_call_some_func( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__caller_test_class_call_some_func( - port_, that); - - void wire__crate__api__merged__caller_test_class_new( - NativePortType port_, String instance_hash, int value) => - wasmModule.wire__crate__api__merged__caller_test_class_new( - port_, instance_hash, value); + NativePortType port_, + String data, + ) => wasmModule.wire__crate__api__merged__accounts_storage_impl_verify_data( + port_, + data, + ); void wire__crate__api__merged__create_log_stream( - NativePortType port_, String s) => - wasmModule.wire__crate__api__merged__create_log_stream(port_, s); + NativePortType port_, + String s, + ) => wasmModule.wire__crate__api__merged__create_log_stream(port_, s); void wire__crate__api__merged__generic_contract_dart_wrapper_address( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__generic_contract_dart_wrapper_address( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__generic_contract_dart_wrapper_address( + port_, + that, + ); void wire__crate__api__merged__generic_contract_dart_wrapper_contract_state( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__generic_contract_dart_wrapper_contract_state( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__generic_contract_dart_wrapper_contract_state( + port_, + that, + ); void wire__crate__api__merged__generic_contract_dart_wrapper_estimate_fees( - NativePortType port_, JSAny that, String signed_message) => - wasmModule - .wire__crate__api__merged__generic_contract_dart_wrapper_estimate_fees( - port_, that, signed_message); - - void wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locally( - NativePortType port_, - JSAny that, - String signed_message, - String options) => - wasmModule - .wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locally( - port_, that, signed_message, options); + NativePortType port_, + JSAny that, + String signed_message, + ) => wasmModule + .wire__crate__api__merged__generic_contract_dart_wrapper_estimate_fees( + port_, + that, + signed_message, + ); + + void + wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locally( + NativePortType port_, + JSAny that, + String signed_message, + String options, + ) => wasmModule + .wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locally( + port_, + that, + signed_message, + options, + ); void wire__crate__api__merged__generic_contract_dart_wrapper_handle_block( - NativePortType port_, JSAny that, String block) => - wasmModule - .wire__crate__api__merged__generic_contract_dart_wrapper_handle_block( - port_, that, block); - - void wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactions( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactions( - port_, that); + NativePortType port_, + JSAny that, + String block, + ) => wasmModule + .wire__crate__api__merged__generic_contract_dart_wrapper_handle_block( + port_, + that, + block, + ); + + void + wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactions( + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactions( + port_, + that, + ); void wire__crate__api__merged__generic_contract_dart_wrapper_polling_method( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__generic_contract_dart_wrapper_polling_method( - port_, that); - - void wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactions( - NativePortType port_, JSAny that, String from_lt) => - wasmModule - .wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactions( - port_, that, from_lt); + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__generic_contract_dart_wrapper_polling_method( + port_, + that, + ); + + void + wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactions( + NativePortType port_, + JSAny that, + String from_lt, + ) => wasmModule + .wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactions( + port_, + that, + from_lt, + ); void wire__crate__api__merged__generic_contract_dart_wrapper_refresh( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__generic_contract_dart_wrapper_refresh( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__generic_contract_dart_wrapper_refresh( + port_, + that, + ); void wire__crate__api__merged__generic_contract_dart_wrapper_send( - NativePortType port_, JSAny that, String signed_message) => - wasmModule.wire__crate__api__merged__generic_contract_dart_wrapper_send( - port_, that, signed_message); + NativePortType port_, + JSAny that, + String signed_message, + ) => wasmModule.wire__crate__api__merged__generic_contract_dart_wrapper_send( + port_, + that, + signed_message, + ); void wire__crate__api__merged__generic_contract_dart_wrapper_subscribe( - NativePortType port_, - String instance_hash, - String address, - bool preload_transactions, - int transport) => - wasmModule - .wire__crate__api__merged__generic_contract_dart_wrapper_subscribe( - port_, instance_hash, address, preload_transactions, transport); + NativePortType port_, + String address, + bool preload_transactions, + int transport, + PlatformPointer on_message_sent, + PlatformPointer on_message_expired, + PlatformPointer on_state_changed, + PlatformPointer on_transactions_found, + ) => wasmModule + .wire__crate__api__merged__generic_contract_dart_wrapper_subscribe( + port_, + address, + preload_transactions, + transport, + on_message_sent, + on_message_expired, + on_state_changed, + on_transactions_found, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__gql_connection_dart_wrapper_new( - bool is_local, String instance_hash) => - wasmModule.wire__crate__api__merged__gql_connection_dart_wrapper_new( - is_local, instance_hash); + wire__crate__api__merged__gql_connection_dart_wrapper_new( + bool is_local, + PlatformPointer on_post, + ) => wasmModule.wire__crate__api__merged__gql_connection_dart_wrapper_new( + is_local, + on_post, + ); void wire__crate__api__merged__gql_transport_impl_get_accounts_by_code_hash( - NativePortType port_, - JSAny that, - String code_hash, - int limit, - String? continuation) => - wasmModule - .wire__crate__api__merged__gql_transport_impl_get_accounts_by_code_hash( - port_, that, code_hash, limit, continuation); + NativePortType port_, + JSAny that, + String code_hash, + int limit, + String? continuation, + ) => wasmModule + .wire__crate__api__merged__gql_transport_impl_get_accounts_by_code_hash( + port_, + that, + code_hash, + limit, + continuation, + ); void wire__crate__api__merged__gql_transport_impl_get_block( - NativePortType port_, JSAny that, String id) => - wasmModule.wire__crate__api__merged__gql_transport_impl_get_block( - port_, that, id); + NativePortType port_, + JSAny that, + String id, + ) => wasmModule.wire__crate__api__merged__gql_transport_impl_get_block( + port_, + that, + id, + ); void wire__crate__api__merged__gql_transport_impl_get_blockchain_config( - NativePortType port_, JSAny that, bool force) => - wasmModule - .wire__crate__api__merged__gql_transport_impl_get_blockchain_config( - port_, that, force); + NativePortType port_, + JSAny that, + bool force, + ) => wasmModule + .wire__crate__api__merged__gql_transport_impl_get_blockchain_config( + port_, + that, + force, + ); void wire__crate__api__merged__gql_transport_impl_get_contract_state( - NativePortType port_, JSAny that, String address) => - wasmModule - .wire__crate__api__merged__gql_transport_impl_get_contract_state( - port_, that, address); + NativePortType port_, + JSAny that, + String address, + ) => wasmModule + .wire__crate__api__merged__gql_transport_impl_get_contract_state( + port_, + that, + address, + ); void wire__crate__api__merged__gql_transport_impl_get_dst_transaction( - NativePortType port_, JSAny that, String message_hash) => - wasmModule - .wire__crate__api__merged__gql_transport_impl_get_dst_transaction( - port_, that, message_hash); + NativePortType port_, + JSAny that, + String message_hash, + ) => wasmModule + .wire__crate__api__merged__gql_transport_impl_get_dst_transaction( + port_, + that, + message_hash, + ); void wire__crate__api__merged__gql_transport_impl_get_fee_factors( - NativePortType port_, JSAny that, bool is_masterchain) => - wasmModule.wire__crate__api__merged__gql_transport_impl_get_fee_factors( - port_, that, is_masterchain); + NativePortType port_, + JSAny that, + bool is_masterchain, + ) => wasmModule.wire__crate__api__merged__gql_transport_impl_get_fee_factors( + port_, + that, + is_masterchain, + ); void wire__crate__api__merged__gql_transport_impl_get_full_contract_state( - NativePortType port_, JSAny that, String address) => - wasmModule - .wire__crate__api__merged__gql_transport_impl_get_full_contract_state( - port_, that, address); + NativePortType port_, + JSAny that, + String address, + ) => wasmModule + .wire__crate__api__merged__gql_transport_impl_get_full_contract_state( + port_, + that, + address, + ); void wire__crate__api__merged__gql_transport_impl_get_latest_block( - NativePortType port_, JSAny that, String address) => - wasmModule.wire__crate__api__merged__gql_transport_impl_get_latest_block( - port_, that, address); + NativePortType port_, + JSAny that, + String address, + ) => wasmModule.wire__crate__api__merged__gql_transport_impl_get_latest_block( + port_, + that, + address, + ); void wire__crate__api__merged__gql_transport_impl_get_network_id( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__gql_transport_impl_get_network_id( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__gql_transport_impl_get_network_id( + port_, + that, + ); void wire__crate__api__merged__gql_transport_impl_get_signature_id( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__gql_transport_impl_get_signature_id( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__gql_transport_impl_get_signature_id( + port_, + that, + ); void wire__crate__api__merged__gql_transport_impl_get_transaction( - NativePortType port_, JSAny that, String hash) => - wasmModule.wire__crate__api__merged__gql_transport_impl_get_transaction( - port_, that, hash); + NativePortType port_, + JSAny that, + String hash, + ) => wasmModule.wire__crate__api__merged__gql_transport_impl_get_transaction( + port_, + that, + hash, + ); void wire__crate__api__merged__gql_transport_impl_get_transactions( - NativePortType port_, - JSAny that, - String address, - String? from_lt, - int count) => - wasmModule.wire__crate__api__merged__gql_transport_impl_get_transactions( - port_, that, address, from_lt, count); + NativePortType port_, + JSAny that, + String address, + String? from_lt, + int count, + ) => wasmModule.wire__crate__api__merged__gql_transport_impl_get_transactions( + port_, + that, + address, + from_lt, + count, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__gql_transport_impl_new(JSAny gql_connection) => - wasmModule - .wire__crate__api__merged__gql_transport_impl_new(gql_connection); + wire__crate__api__merged__gql_transport_impl_new(JSAny gql_connection) => + wasmModule.wire__crate__api__merged__gql_transport_impl_new( + gql_connection, + ); void wire__crate__api__merged__gql_transport_impl_simulate_transaction_tree( - NativePortType port_, - JSAny that, - String signed_message, - JSAny ignored_compute_phase_codes, - JSAny ignored_action_phase_codes) => - wasmModule - .wire__crate__api__merged__gql_transport_impl_simulate_transaction_tree( - port_, - that, - signed_message, - ignored_compute_phase_codes, - ignored_action_phase_codes); + NativePortType port_, + JSAny that, + String signed_message, + JSAny ignored_compute_phase_codes, + JSAny ignored_action_phase_codes, + ) => wasmModule + .wire__crate__api__merged__gql_transport_impl_simulate_transaction_tree( + port_, + that, + signed_message, + ignored_compute_phase_codes, + ignored_action_phase_codes, + ); void wire__crate__api__merged__gql_transport_impl_wait_for_next_block( - NativePortType port_, - JSAny that, - String current_block_id, - String address, - JSAny timeout) => - wasmModule - .wire__crate__api__merged__gql_transport_impl_wait_for_next_block( - port_, that, current_block_id, address, timeout); - - void wire__crate__api__merged__init_caller( - NativePortType port_, String stream_sink) => - wasmModule.wire__crate__api__merged__init_caller(port_, stream_sink); + NativePortType port_, + JSAny that, + String current_block_id, + String address, + JSAny timeout, + ) => wasmModule + .wire__crate__api__merged__gql_transport_impl_wait_for_next_block( + port_, + that, + current_block_id, + address, + timeout, + ); void wire__crate__api__merged__init_logger( - NativePortType port_, int level, bool mobile_logger) => - wasmModule.wire__crate__api__merged__init_logger( - port_, level, mobile_logger); + NativePortType port_, + int level, + bool mobile_logger, + ) => wasmModule.wire__crate__api__merged__init_logger( + port_, + level, + mobile_logger, + ); void wire__crate__api__merged__jetton_wallet_dart_wrapper_address( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__jetton_wallet_dart_wrapper_address( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__jetton_wallet_dart_wrapper_address( + port_, + that, + ); void wire__crate__api__merged__jetton_wallet_dart_wrapper_balance( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__jetton_wallet_dart_wrapper_balance( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__jetton_wallet_dart_wrapper_balance( + port_, + that, + ); void wire__crate__api__merged__jetton_wallet_dart_wrapper_contract_state( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__jetton_wallet_dart_wrapper_contract_state( - port_, that); - - void wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amount( - NativePortType port_, JSAny that, String destination) => - wasmModule - .wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amount( - port_, that, destination); - - void wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details( - NativePortType port_, int transport, String token_root_address) => - wasmModule - .wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details( - port_, transport, token_root_address); - - void wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet( - NativePortType port_, int transport, String token_wallet_address) => - wasmModule - .wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet( - port_, transport, token_wallet_address); - - void wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_details( - NativePortType port_, int transport, String address) => - wasmModule - .wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_details( - port_, transport, address); + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__jetton_wallet_dart_wrapper_contract_state( + port_, + that, + ); + + void + wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amount( + NativePortType port_, + JSAny that, + String destination, + ) => wasmModule + .wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amount( + port_, + that, + destination, + ); + + void + wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details( + NativePortType port_, + int transport, + String token_root_address, + ) => wasmModule + .wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details( + port_, + transport, + token_root_address, + ); + + void + wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet( + NativePortType port_, + int transport, + String token_wallet_address, + ) => wasmModule + .wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet( + port_, + transport, + token_wallet_address, + ); + + void + wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_details( + NativePortType port_, + int transport, + String address, + ) => wasmModule + .wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_details( + port_, + transport, + address, + ); void wire__crate__api__merged__jetton_wallet_dart_wrapper_handle_block( - NativePortType port_, JSAny that, String block) => - wasmModule - .wire__crate__api__merged__jetton_wallet_dart_wrapper_handle_block( - port_, that, block); + NativePortType port_, + JSAny that, + String block, + ) => wasmModule + .wire__crate__api__merged__jetton_wallet_dart_wrapper_handle_block( + port_, + that, + block, + ); void wire__crate__api__merged__jetton_wallet_dart_wrapper_owner( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__jetton_wallet_dart_wrapper_owner( - port_, that); - - void wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactions( - NativePortType port_, JSAny that, String from_lt) => - wasmModule - .wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactions( - port_, that, from_lt); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__jetton_wallet_dart_wrapper_owner( + port_, + that, + ); + + void + wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactions( + NativePortType port_, + JSAny that, + String from_lt, + ) => wasmModule + .wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactions( + port_, + that, + from_lt, + ); void wire__crate__api__merged__jetton_wallet_dart_wrapper_prepare_transfer( - NativePortType port_, - JSAny that, - String amount, - String destination, - String remaining_gas_to, - String? custom_payload, - String callback_value, - String? callback_payload, - String? attached_amount) => - wasmModule - .wire__crate__api__merged__jetton_wallet_dart_wrapper_prepare_transfer( - port_, - that, - amount, - destination, - remaining_gas_to, - custom_payload, - callback_value, - callback_payload, - attached_amount); + NativePortType port_, + JSAny that, + String amount, + String destination, + String remaining_gas_to, + String? custom_payload, + String callback_value, + String? callback_payload, + String? attached_amount, + ) => wasmModule + .wire__crate__api__merged__jetton_wallet_dart_wrapper_prepare_transfer( + port_, + that, + amount, + destination, + remaining_gas_to, + custom_payload, + callback_value, + callback_payload, + attached_amount, + ); void wire__crate__api__merged__jetton_wallet_dart_wrapper_refresh( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__jetton_wallet_dart_wrapper_refresh( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__jetton_wallet_dart_wrapper_refresh( + port_, + that, + ); void wire__crate__api__merged__jetton_wallet_dart_wrapper_subscribe( - NativePortType port_, - String instance_hash, - String owner, - String root_token_contract, - int transport, - bool preload_transactions) => + NativePortType port_, + String owner, + String root_token_contract, + int transport, + bool preload_transactions, + PlatformPointer on_balance_changed, + PlatformPointer on_transactions_found, + ) => wasmModule.wire__crate__api__merged__jetton_wallet_dart_wrapper_subscribe( - port_, - instance_hash, - owner, - root_token_contract, - transport, - preload_transactions); + port_, + owner, + root_token_contract, + transport, + preload_transactions, + on_balance_changed, + on_transactions_found, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__jrpc_connection_dart_wrapper_new( - String instance_hash) => - wasmModule.wire__crate__api__merged__jrpc_connection_dart_wrapper_new( - instance_hash); + wire__crate__api__merged__jrpc_connection_dart_wrapper_new( + PlatformPointer on_post, + ) => wasmModule.wire__crate__api__merged__jrpc_connection_dart_wrapper_new( + on_post, + ); void wire__crate__api__merged__jrpc_transport_impl_get_accounts_by_code_hash( - NativePortType port_, - JSAny that, - String code_hash, - int limit, - String? continuation) => - wasmModule - .wire__crate__api__merged__jrpc_transport_impl_get_accounts_by_code_hash( - port_, that, code_hash, limit, continuation); + NativePortType port_, + JSAny that, + String code_hash, + int limit, + String? continuation, + ) => wasmModule + .wire__crate__api__merged__jrpc_transport_impl_get_accounts_by_code_hash( + port_, + that, + code_hash, + limit, + continuation, + ); void wire__crate__api__merged__jrpc_transport_impl_get_blockchain_config( - NativePortType port_, JSAny that, bool force) => - wasmModule - .wire__crate__api__merged__jrpc_transport_impl_get_blockchain_config( - port_, that, force); + NativePortType port_, + JSAny that, + bool force, + ) => wasmModule + .wire__crate__api__merged__jrpc_transport_impl_get_blockchain_config( + port_, + that, + force, + ); void wire__crate__api__merged__jrpc_transport_impl_get_contract_state( - NativePortType port_, JSAny that, String address) => - wasmModule - .wire__crate__api__merged__jrpc_transport_impl_get_contract_state( - port_, that, address); + NativePortType port_, + JSAny that, + String address, + ) => wasmModule + .wire__crate__api__merged__jrpc_transport_impl_get_contract_state( + port_, + that, + address, + ); void wire__crate__api__merged__jrpc_transport_impl_get_dst_transaction( - NativePortType port_, JSAny that, String message_hash) => - wasmModule - .wire__crate__api__merged__jrpc_transport_impl_get_dst_transaction( - port_, that, message_hash); + NativePortType port_, + JSAny that, + String message_hash, + ) => wasmModule + .wire__crate__api__merged__jrpc_transport_impl_get_dst_transaction( + port_, + that, + message_hash, + ); void wire__crate__api__merged__jrpc_transport_impl_get_fee_factors( - NativePortType port_, JSAny that, bool is_masterchain) => - wasmModule.wire__crate__api__merged__jrpc_transport_impl_get_fee_factors( - port_, that, is_masterchain); + NativePortType port_, + JSAny that, + bool is_masterchain, + ) => wasmModule.wire__crate__api__merged__jrpc_transport_impl_get_fee_factors( + port_, + that, + is_masterchain, + ); void wire__crate__api__merged__jrpc_transport_impl_get_full_contract_state( - NativePortType port_, JSAny that, String address) => - wasmModule - .wire__crate__api__merged__jrpc_transport_impl_get_full_contract_state( - port_, that, address); + NativePortType port_, + JSAny that, + String address, + ) => wasmModule + .wire__crate__api__merged__jrpc_transport_impl_get_full_contract_state( + port_, + that, + address, + ); void wire__crate__api__merged__jrpc_transport_impl_get_network_id( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__jrpc_transport_impl_get_network_id( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__jrpc_transport_impl_get_network_id( + port_, + that, + ); void wire__crate__api__merged__jrpc_transport_impl_get_signature_id( - NativePortType port_, JSAny that) => + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__jrpc_transport_impl_get_signature_id( - port_, that); + port_, + that, + ); void wire__crate__api__merged__jrpc_transport_impl_get_transaction( - NativePortType port_, JSAny that, String hash) => - wasmModule.wire__crate__api__merged__jrpc_transport_impl_get_transaction( - port_, that, hash); + NativePortType port_, + JSAny that, + String hash, + ) => wasmModule.wire__crate__api__merged__jrpc_transport_impl_get_transaction( + port_, + that, + hash, + ); void wire__crate__api__merged__jrpc_transport_impl_get_transactions( - NativePortType port_, - JSAny that, - String address, - String? from_lt, - int count) => + NativePortType port_, + JSAny that, + String address, + String? from_lt, + int count, + ) => wasmModule.wire__crate__api__merged__jrpc_transport_impl_get_transactions( - port_, that, address, from_lt, count); + port_, + that, + address, + from_lt, + count, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__jrpc_transport_impl_new( - JSAny jrpc_connection) => - wasmModule.wire__crate__api__merged__jrpc_transport_impl_new( - jrpc_connection); + wire__crate__api__merged__jrpc_transport_impl_new(JSAny jrpc_connection) => + wasmModule.wire__crate__api__merged__jrpc_transport_impl_new( + jrpc_connection, + ); void wire__crate__api__merged__jrpc_transport_impl_simulate_transaction_tree( - NativePortType port_, - JSAny that, - String signed_message, - JSAny ignored_compute_phase_codes, - JSAny ignored_action_phase_codes) => - wasmModule - .wire__crate__api__merged__jrpc_transport_impl_simulate_transaction_tree( - port_, - that, - signed_message, - ignored_compute_phase_codes, - ignored_action_phase_codes); + NativePortType port_, + JSAny that, + String signed_message, + JSAny ignored_compute_phase_codes, + JSAny ignored_action_phase_codes, + ) => wasmModule + .wire__crate__api__merged__jrpc_transport_impl_simulate_transaction_tree( + port_, + that, + signed_message, + ignored_compute_phase_codes, + ignored_action_phase_codes, + ); void wire__crate__api__merged__keystore_dart_wrapper_add_key( - NativePortType port_, JSAny that, JSAny signer, String input) => - wasmModule.wire__crate__api__merged__keystore_dart_wrapper_add_key( - port_, that, signer, input); + NativePortType port_, + JSAny that, + JSAny signer, + String input, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_add_key( + port_, + that, + signer, + input, + ); void wire__crate__api__merged__keystore_dart_wrapper_add_keys( - NativePortType port_, JSAny that, JSAny signer, String input) => - wasmModule.wire__crate__api__merged__keystore_dart_wrapper_add_keys( - port_, that, signer, input); + NativePortType port_, + JSAny that, + JSAny signer, + String input, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_add_keys( + port_, + that, + signer, + input, + ); void wire__crate__api__merged__keystore_dart_wrapper_clear_keystore( - NativePortType port_, JSAny that) => + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_clear_keystore( - port_, that); + port_, + that, + ); void wire__crate__api__merged__keystore_dart_wrapper_decrypt( - NativePortType port_, - JSAny that, - JSAny signer, - String data, - String input) => - wasmModule.wire__crate__api__merged__keystore_dart_wrapper_decrypt( - port_, that, signer, data, input); + NativePortType port_, + JSAny that, + JSAny signer, + String data, + String input, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_decrypt( + port_, + that, + signer, + data, + input, + ); void wire__crate__api__merged__keystore_dart_wrapper_encrypt( - NativePortType port_, - JSAny that, - JSAny signer, - String data, - JSAny public_keys, - String algorithm, - String input) => - wasmModule.wire__crate__api__merged__keystore_dart_wrapper_encrypt( - port_, that, signer, data, public_keys, algorithm, input); + NativePortType port_, + JSAny that, + JSAny signer, + String data, + JSAny public_keys, + String algorithm, + String input, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_encrypt( + port_, + that, + signer, + data, + public_keys, + algorithm, + input, + ); void wire__crate__api__merged__keystore_dart_wrapper_export_seed( - NativePortType port_, JSAny that, JSAny signer, String input) => - wasmModule.wire__crate__api__merged__keystore_dart_wrapper_export_seed( - port_, that, signer, input); + NativePortType port_, + JSAny that, + JSAny signer, + String input, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_export_seed( + port_, + that, + signer, + input, + ); void wire__crate__api__merged__keystore_dart_wrapper_get_entries( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__keystore_dart_wrapper_get_entries( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_get_entries( + port_, + that, + ); void wire__crate__api__merged__keystore_dart_wrapper_get_public_keys( - NativePortType port_, JSAny that, JSAny signer, String input) => - wasmModule - .wire__crate__api__merged__keystore_dart_wrapper_get_public_keys( - port_, that, signer, input); + NativePortType port_, + JSAny that, + JSAny signer, + String input, + ) => wasmModule + .wire__crate__api__merged__keystore_dart_wrapper_get_public_keys( + port_, + that, + signer, + input, + ); void wire__crate__api__merged__keystore_dart_wrapper_is_password_cached( - NativePortType port_, - JSAny that, - String public_key, - JSAny duration) => - wasmModule - .wire__crate__api__merged__keystore_dart_wrapper_is_password_cached( - port_, that, public_key, duration); - - void wire__crate__api__merged__keystore_dart_wrapper_new(NativePortType port_, - JSAny storage, JSAny signers, JSAny? ledger_connection) => - wasmModule.wire__crate__api__merged__keystore_dart_wrapper_new( - port_, storage, signers, ledger_connection); + NativePortType port_, + JSAny that, + String public_key, + JSAny duration, + ) => wasmModule + .wire__crate__api__merged__keystore_dart_wrapper_is_password_cached( + port_, + that, + public_key, + duration, + ); + + void wire__crate__api__merged__keystore_dart_wrapper_new( + NativePortType port_, + JSAny storage, + JSAny signers, + JSAny? ledger_connection, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_new( + port_, + storage, + signers, + ledger_connection, + ); void wire__crate__api__merged__keystore_dart_wrapper_reload_keystore( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__keystore_dart_wrapper_reload_keystore( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__keystore_dart_wrapper_reload_keystore( + port_, + that, + ); void wire__crate__api__merged__keystore_dart_wrapper_remove_key( - NativePortType port_, JSAny that, String public_key) => - wasmModule.wire__crate__api__merged__keystore_dart_wrapper_remove_key( - port_, that, public_key); + NativePortType port_, + JSAny that, + String public_key, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_remove_key( + port_, + that, + public_key, + ); void wire__crate__api__merged__keystore_dart_wrapper_remove_keys( - NativePortType port_, JSAny that, JSAny public_keys) => - wasmModule.wire__crate__api__merged__keystore_dart_wrapper_remove_keys( - port_, that, public_keys); + NativePortType port_, + JSAny that, + JSAny public_keys, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_remove_keys( + port_, + that, + public_keys, + ); void wire__crate__api__merged__keystore_dart_wrapper_sign( - NativePortType port_, - JSAny that, - JSAny signer, - JSAny message, - String input, - int? signature_id) => - wasmModule.wire__crate__api__merged__keystore_dart_wrapper_sign( - port_, that, signer, message, input, signature_id); + NativePortType port_, + JSAny that, + JSAny signer, + JSAny message, + String input, + int? signature_id, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_sign( + port_, + that, + signer, + message, + input, + signature_id, + ); void wire__crate__api__merged__keystore_dart_wrapper_sign_data( - NativePortType port_, - JSAny that, - JSAny signer, - String data, - String input, - int? signature_id) => - wasmModule.wire__crate__api__merged__keystore_dart_wrapper_sign_data( - port_, that, signer, data, input, signature_id); + NativePortType port_, + JSAny that, + JSAny signer, + String data, + String input, + int? signature_id, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_sign_data( + port_, + that, + signer, + data, + input, + signature_id, + ); void wire__crate__api__merged__keystore_dart_wrapper_sign_data_raw( - NativePortType port_, - JSAny that, - JSAny signer, - String data, - String input, - int? signature_id) => - wasmModule.wire__crate__api__merged__keystore_dart_wrapper_sign_data_raw( - port_, that, signer, data, input, signature_id); + NativePortType port_, + JSAny that, + JSAny signer, + String data, + String input, + int? signature_id, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_sign_data_raw( + port_, + that, + signer, + data, + input, + signature_id, + ); void wire__crate__api__merged__keystore_dart_wrapper_update_key( - NativePortType port_, JSAny that, JSAny signer, String input) => - wasmModule.wire__crate__api__merged__keystore_dart_wrapper_update_key( - port_, that, signer, input); + NativePortType port_, + JSAny that, + JSAny signer, + String input, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_update_key( + port_, + that, + signer, + input, + ); void wire__crate__api__merged__keystore_dart_wrapper_verify_data( - NativePortType port_, - JSAny signers, - JSAny? ledger_connection, - String data) => - wasmModule.wire__crate__api__merged__keystore_dart_wrapper_verify_data( - port_, signers, ledger_connection, data); - - JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__ledger_connection_dart_wrapper_new( - String instance_hash) => - wasmModule - .wire__crate__api__merged__ledger_connection_dart_wrapper_new( - instance_hash); + NativePortType port_, + JSAny signers, + JSAny? ledger_connection, + String data, + ) => wasmModule.wire__crate__api__merged__keystore_dart_wrapper_verify_data( + port_, + signers, + ledger_connection, + data, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__ledger_connection_impl_new( - String instance_hash) => - wasmModule.wire__crate__api__merged__ledger_connection_impl_new( - instance_hash); - - void wire__crate__api__merged__my_class_my_format( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__my_class_my_format(port_, that); - - void wire__crate__api__merged__my_class_new(NativePortType port_, int a) => - wasmModule.wire__crate__api__merged__my_class_new(port_, a); + wire__crate__api__merged__ledger_connection_dart_wrapper_new( + PlatformPointer on_get_public_key, + PlatformPointer on_sign, + PlatformPointer on_sign_transaction, + ) => wasmModule.wire__crate__api__merged__ledger_connection_dart_wrapper_new( + on_get_public_key, + on_sign, + on_sign_transaction, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_check_public_key(String public_key) => - wasmModule.wire__crate__api__merged__nt_check_public_key(public_key); + wire__crate__api__merged__nt_check_public_key(String public_key) => + wasmModule.wire__crate__api__merged__nt_check_public_key(public_key); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_code_to_tvc(String code) => - wasmModule.wire__crate__api__merged__nt_code_to_tvc(code); - - void wire__crate__api__merged__nt_compute_storage_fee(NativePortType port_, - String config, String account, int utime, bool is_masterchain) => - wasmModule.wire__crate__api__merged__nt_compute_storage_fee( - port_, config, account, utime, is_masterchain); + wire__crate__api__merged__nt_code_to_tvc(String code) => + wasmModule.wire__crate__api__merged__nt_code_to_tvc(code); + + void wire__crate__api__merged__nt_compute_storage_fee( + NativePortType port_, + String config, + String account, + int utime, + bool is_masterchain, + ) => wasmModule.wire__crate__api__merged__nt_compute_storage_fee( + port_, + config, + account, + utime, + is_masterchain, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_compute_ton_wallet_address( - String public_key, String wallet_type, int workchain) => - wasmModule.wire__crate__api__merged__nt_compute_ton_wallet_address( - public_key, wallet_type, workchain); + wire__crate__api__merged__nt_compute_ton_wallet_address( + String public_key, + String wallet_type, + int workchain, + ) => wasmModule.wire__crate__api__merged__nt_compute_ton_wallet_address( + public_key, + wallet_type, + workchain, + ); void wire__crate__api__merged__nt_create_external_message( - NativePortType port_, - String dst, - String contract_abi, - String method, - String? state_init, - String input, - String public_key, - int timeout) => - wasmModule.wire__crate__api__merged__nt_create_external_message(port_, - dst, contract_abi, method, state_init, input, public_key, timeout); + NativePortType port_, + String dst, + String contract_abi, + String method, + String? state_init, + String input, + String public_key, + int timeout, + ) => wasmModule.wire__crate__api__merged__nt_create_external_message( + port_, + dst, + contract_abi, + method, + state_init, + input, + public_key, + timeout, + ); void wire__crate__api__merged__nt_create_external_message_without_signature( - NativePortType port_, - String dst, - String contract_abi, - String method, - String? state_init, - String input, - int timeout) => - wasmModule - .wire__crate__api__merged__nt_create_external_message_without_signature( - port_, dst, contract_abi, method, state_init, input, timeout); + NativePortType port_, + String dst, + String contract_abi, + String method, + String? state_init, + String input, + int timeout, + ) => wasmModule + .wire__crate__api__merged__nt_create_external_message_without_signature( + port_, + dst, + contract_abi, + method, + state_init, + input, + timeout, + ); void wire__crate__api__merged__nt_create_raw_external_message( - NativePortType port_, - String dst, - String? state_init, - String? body, - int timeout) => - wasmModule.wire__crate__api__merged__nt_create_raw_external_message( - port_, dst, state_init, body, timeout); - - void wire__crate__api__merged__nt_decode_event(NativePortType port_, - String message_body, String contract_abi, String? event) => - wasmModule.wire__crate__api__merged__nt_decode_event( - port_, message_body, contract_abi, event); + NativePortType port_, + String dst, + String? state_init, + String? body, + int timeout, + ) => wasmModule.wire__crate__api__merged__nt_create_raw_external_message( + port_, + dst, + state_init, + body, + timeout, + ); + + void wire__crate__api__merged__nt_decode_event( + NativePortType port_, + String message_body, + String contract_abi, + String? event, + ) => wasmModule.wire__crate__api__merged__nt_decode_event( + port_, + message_body, + contract_abi, + event, + ); void wire__crate__api__merged__nt_decode_input( - NativePortType port_, - String message_body, - String contract_abi, - String? method, - bool internal) => - wasmModule.wire__crate__api__merged__nt_decode_input( - port_, message_body, contract_abi, method, internal); - - void wire__crate__api__merged__nt_decode_output(NativePortType port_, - String message_body, String contract_abi, String? method) => - wasmModule.wire__crate__api__merged__nt_decode_output( - port_, message_body, contract_abi, method); - - void wire__crate__api__merged__nt_decode_transaction(NativePortType port_, - String transaction, String contract_abi, String? method) => - wasmModule.wire__crate__api__merged__nt_decode_transaction( - port_, transaction, contract_abi, method); + NativePortType port_, + String message_body, + String contract_abi, + String? method, + bool internal, + ) => wasmModule.wire__crate__api__merged__nt_decode_input( + port_, + message_body, + contract_abi, + method, + internal, + ); + + void wire__crate__api__merged__nt_decode_output( + NativePortType port_, + String message_body, + String contract_abi, + String? method, + ) => wasmModule.wire__crate__api__merged__nt_decode_output( + port_, + message_body, + contract_abi, + method, + ); + + void wire__crate__api__merged__nt_decode_transaction( + NativePortType port_, + String transaction, + String contract_abi, + String? method, + ) => wasmModule.wire__crate__api__merged__nt_decode_transaction( + port_, + transaction, + contract_abi, + method, + ); void wire__crate__api__merged__nt_decode_transaction_events( - NativePortType port_, String transaction, String contract_abi) => - wasmModule.wire__crate__api__merged__nt_decode_transaction_events( - port_, transaction, contract_abi); + NativePortType port_, + String transaction, + String contract_abi, + ) => wasmModule.wire__crate__api__merged__nt_decode_transaction_events( + port_, + transaction, + contract_abi, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_derive_from_phrase( - String phrase, JSAny mnemonic_type) => - wasmModule.wire__crate__api__merged__nt_derive_from_phrase( - phrase, mnemonic_type); + wire__crate__api__merged__nt_derive_from_phrase( + String phrase, + JSAny mnemonic_type, + ) => wasmModule.wire__crate__api__merged__nt_derive_from_phrase( + phrase, + mnemonic_type, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_encode_comment(String comment, bool plain) => - wasmModule.wire__crate__api__merged__nt_encode_comment( - comment, plain); - - void wire__crate__api__merged__nt_encode_internal_input(NativePortType port_, - String contract_abi, String method, String input) => - wasmModule.wire__crate__api__merged__nt_encode_internal_input( - port_, contract_abi, method, input); + wire__crate__api__merged__nt_encode_comment(String comment, bool plain) => + wasmModule.wire__crate__api__merged__nt_encode_comment(comment, plain); + + void wire__crate__api__merged__nt_encode_internal_input( + NativePortType port_, + String contract_abi, + String method, + String input, + ) => wasmModule.wire__crate__api__merged__nt_encode_internal_input( + port_, + contract_abi, + method, + input, + ); void wire__crate__api__merged__nt_encode_internal_message( - NativePortType port_, - String? src, - String dst, - bool bounce, - String? state_init, - String? body, - String amount, - bool? bounced) => - wasmModule.wire__crate__api__merged__nt_encode_internal_message( - port_, src, dst, bounce, state_init, body, amount, bounced); + NativePortType port_, + String? src, + String dst, + bool bounce, + String? state_init, + String? body, + String amount, + bool? bounced, + ) => wasmModule.wire__crate__api__merged__nt_encode_internal_message( + port_, + src, + dst, + bounce, + state_init, + body, + amount, + bounced, + ); void wire__crate__api__merged__nt_execute_local( - NativePortType port_, - String config, - String account, - String message, - int utime, - bool disable_signature_check, - String? overwrite_balance, - int? global_id) => - wasmModule.wire__crate__api__merged__nt_execute_local( - port_, - config, - account, - message, - utime, - disable_signature_check, - overwrite_balance, - global_id); + NativePortType port_, + String config, + String account, + String message, + int utime, + bool disable_signature_check, + String? overwrite_balance, + int? global_id, + ) => wasmModule.wire__crate__api__merged__nt_execute_local( + port_, + config, + account, + message, + utime, + disable_signature_check, + overwrite_balance, + global_id, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_extract_public_key(String boc) => - wasmModule.wire__crate__api__merged__nt_extract_public_key(boc); + wire__crate__api__merged__nt_extract_public_key(String boc) => + wasmModule.wire__crate__api__merged__nt_extract_public_key(boc); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_generate_key(JSAny account_type) => - wasmModule.wire__crate__api__merged__nt_generate_key(account_type); + wire__crate__api__merged__nt_generate_key(JSAny account_type) => + wasmModule.wire__crate__api__merged__nt_generate_key(account_type); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_get_boc_hash(String boc) => - wasmModule.wire__crate__api__merged__nt_get_boc_hash(boc); + wire__crate__api__merged__nt_get_boc_hash(String boc) => + wasmModule.wire__crate__api__merged__nt_get_boc_hash(boc); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_get_code_salt(String code) => - wasmModule.wire__crate__api__merged__nt_get_code_salt(code); + wire__crate__api__merged__nt_get_code_salt(String code) => + wasmModule.wire__crate__api__merged__nt_get_code_salt(code); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_get_contract_type_number( - String wallet_type) => - wasmModule.wire__crate__api__merged__nt_get_contract_type_number( - wallet_type); + wire__crate__api__merged__nt_get_contract_type_number(String wallet_type) => + wasmModule.wire__crate__api__merged__nt_get_contract_type_number( + wallet_type, + ); void wire__crate__api__merged__nt_get_expected_address( - NativePortType port_, - String tvc, - String contract_abi, - int workchain_id, - String? public_key, - String init_data) => - wasmModule.wire__crate__api__merged__nt_get_expected_address( - port_, tvc, contract_abi, workchain_id, public_key, init_data); + NativePortType port_, + String tvc, + String contract_abi, + int workchain_id, + String? public_key, + String init_data, + ) => wasmModule.wire__crate__api__merged__nt_get_expected_address( + port_, + tvc, + contract_abi, + workchain_id, + public_key, + init_data, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_get_hints(String input) => - wasmModule.wire__crate__api__merged__nt_get_hints(input); + wire__crate__api__merged__nt_get_hints(String input) => + wasmModule.wire__crate__api__merged__nt_get_hints(input); void wire__crate__api__merged__nt_make_full_account_boc( - NativePortType port_, String? account_stuff_boc) => - wasmModule.wire__crate__api__merged__nt_make_full_account_boc( - port_, account_stuff_boc); + NativePortType port_, + String? account_stuff_boc, + ) => wasmModule.wire__crate__api__merged__nt_make_full_account_boc( + port_, + account_stuff_boc, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_merge_tvc(String code, String data) => - wasmModule.wire__crate__api__merged__nt_merge_tvc(code, data); + wire__crate__api__merged__nt_merge_tvc(String code, String data) => + wasmModule.wire__crate__api__merged__nt_merge_tvc(code, data); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_pack_address( - String address, bool is_url_safe, bool bounceable) => - wasmModule.wire__crate__api__merged__nt_pack_address( - address, is_url_safe, bounceable); + wire__crate__api__merged__nt_pack_address( + String address, + bool is_url_safe, + bool bounceable, + ) => wasmModule.wire__crate__api__merged__nt_pack_address( + address, + is_url_safe, + bounceable, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_pack_into_cell( - String params, String tokens, String? version) => - wasmModule.wire__crate__api__merged__nt_pack_into_cell( - params, tokens, version); + wire__crate__api__merged__nt_pack_into_cell( + String params, + String tokens, + String? version, + ) => wasmModule.wire__crate__api__merged__nt_pack_into_cell( + params, + tokens, + version, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_pack_std_smc_addr( - String addr, bool base64_url, bool bounceable) => - wasmModule.wire__crate__api__merged__nt_pack_std_smc_addr( - addr, base64_url, bounceable); + wire__crate__api__merged__nt_pack_std_smc_addr( + String addr, + bool base64_url, + bool bounceable, + ) => wasmModule.wire__crate__api__merged__nt_pack_std_smc_addr( + addr, + base64_url, + bounceable, + ); void wire__crate__api__merged__nt_parse_full_account_boc( - NativePortType port_, String account) => - wasmModule.wire__crate__api__merged__nt_parse_full_account_boc( - port_, account); + NativePortType port_, + String account, + ) => wasmModule.wire__crate__api__merged__nt_parse_full_account_boc( + port_, + account, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_parse_known_payload(String payload) => - wasmModule.wire__crate__api__merged__nt_parse_known_payload(payload); + wire__crate__api__merged__nt_parse_known_payload(String payload) => + wasmModule.wire__crate__api__merged__nt_parse_known_payload(payload); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_repack_address(String address) => - wasmModule.wire__crate__api__merged__nt_repack_address(address); + wire__crate__api__merged__nt_repack_address(String address) => + wasmModule.wire__crate__api__merged__nt_repack_address(address); void wire__crate__api__merged__nt_run_getter( - NativePortType port_, - String account_stuff_boc, - String contract_abi, - String method_id, - String input, - JSAny libraries, - int? signature_id) => - wasmModule.wire__crate__api__merged__nt_run_getter( - port_, - account_stuff_boc, - contract_abi, - method_id, - input, - libraries, - signature_id); + NativePortType port_, + String account_stuff_boc, + String contract_abi, + String method_id, + String input, + JSAny libraries, + int? signature_id, + ) => wasmModule.wire__crate__api__merged__nt_run_getter( + port_, + account_stuff_boc, + contract_abi, + method_id, + input, + libraries, + signature_id, + ); void wire__crate__api__merged__nt_run_local( - NativePortType port_, - String account_stuff_boc, - String contract_abi, - String method_id, - String input, - bool responsible, - JSAny libraries, - int? signature_id) => - wasmModule.wire__crate__api__merged__nt_run_local( - port_, - account_stuff_boc, - contract_abi, - method_id, - input, - responsible, - libraries, - signature_id); + NativePortType port_, + String account_stuff_boc, + String contract_abi, + String method_id, + String input, + bool responsible, + JSAny libraries, + int? signature_id, + ) => wasmModule.wire__crate__api__merged__nt_run_local( + port_, + account_stuff_boc, + contract_abi, + method_id, + input, + responsible, + libraries, + signature_id, + ); void wire__crate__api__merged__nt_run_local_with_libs( - NativePortType port_, - int transport, - String account_stuff_boc, - String contract_abi, - String method_id, - String input, - bool responsible, - JSAny libraries, - int retry_count, - int? signature_id) => - wasmModule.wire__crate__api__merged__nt_run_local_with_libs( - port_, - transport, - account_stuff_boc, - contract_abi, - method_id, - input, - responsible, - libraries, - retry_count, - signature_id); + NativePortType port_, + int transport, + String account_stuff_boc, + String contract_abi, + String method_id, + String input, + bool responsible, + JSAny libraries, + int retry_count, + int? signature_id, + ) => wasmModule.wire__crate__api__merged__nt_run_local_with_libs( + port_, + transport, + account_stuff_boc, + contract_abi, + method_id, + input, + responsible, + libraries, + retry_count, + signature_id, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_set_code_salt(String code, String salt) => - wasmModule.wire__crate__api__merged__nt_set_code_salt(code, salt); + wire__crate__api__merged__nt_set_code_salt(String code, String salt) => + wasmModule.wire__crate__api__merged__nt_set_code_salt(code, salt); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_split_tvc(String tvc) => - wasmModule.wire__crate__api__merged__nt_split_tvc(tvc); - - void wire__crate__api__merged__nt_unpack_contract_fields(NativePortType port_, - String contract_abi, String boc, bool allow_partial) => - wasmModule.wire__crate__api__merged__nt_unpack_contract_fields( - port_, contract_abi, boc, allow_partial); + wire__crate__api__merged__nt_split_tvc(String tvc) => + wasmModule.wire__crate__api__merged__nt_split_tvc(tvc); + + void wire__crate__api__merged__nt_unpack_contract_fields( + NativePortType port_, + String contract_abi, + String boc, + bool allow_partial, + ) => wasmModule.wire__crate__api__merged__nt_unpack_contract_fields( + port_, + contract_abi, + boc, + allow_partial, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_unpack_from_cell( - String params, String boc, bool allow_partial, String? version) => - wasmModule.wire__crate__api__merged__nt_unpack_from_cell( - params, boc, allow_partial, version); + wire__crate__api__merged__nt_unpack_from_cell( + String params, + String boc, + bool allow_partial, + String? version, + ) => wasmModule.wire__crate__api__merged__nt_unpack_from_cell( + params, + boc, + allow_partial, + version, + ); void wire__crate__api__merged__nt_unpack_init_data( - NativePortType port_, String contract_abi, String data) => - wasmModule.wire__crate__api__merged__nt_unpack_init_data( - port_, contract_abi, data); + NativePortType port_, + String contract_abi, + String data, + ) => wasmModule.wire__crate__api__merged__nt_unpack_init_data( + port_, + contract_abi, + data, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_unpack_std_smc_addr( - String packed, bool base64_url) => - wasmModule.wire__crate__api__merged__nt_unpack_std_smc_addr( - packed, base64_url); + wire__crate__api__merged__nt_unpack_std_smc_addr( + String packed, + bool base64_url, + ) => wasmModule.wire__crate__api__merged__nt_unpack_std_smc_addr( + packed, + base64_url, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_validate_address(String address) => - wasmModule.wire__crate__api__merged__nt_validate_address(address); + wire__crate__api__merged__nt_validate_address(String address) => + wasmModule.wire__crate__api__merged__nt_validate_address(address); void wire__crate__api__merged__nt_verify_signature( - NativePortType port_, - String public_key, - String data, - String signature, - int? signature_id) => - wasmModule.wire__crate__api__merged__nt_verify_signature( - port_, public_key, data, signature, signature_id); + NativePortType port_, + String public_key, + String data, + String signature, + int? signature_id, + ) => wasmModule.wire__crate__api__merged__nt_verify_signature( + port_, + public_key, + data, + signature, + signature_id, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__proto_connection_dart_wrapper_new( - String instance_hash) => - wasmModule - .wire__crate__api__merged__proto_connection_dart_wrapper_new( - instance_hash); + wire__crate__api__merged__proto_connection_dart_wrapper_new( + PlatformPointer on_post, + ) => wasmModule.wire__crate__api__merged__proto_connection_dart_wrapper_new( + on_post, + ); void wire__crate__api__merged__proto_transport_impl_get_accounts_by_code_hash( - NativePortType port_, - JSAny that, - String code_hash, - int limit, - String? continuation) => - wasmModule - .wire__crate__api__merged__proto_transport_impl_get_accounts_by_code_hash( - port_, that, code_hash, limit, continuation); + NativePortType port_, + JSAny that, + String code_hash, + int limit, + String? continuation, + ) => wasmModule + .wire__crate__api__merged__proto_transport_impl_get_accounts_by_code_hash( + port_, + that, + code_hash, + limit, + continuation, + ); void wire__crate__api__merged__proto_transport_impl_get_blockchain_config( - NativePortType port_, JSAny that, bool force) => - wasmModule - .wire__crate__api__merged__proto_transport_impl_get_blockchain_config( - port_, that, force); + NativePortType port_, + JSAny that, + bool force, + ) => wasmModule + .wire__crate__api__merged__proto_transport_impl_get_blockchain_config( + port_, + that, + force, + ); void wire__crate__api__merged__proto_transport_impl_get_contract_state( - NativePortType port_, JSAny that, String address) => - wasmModule - .wire__crate__api__merged__proto_transport_impl_get_contract_state( - port_, that, address); + NativePortType port_, + JSAny that, + String address, + ) => wasmModule + .wire__crate__api__merged__proto_transport_impl_get_contract_state( + port_, + that, + address, + ); void wire__crate__api__merged__proto_transport_impl_get_dst_transaction( - NativePortType port_, JSAny that, String message_hash) => - wasmModule - .wire__crate__api__merged__proto_transport_impl_get_dst_transaction( - port_, that, message_hash); + NativePortType port_, + JSAny that, + String message_hash, + ) => wasmModule + .wire__crate__api__merged__proto_transport_impl_get_dst_transaction( + port_, + that, + message_hash, + ); void wire__crate__api__merged__proto_transport_impl_get_fee_factors( - NativePortType port_, JSAny that, bool is_masterchain) => + NativePortType port_, + JSAny that, + bool is_masterchain, + ) => wasmModule.wire__crate__api__merged__proto_transport_impl_get_fee_factors( - port_, that, is_masterchain); + port_, + that, + is_masterchain, + ); void wire__crate__api__merged__proto_transport_impl_get_full_contract_state( - NativePortType port_, JSAny that, String address) => - wasmModule - .wire__crate__api__merged__proto_transport_impl_get_full_contract_state( - port_, that, address); + NativePortType port_, + JSAny that, + String address, + ) => wasmModule + .wire__crate__api__merged__proto_transport_impl_get_full_contract_state( + port_, + that, + address, + ); void wire__crate__api__merged__proto_transport_impl_get_network_id( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__proto_transport_impl_get_network_id( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__proto_transport_impl_get_network_id( + port_, + that, + ); void wire__crate__api__merged__proto_transport_impl_get_signature_id( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__proto_transport_impl_get_signature_id( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__proto_transport_impl_get_signature_id( + port_, + that, + ); void wire__crate__api__merged__proto_transport_impl_get_transaction( - NativePortType port_, JSAny that, String hash) => + NativePortType port_, + JSAny that, + String hash, + ) => wasmModule.wire__crate__api__merged__proto_transport_impl_get_transaction( - port_, that, hash); + port_, + that, + hash, + ); void wire__crate__api__merged__proto_transport_impl_get_transactions( - NativePortType port_, - JSAny that, - String address, - String? from_lt, - int count) => - wasmModule - .wire__crate__api__merged__proto_transport_impl_get_transactions( - port_, that, address, from_lt, count); + NativePortType port_, + JSAny that, + String address, + String? from_lt, + int count, + ) => wasmModule + .wire__crate__api__merged__proto_transport_impl_get_transactions( + port_, + that, + address, + from_lt, + count, + ); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__proto_transport_impl_new( - JSAny proto_connection) => - wasmModule.wire__crate__api__merged__proto_transport_impl_new( - proto_connection); + wire__crate__api__merged__proto_transport_impl_new(JSAny proto_connection) => + wasmModule.wire__crate__api__merged__proto_transport_impl_new( + proto_connection, + ); void wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree( - NativePortType port_, - JSAny that, - String signed_message, - JSAny ignored_compute_phase_codes, - JSAny ignored_action_phase_codes) => - wasmModule - .wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree( - port_, - that, - signed_message, - ignored_compute_phase_codes, - ignored_action_phase_codes); + NativePortType port_, + JSAny that, + String signed_message, + JSAny ignored_compute_phase_codes, + JSAny ignored_action_phase_codes, + ) => wasmModule + .wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree( + port_, + that, + signed_message, + ignored_compute_phase_codes, + ignored_action_phase_codes, + ); void wire__crate__api__merged__set_clock_offset( - NativePortType port_, JSAny offset_ms) => - wasmModule.wire__crate__api__merged__set_clock_offset(port_, offset_ms); - - void wire__crate__api__merged__simple_adder( - NativePortType port_, int a, int b) => - wasmModule.wire__crate__api__merged__simple_adder(port_, a, b); - - JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__simple_adder_sync(int a, int b) => - wasmModule.wire__crate__api__merged__simple_adder_sync(a, b); - - void wire__crate__api__merged__simple_call_dart(NativePortType port_) => - wasmModule.wire__crate__api__merged__simple_call_dart(port_); - - void wire__crate__api__merged__simple_call_func0( - NativePortType port_, bool need_result) => - wasmModule.wire__crate__api__merged__simple_call_func0( - port_, need_result); - - void wire__crate__api__merged__simple_call_func1( - NativePortType port_, bool need_result) => - wasmModule.wire__crate__api__merged__simple_call_func1( - port_, need_result); - - void wire__crate__api__merged__simple_call_func2(NativePortType port_) => - wasmModule.wire__crate__api__merged__simple_call_func2(port_); - - void wire__crate__api__merged__simple_call_func3(NativePortType port_) => - wasmModule.wire__crate__api__merged__simple_call_func3(port_); - - void wire__crate__api__merged__simple_log( - NativePortType port_, String string) => - wasmModule.wire__crate__api__merged__simple_log(port_, string); - - void wire__crate__api__merged__simple_panic(NativePortType port_) => - wasmModule.wire__crate__api__merged__simple_panic(port_); - - JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__storage_dart_wrapper_new( - String instance_hash) => - wasmModule.wire__crate__api__merged__storage_dart_wrapper_new( - instance_hash); - - void wire__crate__api__merged__storage_impl_new( - NativePortType port_, String instance_hash) => - wasmModule.wire__crate__api__merged__storage_impl_new( - port_, instance_hash); - - void wire__crate__api__merged__stub_call_dart( - NativePortType port_, JSAny stub) => - wasmModule.wire__crate__api__merged__stub_call_dart(port_, stub); - - void wire__crate__api__merged__stub_dcs(NativePortType port_) => - wasmModule.wire__crate__api__merged__stub_dcs(port_); - - void wire__crate__api__merged__stub_dv(NativePortType port_) => - wasmModule.wire__crate__api__merged__stub_dv(port_); - - void wire__crate__api__merged__test_caller_call_test0_async( - NativePortType port_, String string, bool need_result) => - wasmModule.wire__crate__api__merged__test_caller_call_test0_async( - port_, string, need_result); + NativePortType port_, + JSAny offset_ms, + ) => wasmModule.wire__crate__api__merged__set_clock_offset(port_, offset_ms); JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__test_caller_call_test0_sync( - String string, bool need_result) => - wasmModule.wire__crate__api__merged__test_caller_call_test0_sync( - string, need_result); - - void wire__crate__api__merged__test_caller_call_test1_async( - NativePortType port_, String string, bool need_result) => - wasmModule.wire__crate__api__merged__test_caller_call_test1_async( - port_, string, need_result); - - void wire__crate__api__merged__test_logger_debug( - NativePortType port_, String string) => - wasmModule.wire__crate__api__merged__test_logger_debug(port_, string); - - void wire__crate__api__merged__test_logger_error( - NativePortType port_, String string) => - wasmModule.wire__crate__api__merged__test_logger_error(port_, string); - - void wire__crate__api__merged__test_logger_info( - NativePortType port_, String string) => - wasmModule.wire__crate__api__merged__test_logger_info(port_, string); - - void wire__crate__api__merged__test_logger_panic( - NativePortType port_, String string) => - wasmModule.wire__crate__api__merged__test_logger_panic(port_, string); - - void wire__crate__api__merged__test_logger_warn( - NativePortType port_, String string) => - wasmModule.wire__crate__api__merged__test_logger_warn(port_, string); + wire__crate__api__merged__storage_dart_wrapper_new( + PlatformPointer on_get, + PlatformPointer on_set, + PlatformPointer on_set_unchecked, + PlatformPointer on_remove, + PlatformPointer on_remove_unchecked, + ) => wasmModule.wire__crate__api__merged__storage_dart_wrapper_new( + on_get, + on_set, + on_set_unchecked, + on_remove, + on_remove_unchecked, + ); void wire__crate__api__merged__token_wallet_dart_wrapper_address( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__token_wallet_dart_wrapper_address( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__token_wallet_dart_wrapper_address( + port_, + that, + ); void wire__crate__api__merged__token_wallet_dart_wrapper_balance( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__token_wallet_dart_wrapper_balance( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__token_wallet_dart_wrapper_balance( + port_, + that, + ); void wire__crate__api__merged__token_wallet_dart_wrapper_contract_state( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__token_wallet_dart_wrapper_contract_state( - port_, that); - - void wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount( - NativePortType port_, - JSAny that, - String destination, - String amount, - bool notify_receiver, - String? payload) => - wasmModule - .wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount( - port_, that, destination, amount, notify_receiver, payload); - - void wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details( - NativePortType port_, int transport, String token_root_address) => - wasmModule - .wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details( - port_, transport, token_root_address); - - void wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet( - NativePortType port_, int transport, String token_wallet_address) => - wasmModule - .wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet( - port_, transport, token_wallet_address); - - void wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details( - NativePortType port_, int transport, String address) => - wasmModule - .wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details( - port_, transport, address); + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__token_wallet_dart_wrapper_contract_state( + port_, + that, + ); + + void + wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount( + NativePortType port_, + JSAny that, + String destination, + String amount, + bool notify_receiver, + String? payload, + ) => wasmModule + .wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount( + port_, + that, + destination, + amount, + notify_receiver, + payload, + ); + + void + wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details( + NativePortType port_, + int transport, + String token_root_address, + ) => wasmModule + .wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details( + port_, + transport, + token_root_address, + ); + + void + wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet( + NativePortType port_, + int transport, + String token_wallet_address, + ) => wasmModule + .wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet( + port_, + transport, + token_wallet_address, + ); + + void + wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details( + NativePortType port_, + int transport, + String address, + ) => wasmModule + .wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details( + port_, + transport, + address, + ); void wire__crate__api__merged__token_wallet_dart_wrapper_handle_block( - NativePortType port_, JSAny that, String block) => - wasmModule - .wire__crate__api__merged__token_wallet_dart_wrapper_handle_block( - port_, that, block); + NativePortType port_, + JSAny that, + String block, + ) => wasmModule + .wire__crate__api__merged__token_wallet_dart_wrapper_handle_block( + port_, + that, + block, + ); void wire__crate__api__merged__token_wallet_dart_wrapper_owner( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__token_wallet_dart_wrapper_owner( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__token_wallet_dart_wrapper_owner( + port_, + that, + ); void wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions( - NativePortType port_, JSAny that, String from_lt) => - wasmModule - .wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions( - port_, that, from_lt); + NativePortType port_, + JSAny that, + String from_lt, + ) => wasmModule + .wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions( + port_, + that, + from_lt, + ); void wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer( - NativePortType port_, - JSAny that, - String destination, - String amount, - bool notify_receiver, - String? attached_amount, - String? payload, - String? remaining_gas_to) => - wasmModule - .wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer( - port_, - that, - destination, - amount, - notify_receiver, - attached_amount, - payload, - remaining_gas_to); + NativePortType port_, + JSAny that, + String destination, + String amount, + bool notify_receiver, + String? attached_amount, + String? payload, + String? remaining_gas_to, + ) => wasmModule + .wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer( + port_, + that, + destination, + amount, + notify_receiver, + attached_amount, + payload, + remaining_gas_to, + ); void wire__crate__api__merged__token_wallet_dart_wrapper_refresh( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__token_wallet_dart_wrapper_refresh( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__token_wallet_dart_wrapper_refresh( + port_, + that, + ); void wire__crate__api__merged__token_wallet_dart_wrapper_subscribe( - NativePortType port_, - String instance_hash, - String owner, - String root_token_contract, - int transport, - bool preload_transactions) => - wasmModule.wire__crate__api__merged__token_wallet_dart_wrapper_subscribe( - port_, - instance_hash, - owner, - root_token_contract, - transport, - preload_transactions); + NativePortType port_, + String owner, + String root_token_contract, + int transport, + bool preload_transactions, + PlatformPointer on_balance_changed, + PlatformPointer on_transactions_found, + ) => wasmModule.wire__crate__api__merged__token_wallet_dart_wrapper_subscribe( + port_, + owner, + root_token_contract, + transport, + preload_transactions, + on_balance_changed, + on_transactions_found, + ); void wire__crate__api__merged__token_wallet_dart_wrapper_symbol( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__token_wallet_dart_wrapper_symbol( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__token_wallet_dart_wrapper_symbol( + port_, + that, + ); void wire__crate__api__merged__token_wallet_dart_wrapper_version( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__token_wallet_dart_wrapper_version( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__token_wallet_dart_wrapper_version( + port_, + that, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_address( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_address( - port_, that); - - void wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload( - NativePortType port_, String payload, String base64_signature) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload( - port_, payload, base64_signature); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_address( + port_, + that, + ); + + void + wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload( + NativePortType port_, + String payload, + String base64_signature, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload( + port_, + payload, + base64_signature, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state( + port_, + that, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_custodians( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_custodians( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_custodians( + port_, + that, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_details( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_details( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_details( + port_, + that, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_fees( - NativePortType port_, - JSAny that, - String signed_message, - String? execution_options) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_fees( - port_, that, signed_message, execution_options); + NativePortType port_, + JSAny that, + String signed_message, + String? execution_options, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_fees( + port_, + that, + signed_message, + execution_options, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets( - NativePortType port_, - int transport, - String public_key, - int workchain_id, - String wallet_types) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets( - port_, transport, public_key, workchain_id, wallet_types); + NativePortType port_, + int transport, + String public_key, + int workchain_id, + String wallet_types, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets( + port_, + transport, + public_key, + workchain_id, + wallet_types, + ); - void wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians( - NativePortType port_, int transport, String address) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians( - port_, transport, address); - - void wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info( - NativePortType port_, int transport, String address) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info( - port_, transport, address); + void wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians( + NativePortType port_, + int transport, + String address, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians( + port_, + transport, + address, + ); + + void + wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info( + NativePortType port_, + int transport, + String address, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info( + port_, + transport, + address, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno( - NativePortType port_, - JSAny that, - String raw_current_state, - String public_key) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno( - port_, that, raw_current_state, public_key); + NativePortType port_, + JSAny that, + String raw_current_state, + String public_key, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno( + port_, + that, + raw_current_state, + public_key, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_handle_block( - NativePortType port_, JSAny that, String block) => + NativePortType port_, + JSAny that, + String block, + ) => wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_handle_block( - port_, that, block); + port_, + that, + block, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init( + port_, + that, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions( + port_, + that, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method( + port_, + that, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions( - NativePortType port_, JSAny that, String from_lt) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions( - port_, that, from_lt); - - void wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction( - NativePortType port_, - JSAny that, - String contract_state, - String public_key, - String transaction_id, - String expiration) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction( - port_, - that, - contract_state, - public_key, - transaction_id, - expiration); + NativePortType port_, + JSAny that, + String from_lt, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions( + port_, + that, + from_lt, + ); + + void + wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction( + NativePortType port_, + JSAny that, + String contract_state, + String public_key, + String transaction_id, + String expiration, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction( + port_, + that, + contract_state, + public_key, + transaction_id, + expiration, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy( - NativePortType port_, JSAny that, String expiration) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy( - port_, that, expiration); - - void wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners( - NativePortType port_, - JSAny that, - String expiration, - JSAny custodians, - int req_confirms, - int? expiration_time) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners( - port_, - that, - expiration, - custodians, - req_confirms, - expiration_time); - - void wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body( - NativePortType port_, - JSAny that, - String expiration, - String params, - bool is_internal_flow) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body( - port_, that, expiration, params, is_internal_flow); + NativePortType port_, + JSAny that, + String expiration, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy( + port_, + that, + expiration, + ); + + void + wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners( + NativePortType port_, + JSAny that, + String expiration, + JSAny custodians, + int req_confirms, + int? expiration_time, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners( + port_, + that, + expiration, + custodians, + req_confirms, + expiration_time, + ); + + void + wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body( + NativePortType port_, + JSAny that, + String expiration, + String params, + bool is_internal_flow, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body( + port_, + that, + expiration, + params, + is_internal_flow, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer( - NativePortType port_, - JSAny that, - String contract_state, - String public_key, - String expiration, - String params) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer( - port_, that, contract_state, public_key, expiration, params); - - void wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body( - NativePortType port_, - JSAny that, - String contract_state, - String public_key, - String expiration, - String params, - bool is_internal_flow) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body( - port_, - that, - contract_state, - public_key, - expiration, - params, - is_internal_flow); + NativePortType port_, + JSAny that, + String contract_state, + String public_key, + String expiration, + String params, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer( + port_, + that, + contract_state, + public_key, + expiration, + params, + ); + + void + wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body( + NativePortType port_, + JSAny that, + String contract_state, + String public_key, + String expiration, + String params, + bool is_internal_flow, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body( + port_, + that, + contract_state, + public_key, + expiration, + params, + is_internal_flow, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_public_key( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_public_key( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_public_key( + port_, + that, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_refresh( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_refresh( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_refresh( + port_, + that, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_send( - NativePortType port_, JSAny that, String signed_message) => - wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_send( - port_, that, signed_message); + NativePortType port_, + JSAny that, + String signed_message, + ) => wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_send( + port_, + that, + signed_message, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe( - NativePortType port_, - String instance_hash, - int workchain_id, - String public_key, - String wallet_type, - int transport) => - wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe( - port_, - instance_hash, - workchain_id, - public_key, - wallet_type, - transport); + NativePortType port_, + int workchain_id, + String public_key, + String wallet_type, + int transport, + PlatformPointer on_message_sent, + PlatformPointer on_message_expired, + PlatformPointer on_state_changed, + PlatformPointer on_transactions_found, + PlatformPointer on_details_changed, + PlatformPointer on_custodians_changed, + PlatformPointer on_unconfirmed_transactions_changed, + ) => wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe( + port_, + workchain_id, + public_key, + wallet_type, + transport, + on_message_sent, + on_message_expired, + on_state_changed, + on_transactions_found, + on_details_changed, + on_custodians_changed, + on_unconfirmed_transactions_changed, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address( - NativePortType port_, - String instance_hash, - String address, - int transport) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address( - port_, instance_hash, address, transport); + NativePortType port_, + String address, + int transport, + PlatformPointer on_message_sent, + PlatformPointer on_message_expired, + PlatformPointer on_state_changed, + PlatformPointer on_transactions_found, + PlatformPointer on_details_changed, + PlatformPointer on_custodians_changed, + PlatformPointer on_unconfirmed_transactions_changed, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address( + port_, + address, + transport, + on_message_sent, + on_message_expired, + on_state_changed, + on_transactions_found, + on_details_changed, + on_custodians_changed, + on_unconfirmed_transactions_changed, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing( - NativePortType port_, - String instance_hash, - String existing_wallet, - int transport) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing( - port_, instance_hash, existing_wallet, transport); - - void wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions( - port_, that); + NativePortType port_, + String existing_wallet, + int transport, + PlatformPointer on_message_sent, + PlatformPointer on_message_expired, + PlatformPointer on_state_changed, + PlatformPointer on_transactions_found, + PlatformPointer on_details_changed, + PlatformPointer on_custodians_changed, + PlatformPointer on_unconfirmed_transactions_changed, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing( + port_, + existing_wallet, + transport, + on_message_sent, + on_message_expired, + on_state_changed, + on_transactions_found, + on_details_changed, + on_custodians_changed, + on_unconfirmed_transactions_changed, + ); + + void + wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions( + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions( + port_, + that, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_type( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_type( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_type( + port_, + that, + ); void wire__crate__api__merged__ton_wallet_dart_wrapper_workchain( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_workchain( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__ton_wallet_dart_wrapper_workchain( + port_, + that, + ); void wire__crate__api__merged__unsigned_message_impl_expire_at( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__unsigned_message_impl_expire_at( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__unsigned_message_impl_expire_at( + port_, + that, + ); void wire__crate__api__merged__unsigned_message_impl_hash( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__unsigned_message_impl_hash( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__unsigned_message_impl_hash( + port_, + that, + ); void wire__crate__api__merged__unsigned_message_impl_refresh_timeout( - NativePortType port_, JSAny that) => - wasmModule - .wire__crate__api__merged__unsigned_message_impl_refresh_timeout( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule + .wire__crate__api__merged__unsigned_message_impl_refresh_timeout( + port_, + that, + ); void wire__crate__api__merged__unsigned_message_impl_sign( - NativePortType port_, JSAny that, String signature) => - wasmModule.wire__crate__api__merged__unsigned_message_impl_sign( - port_, that, signature); + NativePortType port_, + JSAny that, + String signature, + ) => wasmModule.wire__crate__api__merged__unsigned_message_impl_sign( + port_, + that, + signature, + ); void wire__crate__api__merged__unsigned_message_impl_sign_fake( - NativePortType port_, JSAny that) => - wasmModule.wire__crate__api__merged__unsigned_message_impl_sign_fake( - port_, that); + NativePortType port_, + JSAny that, + ) => wasmModule.wire__crate__api__merged__unsigned_message_impl_sign_fake( + port_, + that, + ); void rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( - int ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( + ptr, + ); void rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( - int ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( + ptr, + ); void rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( - int ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( + ptr, + ); void rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( - int ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( + ptr, + ); void rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( - int ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( + ptr, + ); void rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( - int ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( + ptr, + ); void rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( - int ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( + ptr, + ); void rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( - int ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( + ptr, + ); void rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( - int ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( + ptr, + ); void rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( - int ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( + ptr, + ); void rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( - int ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( + ptr, + ); void rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( - int ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( - ptr); - - void rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( - int ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( - ptr); - - void rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( - int ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( + ptr, + ); void rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( - int ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( + ptr, + ); void rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( - int ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( + ptr, + ); void rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait( - int ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait(ptr); void rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait( - int ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait(ptr); void rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( - int ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( + ptr, + ); void rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( - int ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( + ptr, + ); void rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait( - int ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait(ptr); void rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait( - int ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait(ptr); void rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait( - int ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait(ptr); void rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait( - int ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait(ptr); void rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( - int ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( + ptr, + ); void rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( - int ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( - ptr); + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + ptr, + ); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + int ptr, + ) => wasmModule + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + ptr, + ); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + int ptr, + ) => wasmModule + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + ptr, + ); } @JS('wasm_bindgen') @@ -3627,1097 +6511,1902 @@ external NekotonBridgeWasmModule get wasmModule; @JS() @anonymous extension type NekotonBridgeWasmModule._(JSObject _) implements JSObject { + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_expired( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_message_sent( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_state_changed( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_expired( + int that, + int on_message_expired, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_message_sent( + int that, + int on_message_sent, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_state_changed( + int that, + int on_state_changed, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GenericContractSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + int that, + int on_transactions_found, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_is_local( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GqlConnectionImpl_auto_accessor_get_on_post( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_is_local( + int that, + bool is_local, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__GqlConnectionImpl_auto_accessor_set_on_post( + int that, + int on_post, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed( + int that, + int on_balance_changed, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__JettonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + int that, + int on_transactions_found, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_get_on_post( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__JrpcConnectionImpl_auto_accessor_set_on_post( + int that, + int on_post, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_get_public_key( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_get_on_sign_transaction( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_get_public_key( + int that, + int on_get_public_key, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign( + int that, + int on_sign, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__LedgerConnectionImpl_auto_accessor_set_on_sign_transaction( + int that, + int on_sign_transaction, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_get_on_post( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__ProtoConnectionImpl_auto_accessor_set_on_post( + int that, + int on_post, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_get(int that); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove(int that); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_remove_unchecked( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set(int that); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_get_on_set_unchecked( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_get( + int that, + int on_get, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove( + int that, + int on_remove, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_remove_unchecked( + int that, + int on_remove_unchecked, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set( + int that, + int on_set, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__StorageImpl_auto_accessor_set_on_set_unchecked( + int that, + int on_set_unchecked, + ); + + external void wire__crate__api__merged__StorageImpl_new( + NativePortType port_, + int on_get, + int on_set, + int on_set_unchecked, + int on_remove, + int on_remove_unchecked, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_balance_changed( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_balance_changed( + int that, + int on_balance_changed, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TokenWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + int that, + int on_transactions_found, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_custodians_changed( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_details_changed( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_expired( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_message_sent( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_state_changed( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_transactions_found( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_get_on_unconfirmed_transactions_changed( + int that, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_custodians_changed( + int that, + int on_custodians_changed, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_details_changed( + int that, + int on_details_changed, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_expired( + int that, + int on_message_expired, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_message_sent( + int that, + int on_message_sent, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_state_changed( + int that, + int on_state_changed, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_transactions_found( + int that, + int on_transactions_found, + ); + + external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ + wire__crate__api__merged__TonWalletSubscriptionHandlerImpl_auto_accessor_set_on_unconfirmed_transactions_changed( + int that, + int on_unconfirmed_transactions_changed, + ); + external void wire__crate__api__merged__accounts_storage_impl_add_account( - NativePortType port_, JSAny that, String account); + NativePortType port_, + JSAny that, + String account, + ); external void wire__crate__api__merged__accounts_storage_impl_add_accounts( - NativePortType port_, JSAny that, String accounts); + NativePortType port_, + JSAny that, + String accounts, + ); external void - wire__crate__api__merged__accounts_storage_impl_add_token_wallet( - NativePortType port_, - JSAny that, - String account_address, - String network_group, - String root_token_contract); + wire__crate__api__merged__accounts_storage_impl_add_token_wallet( + NativePortType port_, + JSAny that, + String account_address, + String network_group, + String root_token_contract, + ); external void - wire__crate__api__merged__accounts_storage_impl_add_token_wallets( - NativePortType port_, - JSAny that, - String account_address, - String network_group, - JSAny root_token_contracts); + wire__crate__api__merged__accounts_storage_impl_add_token_wallets( + NativePortType port_, + JSAny that, + String account_address, + String network_group, + JSAny root_token_contracts, + ); external void wire__crate__api__merged__accounts_storage_impl_clear( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__accounts_storage_impl_get_entries( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__accounts_storage_impl_new( - NativePortType port_, JSAny storage); + NativePortType port_, + JSAny storage, + ); external void wire__crate__api__merged__accounts_storage_impl_reload( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__accounts_storage_impl_remove_account( - NativePortType port_, JSAny that, String account_address); + NativePortType port_, + JSAny that, + String account_address, + ); external void wire__crate__api__merged__accounts_storage_impl_remove_accounts( - NativePortType port_, JSAny that, JSAny account_addresses); + NativePortType port_, + JSAny that, + JSAny account_addresses, + ); external void - wire__crate__api__merged__accounts_storage_impl_remove_token_wallet( - NativePortType port_, - JSAny that, - String account_address, - String network_group, - String root_token_contract); + wire__crate__api__merged__accounts_storage_impl_remove_token_wallet( + NativePortType port_, + JSAny that, + String account_address, + String network_group, + String root_token_contract, + ); external void - wire__crate__api__merged__accounts_storage_impl_remove_token_wallets( - NativePortType port_, - JSAny that, - String account_address, - String network_group, - JSAny root_token_contracts); + wire__crate__api__merged__accounts_storage_impl_remove_token_wallets( + NativePortType port_, + JSAny that, + String account_address, + String network_group, + JSAny root_token_contracts, + ); external void wire__crate__api__merged__accounts_storage_impl_rename_account( - NativePortType port_, JSAny that, String account_address, String name); + NativePortType port_, + JSAny that, + String account_address, + String name, + ); external void wire__crate__api__merged__accounts_storage_impl_verify_data( - NativePortType port_, String data); - - external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__call_send_result(String id, JSAny value); - - external void wire__crate__api__merged__caller_test_class_call_some_func( - NativePortType port_, JSAny that); - - external void wire__crate__api__merged__caller_test_class_new( - NativePortType port_, String instance_hash, int value); + NativePortType port_, + String data, + ); external void wire__crate__api__merged__create_log_stream( - NativePortType port_, String s); + NativePortType port_, + String s, + ); external void wire__crate__api__merged__generic_contract_dart_wrapper_address( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void - wire__crate__api__merged__generic_contract_dart_wrapper_contract_state( - NativePortType port_, JSAny that); + wire__crate__api__merged__generic_contract_dart_wrapper_contract_state( + NativePortType port_, + JSAny that, + ); external void - wire__crate__api__merged__generic_contract_dart_wrapper_estimate_fees( - NativePortType port_, JSAny that, String signed_message); + wire__crate__api__merged__generic_contract_dart_wrapper_estimate_fees( + NativePortType port_, + JSAny that, + String signed_message, + ); external void - wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locally( - NativePortType port_, - JSAny that, - String signed_message, - String options); + wire__crate__api__merged__generic_contract_dart_wrapper_execute_transaction_locally( + NativePortType port_, + JSAny that, + String signed_message, + String options, + ); external void - wire__crate__api__merged__generic_contract_dart_wrapper_handle_block( - NativePortType port_, JSAny that, String block); + wire__crate__api__merged__generic_contract_dart_wrapper_handle_block( + NativePortType port_, + JSAny that, + String block, + ); external void - wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactions( - NativePortType port_, JSAny that); + wire__crate__api__merged__generic_contract_dart_wrapper_pending_transactions( + NativePortType port_, + JSAny that, + ); external void - wire__crate__api__merged__generic_contract_dart_wrapper_polling_method( - NativePortType port_, JSAny that); + wire__crate__api__merged__generic_contract_dart_wrapper_polling_method( + NativePortType port_, + JSAny that, + ); external void - wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactions( - NativePortType port_, JSAny that, String from_lt); + wire__crate__api__merged__generic_contract_dart_wrapper_preload_transactions( + NativePortType port_, + JSAny that, + String from_lt, + ); external void wire__crate__api__merged__generic_contract_dart_wrapper_refresh( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__generic_contract_dart_wrapper_send( - NativePortType port_, JSAny that, String signed_message); + NativePortType port_, + JSAny that, + String signed_message, + ); external void - wire__crate__api__merged__generic_contract_dart_wrapper_subscribe( - NativePortType port_, - String instance_hash, - String address, - bool preload_transactions, - int transport); + wire__crate__api__merged__generic_contract_dart_wrapper_subscribe( + NativePortType port_, + String address, + bool preload_transactions, + int transport, + PlatformPointer on_message_sent, + PlatformPointer on_message_expired, + PlatformPointer on_state_changed, + PlatformPointer on_transactions_found, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__gql_connection_dart_wrapper_new( - bool is_local, String instance_hash); + wire__crate__api__merged__gql_connection_dart_wrapper_new( + bool is_local, + PlatformPointer on_post, + ); external void - wire__crate__api__merged__gql_transport_impl_get_accounts_by_code_hash( - NativePortType port_, - JSAny that, - String code_hash, - int limit, - String? continuation); + wire__crate__api__merged__gql_transport_impl_get_accounts_by_code_hash( + NativePortType port_, + JSAny that, + String code_hash, + int limit, + String? continuation, + ); external void wire__crate__api__merged__gql_transport_impl_get_block( - NativePortType port_, JSAny that, String id); + NativePortType port_, + JSAny that, + String id, + ); external void - wire__crate__api__merged__gql_transport_impl_get_blockchain_config( - NativePortType port_, JSAny that, bool force); + wire__crate__api__merged__gql_transport_impl_get_blockchain_config( + NativePortType port_, + JSAny that, + bool force, + ); external void wire__crate__api__merged__gql_transport_impl_get_contract_state( - NativePortType port_, JSAny that, String address); + NativePortType port_, + JSAny that, + String address, + ); external void - wire__crate__api__merged__gql_transport_impl_get_dst_transaction( - NativePortType port_, JSAny that, String message_hash); + wire__crate__api__merged__gql_transport_impl_get_dst_transaction( + NativePortType port_, + JSAny that, + String message_hash, + ); external void wire__crate__api__merged__gql_transport_impl_get_fee_factors( - NativePortType port_, JSAny that, bool is_masterchain); + NativePortType port_, + JSAny that, + bool is_masterchain, + ); external void - wire__crate__api__merged__gql_transport_impl_get_full_contract_state( - NativePortType port_, JSAny that, String address); + wire__crate__api__merged__gql_transport_impl_get_full_contract_state( + NativePortType port_, + JSAny that, + String address, + ); external void wire__crate__api__merged__gql_transport_impl_get_latest_block( - NativePortType port_, JSAny that, String address); + NativePortType port_, + JSAny that, + String address, + ); external void wire__crate__api__merged__gql_transport_impl_get_network_id( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__gql_transport_impl_get_signature_id( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__gql_transport_impl_get_transaction( - NativePortType port_, JSAny that, String hash); + NativePortType port_, + JSAny that, + String hash, + ); external void wire__crate__api__merged__gql_transport_impl_get_transactions( - NativePortType port_, - JSAny that, - String address, - String? from_lt, - int count); + NativePortType port_, + JSAny that, + String address, + String? from_lt, + int count, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__gql_transport_impl_new(JSAny gql_connection); + wire__crate__api__merged__gql_transport_impl_new(JSAny gql_connection); external void - wire__crate__api__merged__gql_transport_impl_simulate_transaction_tree( - NativePortType port_, - JSAny that, - String signed_message, - JSAny ignored_compute_phase_codes, - JSAny ignored_action_phase_codes); + wire__crate__api__merged__gql_transport_impl_simulate_transaction_tree( + NativePortType port_, + JSAny that, + String signed_message, + JSAny ignored_compute_phase_codes, + JSAny ignored_action_phase_codes, + ); external void - wire__crate__api__merged__gql_transport_impl_wait_for_next_block( - NativePortType port_, - JSAny that, - String current_block_id, - String address, - JSAny timeout); - - external void wire__crate__api__merged__init_caller( - NativePortType port_, String stream_sink); + wire__crate__api__merged__gql_transport_impl_wait_for_next_block( + NativePortType port_, + JSAny that, + String current_block_id, + String address, + JSAny timeout, + ); external void wire__crate__api__merged__init_logger( - NativePortType port_, int level, bool mobile_logger); + NativePortType port_, + int level, + bool mobile_logger, + ); external void wire__crate__api__merged__jetton_wallet_dart_wrapper_address( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__jetton_wallet_dart_wrapper_balance( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void - wire__crate__api__merged__jetton_wallet_dart_wrapper_contract_state( - NativePortType port_, JSAny that); + wire__crate__api__merged__jetton_wallet_dart_wrapper_contract_state( + NativePortType port_, + JSAny that, + ); external void - wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amount( - NativePortType port_, JSAny that, String destination); + wire__crate__api__merged__jetton_wallet_dart_wrapper_estimate_min_attached_amount( + NativePortType port_, + JSAny that, + String destination, + ); external void - wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details( - NativePortType port_, int transport, String token_root_address); + wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details( + NativePortType port_, + int transport, + String token_root_address, + ); external void - wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet( - NativePortType port_, int transport, String token_wallet_address); + wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_root_details_from_jetton_wallet( + NativePortType port_, + int transport, + String token_wallet_address, + ); external void - wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_details( - NativePortType port_, int transport, String address); + wire__crate__api__merged__jetton_wallet_dart_wrapper_get_jetton_wallet_details( + NativePortType port_, + int transport, + String address, + ); external void - wire__crate__api__merged__jetton_wallet_dart_wrapper_handle_block( - NativePortType port_, JSAny that, String block); + wire__crate__api__merged__jetton_wallet_dart_wrapper_handle_block( + NativePortType port_, + JSAny that, + String block, + ); external void wire__crate__api__merged__jetton_wallet_dart_wrapper_owner( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void - wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactions( - NativePortType port_, JSAny that, String from_lt); + wire__crate__api__merged__jetton_wallet_dart_wrapper_preload_transactions( + NativePortType port_, + JSAny that, + String from_lt, + ); external void - wire__crate__api__merged__jetton_wallet_dart_wrapper_prepare_transfer( - NativePortType port_, - JSAny that, - String amount, - String destination, - String remaining_gas_to, - String? custom_payload, - String callback_value, - String? callback_payload, - String? attached_amount); + wire__crate__api__merged__jetton_wallet_dart_wrapper_prepare_transfer( + NativePortType port_, + JSAny that, + String amount, + String destination, + String remaining_gas_to, + String? custom_payload, + String callback_value, + String? callback_payload, + String? attached_amount, + ); external void wire__crate__api__merged__jetton_wallet_dart_wrapper_refresh( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__jetton_wallet_dart_wrapper_subscribe( - NativePortType port_, - String instance_hash, - String owner, - String root_token_contract, - int transport, - bool preload_transactions); + NativePortType port_, + String owner, + String root_token_contract, + int transport, + bool preload_transactions, + PlatformPointer on_balance_changed, + PlatformPointer on_transactions_found, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__jrpc_connection_dart_wrapper_new( - String instance_hash); + wire__crate__api__merged__jrpc_connection_dart_wrapper_new( + PlatformPointer on_post, + ); external void - wire__crate__api__merged__jrpc_transport_impl_get_accounts_by_code_hash( - NativePortType port_, - JSAny that, - String code_hash, - int limit, - String? continuation); + wire__crate__api__merged__jrpc_transport_impl_get_accounts_by_code_hash( + NativePortType port_, + JSAny that, + String code_hash, + int limit, + String? continuation, + ); external void - wire__crate__api__merged__jrpc_transport_impl_get_blockchain_config( - NativePortType port_, JSAny that, bool force); + wire__crate__api__merged__jrpc_transport_impl_get_blockchain_config( + NativePortType port_, + JSAny that, + bool force, + ); external void - wire__crate__api__merged__jrpc_transport_impl_get_contract_state( - NativePortType port_, JSAny that, String address); + wire__crate__api__merged__jrpc_transport_impl_get_contract_state( + NativePortType port_, + JSAny that, + String address, + ); external void - wire__crate__api__merged__jrpc_transport_impl_get_dst_transaction( - NativePortType port_, JSAny that, String message_hash); + wire__crate__api__merged__jrpc_transport_impl_get_dst_transaction( + NativePortType port_, + JSAny that, + String message_hash, + ); external void wire__crate__api__merged__jrpc_transport_impl_get_fee_factors( - NativePortType port_, JSAny that, bool is_masterchain); + NativePortType port_, + JSAny that, + bool is_masterchain, + ); external void - wire__crate__api__merged__jrpc_transport_impl_get_full_contract_state( - NativePortType port_, JSAny that, String address); + wire__crate__api__merged__jrpc_transport_impl_get_full_contract_state( + NativePortType port_, + JSAny that, + String address, + ); external void wire__crate__api__merged__jrpc_transport_impl_get_network_id( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__jrpc_transport_impl_get_signature_id( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__jrpc_transport_impl_get_transaction( - NativePortType port_, JSAny that, String hash); + NativePortType port_, + JSAny that, + String hash, + ); external void wire__crate__api__merged__jrpc_transport_impl_get_transactions( - NativePortType port_, - JSAny that, - String address, - String? from_lt, - int count); + NativePortType port_, + JSAny that, + String address, + String? from_lt, + int count, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__jrpc_transport_impl_new(JSAny jrpc_connection); + wire__crate__api__merged__jrpc_transport_impl_new(JSAny jrpc_connection); external void - wire__crate__api__merged__jrpc_transport_impl_simulate_transaction_tree( - NativePortType port_, - JSAny that, - String signed_message, - JSAny ignored_compute_phase_codes, - JSAny ignored_action_phase_codes); + wire__crate__api__merged__jrpc_transport_impl_simulate_transaction_tree( + NativePortType port_, + JSAny that, + String signed_message, + JSAny ignored_compute_phase_codes, + JSAny ignored_action_phase_codes, + ); external void wire__crate__api__merged__keystore_dart_wrapper_add_key( - NativePortType port_, JSAny that, JSAny signer, String input); + NativePortType port_, + JSAny that, + JSAny signer, + String input, + ); external void wire__crate__api__merged__keystore_dart_wrapper_add_keys( - NativePortType port_, JSAny that, JSAny signer, String input); + NativePortType port_, + JSAny that, + JSAny signer, + String input, + ); external void wire__crate__api__merged__keystore_dart_wrapper_clear_keystore( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__keystore_dart_wrapper_decrypt( - NativePortType port_, - JSAny that, - JSAny signer, - String data, - String input); + NativePortType port_, + JSAny that, + JSAny signer, + String data, + String input, + ); external void wire__crate__api__merged__keystore_dart_wrapper_encrypt( - NativePortType port_, - JSAny that, - JSAny signer, - String data, - JSAny public_keys, - String algorithm, - String input); + NativePortType port_, + JSAny that, + JSAny signer, + String data, + JSAny public_keys, + String algorithm, + String input, + ); external void wire__crate__api__merged__keystore_dart_wrapper_export_seed( - NativePortType port_, JSAny that, JSAny signer, String input); + NativePortType port_, + JSAny that, + JSAny signer, + String input, + ); external void wire__crate__api__merged__keystore_dart_wrapper_get_entries( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__keystore_dart_wrapper_get_public_keys( - NativePortType port_, JSAny that, JSAny signer, String input); + NativePortType port_, + JSAny that, + JSAny signer, + String input, + ); external void - wire__crate__api__merged__keystore_dart_wrapper_is_password_cached( - NativePortType port_, JSAny that, String public_key, JSAny duration); + wire__crate__api__merged__keystore_dart_wrapper_is_password_cached( + NativePortType port_, + JSAny that, + String public_key, + JSAny duration, + ); external void wire__crate__api__merged__keystore_dart_wrapper_new( - NativePortType port_, - JSAny storage, - JSAny signers, - JSAny? ledger_connection); + NativePortType port_, + JSAny storage, + JSAny signers, + JSAny? ledger_connection, + ); external void wire__crate__api__merged__keystore_dart_wrapper_reload_keystore( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__keystore_dart_wrapper_remove_key( - NativePortType port_, JSAny that, String public_key); + NativePortType port_, + JSAny that, + String public_key, + ); external void wire__crate__api__merged__keystore_dart_wrapper_remove_keys( - NativePortType port_, JSAny that, JSAny public_keys); + NativePortType port_, + JSAny that, + JSAny public_keys, + ); external void wire__crate__api__merged__keystore_dart_wrapper_sign( - NativePortType port_, - JSAny that, - JSAny signer, - JSAny message, - String input, - int? signature_id); + NativePortType port_, + JSAny that, + JSAny signer, + JSAny message, + String input, + int? signature_id, + ); external void wire__crate__api__merged__keystore_dart_wrapper_sign_data( - NativePortType port_, - JSAny that, - JSAny signer, - String data, - String input, - int? signature_id); + NativePortType port_, + JSAny that, + JSAny signer, + String data, + String input, + int? signature_id, + ); external void wire__crate__api__merged__keystore_dart_wrapper_sign_data_raw( - NativePortType port_, - JSAny that, - JSAny signer, - String data, - String input, - int? signature_id); + NativePortType port_, + JSAny that, + JSAny signer, + String data, + String input, + int? signature_id, + ); external void wire__crate__api__merged__keystore_dart_wrapper_update_key( - NativePortType port_, JSAny that, JSAny signer, String input); + NativePortType port_, + JSAny that, + JSAny signer, + String input, + ); external void wire__crate__api__merged__keystore_dart_wrapper_verify_data( - NativePortType port_, - JSAny signers, - JSAny? ledger_connection, - String data); - - external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__ledger_connection_dart_wrapper_new( - String instance_hash); + NativePortType port_, + JSAny signers, + JSAny? ledger_connection, + String data, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__ledger_connection_impl_new( - String instance_hash); - - external void wire__crate__api__merged__my_class_my_format( - NativePortType port_, JSAny that); - - external void wire__crate__api__merged__my_class_new( - NativePortType port_, int a); + wire__crate__api__merged__ledger_connection_dart_wrapper_new( + PlatformPointer on_get_public_key, + PlatformPointer on_sign, + PlatformPointer on_sign_transaction, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_check_public_key(String public_key); + wire__crate__api__merged__nt_check_public_key(String public_key); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_code_to_tvc(String code); + wire__crate__api__merged__nt_code_to_tvc(String code); external void wire__crate__api__merged__nt_compute_storage_fee( - NativePortType port_, - String config, - String account, - int utime, - bool is_masterchain); + NativePortType port_, + String config, + String account, + int utime, + bool is_masterchain, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_compute_ton_wallet_address( - String public_key, String wallet_type, int workchain); + wire__crate__api__merged__nt_compute_ton_wallet_address( + String public_key, + String wallet_type, + int workchain, + ); external void wire__crate__api__merged__nt_create_external_message( - NativePortType port_, - String dst, - String contract_abi, - String method, - String? state_init, - String input, - String public_key, - int timeout); + NativePortType port_, + String dst, + String contract_abi, + String method, + String? state_init, + String input, + String public_key, + int timeout, + ); external void - wire__crate__api__merged__nt_create_external_message_without_signature( - NativePortType port_, - String dst, - String contract_abi, - String method, - String? state_init, - String input, - int timeout); + wire__crate__api__merged__nt_create_external_message_without_signature( + NativePortType port_, + String dst, + String contract_abi, + String method, + String? state_init, + String input, + int timeout, + ); external void wire__crate__api__merged__nt_create_raw_external_message( - NativePortType port_, - String dst, - String? state_init, - String? body, - int timeout); - - external void wire__crate__api__merged__nt_decode_event(NativePortType port_, - String message_body, String contract_abi, String? event); - - external void wire__crate__api__merged__nt_decode_input(NativePortType port_, - String message_body, String contract_abi, String? method, bool internal); - - external void wire__crate__api__merged__nt_decode_output(NativePortType port_, - String message_body, String contract_abi, String? method); + NativePortType port_, + String dst, + String? state_init, + String? body, + int timeout, + ); + + external void wire__crate__api__merged__nt_decode_event( + NativePortType port_, + String message_body, + String contract_abi, + String? event, + ); + + external void wire__crate__api__merged__nt_decode_input( + NativePortType port_, + String message_body, + String contract_abi, + String? method, + bool internal, + ); + + external void wire__crate__api__merged__nt_decode_output( + NativePortType port_, + String message_body, + String contract_abi, + String? method, + ); external void wire__crate__api__merged__nt_decode_transaction( - NativePortType port_, - String transaction, - String contract_abi, - String? method); + NativePortType port_, + String transaction, + String contract_abi, + String? method, + ); external void wire__crate__api__merged__nt_decode_transaction_events( - NativePortType port_, String transaction, String contract_abi); + NativePortType port_, + String transaction, + String contract_abi, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_derive_from_phrase( - String phrase, JSAny mnemonic_type); + wire__crate__api__merged__nt_derive_from_phrase( + String phrase, + JSAny mnemonic_type, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_encode_comment(String comment, bool plain); + wire__crate__api__merged__nt_encode_comment(String comment, bool plain); external void wire__crate__api__merged__nt_encode_internal_input( - NativePortType port_, String contract_abi, String method, String input); + NativePortType port_, + String contract_abi, + String method, + String input, + ); external void wire__crate__api__merged__nt_encode_internal_message( - NativePortType port_, - String? src, - String dst, - bool bounce, - String? state_init, - String? body, - String amount, - bool? bounced); + NativePortType port_, + String? src, + String dst, + bool bounce, + String? state_init, + String? body, + String amount, + bool? bounced, + ); external void wire__crate__api__merged__nt_execute_local( - NativePortType port_, - String config, - String account, - String message, - int utime, - bool disable_signature_check, - String? overwrite_balance, - int? global_id); + NativePortType port_, + String config, + String account, + String message, + int utime, + bool disable_signature_check, + String? overwrite_balance, + int? global_id, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_extract_public_key(String boc); + wire__crate__api__merged__nt_extract_public_key(String boc); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_generate_key(JSAny account_type); + wire__crate__api__merged__nt_generate_key(JSAny account_type); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_get_boc_hash(String boc); + wire__crate__api__merged__nt_get_boc_hash(String boc); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_get_code_salt(String code); + wire__crate__api__merged__nt_get_code_salt(String code); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_get_contract_type_number(String wallet_type); + wire__crate__api__merged__nt_get_contract_type_number(String wallet_type); external void wire__crate__api__merged__nt_get_expected_address( - NativePortType port_, - String tvc, - String contract_abi, - int workchain_id, - String? public_key, - String init_data); + NativePortType port_, + String tvc, + String contract_abi, + int workchain_id, + String? public_key, + String init_data, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_get_hints(String input); + wire__crate__api__merged__nt_get_hints(String input); external void wire__crate__api__merged__nt_make_full_account_boc( - NativePortType port_, String? account_stuff_boc); + NativePortType port_, + String? account_stuff_boc, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_merge_tvc(String code, String data); + wire__crate__api__merged__nt_merge_tvc(String code, String data); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_pack_address( - String address, bool is_url_safe, bool bounceable); + wire__crate__api__merged__nt_pack_address( + String address, + bool is_url_safe, + bool bounceable, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_pack_into_cell( - String params, String tokens, String? version); + wire__crate__api__merged__nt_pack_into_cell( + String params, + String tokens, + String? version, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_pack_std_smc_addr( - String addr, bool base64_url, bool bounceable); + wire__crate__api__merged__nt_pack_std_smc_addr( + String addr, + bool base64_url, + bool bounceable, + ); external void wire__crate__api__merged__nt_parse_full_account_boc( - NativePortType port_, String account); + NativePortType port_, + String account, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_parse_known_payload(String payload); + wire__crate__api__merged__nt_parse_known_payload(String payload); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_repack_address(String address); + wire__crate__api__merged__nt_repack_address(String address); external void wire__crate__api__merged__nt_run_getter( - NativePortType port_, - String account_stuff_boc, - String contract_abi, - String method_id, - String input, - JSAny libraries, - int? signature_id); + NativePortType port_, + String account_stuff_boc, + String contract_abi, + String method_id, + String input, + JSAny libraries, + int? signature_id, + ); external void wire__crate__api__merged__nt_run_local( - NativePortType port_, - String account_stuff_boc, - String contract_abi, - String method_id, - String input, - bool responsible, - JSAny libraries, - int? signature_id); + NativePortType port_, + String account_stuff_boc, + String contract_abi, + String method_id, + String input, + bool responsible, + JSAny libraries, + int? signature_id, + ); external void wire__crate__api__merged__nt_run_local_with_libs( - NativePortType port_, - int transport, - String account_stuff_boc, - String contract_abi, - String method_id, - String input, - bool responsible, - JSAny libraries, - int retry_count, - int? signature_id); + NativePortType port_, + int transport, + String account_stuff_boc, + String contract_abi, + String method_id, + String input, + bool responsible, + JSAny libraries, + int retry_count, + int? signature_id, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_set_code_salt(String code, String salt); + wire__crate__api__merged__nt_set_code_salt(String code, String salt); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_split_tvc(String tvc); + wire__crate__api__merged__nt_split_tvc(String tvc); external void wire__crate__api__merged__nt_unpack_contract_fields( - NativePortType port_, - String contract_abi, - String boc, - bool allow_partial); + NativePortType port_, + String contract_abi, + String boc, + bool allow_partial, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_unpack_from_cell( - String params, String boc, bool allow_partial, String? version); + wire__crate__api__merged__nt_unpack_from_cell( + String params, + String boc, + bool allow_partial, + String? version, + ); external void wire__crate__api__merged__nt_unpack_init_data( - NativePortType port_, String contract_abi, String data); + NativePortType port_, + String contract_abi, + String data, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_unpack_std_smc_addr( - String packed, bool base64_url); + wire__crate__api__merged__nt_unpack_std_smc_addr( + String packed, + bool base64_url, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__nt_validate_address(String address); + wire__crate__api__merged__nt_validate_address(String address); external void wire__crate__api__merged__nt_verify_signature( - NativePortType port_, - String public_key, - String data, - String signature, - int? signature_id); + NativePortType port_, + String public_key, + String data, + String signature, + int? signature_id, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__proto_connection_dart_wrapper_new( - String instance_hash); + wire__crate__api__merged__proto_connection_dart_wrapper_new( + PlatformPointer on_post, + ); external void - wire__crate__api__merged__proto_transport_impl_get_accounts_by_code_hash( - NativePortType port_, - JSAny that, - String code_hash, - int limit, - String? continuation); + wire__crate__api__merged__proto_transport_impl_get_accounts_by_code_hash( + NativePortType port_, + JSAny that, + String code_hash, + int limit, + String? continuation, + ); external void - wire__crate__api__merged__proto_transport_impl_get_blockchain_config( - NativePortType port_, JSAny that, bool force); + wire__crate__api__merged__proto_transport_impl_get_blockchain_config( + NativePortType port_, + JSAny that, + bool force, + ); external void - wire__crate__api__merged__proto_transport_impl_get_contract_state( - NativePortType port_, JSAny that, String address); + wire__crate__api__merged__proto_transport_impl_get_contract_state( + NativePortType port_, + JSAny that, + String address, + ); external void - wire__crate__api__merged__proto_transport_impl_get_dst_transaction( - NativePortType port_, JSAny that, String message_hash); + wire__crate__api__merged__proto_transport_impl_get_dst_transaction( + NativePortType port_, + JSAny that, + String message_hash, + ); external void wire__crate__api__merged__proto_transport_impl_get_fee_factors( - NativePortType port_, JSAny that, bool is_masterchain); + NativePortType port_, + JSAny that, + bool is_masterchain, + ); external void - wire__crate__api__merged__proto_transport_impl_get_full_contract_state( - NativePortType port_, JSAny that, String address); + wire__crate__api__merged__proto_transport_impl_get_full_contract_state( + NativePortType port_, + JSAny that, + String address, + ); external void wire__crate__api__merged__proto_transport_impl_get_network_id( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__proto_transport_impl_get_signature_id( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__proto_transport_impl_get_transaction( - NativePortType port_, JSAny that, String hash); + NativePortType port_, + JSAny that, + String hash, + ); external void wire__crate__api__merged__proto_transport_impl_get_transactions( - NativePortType port_, - JSAny that, - String address, - String? from_lt, - int count); + NativePortType port_, + JSAny that, + String address, + String? from_lt, + int count, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__proto_transport_impl_new( - JSAny proto_connection); + wire__crate__api__merged__proto_transport_impl_new(JSAny proto_connection); external void - wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree( - NativePortType port_, - JSAny that, - String signed_message, - JSAny ignored_compute_phase_codes, - JSAny ignored_action_phase_codes); + wire__crate__api__merged__proto_transport_impl_simulate_transaction_tree( + NativePortType port_, + JSAny that, + String signed_message, + JSAny ignored_compute_phase_codes, + JSAny ignored_action_phase_codes, + ); external void wire__crate__api__merged__set_clock_offset( - NativePortType port_, JSAny offset_ms); - - external void wire__crate__api__merged__simple_adder( - NativePortType port_, int a, int b); - - external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__simple_adder_sync(int a, int b); - - external void wire__crate__api__merged__simple_call_dart( - NativePortType port_); - - external void wire__crate__api__merged__simple_call_func0( - NativePortType port_, bool need_result); - - external void wire__crate__api__merged__simple_call_func1( - NativePortType port_, bool need_result); - - external void wire__crate__api__merged__simple_call_func2( - NativePortType port_); - - external void wire__crate__api__merged__simple_call_func3( - NativePortType port_); - - external void wire__crate__api__merged__simple_log( - NativePortType port_, String string); - - external void wire__crate__api__merged__simple_panic(NativePortType port_); - - external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__storage_dart_wrapper_new(String instance_hash); - - external void wire__crate__api__merged__storage_impl_new( - NativePortType port_, String instance_hash); - - external void wire__crate__api__merged__stub_call_dart( - NativePortType port_, JSAny stub); - - external void wire__crate__api__merged__stub_dcs(NativePortType port_); - - external void wire__crate__api__merged__stub_dv(NativePortType port_); - - external void wire__crate__api__merged__test_caller_call_test0_async( - NativePortType port_, String string, bool need_result); + NativePortType port_, + JSAny offset_ms, + ); external JSAny? /* flutter_rust_bridge::for_generated::WireSyncRust2DartDco */ - wire__crate__api__merged__test_caller_call_test0_sync( - String string, bool need_result); - - external void wire__crate__api__merged__test_caller_call_test1_async( - NativePortType port_, String string, bool need_result); - - external void wire__crate__api__merged__test_logger_debug( - NativePortType port_, String string); - - external void wire__crate__api__merged__test_logger_error( - NativePortType port_, String string); - - external void wire__crate__api__merged__test_logger_info( - NativePortType port_, String string); - - external void wire__crate__api__merged__test_logger_panic( - NativePortType port_, String string); - - external void wire__crate__api__merged__test_logger_warn( - NativePortType port_, String string); + wire__crate__api__merged__storage_dart_wrapper_new( + PlatformPointer on_get, + PlatformPointer on_set, + PlatformPointer on_set_unchecked, + PlatformPointer on_remove, + PlatformPointer on_remove_unchecked, + ); external void wire__crate__api__merged__token_wallet_dart_wrapper_address( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__token_wallet_dart_wrapper_balance( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void - wire__crate__api__merged__token_wallet_dart_wrapper_contract_state( - NativePortType port_, JSAny that); + wire__crate__api__merged__token_wallet_dart_wrapper_contract_state( + NativePortType port_, + JSAny that, + ); external void - wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount( - NativePortType port_, - JSAny that, - String destination, - String amount, - bool notify_receiver, - String? payload); + wire__crate__api__merged__token_wallet_dart_wrapper_estimate_min_attached_amount( + NativePortType port_, + JSAny that, + String destination, + String amount, + bool notify_receiver, + String? payload, + ); external void - wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details( - NativePortType port_, int transport, String token_root_address); + wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details( + NativePortType port_, + int transport, + String token_root_address, + ); external void - wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet( - NativePortType port_, int transport, String token_wallet_address); + wire__crate__api__merged__token_wallet_dart_wrapper_get_token_root_details_from_token_wallet( + NativePortType port_, + int transport, + String token_wallet_address, + ); external void - wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details( - NativePortType port_, int transport, String address); + wire__crate__api__merged__token_wallet_dart_wrapper_get_token_wallet_details( + NativePortType port_, + int transport, + String address, + ); external void - wire__crate__api__merged__token_wallet_dart_wrapper_handle_block( - NativePortType port_, JSAny that, String block); + wire__crate__api__merged__token_wallet_dart_wrapper_handle_block( + NativePortType port_, + JSAny that, + String block, + ); external void wire__crate__api__merged__token_wallet_dart_wrapper_owner( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void - wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions( - NativePortType port_, JSAny that, String from_lt); + wire__crate__api__merged__token_wallet_dart_wrapper_preload_transactions( + NativePortType port_, + JSAny that, + String from_lt, + ); external void - wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer( - NativePortType port_, - JSAny that, - String destination, - String amount, - bool notify_receiver, - String? attached_amount, - String? payload, - String? remaining_gas_to); + wire__crate__api__merged__token_wallet_dart_wrapper_prepare_transfer( + NativePortType port_, + JSAny that, + String destination, + String amount, + bool notify_receiver, + String? attached_amount, + String? payload, + String? remaining_gas_to, + ); external void wire__crate__api__merged__token_wallet_dart_wrapper_refresh( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__token_wallet_dart_wrapper_subscribe( - NativePortType port_, - String instance_hash, - String owner, - String root_token_contract, - int transport, - bool preload_transactions); + NativePortType port_, + String owner, + String root_token_contract, + int transport, + bool preload_transactions, + PlatformPointer on_balance_changed, + PlatformPointer on_transactions_found, + ); external void wire__crate__api__merged__token_wallet_dart_wrapper_symbol( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__token_wallet_dart_wrapper_version( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__ton_wallet_dart_wrapper_address( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload( - NativePortType port_, String payload, String base64_signature); + wire__crate__api__merged__ton_wallet_dart_wrapper_append_signature_to_wallet_v5r1_payload( + NativePortType port_, + String payload, + String base64_signature, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state( - NativePortType port_, JSAny that); + wire__crate__api__merged__ton_wallet_dart_wrapper_contract_state( + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__ton_wallet_dart_wrapper_custodians( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__ton_wallet_dart_wrapper_details( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__ton_wallet_dart_wrapper_estimate_fees( - NativePortType port_, - JSAny that, - String signed_message, - String? execution_options); + NativePortType port_, + JSAny that, + String signed_message, + String? execution_options, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets( - NativePortType port_, - int transport, - String public_key, - int workchain_id, - String wallet_types); + wire__crate__api__merged__ton_wallet_dart_wrapper_find_existing_wallets( + NativePortType port_, + int transport, + String public_key, + int workchain_id, + String wallet_types, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians( - NativePortType port_, int transport, String address); + wire__crate__api__merged__ton_wallet_dart_wrapper_get_custodians( + NativePortType port_, + int transport, + String address, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info( - NativePortType port_, int transport, String address); + wire__crate__api__merged__ton_wallet_dart_wrapper_get_existing_wallet_info( + NativePortType port_, + int transport, + String address, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno( - NativePortType port_, - JSAny that, - String raw_current_state, - String public_key); + wire__crate__api__merged__ton_wallet_dart_wrapper_get_wallet_v5r1_seqno( + NativePortType port_, + JSAny that, + String raw_current_state, + String public_key, + ); external void wire__crate__api__merged__ton_wallet_dart_wrapper_handle_block( - NativePortType port_, JSAny that, String block); + NativePortType port_, + JSAny that, + String block, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init( - NativePortType port_, JSAny that); + wire__crate__api__merged__ton_wallet_dart_wrapper_make_state_init( + NativePortType port_, + JSAny that, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions( - NativePortType port_, JSAny that); + wire__crate__api__merged__ton_wallet_dart_wrapper_pending_transactions( + NativePortType port_, + JSAny that, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method( - NativePortType port_, JSAny that); + wire__crate__api__merged__ton_wallet_dart_wrapper_polling_method( + NativePortType port_, + JSAny that, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions( - NativePortType port_, JSAny that, String from_lt); + wire__crate__api__merged__ton_wallet_dart_wrapper_preload_transactions( + NativePortType port_, + JSAny that, + String from_lt, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction( - NativePortType port_, - JSAny that, - String contract_state, - String public_key, - String transaction_id, - String expiration); + wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_confirm_transaction( + NativePortType port_, + JSAny that, + String contract_state, + String public_key, + String transaction_id, + String expiration, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy( - NativePortType port_, JSAny that, String expiration); + wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy( + NativePortType port_, + JSAny that, + String expiration, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners( - NativePortType port_, - JSAny that, - String expiration, - JSAny custodians, - int req_confirms, - int? expiration_time); + wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_deploy_with_multiple_owners( + NativePortType port_, + JSAny that, + String expiration, + JSAny custodians, + int req_confirms, + int? expiration_time, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body( - NativePortType port_, - JSAny that, - String expiration, - String params, - bool is_internal_flow); + wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_nonexist_wallet_v5r1_message_body( + NativePortType port_, + JSAny that, + String expiration, + String params, + bool is_internal_flow, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer( - NativePortType port_, - JSAny that, - String contract_state, - String public_key, - String expiration, - String params); + wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_transfer( + NativePortType port_, + JSAny that, + String contract_state, + String public_key, + String expiration, + String params, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body( - NativePortType port_, - JSAny that, - String contract_state, - String public_key, - String expiration, - String params, - bool is_internal_flow); + wire__crate__api__merged__ton_wallet_dart_wrapper_prepare_wallet_v5r1_message_body( + NativePortType port_, + JSAny that, + String contract_state, + String public_key, + String expiration, + String params, + bool is_internal_flow, + ); external void wire__crate__api__merged__ton_wallet_dart_wrapper_public_key( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__ton_wallet_dart_wrapper_refresh( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__ton_wallet_dart_wrapper_send( - NativePortType port_, JSAny that, String signed_message); + NativePortType port_, + JSAny that, + String signed_message, + ); external void wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe( - NativePortType port_, - String instance_hash, - int workchain_id, - String public_key, - String wallet_type, - int transport); + NativePortType port_, + int workchain_id, + String public_key, + String wallet_type, + int transport, + PlatformPointer on_message_sent, + PlatformPointer on_message_expired, + PlatformPointer on_state_changed, + PlatformPointer on_transactions_found, + PlatformPointer on_details_changed, + PlatformPointer on_custodians_changed, + PlatformPointer on_unconfirmed_transactions_changed, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address( - NativePortType port_, - String instance_hash, - String address, - int transport); + wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_address( + NativePortType port_, + String address, + int transport, + PlatformPointer on_message_sent, + PlatformPointer on_message_expired, + PlatformPointer on_state_changed, + PlatformPointer on_transactions_found, + PlatformPointer on_details_changed, + PlatformPointer on_custodians_changed, + PlatformPointer on_unconfirmed_transactions_changed, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing( - NativePortType port_, - String instance_hash, - String existing_wallet, - int transport); + wire__crate__api__merged__ton_wallet_dart_wrapper_subscribe_by_existing( + NativePortType port_, + String existing_wallet, + int transport, + PlatformPointer on_message_sent, + PlatformPointer on_message_expired, + PlatformPointer on_state_changed, + PlatformPointer on_transactions_found, + PlatformPointer on_details_changed, + PlatformPointer on_custodians_changed, + PlatformPointer on_unconfirmed_transactions_changed, + ); external void - wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions( - NativePortType port_, JSAny that); + wire__crate__api__merged__ton_wallet_dart_wrapper_unconfirmed_transactions( + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__ton_wallet_dart_wrapper_wallet_type( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__ton_wallet_dart_wrapper_workchain( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__unsigned_message_impl_expire_at( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__unsigned_message_impl_hash( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__unsigned_message_impl_refresh_timeout( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); external void wire__crate__api__merged__unsigned_message_impl_sign( - NativePortType port_, JSAny that, String signature); + NativePortType port_, + JSAny that, + String signature, + ); external void wire__crate__api__merged__unsigned_message_impl_sign_fake( - NativePortType port_, JSAny that); + NativePortType port_, + JSAny that, + ); + + external void + rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( + int ptr, + ); + + external void + rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( + int ptr, + ); + + external void + rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( + int ptr, + ); + + external void + rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( + int ptr, + ); + + external void + rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( + int ptr, + ); + + external void + rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( + int ptr, + ); + + external void + rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( + int ptr, + ); + + external void + rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( + int ptr, + ); + + external void + rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( + int ptr, + ); + + external void + rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( + int ptr, + ); + + external void + rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait(int ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait(int ptr); + + external void + rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( + int ptr, + ); + + external void + rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( + int ptr, + ); + + external void + rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( + int ptr, + ); + + external void + rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( + int ptr, + ); + + external void + rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait(int ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait(int ptr); + + external void + rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait(int ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait(int ptr); + + external void + rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait(int ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait(int ptr); + + external void + rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait(int ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait(int ptr); + + external void + rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( + int ptr, + ); + + external void + rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( + int ptr, + ); + + external void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + int ptr, + ); + + external void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureOptionStringSendSync( + int ptr, + ); + + external void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + int ptr, + ); + + external void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureSendSync( + int ptr, + ); + + external void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + int ptr, + ); + + external void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringDartFnFutureStringSendSync( + int ptr, + ); + + external void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + int ptr, + ); + + external void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnStringStringDartFnFutureSendSync( + int ptr, + ); external void - rust_arc_increment_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( - int ptr); + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + int ptr, + ); external void - rust_arc_decrement_strong_count_RustOpaque_ArcdynAccountsStorageBoxTrait( - int ptr); + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnVecu8DartFnFutureVecu8SendSync( + int ptr, + ); external void - rust_arc_increment_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( - int ptr); + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + int ptr, + ); external void - rust_arc_decrement_strong_count_RustOpaque_ArcdynGenericContractBoxTrait( - int ptr); + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16DartFnFutureVecu8SendSync( + int ptr, + ); external void - rust_arc_increment_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( - int ptr); + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + int ptr, + ); external void - rust_arc_decrement_strong_count_RustOpaque_ArcdynGqlConnectionBoxTrait( - int ptr); + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16Optioni32Vecu8DartFnFutureVecu8SendSync( + int ptr, + ); external void - rust_arc_increment_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( - int ptr); + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + int ptr, + ); external void - rust_arc_decrement_strong_count_RustOpaque_ArcdynJettonWalletBoxTrait( - int ptr); + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynFnu16u16Optioni32Vecu8StringDartFnFutureVecu8SendSync( + int ptr, + ); external void - rust_arc_increment_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( - int ptr); + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + int ptr, + ); external void - rust_arc_decrement_strong_count_RustOpaque_ArcdynJrpcConnectionBoxTrait( - int ptr); + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGenericContractSubscriptionHandlerImpl( + int ptr, + ); external void - rust_arc_increment_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( - int ptr); + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + int ptr, + ); external void - rust_arc_decrement_strong_count_RustOpaque_ArcdynKeyStoreApiBoxTrait( - int ptr); + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerGqlConnectionImpl( + int ptr, + ); external void - rust_arc_increment_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( - int ptr); + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + int ptr, + ); external void - rust_arc_decrement_strong_count_RustOpaque_ArcdynLedgerConnectionBoxTrait( - int ptr); + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJettonWalletSubscriptionHandlerImpl( + int ptr, + ); external void - rust_arc_increment_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( - int ptr); + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + int ptr, + ); external void - rust_arc_decrement_strong_count_RustOpaque_ArcdynProtoConnectionBoxTrait( - int ptr); + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerJrpcConnectionImpl( + int ptr, + ); external void - rust_arc_increment_strong_count_RustOpaque_ArcdynStorageBoxTrait(int ptr); + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + int ptr, + ); external void - rust_arc_decrement_strong_count_RustOpaque_ArcdynStorageBoxTrait(int ptr); + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLedgerConnectionImpl( + int ptr, + ); external void - rust_arc_increment_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( - int ptr); + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + int ptr, + ); external void - rust_arc_decrement_strong_count_RustOpaque_ArcdynTokenWalletBoxTrait( - int ptr); + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerProtoConnectionImpl( + int ptr, + ); external void - rust_arc_increment_strong_count_RustOpaque_ArcdynTonWalletBoxTrait( - int ptr); + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + int ptr, + ); external void - rust_arc_decrement_strong_count_RustOpaque_ArcdynTonWalletBoxTrait( - int ptr); + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStorageImpl( + int ptr, + ); external void - rust_arc_increment_strong_count_RustOpaque_ArcdynTransportBoxTrait( - int ptr); + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + int ptr, + ); external void - rust_arc_decrement_strong_count_RustOpaque_ArcdynTransportBoxTrait( - int ptr); + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTokenWalletSubscriptionHandlerImpl( + int ptr, + ); external void - rust_arc_increment_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( - int ptr); + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + int ptr, + ); external void - rust_arc_decrement_strong_count_RustOpaque_ArcdynUnsignedMessageBoxTrait( - int ptr); + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerTonWalletSubscriptionHandlerImpl( + int ptr, + ); } diff --git a/packages/nekoton_bridge/lib/src/lib.dart b/packages/nekoton_bridge/lib/src/lib.dart index bedc2949..5d8aebf0 100644 --- a/packages/nekoton_bridge/lib/src/lib.dart +++ b/packages/nekoton_bridge/lib/src/lib.dart @@ -1,10 +1,34 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.9.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import import 'frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -// Rust type: RustOpaqueNom> -abstract class DartCallback implements RustOpaqueInterface {} +// Rust type: RustOpaqueNom DartFnFuture < Option < String > > + Send + Sync >>> +abstract class ArcFnStringDartFnFutureOptionString + implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom DartFnFuture < () > + Send + Sync >>> +abstract class ArcFnStringDartFnFuture implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom DartFnFuture < String > + Send + Sync >>> +abstract class ArcFnStringDartFnFutureString implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom DartFnFuture < () > + Send + Sync >>> +abstract class ArcFnStringStringDartFnFuture implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom) -> DartFnFuture < Vec < u8 > > + Send + Sync >>> +abstract class ArcFnVecU8DartFnFutureVecU8 implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom DartFnFuture < Vec < u8 > > + Send + Sync >>> +abstract class ArcFnU16DartFnFutureVecU8 implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom , Vec < u8 >) -> DartFnFuture < Vec < u8 > > + Send + Sync >>> +abstract class ArcFnU16OptionI32VecU8DartFnFutureVecU8 + implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom , Vec < u8 > , String) -> DartFnFuture < Vec < u8 > > + Send + Sync >>> +abstract class ArcFnU16U16OptionI32VecU8StringDartFnFutureVecU8 + implements RustOpaqueInterface {} diff --git a/packages/nekoton_bridge/lib/src/models_utils.dart b/packages/nekoton_bridge/lib/src/models_utils.dart index 381aa068..a2c8eb03 100644 --- a/packages/nekoton_bridge/lib/src/models_utils.dart +++ b/packages/nekoton_bridge/lib/src/models_utils.dart @@ -22,21 +22,21 @@ class MnemonicTypeJsonConverter 'ever' => Bip39Path.ever, 'ton' => Bip39Path.ton, _ => throw CheckedFromJsonException( - json['data'], - 'path', - 'Bip39Path', - 'Invalid enum value "${json['data']['path']}"!', - ), + json['data'], + 'path', + 'Bip39Path', + 'Invalid enum value "${json['data']['path']}"!', + ), }, entropy: switch (json['data']['entropy'] as String) { 'bits128' => Bip39Entropy.bits128, 'bits256' => Bip39Entropy.bits256, _ => throw CheckedFromJsonException( - json['data'], - 'entropy', - 'Bip39Entropy', - 'Invalid enum value "${json['data']['entropy']}"!', - ), + json['data'], + 'entropy', + 'Bip39Entropy', + 'Invalid enum value "${json['data']['entropy']}"!', + ), }, ), ); // json['data'] as int diff --git a/packages/nekoton_bridge/lib/src/nekoton_wrapper/core/keystore/models.dart b/packages/nekoton_bridge/lib/src/nekoton_wrapper/core/keystore/models.dart index a5fb90f7..30487c7b 100644 --- a/packages/nekoton_bridge/lib/src/nekoton_wrapper/core/keystore/models.dart +++ b/packages/nekoton_bridge/lib/src/nekoton_wrapper/core/keystore/models.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -15,10 +15,7 @@ class SignatureParts { /// symbols after 32-th final String high; - const SignatureParts({ - required this.low, - required this.high, - }); + const SignatureParts({required this.low, required this.high}); @override int get hashCode => low.hashCode ^ high.hashCode; diff --git a/packages/nekoton_bridge/lib/src/nekoton_wrapper/crypto/models.dart b/packages/nekoton_bridge/lib/src/nekoton_wrapper/crypto/models.dart index 158d7ff6..5c6da01f 100644 --- a/packages/nekoton_bridge/lib/src/nekoton_wrapper/crypto/models.dart +++ b/packages/nekoton_bridge/lib/src/nekoton_wrapper/crypto/models.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -18,7 +18,5 @@ sealed class KeySigner with _$KeySigner { /// Do not use this type. This is fucking hack because generator don't want generate /// converter for Vec if it is simple enum - const factory KeySigner.stub( - bool field0, - ) = KeySigner_Stub; + const factory KeySigner.stub(bool field0) = KeySigner_Stub; } diff --git a/packages/nekoton_bridge/lib/src/nekoton_wrapper/crypto/models.freezed.dart b/packages/nekoton_bridge/lib/src/nekoton_wrapper/crypto/models.freezed.dart index 971f1bab..3a02ece8 100644 --- a/packages/nekoton_bridge/lib/src/nekoton_wrapper/crypto/models.freezed.dart +++ b/packages/nekoton_bridge/lib/src/nekoton_wrapper/crypto/models.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,130 +11,320 @@ part of 'models.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$KeySigner { - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is KeySigner); - } - @override - int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'KeySigner()'; - } + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is KeySigner); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'KeySigner()'; +} + + } /// @nodoc -class $KeySignerCopyWith<$Res> { - $KeySignerCopyWith(KeySigner _, $Res Function(KeySigner) __); +class $KeySignerCopyWith<$Res> { +$KeySignerCopyWith(KeySigner _, $Res Function(KeySigner) __); +} + + +/// Adds pattern-matching-related methods to [KeySigner]. +extension KeySignerPatterns on KeySigner { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( KeySigner_Encrypted value)? encrypted,TResult Function( KeySigner_Derived value)? derived,TResult Function( KeySigner_Ledger value)? ledger,TResult Function( KeySigner_Stub value)? stub,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case KeySigner_Encrypted() when encrypted != null: +return encrypted(_that);case KeySigner_Derived() when derived != null: +return derived(_that);case KeySigner_Ledger() when ledger != null: +return ledger(_that);case KeySigner_Stub() when stub != null: +return stub(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( KeySigner_Encrypted value) encrypted,required TResult Function( KeySigner_Derived value) derived,required TResult Function( KeySigner_Ledger value) ledger,required TResult Function( KeySigner_Stub value) stub,}){ +final _that = this; +switch (_that) { +case KeySigner_Encrypted(): +return encrypted(_that);case KeySigner_Derived(): +return derived(_that);case KeySigner_Ledger(): +return ledger(_that);case KeySigner_Stub(): +return stub(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( KeySigner_Encrypted value)? encrypted,TResult? Function( KeySigner_Derived value)? derived,TResult? Function( KeySigner_Ledger value)? ledger,TResult? Function( KeySigner_Stub value)? stub,}){ +final _that = this; +switch (_that) { +case KeySigner_Encrypted() when encrypted != null: +return encrypted(_that);case KeySigner_Derived() when derived != null: +return derived(_that);case KeySigner_Ledger() when ledger != null: +return ledger(_that);case KeySigner_Stub() when stub != null: +return stub(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function()? encrypted,TResult Function()? derived,TResult Function()? ledger,TResult Function( bool field0)? stub,required TResult orElse(),}) {final _that = this; +switch (_that) { +case KeySigner_Encrypted() when encrypted != null: +return encrypted();case KeySigner_Derived() when derived != null: +return derived();case KeySigner_Ledger() when ledger != null: +return ledger();case KeySigner_Stub() when stub != null: +return stub(_that.field0);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function() encrypted,required TResult Function() derived,required TResult Function() ledger,required TResult Function( bool field0) stub,}) {final _that = this; +switch (_that) { +case KeySigner_Encrypted(): +return encrypted();case KeySigner_Derived(): +return derived();case KeySigner_Ledger(): +return ledger();case KeySigner_Stub(): +return stub(_that.field0);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function()? encrypted,TResult? Function()? derived,TResult? Function()? ledger,TResult? Function( bool field0)? stub,}) {final _that = this; +switch (_that) { +case KeySigner_Encrypted() when encrypted != null: +return encrypted();case KeySigner_Derived() when derived != null: +return derived();case KeySigner_Ledger() when ledger != null: +return ledger();case KeySigner_Stub() when stub != null: +return stub(_that.field0);case _: + return null; + +} +} + } /// @nodoc + class KeySigner_Encrypted extends KeySigner { - const KeySigner_Encrypted() : super._(); + const KeySigner_Encrypted(): super._(); + + + - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is KeySigner_Encrypted); - } - @override - int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'KeySigner.encrypted()'; - } + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is KeySigner_Encrypted); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'KeySigner.encrypted()'; } + +} + + + + /// @nodoc + class KeySigner_Derived extends KeySigner { - const KeySigner_Derived() : super._(); + const KeySigner_Derived(): super._(); + + + + + + - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is KeySigner_Derived); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is KeySigner_Derived); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'KeySigner.derived()'; +} - @override - int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'KeySigner.derived()'; - } } + + + /// @nodoc + class KeySigner_Ledger extends KeySigner { - const KeySigner_Ledger() : super._(); + const KeySigner_Ledger(): super._(); + + + + + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is KeySigner_Ledger); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is KeySigner_Ledger); - } - @override - int get hashCode => runtimeType.hashCode; +@override +int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'KeySigner.ledger()'; - } +@override +String toString() { + return 'KeySigner.ledger()'; } + +} + + + + /// @nodoc + class KeySigner_Stub extends KeySigner { - const KeySigner_Stub(this.field0) : super._(); + const KeySigner_Stub(this.field0): super._(); + - final bool field0; + final bool field0; - /// Create a copy of KeySigner - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $KeySigner_StubCopyWith get copyWith => - _$KeySigner_StubCopyWithImpl(this, _$identity); +/// Create a copy of KeySigner +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$KeySigner_StubCopyWith get copyWith => _$KeySigner_StubCopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is KeySigner_Stub && - (identical(other.field0, field0) || other.field0 == field0)); - } - @override - int get hashCode => Object.hash(runtimeType, field0); - @override - String toString() { - return 'KeySigner.stub(field0: $field0)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is KeySigner_Stub&&(identical(other.field0, field0) || other.field0 == field0)); } -/// @nodoc -abstract mixin class $KeySigner_StubCopyWith<$Res> - implements $KeySignerCopyWith<$Res> { - factory $KeySigner_StubCopyWith( - KeySigner_Stub value, $Res Function(KeySigner_Stub) _then) = - _$KeySigner_StubCopyWithImpl; - @useResult - $Res call({bool field0}); + +@override +int get hashCode => Object.hash(runtimeType,field0); + +@override +String toString() { + return 'KeySigner.stub(field0: $field0)'; +} + + } +/// @nodoc +abstract mixin class $KeySigner_StubCopyWith<$Res> implements $KeySignerCopyWith<$Res> { + factory $KeySigner_StubCopyWith(KeySigner_Stub value, $Res Function(KeySigner_Stub) _then) = _$KeySigner_StubCopyWithImpl; +@useResult +$Res call({ + bool field0 +}); + + + + +} /// @nodoc class _$KeySigner_StubCopyWithImpl<$Res> implements $KeySigner_StubCopyWith<$Res> { @@ -144,19 +333,16 @@ class _$KeySigner_StubCopyWithImpl<$Res> final KeySigner_Stub _self; final $Res Function(KeySigner_Stub) _then; - /// Create a copy of KeySigner - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? field0 = null, - }) { - return _then(KeySigner_Stub( - null == field0 - ? _self.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as bool, - )); - } +/// Create a copy of KeySigner +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) { + return _then(KeySigner_Stub( +null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable +as bool, + )); +} + + } // dart format on diff --git a/packages/nekoton_bridge/lib/src/utils/caller.dart b/packages/nekoton_bridge/lib/src/utils/caller.dart index 2d3c5d5f..52cbd00a 100644 --- a/packages/nekoton_bridge/lib/src/utils/caller.dart +++ b/packages/nekoton_bridge/lib/src/utils/caller.dart @@ -55,10 +55,7 @@ class DartCallStubRegistred { /// Call itself final DartCallStub stub; - const DartCallStubRegistred({ - this.id, - required this.stub, - }); + const DartCallStubRegistred({this.id, required this.stub}); @override int get hashCode => id.hashCode ^ stub.hashCode; @@ -78,10 +75,7 @@ class DynamicNamedValue { final String name; final DynamicValue? value; - const DynamicNamedValue({ - required this.name, - this.value, - }); + const DynamicNamedValue({required this.name, this.value}); @override int get hashCode => name.hashCode ^ value.hashCode; @@ -99,47 +93,19 @@ class DynamicNamedValue { sealed class DynamicValue with _$DynamicValue { const DynamicValue._(); - const factory DynamicValue.u16( - int field0, - ) = DynamicValue_U16; - const factory DynamicValue.u32( - int field0, - ) = DynamicValue_U32; - const factory DynamicValue.i32( - int field0, - ) = DynamicValue_I32; - const factory DynamicValue.u64( - BigInt field0, - ) = DynamicValue_U64; - const factory DynamicValue.i64( - PlatformInt64 field0, - ) = DynamicValue_I64; - const factory DynamicValue.f32( - double field0, - ) = DynamicValue_F32; - const factory DynamicValue.f64( - double field0, - ) = DynamicValue_F64; - const factory DynamicValue.string( - String field0, - ) = DynamicValue_String; - const factory DynamicValue.vecU8( - Uint8List field0, - ) = DynamicValue_VecU8; - const factory DynamicValue.megaStruct( - String field0, - ) = DynamicValue_MegaStruct; - const factory DynamicValue.error( - ErrorCode field0, - ) = DynamicValue_Error; + const factory DynamicValue.u16(int field0) = DynamicValue_U16; + const factory DynamicValue.u32(int field0) = DynamicValue_U32; + const factory DynamicValue.i32(int field0) = DynamicValue_I32; + const factory DynamicValue.u64(BigInt field0) = DynamicValue_U64; + const factory DynamicValue.i64(PlatformInt64 field0) = DynamicValue_I64; + const factory DynamicValue.f32(double field0) = DynamicValue_F32; + const factory DynamicValue.f64(double field0) = DynamicValue_F64; + const factory DynamicValue.string(String field0) = DynamicValue_String; + const factory DynamicValue.vecU8(Uint8List field0) = DynamicValue_VecU8; + const factory DynamicValue.megaStruct(String field0) = + DynamicValue_MegaStruct; + const factory DynamicValue.error(ErrorCode field0) = DynamicValue_Error; const factory DynamicValue.none() = DynamicValue_None; } -enum ErrorCode { - ok, - network, - generic, - invokeException, - cancelled, - ; -} +enum ErrorCode { ok, network, generic, invokeException, cancelled } diff --git a/packages/nekoton_bridge/lib/src/utils/caller.freezed.dart b/packages/nekoton_bridge/lib/src/utils/caller.freezed.dart index 8f7d1b0c..229f852e 100644 --- a/packages/nekoton_bridge/lib/src/utils/caller.freezed.dart +++ b/packages/nekoton_bridge/lib/src/utils/caller.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,70 +11,272 @@ part of 'caller.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$DynamicValue { - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is DynamicValue); - } - @override - int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'DynamicValue()'; - } + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DynamicValue); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'DynamicValue()'; +} + + +} + +/// @nodoc +class $DynamicValueCopyWith<$Res> { +$DynamicValueCopyWith(DynamicValue _, $Res Function(DynamicValue) __); +} + + +/// Adds pattern-matching-related methods to [DynamicValue]. +extension DynamicValuePatterns on DynamicValue { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( DynamicValue_U16 value)? u16,TResult Function( DynamicValue_U32 value)? u32,TResult Function( DynamicValue_I32 value)? i32,TResult Function( DynamicValue_U64 value)? u64,TResult Function( DynamicValue_I64 value)? i64,TResult Function( DynamicValue_F32 value)? f32,TResult Function( DynamicValue_F64 value)? f64,TResult Function( DynamicValue_String value)? string,TResult Function( DynamicValue_VecU8 value)? vecU8,TResult Function( DynamicValue_MegaStruct value)? megaStruct,TResult Function( DynamicValue_Error value)? error,TResult Function( DynamicValue_None value)? none,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case DynamicValue_U16() when u16 != null: +return u16(_that);case DynamicValue_U32() when u32 != null: +return u32(_that);case DynamicValue_I32() when i32 != null: +return i32(_that);case DynamicValue_U64() when u64 != null: +return u64(_that);case DynamicValue_I64() when i64 != null: +return i64(_that);case DynamicValue_F32() when f32 != null: +return f32(_that);case DynamicValue_F64() when f64 != null: +return f64(_that);case DynamicValue_String() when string != null: +return string(_that);case DynamicValue_VecU8() when vecU8 != null: +return vecU8(_that);case DynamicValue_MegaStruct() when megaStruct != null: +return megaStruct(_that);case DynamicValue_Error() when error != null: +return error(_that);case DynamicValue_None() when none != null: +return none(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( DynamicValue_U16 value) u16,required TResult Function( DynamicValue_U32 value) u32,required TResult Function( DynamicValue_I32 value) i32,required TResult Function( DynamicValue_U64 value) u64,required TResult Function( DynamicValue_I64 value) i64,required TResult Function( DynamicValue_F32 value) f32,required TResult Function( DynamicValue_F64 value) f64,required TResult Function( DynamicValue_String value) string,required TResult Function( DynamicValue_VecU8 value) vecU8,required TResult Function( DynamicValue_MegaStruct value) megaStruct,required TResult Function( DynamicValue_Error value) error,required TResult Function( DynamicValue_None value) none,}){ +final _that = this; +switch (_that) { +case DynamicValue_U16(): +return u16(_that);case DynamicValue_U32(): +return u32(_that);case DynamicValue_I32(): +return i32(_that);case DynamicValue_U64(): +return u64(_that);case DynamicValue_I64(): +return i64(_that);case DynamicValue_F32(): +return f32(_that);case DynamicValue_F64(): +return f64(_that);case DynamicValue_String(): +return string(_that);case DynamicValue_VecU8(): +return vecU8(_that);case DynamicValue_MegaStruct(): +return megaStruct(_that);case DynamicValue_Error(): +return error(_that);case DynamicValue_None(): +return none(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( DynamicValue_U16 value)? u16,TResult? Function( DynamicValue_U32 value)? u32,TResult? Function( DynamicValue_I32 value)? i32,TResult? Function( DynamicValue_U64 value)? u64,TResult? Function( DynamicValue_I64 value)? i64,TResult? Function( DynamicValue_F32 value)? f32,TResult? Function( DynamicValue_F64 value)? f64,TResult? Function( DynamicValue_String value)? string,TResult? Function( DynamicValue_VecU8 value)? vecU8,TResult? Function( DynamicValue_MegaStruct value)? megaStruct,TResult? Function( DynamicValue_Error value)? error,TResult? Function( DynamicValue_None value)? none,}){ +final _that = this; +switch (_that) { +case DynamicValue_U16() when u16 != null: +return u16(_that);case DynamicValue_U32() when u32 != null: +return u32(_that);case DynamicValue_I32() when i32 != null: +return i32(_that);case DynamicValue_U64() when u64 != null: +return u64(_that);case DynamicValue_I64() when i64 != null: +return i64(_that);case DynamicValue_F32() when f32 != null: +return f32(_that);case DynamicValue_F64() when f64 != null: +return f64(_that);case DynamicValue_String() when string != null: +return string(_that);case DynamicValue_VecU8() when vecU8 != null: +return vecU8(_that);case DynamicValue_MegaStruct() when megaStruct != null: +return megaStruct(_that);case DynamicValue_Error() when error != null: +return error(_that);case DynamicValue_None() when none != null: +return none(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( int field0)? u16,TResult Function( int field0)? u32,TResult Function( int field0)? i32,TResult Function( BigInt field0)? u64,TResult Function( PlatformInt64 field0)? i64,TResult Function( double field0)? f32,TResult Function( double field0)? f64,TResult Function( String field0)? string,TResult Function( Uint8List field0)? vecU8,TResult Function( String field0)? megaStruct,TResult Function( ErrorCode field0)? error,TResult Function()? none,required TResult orElse(),}) {final _that = this; +switch (_that) { +case DynamicValue_U16() when u16 != null: +return u16(_that.field0);case DynamicValue_U32() when u32 != null: +return u32(_that.field0);case DynamicValue_I32() when i32 != null: +return i32(_that.field0);case DynamicValue_U64() when u64 != null: +return u64(_that.field0);case DynamicValue_I64() when i64 != null: +return i64(_that.field0);case DynamicValue_F32() when f32 != null: +return f32(_that.field0);case DynamicValue_F64() when f64 != null: +return f64(_that.field0);case DynamicValue_String() when string != null: +return string(_that.field0);case DynamicValue_VecU8() when vecU8 != null: +return vecU8(_that.field0);case DynamicValue_MegaStruct() when megaStruct != null: +return megaStruct(_that.field0);case DynamicValue_Error() when error != null: +return error(_that.field0);case DynamicValue_None() when none != null: +return none();case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( int field0) u16,required TResult Function( int field0) u32,required TResult Function( int field0) i32,required TResult Function( BigInt field0) u64,required TResult Function( PlatformInt64 field0) i64,required TResult Function( double field0) f32,required TResult Function( double field0) f64,required TResult Function( String field0) string,required TResult Function( Uint8List field0) vecU8,required TResult Function( String field0) megaStruct,required TResult Function( ErrorCode field0) error,required TResult Function() none,}) {final _that = this; +switch (_that) { +case DynamicValue_U16(): +return u16(_that.field0);case DynamicValue_U32(): +return u32(_that.field0);case DynamicValue_I32(): +return i32(_that.field0);case DynamicValue_U64(): +return u64(_that.field0);case DynamicValue_I64(): +return i64(_that.field0);case DynamicValue_F32(): +return f32(_that.field0);case DynamicValue_F64(): +return f64(_that.field0);case DynamicValue_String(): +return string(_that.field0);case DynamicValue_VecU8(): +return vecU8(_that.field0);case DynamicValue_MegaStruct(): +return megaStruct(_that.field0);case DynamicValue_Error(): +return error(_that.field0);case DynamicValue_None(): +return none();} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( int field0)? u16,TResult? Function( int field0)? u32,TResult? Function( int field0)? i32,TResult? Function( BigInt field0)? u64,TResult? Function( PlatformInt64 field0)? i64,TResult? Function( double field0)? f32,TResult? Function( double field0)? f64,TResult? Function( String field0)? string,TResult? Function( Uint8List field0)? vecU8,TResult? Function( String field0)? megaStruct,TResult? Function( ErrorCode field0)? error,TResult? Function()? none,}) {final _that = this; +switch (_that) { +case DynamicValue_U16() when u16 != null: +return u16(_that.field0);case DynamicValue_U32() when u32 != null: +return u32(_that.field0);case DynamicValue_I32() when i32 != null: +return i32(_that.field0);case DynamicValue_U64() when u64 != null: +return u64(_that.field0);case DynamicValue_I64() when i64 != null: +return i64(_that.field0);case DynamicValue_F32() when f32 != null: +return f32(_that.field0);case DynamicValue_F64() when f64 != null: +return f64(_that.field0);case DynamicValue_String() when string != null: +return string(_that.field0);case DynamicValue_VecU8() when vecU8 != null: +return vecU8(_that.field0);case DynamicValue_MegaStruct() when megaStruct != null: +return megaStruct(_that.field0);case DynamicValue_Error() when error != null: +return error(_that.field0);case DynamicValue_None() when none != null: +return none();case _: + return null; + +} } -/// @nodoc -class $DynamicValueCopyWith<$Res> { - $DynamicValueCopyWith(DynamicValue _, $Res Function(DynamicValue) __); } /// @nodoc + class DynamicValue_U16 extends DynamicValue { - const DynamicValue_U16(this.field0) : super._(); + const DynamicValue_U16(this.field0): super._(); + - final int field0; + final int field0; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DynamicValue_U16CopyWith get copyWith => - _$DynamicValue_U16CopyWithImpl(this, _$identity); +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DynamicValue_U16CopyWith get copyWith => _$DynamicValue_U16CopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DynamicValue_U16 && - (identical(other.field0, field0) || other.field0 == field0)); - } - @override - int get hashCode => Object.hash(runtimeType, field0); - @override - String toString() { - return 'DynamicValue.u16(field0: $field0)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DynamicValue_U16&&(identical(other.field0, field0) || other.field0 == field0)); } -/// @nodoc -abstract mixin class $DynamicValue_U16CopyWith<$Res> - implements $DynamicValueCopyWith<$Res> { - factory $DynamicValue_U16CopyWith( - DynamicValue_U16 value, $Res Function(DynamicValue_U16) _then) = - _$DynamicValue_U16CopyWithImpl; - @useResult - $Res call({int field0}); + +@override +int get hashCode => Object.hash(runtimeType,field0); + +@override +String toString() { + return 'DynamicValue.u16(field0: $field0)'; } + +} + +/// @nodoc +abstract mixin class $DynamicValue_U16CopyWith<$Res> implements $DynamicValueCopyWith<$Res> { + factory $DynamicValue_U16CopyWith(DynamicValue_U16 value, $Res Function(DynamicValue_U16) _then) = _$DynamicValue_U16CopyWithImpl; +@useResult +$Res call({ + int field0 +}); + + + + +} /// @nodoc class _$DynamicValue_U16CopyWithImpl<$Res> implements $DynamicValue_U16CopyWith<$Res> { @@ -84,62 +285,64 @@ class _$DynamicValue_U16CopyWithImpl<$Res> final DynamicValue_U16 _self; final $Res Function(DynamicValue_U16) _then; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? field0 = null, - }) { - return _then(DynamicValue_U16( - null == field0 - ? _self.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) { + return _then(DynamicValue_U16( +null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + } /// @nodoc + class DynamicValue_U32 extends DynamicValue { - const DynamicValue_U32(this.field0) : super._(); + const DynamicValue_U32(this.field0): super._(); + - final int field0; + final int field0; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DynamicValue_U32CopyWith get copyWith => - _$DynamicValue_U32CopyWithImpl(this, _$identity); +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DynamicValue_U32CopyWith get copyWith => _$DynamicValue_U32CopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DynamicValue_U32 && - (identical(other.field0, field0) || other.field0 == field0)); - } - @override - int get hashCode => Object.hash(runtimeType, field0); - @override - String toString() { - return 'DynamicValue.u32(field0: $field0)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DynamicValue_U32&&(identical(other.field0, field0) || other.field0 == field0)); } -/// @nodoc -abstract mixin class $DynamicValue_U32CopyWith<$Res> - implements $DynamicValueCopyWith<$Res> { - factory $DynamicValue_U32CopyWith( - DynamicValue_U32 value, $Res Function(DynamicValue_U32) _then) = - _$DynamicValue_U32CopyWithImpl; - @useResult - $Res call({int field0}); + +@override +int get hashCode => Object.hash(runtimeType,field0); + +@override +String toString() { + return 'DynamicValue.u32(field0: $field0)'; +} + + } +/// @nodoc +abstract mixin class $DynamicValue_U32CopyWith<$Res> implements $DynamicValueCopyWith<$Res> { + factory $DynamicValue_U32CopyWith(DynamicValue_U32 value, $Res Function(DynamicValue_U32) _then) = _$DynamicValue_U32CopyWithImpl; +@useResult +$Res call({ + int field0 +}); + + + + +} /// @nodoc class _$DynamicValue_U32CopyWithImpl<$Res> implements $DynamicValue_U32CopyWith<$Res> { @@ -148,62 +351,64 @@ class _$DynamicValue_U32CopyWithImpl<$Res> final DynamicValue_U32 _self; final $Res Function(DynamicValue_U32) _then; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? field0 = null, - }) { - return _then(DynamicValue_U32( - null == field0 - ? _self.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) { + return _then(DynamicValue_U32( +null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + } /// @nodoc + class DynamicValue_I32 extends DynamicValue { - const DynamicValue_I32(this.field0) : super._(); + const DynamicValue_I32(this.field0): super._(); + - final int field0; + final int field0; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DynamicValue_I32CopyWith get copyWith => - _$DynamicValue_I32CopyWithImpl(this, _$identity); +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DynamicValue_I32CopyWith get copyWith => _$DynamicValue_I32CopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DynamicValue_I32 && - (identical(other.field0, field0) || other.field0 == field0)); - } - @override - int get hashCode => Object.hash(runtimeType, field0); - @override - String toString() { - return 'DynamicValue.i32(field0: $field0)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DynamicValue_I32&&(identical(other.field0, field0) || other.field0 == field0)); } -/// @nodoc -abstract mixin class $DynamicValue_I32CopyWith<$Res> - implements $DynamicValueCopyWith<$Res> { - factory $DynamicValue_I32CopyWith( - DynamicValue_I32 value, $Res Function(DynamicValue_I32) _then) = - _$DynamicValue_I32CopyWithImpl; - @useResult - $Res call({int field0}); + +@override +int get hashCode => Object.hash(runtimeType,field0); + +@override +String toString() { + return 'DynamicValue.i32(field0: $field0)'; +} + + } +/// @nodoc +abstract mixin class $DynamicValue_I32CopyWith<$Res> implements $DynamicValueCopyWith<$Res> { + factory $DynamicValue_I32CopyWith(DynamicValue_I32 value, $Res Function(DynamicValue_I32) _then) = _$DynamicValue_I32CopyWithImpl; +@useResult +$Res call({ + int field0 +}); + + + + +} /// @nodoc class _$DynamicValue_I32CopyWithImpl<$Res> implements $DynamicValue_I32CopyWith<$Res> { @@ -212,62 +417,64 @@ class _$DynamicValue_I32CopyWithImpl<$Res> final DynamicValue_I32 _self; final $Res Function(DynamicValue_I32) _then; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? field0 = null, - }) { - return _then(DynamicValue_I32( - null == field0 - ? _self.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) { + return _then(DynamicValue_I32( +null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + } /// @nodoc + class DynamicValue_U64 extends DynamicValue { - const DynamicValue_U64(this.field0) : super._(); + const DynamicValue_U64(this.field0): super._(); + - final BigInt field0; + final BigInt field0; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DynamicValue_U64CopyWith get copyWith => - _$DynamicValue_U64CopyWithImpl(this, _$identity); +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DynamicValue_U64CopyWith get copyWith => _$DynamicValue_U64CopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DynamicValue_U64 && - (identical(other.field0, field0) || other.field0 == field0)); - } - @override - int get hashCode => Object.hash(runtimeType, field0); - @override - String toString() { - return 'DynamicValue.u64(field0: $field0)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DynamicValue_U64&&(identical(other.field0, field0) || other.field0 == field0)); } -/// @nodoc -abstract mixin class $DynamicValue_U64CopyWith<$Res> - implements $DynamicValueCopyWith<$Res> { - factory $DynamicValue_U64CopyWith( - DynamicValue_U64 value, $Res Function(DynamicValue_U64) _then) = - _$DynamicValue_U64CopyWithImpl; - @useResult - $Res call({BigInt field0}); + +@override +int get hashCode => Object.hash(runtimeType,field0); + +@override +String toString() { + return 'DynamicValue.u64(field0: $field0)'; } + +} + +/// @nodoc +abstract mixin class $DynamicValue_U64CopyWith<$Res> implements $DynamicValueCopyWith<$Res> { + factory $DynamicValue_U64CopyWith(DynamicValue_U64 value, $Res Function(DynamicValue_U64) _then) = _$DynamicValue_U64CopyWithImpl; +@useResult +$Res call({ + BigInt field0 +}); + + + + +} /// @nodoc class _$DynamicValue_U64CopyWithImpl<$Res> implements $DynamicValue_U64CopyWith<$Res> { @@ -276,62 +483,64 @@ class _$DynamicValue_U64CopyWithImpl<$Res> final DynamicValue_U64 _self; final $Res Function(DynamicValue_U64) _then; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? field0 = null, - }) { - return _then(DynamicValue_U64( - null == field0 - ? _self.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) { + return _then(DynamicValue_U64( +null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable +as BigInt, + )); +} + + } /// @nodoc + class DynamicValue_I64 extends DynamicValue { - const DynamicValue_I64(this.field0) : super._(); + const DynamicValue_I64(this.field0): super._(); + - final PlatformInt64 field0; + final PlatformInt64 field0; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DynamicValue_I64CopyWith get copyWith => - _$DynamicValue_I64CopyWithImpl(this, _$identity); +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DynamicValue_I64CopyWith get copyWith => _$DynamicValue_I64CopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DynamicValue_I64 && - (identical(other.field0, field0) || other.field0 == field0)); - } - @override - int get hashCode => Object.hash(runtimeType, field0); - @override - String toString() { - return 'DynamicValue.i64(field0: $field0)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DynamicValue_I64&&(identical(other.field0, field0) || other.field0 == field0)); } -/// @nodoc -abstract mixin class $DynamicValue_I64CopyWith<$Res> - implements $DynamicValueCopyWith<$Res> { - factory $DynamicValue_I64CopyWith( - DynamicValue_I64 value, $Res Function(DynamicValue_I64) _then) = - _$DynamicValue_I64CopyWithImpl; - @useResult - $Res call({PlatformInt64 field0}); + +@override +int get hashCode => Object.hash(runtimeType,field0); + +@override +String toString() { + return 'DynamicValue.i64(field0: $field0)'; +} + + } +/// @nodoc +abstract mixin class $DynamicValue_I64CopyWith<$Res> implements $DynamicValueCopyWith<$Res> { + factory $DynamicValue_I64CopyWith(DynamicValue_I64 value, $Res Function(DynamicValue_I64) _then) = _$DynamicValue_I64CopyWithImpl; +@useResult +$Res call({ + PlatformInt64 field0 +}); + + + + +} /// @nodoc class _$DynamicValue_I64CopyWithImpl<$Res> implements $DynamicValue_I64CopyWith<$Res> { @@ -340,62 +549,64 @@ class _$DynamicValue_I64CopyWithImpl<$Res> final DynamicValue_I64 _self; final $Res Function(DynamicValue_I64) _then; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? field0 = null, - }) { - return _then(DynamicValue_I64( - null == field0 - ? _self.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as PlatformInt64, - )); - } +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) { + return _then(DynamicValue_I64( +null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable +as PlatformInt64, + )); +} + + } /// @nodoc + class DynamicValue_F32 extends DynamicValue { - const DynamicValue_F32(this.field0) : super._(); + const DynamicValue_F32(this.field0): super._(); + - final double field0; + final double field0; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DynamicValue_F32CopyWith get copyWith => - _$DynamicValue_F32CopyWithImpl(this, _$identity); +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DynamicValue_F32CopyWith get copyWith => _$DynamicValue_F32CopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DynamicValue_F32 && - (identical(other.field0, field0) || other.field0 == field0)); - } - @override - int get hashCode => Object.hash(runtimeType, field0); - @override - String toString() { - return 'DynamicValue.f32(field0: $field0)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DynamicValue_F32&&(identical(other.field0, field0) || other.field0 == field0)); } -/// @nodoc -abstract mixin class $DynamicValue_F32CopyWith<$Res> - implements $DynamicValueCopyWith<$Res> { - factory $DynamicValue_F32CopyWith( - DynamicValue_F32 value, $Res Function(DynamicValue_F32) _then) = - _$DynamicValue_F32CopyWithImpl; - @useResult - $Res call({double field0}); + +@override +int get hashCode => Object.hash(runtimeType,field0); + +@override +String toString() { + return 'DynamicValue.f32(field0: $field0)'; +} + + } +/// @nodoc +abstract mixin class $DynamicValue_F32CopyWith<$Res> implements $DynamicValueCopyWith<$Res> { + factory $DynamicValue_F32CopyWith(DynamicValue_F32 value, $Res Function(DynamicValue_F32) _then) = _$DynamicValue_F32CopyWithImpl; +@useResult +$Res call({ + double field0 +}); + + + + +} /// @nodoc class _$DynamicValue_F32CopyWithImpl<$Res> implements $DynamicValue_F32CopyWith<$Res> { @@ -404,62 +615,64 @@ class _$DynamicValue_F32CopyWithImpl<$Res> final DynamicValue_F32 _self; final $Res Function(DynamicValue_F32) _then; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? field0 = null, - }) { - return _then(DynamicValue_F32( - null == field0 - ? _self.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as double, - )); - } +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) { + return _then(DynamicValue_F32( +null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable +as double, + )); +} + + } /// @nodoc + class DynamicValue_F64 extends DynamicValue { - const DynamicValue_F64(this.field0) : super._(); + const DynamicValue_F64(this.field0): super._(); + - final double field0; + final double field0; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DynamicValue_F64CopyWith get copyWith => - _$DynamicValue_F64CopyWithImpl(this, _$identity); +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DynamicValue_F64CopyWith get copyWith => _$DynamicValue_F64CopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DynamicValue_F64 && - (identical(other.field0, field0) || other.field0 == field0)); - } - @override - int get hashCode => Object.hash(runtimeType, field0); - @override - String toString() { - return 'DynamicValue.f64(field0: $field0)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DynamicValue_F64&&(identical(other.field0, field0) || other.field0 == field0)); } -/// @nodoc -abstract mixin class $DynamicValue_F64CopyWith<$Res> - implements $DynamicValueCopyWith<$Res> { - factory $DynamicValue_F64CopyWith( - DynamicValue_F64 value, $Res Function(DynamicValue_F64) _then) = - _$DynamicValue_F64CopyWithImpl; - @useResult - $Res call({double field0}); + +@override +int get hashCode => Object.hash(runtimeType,field0); + +@override +String toString() { + return 'DynamicValue.f64(field0: $field0)'; +} + + } +/// @nodoc +abstract mixin class $DynamicValue_F64CopyWith<$Res> implements $DynamicValueCopyWith<$Res> { + factory $DynamicValue_F64CopyWith(DynamicValue_F64 value, $Res Function(DynamicValue_F64) _then) = _$DynamicValue_F64CopyWithImpl; +@useResult +$Res call({ + double field0 +}); + + + + +} /// @nodoc class _$DynamicValue_F64CopyWithImpl<$Res> implements $DynamicValue_F64CopyWith<$Res> { @@ -468,62 +681,64 @@ class _$DynamicValue_F64CopyWithImpl<$Res> final DynamicValue_F64 _self; final $Res Function(DynamicValue_F64) _then; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? field0 = null, - }) { - return _then(DynamicValue_F64( - null == field0 - ? _self.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as double, - )); - } +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) { + return _then(DynamicValue_F64( +null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable +as double, + )); +} + + } /// @nodoc + class DynamicValue_String extends DynamicValue { - const DynamicValue_String(this.field0) : super._(); + const DynamicValue_String(this.field0): super._(); + - final String field0; + final String field0; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DynamicValue_StringCopyWith get copyWith => - _$DynamicValue_StringCopyWithImpl(this, _$identity); +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DynamicValue_StringCopyWith get copyWith => _$DynamicValue_StringCopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DynamicValue_String && - (identical(other.field0, field0) || other.field0 == field0)); - } - @override - int get hashCode => Object.hash(runtimeType, field0); - @override - String toString() { - return 'DynamicValue.string(field0: $field0)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DynamicValue_String&&(identical(other.field0, field0) || other.field0 == field0)); } -/// @nodoc -abstract mixin class $DynamicValue_StringCopyWith<$Res> - implements $DynamicValueCopyWith<$Res> { - factory $DynamicValue_StringCopyWith( - DynamicValue_String value, $Res Function(DynamicValue_String) _then) = - _$DynamicValue_StringCopyWithImpl; - @useResult - $Res call({String field0}); + +@override +int get hashCode => Object.hash(runtimeType,field0); + +@override +String toString() { + return 'DynamicValue.string(field0: $field0)'; +} + + } +/// @nodoc +abstract mixin class $DynamicValue_StringCopyWith<$Res> implements $DynamicValueCopyWith<$Res> { + factory $DynamicValue_StringCopyWith(DynamicValue_String value, $Res Function(DynamicValue_String) _then) = _$DynamicValue_StringCopyWithImpl; +@useResult +$Res call({ + String field0 +}); + + + + +} /// @nodoc class _$DynamicValue_StringCopyWithImpl<$Res> implements $DynamicValue_StringCopyWith<$Res> { @@ -532,63 +747,64 @@ class _$DynamicValue_StringCopyWithImpl<$Res> final DynamicValue_String _self; final $Res Function(DynamicValue_String) _then; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? field0 = null, - }) { - return _then(DynamicValue_String( - null == field0 - ? _self.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) { + return _then(DynamicValue_String( +null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } /// @nodoc + class DynamicValue_VecU8 extends DynamicValue { - const DynamicValue_VecU8(this.field0) : super._(); + const DynamicValue_VecU8(this.field0): super._(); + - final Uint8List field0; + final Uint8List field0; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DynamicValue_VecU8CopyWith get copyWith => - _$DynamicValue_VecU8CopyWithImpl(this, _$identity); +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DynamicValue_VecU8CopyWith get copyWith => _$DynamicValue_VecU8CopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DynamicValue_VecU8 && - const DeepCollectionEquality().equals(other.field0, field0)); - } - @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(field0)); - @override - String toString() { - return 'DynamicValue.vecU8(field0: $field0)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DynamicValue_VecU8&&const DeepCollectionEquality().equals(other.field0, field0)); } -/// @nodoc -abstract mixin class $DynamicValue_VecU8CopyWith<$Res> - implements $DynamicValueCopyWith<$Res> { - factory $DynamicValue_VecU8CopyWith( - DynamicValue_VecU8 value, $Res Function(DynamicValue_VecU8) _then) = - _$DynamicValue_VecU8CopyWithImpl; - @useResult - $Res call({Uint8List field0}); + +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(field0)); + +@override +String toString() { + return 'DynamicValue.vecU8(field0: $field0)'; +} + + } +/// @nodoc +abstract mixin class $DynamicValue_VecU8CopyWith<$Res> implements $DynamicValueCopyWith<$Res> { + factory $DynamicValue_VecU8CopyWith(DynamicValue_VecU8 value, $Res Function(DynamicValue_VecU8) _then) = _$DynamicValue_VecU8CopyWithImpl; +@useResult +$Res call({ + Uint8List field0 +}); + + + + +} /// @nodoc class _$DynamicValue_VecU8CopyWithImpl<$Res> implements $DynamicValue_VecU8CopyWith<$Res> { @@ -597,63 +813,64 @@ class _$DynamicValue_VecU8CopyWithImpl<$Res> final DynamicValue_VecU8 _self; final $Res Function(DynamicValue_VecU8) _then; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? field0 = null, - }) { - return _then(DynamicValue_VecU8( - null == field0 - ? _self.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as Uint8List, - )); - } +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) { + return _then(DynamicValue_VecU8( +null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable +as Uint8List, + )); +} + + } /// @nodoc + class DynamicValue_MegaStruct extends DynamicValue { - const DynamicValue_MegaStruct(this.field0) : super._(); + const DynamicValue_MegaStruct(this.field0): super._(); + - final String field0; + final String field0; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DynamicValue_MegaStructCopyWith get copyWith => - _$DynamicValue_MegaStructCopyWithImpl( - this, _$identity); +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DynamicValue_MegaStructCopyWith get copyWith => _$DynamicValue_MegaStructCopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DynamicValue_MegaStruct && - (identical(other.field0, field0) || other.field0 == field0)); - } - @override - int get hashCode => Object.hash(runtimeType, field0); - @override - String toString() { - return 'DynamicValue.megaStruct(field0: $field0)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DynamicValue_MegaStruct&&(identical(other.field0, field0) || other.field0 == field0)); } -/// @nodoc -abstract mixin class $DynamicValue_MegaStructCopyWith<$Res> - implements $DynamicValueCopyWith<$Res> { - factory $DynamicValue_MegaStructCopyWith(DynamicValue_MegaStruct value, - $Res Function(DynamicValue_MegaStruct) _then) = - _$DynamicValue_MegaStructCopyWithImpl; - @useResult - $Res call({String field0}); + +@override +int get hashCode => Object.hash(runtimeType,field0); + +@override +String toString() { + return 'DynamicValue.megaStruct(field0: $field0)'; +} + + } +/// @nodoc +abstract mixin class $DynamicValue_MegaStructCopyWith<$Res> implements $DynamicValueCopyWith<$Res> { + factory $DynamicValue_MegaStructCopyWith(DynamicValue_MegaStruct value, $Res Function(DynamicValue_MegaStruct) _then) = _$DynamicValue_MegaStructCopyWithImpl; +@useResult +$Res call({ + String field0 +}); + + + + +} /// @nodoc class _$DynamicValue_MegaStructCopyWithImpl<$Res> implements $DynamicValue_MegaStructCopyWith<$Res> { @@ -662,62 +879,64 @@ class _$DynamicValue_MegaStructCopyWithImpl<$Res> final DynamicValue_MegaStruct _self; final $Res Function(DynamicValue_MegaStruct) _then; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? field0 = null, - }) { - return _then(DynamicValue_MegaStruct( - null == field0 - ? _self.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) { + return _then(DynamicValue_MegaStruct( +null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable +as String, + )); +} + + } /// @nodoc + class DynamicValue_Error extends DynamicValue { - const DynamicValue_Error(this.field0) : super._(); + const DynamicValue_Error(this.field0): super._(); + - final ErrorCode field0; + final ErrorCode field0; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DynamicValue_ErrorCopyWith get copyWith => - _$DynamicValue_ErrorCopyWithImpl(this, _$identity); +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DynamicValue_ErrorCopyWith get copyWith => _$DynamicValue_ErrorCopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DynamicValue_Error && - (identical(other.field0, field0) || other.field0 == field0)); - } - @override - int get hashCode => Object.hash(runtimeType, field0); - @override - String toString() { - return 'DynamicValue.error(field0: $field0)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DynamicValue_Error&&(identical(other.field0, field0) || other.field0 == field0)); } -/// @nodoc -abstract mixin class $DynamicValue_ErrorCopyWith<$Res> - implements $DynamicValueCopyWith<$Res> { - factory $DynamicValue_ErrorCopyWith( - DynamicValue_Error value, $Res Function(DynamicValue_Error) _then) = - _$DynamicValue_ErrorCopyWithImpl; - @useResult - $Res call({ErrorCode field0}); + +@override +int get hashCode => Object.hash(runtimeType,field0); + +@override +String toString() { + return 'DynamicValue.error(field0: $field0)'; } + +} + +/// @nodoc +abstract mixin class $DynamicValue_ErrorCopyWith<$Res> implements $DynamicValueCopyWith<$Res> { + factory $DynamicValue_ErrorCopyWith(DynamicValue_Error value, $Res Function(DynamicValue_Error) _then) = _$DynamicValue_ErrorCopyWithImpl; +@useResult +$Res call({ + ErrorCode field0 +}); + + + + +} /// @nodoc class _$DynamicValue_ErrorCopyWithImpl<$Res> implements $DynamicValue_ErrorCopyWith<$Res> { @@ -726,39 +945,48 @@ class _$DynamicValue_ErrorCopyWithImpl<$Res> final DynamicValue_Error _self; final $Res Function(DynamicValue_Error) _then; - /// Create a copy of DynamicValue - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? field0 = null, - }) { - return _then(DynamicValue_Error( - null == field0 - ? _self.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as ErrorCode, - )); - } +/// Create a copy of DynamicValue +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) { + return _then(DynamicValue_Error( +null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable +as ErrorCode, + )); +} + + } /// @nodoc + class DynamicValue_None extends DynamicValue { - const DynamicValue_None() : super._(); + const DynamicValue_None(): super._(); + + - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is DynamicValue_None); - } - @override - int get hashCode => runtimeType.hashCode; - @override - String toString() { - return 'DynamicValue.none()'; - } + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DynamicValue_None); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'DynamicValue.none()'; } + +} + + + + // dart format on diff --git a/packages/nekoton_bridge/lib/src/utils/logger.dart b/packages/nekoton_bridge/lib/src/utils/logger.dart index 529f9671..13022608 100644 --- a/packages/nekoton_bridge/lib/src/utils/logger.dart +++ b/packages/nekoton_bridge/lib/src/utils/logger.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -42,11 +42,4 @@ class LogEntry { stack == other.stack; } -enum LogLevel { - trace, - debug, - info, - warn, - error, - ; -} +enum LogLevel { trace, debug, info, warn, error } diff --git a/packages/nekoton_bridge/pubspec.yaml b/packages/nekoton_bridge/pubspec.yaml index 8817e693..9d3a334b 100644 --- a/packages/nekoton_bridge/pubspec.yaml +++ b/packages/nekoton_bridge/pubspec.yaml @@ -1,26 +1,26 @@ name: nekoton_bridge description: Nekoton bridge -version: 3.6.0 +version: 4.0.0-dev.2 homepage: https://github.com/broxus/nekoton_bridge.git repository: https://github.com/broxus/nekoton_bridge.git +resolution: workspace environment: - sdk: '>=3.5.0 <4.0.0' - -dev_dependencies: - ffigen: ^19.0.0 - lints: ^5.0.0 - test: ^1.25.8 - freezed: '>=3.0.0 <3.1.0' - build_runner: ^2.4.13 - json_serializable: ^6.9.0 + sdk: '>=3.9.0 <4.0.0' dependencies: ffi: ^2.1.3 - flutter_rust_bridge: 2.10.0 - freezed_annotation: '>=3.0.0 <3.1.0' + flutter_rust_bridge: ^2.11.1 + freezed_annotation: ^3.1.0 basic_utils: ^5.7.0 - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 meta: ^1.15.0 - uuid: ^4.5.1 json_annotation: ^4.9.0 + +dev_dependencies: + ffigen: ^19.0.0 + lints: ^6.0.0 + test: ^1.25.8 + freezed: ^3.1.0 + build_runner: ^2.4.13 + json_serializable: ^6.9.0 diff --git a/packages/nekoton_bridge/rust/Cargo.toml b/packages/nekoton_bridge/rust/Cargo.toml index 5e7d0747..1a3f96bc 100644 --- a/packages/nekoton_bridge/rust/Cargo.toml +++ b/packages/nekoton_bridge/rust/Cargo.toml @@ -7,12 +7,12 @@ edition = "2021" crate-type = ["cdylib", "staticlib"] [build-dependencies] -flutter_rust_bridge_codegen = "=2.10.0" +flutter_rust_bridge_codegen = "=2.11.1" anyhow = "1.0.54" rerun_except = "1.0.0" [dependencies] -flutter_rust_bridge = "=2.10.0" +flutter_rust_bridge = "=2.11.1" lazy_static = "1.4.0" anyhow = "1.0.54" thiserror = "2.0.11" diff --git a/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/generic_contract/generic_contract_api.rs b/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/generic_contract/generic_contract_api.rs index 01145164..925ae43a 100644 --- a/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/generic_contract/generic_contract_api.rs +++ b/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/generic_contract/generic_contract_api.rs @@ -4,7 +4,7 @@ use crate::frb_generated::RustOpaque; use crate::nekoton_wrapper::core::generic_contract::{GenericContractBox, GenericContractBoxTrait}; use crate::nekoton_wrapper::transport::TransportBoxTrait; use crate::nekoton_wrapper::HandleError; -use crate::utils::caller; +pub use flutter_rust_bridge::DartFnFuture; use nekoton::core::generic_contract::GenericContractSubscriptionHandler; use nekoton::core::models::{ ContractState, PendingTransaction, PollingMethod, Transaction, TransactionsBatchInfo, @@ -19,16 +19,24 @@ impl GenericContractDartWrapper { /// address - address of contract /// preload_transactions - if transactions must be loaded during creation pub async fn subscribe( - instance_hash: String, address: String, preload_transactions: bool, transport: RustOpaque>, + on_message_sent: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_message_expired: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_state_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_transactions_found: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, ) -> anyhow::Result { let contract = GenericContractBox::subscribe( transport.get_transport(), address, preload_transactions, - Arc::new(GenericContractSubscriptionHandlerImpl { instance_hash }), + Arc::new(GenericContractSubscriptionHandlerImpl { + on_message_sent: Arc::new(on_message_sent), + on_message_expired: Arc::new(on_message_expired), + on_state_changed: Arc::new(on_state_changed), + on_transactions_found: Arc::new(on_transactions_found), + }), ) .await .handle_error()?; @@ -107,9 +115,12 @@ impl GenericContractDartWrapper { } } -/// Handler for GenericContract that calls dart methods and sends data +/// Handler for GenericContract that calls dart methods and sends data via provided closures pub struct GenericContractSubscriptionHandlerImpl { - pub instance_hash: String, + pub on_message_sent: Arc DartFnFuture<()> + Send + Sync>, + pub on_message_expired: Arc DartFnFuture<()> + Send + Sync>, + pub on_state_changed: Arc DartFnFuture<()> + Send + Sync>, + pub on_transactions_found: Arc DartFnFuture<()> + Send + Sync>, } impl GenericContractSubscriptionHandler for GenericContractSubscriptionHandlerImpl { @@ -122,37 +133,28 @@ impl GenericContractSubscriptionHandler for GenericContractSubscriptionHandlerIm transaction: Option, ) { let payload = serde_json::to_string(&(pending_transaction, transaction)).unwrap(); - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onMessageSent"), - args: vec![caller::DynamicValue::String(payload)], - named_args: vec![], - }; - caller::call(stub, false); + let fut = (self.on_message_sent)(payload); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } /// Send json-encoded PendingTransaction fn on_message_expired(&self, pending_transaction: PendingTransaction) { let payload = serde_json::to_string(&pending_transaction).unwrap(); - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onMessageExpired"), - args: vec![caller::DynamicValue::String(payload)], - named_args: vec![], - }; - caller::call(stub, false); + let fut = (self.on_message_expired)(payload); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } /// Send json-encoded ContractState fn on_state_changed(&self, new_state: ContractState) { let payload = serde_json::to_string(&new_state).unwrap(); - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onStateChanged"), - args: vec![caller::DynamicValue::String(payload)], - named_args: vec![], - }; - caller::call(stub, false); + let fut = (self.on_state_changed)(payload); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } /// Send json-encoded list with 2 positions: @@ -164,12 +166,9 @@ impl GenericContractSubscriptionHandler for GenericContractSubscriptionHandlerIm batch_info: TransactionsBatchInfo, ) { let payload = serde_json::to_string(&(transactions, batch_info)).unwrap(); - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onTransactionsFound"), - args: vec![caller::DynamicValue::String(payload)], - named_args: vec![], - }; - caller::call(stub, false); + let fut = (self.on_transactions_found)(payload); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } } diff --git a/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/jetton_wallet/jetton_wallet_api.rs b/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/jetton_wallet/jetton_wallet_api.rs index 4a66dbb2..16003f40 100644 --- a/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/jetton_wallet/jetton_wallet_api.rs +++ b/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/jetton_wallet/jetton_wallet_api.rs @@ -6,7 +6,7 @@ use crate::nekoton_wrapper::core::jetton_wallet::{ }; use crate::nekoton_wrapper::transport::TransportBoxTrait; use crate::nekoton_wrapper::HandleError; -use crate::utils::caller; +pub use flutter_rust_bridge::DartFnFuture; use nekoton::core::jetton_wallet::JettonWalletSubscriptionHandler; pub use nekoton::core::models::{TransactionWithData, TransactionsBatchInfo}; use nekoton::models::JettonWalletTransaction; @@ -22,17 +22,21 @@ impl JettonWalletDartWrapper { /// owner - address of account that is owner of wallet /// root_token_contract - address of contract in blockchain pub async fn subscribe( - instance_hash: String, owner: String, root_token_contract: String, transport: RustOpaque>, preload_transactions: bool, + on_balance_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_transactions_found: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, ) -> anyhow::Result { let wallet = JettonWalletBox::subscribe( transport.get_transport(), owner, root_token_contract, - Arc::new(JettonWalletSubscriptionHandlerImpl { instance_hash }), + Arc::new(JettonWalletSubscriptionHandlerImpl { + on_balance_changed: Arc::new(on_balance_changed), + on_transactions_found: Arc::new(on_transactions_found), + }), preload_transactions, ) .await @@ -161,38 +165,29 @@ impl JettonWalletDartWrapper { } } -/// Handler for TonWallet that calls dart methods and sends data +/// Handler for JettonWallet that calls dart methods via provided closures pub struct JettonWalletSubscriptionHandlerImpl { - pub instance_hash: String, + pub on_balance_changed: Arc DartFnFuture<()> + Send + Sync>, + pub on_transactions_found: Arc DartFnFuture<()> + Send + Sync>, } impl JettonWalletSubscriptionHandler for JettonWalletSubscriptionHandlerImpl { - /// Send string representation of rust BigUInt fn on_balance_changed(&self, balance: BigUint) { - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onBalanceChanged"), - args: vec![caller::DynamicValue::String(balance.to_string())], - named_args: vec![], - }; - caller::call(stub, false); + let fut = (self.on_balance_changed)(balance.to_string()); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } - /// Send json-encoded list with 2 positions: - /// 0: list of TransactionWithData - /// 1: TransactionsBatchInfo fn on_transactions_found( &self, transactions: Vec>, batch_info: TransactionsBatchInfo, ) { let payload = serde_json::to_string(&(transactions, batch_info)).unwrap(); - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onTransactionsFound"), - args: vec![caller::DynamicValue::String(payload)], - named_args: vec![], - }; - caller::call(stub, false); + let fut = (self.on_transactions_found)(payload); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } } diff --git a/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/token_wallet/token_wallet_api.rs b/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/token_wallet/token_wallet_api.rs index 011db5f0..1552091c 100644 --- a/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/token_wallet/token_wallet_api.rs +++ b/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/token_wallet/token_wallet_api.rs @@ -7,7 +7,7 @@ use crate::nekoton_wrapper::core::token_wallet::{ use crate::nekoton_wrapper::transport::TransportBoxTrait; use crate::nekoton_wrapper::HandleError; -use crate::utils::caller; +pub use flutter_rust_bridge::DartFnFuture; use nekoton::core::models::TokenWalletTransaction; pub use nekoton::core::models::{TransactionWithData, TransactionsBatchInfo}; use nekoton::core::token_wallet::TokenWalletSubscriptionHandler; @@ -23,17 +23,21 @@ impl TokenWalletDartWrapper { /// owner - address of account that is owner of wallet /// root_token_contract - address of contract in blockchain pub async fn subscribe( - instance_hash: String, owner: String, root_token_contract: String, transport: RustOpaque>, preload_transactions: bool, + on_balance_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_transactions_found: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, ) -> anyhow::Result { let wallet = TokenWalletBox::subscribe( transport.get_transport(), owner, root_token_contract, - Arc::new(TokenWalletSubscriptionHandlerImpl { instance_hash }), + Arc::new(TokenWalletSubscriptionHandlerImpl { + on_balance_changed: Arc::new(on_balance_changed), + on_transactions_found: Arc::new(on_transactions_found), + }), preload_transactions, ) .await @@ -175,19 +179,17 @@ impl TokenWalletDartWrapper { /// Handler for TonWallet that calls dart methods and sends data pub struct TokenWalletSubscriptionHandlerImpl { - pub instance_hash: String, + pub on_balance_changed: Arc DartFnFuture<()> + Send + Sync>, + pub on_transactions_found: Arc DartFnFuture<()> + Send + Sync>, } impl TokenWalletSubscriptionHandler for TokenWalletSubscriptionHandlerImpl { /// Send string representation of rust BigUInt fn on_balance_changed(&self, balance: BigUint) { - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onBalanceChanged"), - args: vec![caller::DynamicValue::String(balance.to_string())], - named_args: vec![], - }; - caller::call(stub, false); + let fut = (self.on_balance_changed)(balance.to_string()); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } /// Send json-encoded list with 2 positions: @@ -199,12 +201,9 @@ impl TokenWalletSubscriptionHandler for TokenWalletSubscriptionHandlerImpl { batch_info: TransactionsBatchInfo, ) { let payload = serde_json::to_string(&(transactions, batch_info)).unwrap(); - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onTransactionsFound"), - args: vec![caller::DynamicValue::String(payload)], - named_args: vec![], - }; - caller::call(stub, false); + let fut = (self.on_transactions_found)(payload); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } } diff --git a/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/ton_wallet/ton_wallet_api.rs b/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/ton_wallet/ton_wallet_api.rs index 99c7f264..58601454 100644 --- a/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/ton_wallet/ton_wallet_api.rs +++ b/packages/nekoton_bridge/rust/src/nekoton_wrapper/core/ton_wallet/ton_wallet_api.rs @@ -6,8 +6,8 @@ use crate::nekoton_wrapper::core::ton_wallet::{ }; use crate::nekoton_wrapper::crypto::crypto_api::UnsignedMessageImpl; use crate::nekoton_wrapper::transport::TransportBoxTrait; -use crate::utils::caller; use flutter_rust_bridge::frb; +pub use flutter_rust_bridge::DartFnFuture; pub use nekoton::core::models::{ ContractState, PendingTransaction, PollingMethod, Transaction, TransactionAdditionalInfo, TransactionWithData, TransactionsBatchInfo, @@ -35,18 +35,32 @@ impl TonWalletDartWrapper { /// wallet_type - is json-encoded WalletType. /// public_key - is string representation of key pub async fn subscribe( - instance_hash: String, workchain_id: i8, public_key: String, wallet_type: String, transport: RustOpaque>, + on_message_sent: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_message_expired: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_state_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_transactions_found: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_details_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_custodians_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_unconfirmed_transactions_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, ) -> anyhow::Result { let wallet = TonWalletBox::subscribe( transport.get_transport(), workchain_id, public_key, wallet_type, - Arc::new(TonWalletSubscriptionHandlerImpl { instance_hash }), + Arc::new(TonWalletSubscriptionHandlerImpl { + on_message_sent: Arc::new(on_message_sent), + on_message_expired: Arc::new(on_message_expired), + on_state_changed: Arc::new(on_state_changed), + on_transactions_found: Arc::new(on_transactions_found), + on_details_changed: Arc::new(on_details_changed), + on_custodians_changed: Arc::new(on_custodians_changed), + on_unconfirmed_transactions_changed: Arc::new(on_unconfirmed_transactions_changed), + }), ) .await?; @@ -57,14 +71,28 @@ impl TonWalletDartWrapper { /// Create TonWallet by subscribing to its instance by address of wallet. pub async fn subscribe_by_address( - instance_hash: String, address: String, transport: RustOpaque>, + on_message_sent: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_message_expired: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_state_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_transactions_found: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_details_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_custodians_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_unconfirmed_transactions_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, ) -> anyhow::Result { let wallet = TonWalletBox::subscribe_by_address( transport.get_transport(), address, - Arc::new(TonWalletSubscriptionHandlerImpl { instance_hash }), + Arc::new(TonWalletSubscriptionHandlerImpl { + on_message_sent: Arc::new(on_message_sent), + on_message_expired: Arc::new(on_message_expired), + on_state_changed: Arc::new(on_state_changed), + on_transactions_found: Arc::new(on_transactions_found), + on_details_changed: Arc::new(on_details_changed), + on_custodians_changed: Arc::new(on_custodians_changed), + on_unconfirmed_transactions_changed: Arc::new(on_unconfirmed_transactions_changed), + }), ) .await?; @@ -76,14 +104,28 @@ impl TonWalletDartWrapper { /// Create TonWallet by subscribing to its instance by existed instance. /// existing_wallet - json-encoded ExistingWalletInfo. pub async fn subscribe_by_existing( - instance_hash: String, existing_wallet: String, transport: RustOpaque>, + on_message_sent: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_message_expired: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_state_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_transactions_found: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_details_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_custodians_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_unconfirmed_transactions_changed: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, ) -> anyhow::Result { let wallet = TonWalletBox::subscribe_by_existing( transport.get_transport(), existing_wallet, - Arc::new(TonWalletSubscriptionHandlerImpl { instance_hash }), + Arc::new(TonWalletSubscriptionHandlerImpl { + on_message_sent: Arc::new(on_message_sent), + on_message_expired: Arc::new(on_message_expired), + on_state_changed: Arc::new(on_state_changed), + on_transactions_found: Arc::new(on_transactions_found), + on_details_changed: Arc::new(on_details_changed), + on_custodians_changed: Arc::new(on_custodians_changed), + on_unconfirmed_transactions_changed: Arc::new(on_unconfirmed_transactions_changed), + }), ) .await?; @@ -347,81 +389,64 @@ impl TonWalletDartWrapper { } } -/// Handler for TonWallet that calls dart methods and sends data +/// Handler for TonWallet that calls dart methods via provided closures pub struct TonWalletSubscriptionHandlerImpl { - pub instance_hash: String, + pub on_message_sent: Arc DartFnFuture<()> + Send + Sync>, + pub on_message_expired: Arc DartFnFuture<()> + Send + Sync>, + pub on_state_changed: Arc DartFnFuture<()> + Send + Sync>, + pub on_transactions_found: Arc DartFnFuture<()> + Send + Sync>, + pub on_details_changed: Arc DartFnFuture<()> + Send + Sync>, + pub on_custodians_changed: Arc DartFnFuture<()> + Send + Sync>, + pub on_unconfirmed_transactions_changed: Arc DartFnFuture<()> + Send + Sync>, } impl TonWalletSubscriptionHandler for TonWalletSubscriptionHandlerImpl { - /// Send json-encoded list with 2 positions: - /// 0: PendingTransaction - /// 1: Option fn on_message_sent( &self, pending_transaction: PendingTransaction, transaction: Option, ) { let payload = serde_json::to_string(&(pending_transaction, transaction)).unwrap(); - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onMessageSent"), - args: vec![caller::DynamicValue::String(payload)], - named_args: vec![], - }; - caller::call(stub, false); + let fut = (self.on_message_sent)(payload); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } - /// Send json-encoded PendingTransaction fn on_message_expired(&self, pending_transaction: PendingTransaction) { let payload = serde_json::to_string(&pending_transaction).unwrap(); - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onMessageExpired"), - args: vec![caller::DynamicValue::String(payload)], - named_args: vec![], - }; - caller::call(stub, false); + let fut = (self.on_message_expired)(payload); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } - /// Send json-encoded ContractState fn on_state_changed(&self, new_state: ContractState) { let payload = serde_json::to_string(&new_state).unwrap(); - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onStateChanged"), - args: vec![caller::DynamicValue::String(payload)], - named_args: vec![], - }; - caller::call(stub, false); - } - - /// Send json-encoded list with 2 positions: - /// 0: list of TransactionWithData - /// 1: TransactionsBatchInfo + let fut = (self.on_state_changed)(payload); + flutter_rust_bridge::spawn(async move { + fut.await; + }); + } + fn on_transactions_found( &self, transactions: Vec>, batch_info: TransactionsBatchInfo, ) { let payload = serde_json::to_string(&(transactions, batch_info)).unwrap(); - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onTransactionsFound"), - args: vec![caller::DynamicValue::String(payload)], - named_args: vec![], - }; - caller::call(stub, false); + let fut = (self.on_transactions_found)(payload); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } fn on_details_changed(&self, details: TonWalletDetails) { let payload = serde_json::to_string(&details).unwrap(); - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onDetailsChanged"), - args: vec![caller::DynamicValue::String(payload)], - named_args: vec![], - }; - caller::call(stub, false); + let fut = (self.on_details_changed)(payload); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } fn on_custodians_changed(&self, custodians: &[ton_types::UInt256]) { @@ -430,13 +455,10 @@ impl TonWalletSubscriptionHandler for TonWalletSubscriptionHandlerImpl { .map(|item| item.to_hex_string()) .collect::>(); let payload = serde_json::to_string(&payload).unwrap(); - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onCustodiansChanged"), - args: vec![caller::DynamicValue::String(payload)], - named_args: vec![], - }; - caller::call(stub, false); + let fut = (self.on_custodians_changed)(payload); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } fn on_unconfirmed_transactions_changed( @@ -444,12 +466,9 @@ impl TonWalletSubscriptionHandler for TonWalletSubscriptionHandlerImpl { unconfirmed_transactions: &[MultisigPendingTransaction], ) { let payload = serde_json::to_string(unconfirmed_transactions).unwrap(); - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("onUnconfirmedTransactionsChanged"), - args: vec![caller::DynamicValue::String(payload)], - named_args: vec![], - }; - caller::call(stub, false); + let fut = (self.on_unconfirmed_transactions_changed)(payload); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } } diff --git a/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/gql_connection_api.rs b/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/gql_connection_api.rs index 0c4908b7..3c348ac8 100644 --- a/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/gql_connection_api.rs +++ b/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/gql_connection_api.rs @@ -2,9 +2,9 @@ use crate::frb_generated::RustOpaque; use crate::nekoton_wrapper::external::connections::{GqlConnectionBox, GqlConnectionBoxTrait}; -use crate::utils::caller; use async_trait::async_trait; use flutter_rust_bridge::frb; +pub use flutter_rust_bridge::DartFnFuture; use nekoton::external::{GqlConnection, GqlRequest}; use std::sync::Arc; @@ -15,12 +15,15 @@ pub struct GqlConnectionDartWrapper { impl GqlConnectionDartWrapper { #[frb(sync)] - pub fn new(is_local: bool, instance_hash: String) -> GqlConnectionDartWrapper { + pub fn new( + is_local: bool, + on_post: impl Fn(String) -> DartFnFuture + Send + Sync + 'static, + ) -> GqlConnectionDartWrapper { Self { inner_connection: RustOpaque::new(GqlConnectionBox::create(Arc::new( GqlConnectionImpl { is_local, - instance_hash, + on_post: Arc::new(on_post), }, ))), } @@ -33,9 +36,9 @@ impl GqlConnectionDartWrapper { } /// Implementation of nekoton's GqlConnection -struct GqlConnectionImpl { +pub struct GqlConnectionImpl { pub is_local: bool, - pub instance_hash: String, + pub on_post: Arc DartFnFuture + Send + Sync>, } #[async_trait] @@ -45,12 +48,7 @@ impl GqlConnection for GqlConnectionImpl { } async fn post(&self, req: GqlRequest) -> anyhow::Result { - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("post"), - args: vec![caller::DynamicValue::String(req.data)], - named_args: vec![], - }; - caller::call(stub, true).as_string() + let fut = (self.on_post)(req.data); + Ok(fut.await) } } diff --git a/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/jrpc_connection_api.rs b/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/jrpc_connection_api.rs index 69f660b6..098e949a 100644 --- a/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/jrpc_connection_api.rs +++ b/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/jrpc_connection_api.rs @@ -2,9 +2,9 @@ use crate::frb_generated::RustOpaque; use crate::nekoton_wrapper::external::connections::{JrpcConnectionBox, JrpcConnectionBoxTrait}; -use crate::utils::caller; use async_trait::async_trait; use flutter_rust_bridge::frb; +pub use flutter_rust_bridge::DartFnFuture; use nekoton::external::{JrpcConnection, JrpcRequest}; use std::sync::Arc; @@ -15,10 +15,14 @@ pub struct JrpcConnectionDartWrapper { impl JrpcConnectionDartWrapper { #[frb(sync)] - pub fn new(instance_hash: String) -> JrpcConnectionDartWrapper { + pub fn new( + on_post: impl Fn(String) -> DartFnFuture + Send + Sync + 'static, + ) -> JrpcConnectionDartWrapper { Self { inner_connection: RustOpaque::new(JrpcConnectionBox::create(Arc::new( - JrpcConnectionImpl { instance_hash }, + JrpcConnectionImpl { + on_post: Arc::new(on_post), + }, ))), } } @@ -31,18 +35,13 @@ impl JrpcConnectionDartWrapper { /// Implementation of nekoton's JrpcConnection pub struct JrpcConnectionImpl { - pub instance_hash: String, + pub on_post: Arc DartFnFuture + Send + Sync>, } #[async_trait] impl JrpcConnection for JrpcConnectionImpl { async fn post(&self, req: JrpcRequest) -> anyhow::Result { - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("post"), - args: vec![caller::DynamicValue::String(req.data)], - named_args: vec![], - }; - caller::call(stub, true).as_string() + let fut = (self.on_post)(req.data); + Ok(fut.await) } } diff --git a/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/ledger_connection_api.rs b/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/ledger_connection_api.rs index 27a9b1cb..a7bbdab1 100644 --- a/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/ledger_connection_api.rs +++ b/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/ledger_connection_api.rs @@ -4,10 +4,10 @@ use crate::frb_generated::RustOpaque; use crate::nekoton_wrapper::external::connections::{ LedgerConnectionBox, LedgerConnectionBoxTrait, }; -use crate::utils::caller; use async_trait::async_trait; pub use ed25519_dalek::{PUBLIC_KEY_LENGTH, SIGNATURE_LENGTH}; use flutter_rust_bridge::frb; +pub use flutter_rust_bridge::DartFnFuture; pub use nekoton::external; use std::convert::TryInto; use std::sync::Arc; @@ -19,10 +19,21 @@ pub struct LedgerConnectionDartWrapper { impl LedgerConnectionDartWrapper { #[frb(sync)] - pub fn new(instance_hash: String) -> LedgerConnectionDartWrapper { + pub fn new( + on_get_public_key: impl Fn(u16) -> DartFnFuture> + Send + Sync + 'static, + on_sign: impl Fn(u16, Option, Vec) -> DartFnFuture> + Send + Sync + 'static, + on_sign_transaction: impl Fn(u16, u16, Option, Vec, String) -> DartFnFuture> + + Send + + Sync + + 'static, + ) -> LedgerConnectionDartWrapper { Self { inner_connection: RustOpaque::new(LedgerConnectionBox::create(Arc::new( - LedgerConnectionImpl { instance_hash }, + LedgerConnectionImpl { + on_get_public_key: Arc::new(on_get_public_key), + on_sign: Arc::new(on_sign), + on_sign_transaction: Arc::new(on_sign_transaction), + }, ))), } } @@ -35,30 +46,24 @@ impl LedgerConnectionDartWrapper { /// Implementation of nekoton's LedgerConnection pub struct LedgerConnectionImpl { - pub instance_hash: String, -} - -impl LedgerConnectionImpl { - #[frb(sync)] - pub fn new(instance_hash: String) -> LedgerConnectionImpl { - Self { instance_hash } - } + pub on_get_public_key: Arc DartFnFuture> + Send + Sync>, + pub on_sign: Arc, Vec) -> DartFnFuture> + Send + Sync>, + pub on_sign_transaction: + Arc, Vec, String) -> DartFnFuture> + Send + Sync>, } #[async_trait] impl external::LedgerConnection for LedgerConnectionImpl { async fn get_public_key(&self, account_id: u16) -> anyhow::Result<[u8; PUBLIC_KEY_LENGTH]> { - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("getPublicKey"), - args: vec![caller::DynamicValue::U16(account_id)], - named_args: vec![], - }; - let res = caller::call(stub, true).as_vec_u8(); - match res { - Ok(v) => Ok(v.as_slice().try_into().unwrap()), - Err(e) => Err(e), + let data = (self.on_get_public_key)(account_id).await; + if data.len() != PUBLIC_KEY_LENGTH { + anyhow::bail!( + "Invalid public key length: expected {}, got {}", + PUBLIC_KEY_LENGTH, + data.len() + ); } + Ok(data.as_slice().try_into().unwrap()) } async fn sign( @@ -67,24 +72,15 @@ impl external::LedgerConnection for LedgerConnectionImpl { signature_id: Option, message: &[u8], ) -> anyhow::Result<[u8; SIGNATURE_LENGTH]> { - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("sign"), - args: vec![ - caller::DynamicValue::U16(account), - match signature_id { - Some(id) => caller::DynamicValue::I32(id), - None => caller::DynamicValue::None, - }, - caller::DynamicValue::VecU8(message.to_vec()), - ], - named_args: vec![], - }; - let res = caller::call(stub, true).as_vec_u8(); - match res { - Ok(v) => Ok(v.as_slice().try_into().unwrap()), - Err(e) => Err(e), + let data = (self.on_sign)(account, signature_id, message.to_vec()).await; + if data.len() != SIGNATURE_LENGTH { + anyhow::bail!( + "Invalid signature length: expected {}, got {}", + SIGNATURE_LENGTH, + data.len() + ); } + Ok(data.as_slice().try_into().unwrap()) } async fn sign_transaction( @@ -95,25 +91,17 @@ impl external::LedgerConnection for LedgerConnectionImpl { message: &[u8], context: &external::LedgerSignatureContext, ) -> anyhow::Result<[u8; SIGNATURE_LENGTH]> { - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("signTransaction"), - args: vec![ - caller::DynamicValue::U16(account), - caller::DynamicValue::U16(wallet), - match signature_id { - Some(id) => caller::DynamicValue::I32(id), - None => caller::DynamicValue::None, - }, - caller::DynamicValue::VecU8(message.to_vec()), - caller::DynamicValue::String(serde_json::to_string(context).unwrap()), - ], - named_args: vec![], - }; - let res = caller::call(stub, true).as_vec_u8(); - match res { - Ok(v) => Ok(v.as_slice().try_into().unwrap()), - Err(e) => Err(e), + let ctx_json = serde_json::to_string(context)?; + let data = + (self.on_sign_transaction)(account, wallet, signature_id, message.to_vec(), ctx_json) + .await; + if data.len() != SIGNATURE_LENGTH { + anyhow::bail!( + "Invalid signature length: expected {}, got {}", + SIGNATURE_LENGTH, + data.len() + ); } + Ok(data.as_slice().try_into().unwrap()) } } diff --git a/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/proto_connection_api.rs b/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/proto_connection_api.rs index 472319c6..53c9accf 100644 --- a/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/proto_connection_api.rs +++ b/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/proto_connection_api.rs @@ -2,9 +2,9 @@ use crate::frb_generated::RustOpaque; use crate::nekoton_wrapper::external::connections::{ProtoConnectionBox, ProtoConnectionBoxTrait}; -use crate::utils::caller; use async_trait::async_trait; use flutter_rust_bridge::frb; +pub use flutter_rust_bridge::DartFnFuture; use nekoton::external::{ProtoConnection, ProtoRequest}; use std::sync::Arc; @@ -15,10 +15,14 @@ pub struct ProtoConnectionDartWrapper { impl ProtoConnectionDartWrapper { #[frb(sync)] - pub fn new(instance_hash: String) -> ProtoConnectionDartWrapper { + pub fn new( + on_post: impl Fn(Vec) -> DartFnFuture> + Send + Sync + 'static, + ) -> ProtoConnectionDartWrapper { Self { inner_connection: RustOpaque::new(ProtoConnectionBox::create(Arc::new( - ProtoConnectionImpl { instance_hash }, + ProtoConnectionImpl { + on_post: Arc::new(on_post), + }, ))), } } @@ -31,18 +35,13 @@ impl ProtoConnectionDartWrapper { /// Implementation of nekoton's ProtoConnection pub struct ProtoConnectionImpl { - pub instance_hash: String, + pub on_post: Arc) -> DartFnFuture> + Send + Sync>, } #[async_trait] impl ProtoConnection for ProtoConnectionImpl { async fn post(&self, req: ProtoRequest) -> anyhow::Result> { - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("post"), - args: vec![caller::DynamicValue::VecU8(req.data)], - named_args: vec![], - }; - caller::call(stub, true).as_vec_u8() + let fut = (self.on_post)(req.data); + Ok(fut.await) } } diff --git a/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/storage_api.rs b/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/storage_api.rs index 6bcb74e3..5f66fa6e 100644 --- a/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/storage_api.rs +++ b/packages/nekoton_bridge/rust/src/nekoton_wrapper/external/storage_api.rs @@ -2,10 +2,9 @@ use crate::frb_generated::RustOpaque; use crate::nekoton_wrapper::external::storage::{StorageBox, StorageBoxTrait}; -use crate::utils::caller; -use crate::utils::caller::{DynamicNamedValue, DynamicValue}; use async_trait::async_trait; use flutter_rust_bridge::frb; +pub use flutter_rust_bridge::DartFnFuture; use nekoton::external::Storage; use std::sync::Arc; @@ -16,10 +15,20 @@ pub struct StorageDartWrapper { impl StorageDartWrapper { #[frb(sync)] - pub fn new(instance_hash: String) -> StorageDartWrapper { + pub fn new( + on_get: impl Fn(String) -> DartFnFuture> + Send + Sync + 'static, + on_set: impl Fn(String, String) -> DartFnFuture<()> + Send + Sync + 'static, + on_set_unchecked: impl Fn(String, String) -> DartFnFuture<()> + Send + Sync + 'static, + on_remove: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + on_remove_unchecked: impl Fn(String) -> DartFnFuture<()> + Send + Sync + 'static, + ) -> StorageDartWrapper { Self { inner_storage: RustOpaque::new(StorageBox::create(Arc::new(StorageImpl { - instance_hash, + on_get: Arc::new(on_get), + on_set: Arc::new(on_set), + on_set_unchecked: Arc::new(on_set_unchecked), + on_remove: Arc::new(on_remove), + on_remove_unchecked: Arc::new(on_remove_unchecked), }))), } } @@ -32,88 +41,63 @@ impl StorageDartWrapper { /// Implementation of nekoton's Storage pub struct StorageImpl { - pub instance_hash: String, + // Stored Dart callback passed from Flutter side. + pub on_get: Arc DartFnFuture> + Send + Sync>, + pub on_set: Arc DartFnFuture<()> + Send + Sync>, + pub on_set_unchecked: Arc DartFnFuture<()> + Send + Sync>, + pub on_remove: Arc DartFnFuture<()> + Send + Sync>, + pub on_remove_unchecked: Arc DartFnFuture<()> + Send + Sync>, } impl StorageImpl { - pub fn new(instance_hash: String) -> StorageImpl { - Self { instance_hash } + pub fn new( + on_get: Arc DartFnFuture> + Send + Sync>, + on_set: Arc DartFnFuture<()> + Send + Sync>, + on_set_unchecked: Arc DartFnFuture<()> + Send + Sync>, + on_remove: Arc DartFnFuture<()> + Send + Sync>, + on_remove_unchecked: Arc DartFnFuture<()> + Send + Sync>, + ) -> StorageImpl { + Self { + on_get, + on_set, + on_set_unchecked, + on_remove, + on_remove_unchecked, + } } } #[async_trait] impl Storage for StorageImpl { async fn get(&self, key: &str) -> anyhow::Result> { - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("get"), - args: vec![DynamicValue::String(key.to_string())], - named_args: vec![], - }; - caller::call(stub, true).as_string_option() + let fut = (self.on_get)(key.to_string()); + let result = fut.await; + Ok(result) } async fn set(&self, key: &str, value: &str) -> anyhow::Result<()> { - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("set"), - args: vec![], - named_args: vec![ - DynamicNamedValue { - name: "key".to_string(), - value: Some(DynamicValue::String(key.to_string())), - }, - DynamicNamedValue { - name: "value".to_string(), - value: Some(DynamicValue::String(value.to_string())), - }, - ], - }; - caller::call(stub, true).as_void() + let fut = (self.on_set)(key.to_string(), value.to_string()); + let result = fut.await; + Ok(result) } fn set_unchecked(&self, key: &str, value: &str) { - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("setUnchecked"), - args: vec![], - named_args: vec![ - DynamicNamedValue { - name: "key".to_string(), - value: Some(DynamicValue::String(key.to_string())), - }, - DynamicNamedValue { - name: "value".to_string(), - value: Some(DynamicValue::String(value.to_string())), - }, - ], - }; - caller::call(stub, false); + let fut = (self.on_set_unchecked)(key.to_string(), value.to_string()); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } async fn remove(&self, key: &str) -> anyhow::Result<()> { - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("remove"), - args: vec![], - named_args: vec![DynamicNamedValue { - name: "key".to_string(), - value: Some(DynamicValue::String(key.to_string())), - }], - }; - caller::call(stub, true).as_void() + let fut = (self.on_remove)(key.to_string()); + let result = fut.await; + Ok(result) } fn remove_unchecked(&self, key: &str) { - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("removeUnchecked"), - args: vec![], - named_args: vec![DynamicNamedValue { - name: "key".to_string(), - value: Some(DynamicValue::String(key.to_string())), - }], - }; - caller::call(stub, false); + let fut = (self.on_remove_unchecked)(key.to_string()); + flutter_rust_bridge::spawn(async move { + fut.await; + }); } } diff --git a/packages/nekoton_bridge/rust/src/utils/api.rs b/packages/nekoton_bridge/rust/src/utils/api.rs index 27077f8f..8ffc5fc6 100644 --- a/packages/nekoton_bridge/rust/src/utils/api.rs +++ b/packages/nekoton_bridge/rust/src/utils/api.rs @@ -1,17 +1,8 @@ #![allow(unused_variables, dead_code)] -use std::collections::HashMap; -use std::{thread, time}; - -use flutter_rust_bridge::frb; -use log::*; - use crate::frb_generated::StreamSink; -use crate::utils::caller; -use crate::utils::logger; -use crate::utils::mega_struct; - use crate::nekoton_wrapper::update_clock_offset; +use crate::utils::logger; /// Init utils pub fn init_logger(level: logger::LogLevel, mobile_logger: bool) { @@ -23,230 +14,7 @@ pub fn create_log_stream(s: StreamSink) { logger::SendToDartLogger::set_stream_sink(s); } -/// Init caller -pub fn init_caller(stream_sink: StreamSink) { - caller::set_stream_sink(stream_sink); -} - -/// Callback functions for returning Dart method result -#[frb(sync)] -pub fn call_send_result(id: String, value: caller::DynamicValue) { - caller::call_send_result(id, value) -} - /// Set clock offset in milliseconds pub fn set_clock_offset(offset_ms: i64) { update_clock_offset(offset_ms); } - -// TODO: remove all non-integration test related things FROM here - -pub fn simple_log(string: String) { - info!("Info: {string}"); - debug!("Debug: {string}"); - warn!("Warn: {string}"); - error!("Error: {string}"); -} - -pub fn simple_panic() { - panic!("Just a panic"); -} - -#[frb(sync)] -pub fn simple_adder_sync(a: i32, b: i32) -> i32 { - (a + b) -} - -pub fn simple_adder(a: i32, b: i32) -> i32 { - a + b -} - -pub trait MyFormat { - fn my_format(&self) -> String; -} - -impl MyFormat for i32 { - fn my_format(&self) -> String { - format!("i32 {self}") - } -} - -pub struct MyClass { - pub val: i32, -} - -impl MyClass { - pub fn new(a: i32) -> MyClass { - MyClass { val: a } - } - pub fn my_format(&self) -> String { - self.val.my_format() - } -} - -pub fn stub_dv() -> caller::DynamicValue { - caller::DynamicValue::U32(0) -} - -pub fn stub_dcs() -> caller::DartCallStub { - caller::DartCallStub { - instance_hash: String::from("0"), - fn_name: String::from("func0"), - args: vec![ - caller::DynamicValue::String(String::from( - "Hello from rust, this is simple_call_func0", - )), - caller::DynamicValue::I64(42), - caller::DynamicValue::F64(42.42), - ], - named_args: vec![ - caller::DynamicNamedValue { - name: String::from("arg0"), - value: Some(caller::DynamicValue::I64(420)), - }, - caller::DynamicNamedValue { - name: String::from("arg1"), - value: Some(caller::DynamicValue::F64(420.42)), - }, - ], - } -} - -pub fn simple_call_dart() { - let ret = caller::call(stub_dcs(), true); - debug!("simple_call_dart returns: {:?}", ret); -} - -pub fn stub_call_dart(stub: caller::DartCallStub) { - caller::call(stub, true); -} - -pub fn simple_call_func0(need_result: bool) { - let stub = caller::DartCallStub { - instance_hash: String::from("0"), - fn_name: String::from("func0"), - args: vec![ - caller::DynamicValue::String(String::from( - "Hello from rust, this is simple_call_func0", - )), - caller::DynamicValue::I64(42), - caller::DynamicValue::F64(42.42), - ], - named_args: vec![ - caller::DynamicNamedValue { - name: String::from("arg0"), - value: Some(caller::DynamicValue::I64(420)), - }, - caller::DynamicNamedValue { - name: String::from("arg1"), - value: Some(caller::DynamicValue::F64(420.42)), - }, - ], - }; - - let result = caller::call(stub, need_result); - let dgbstr = if need_result { - result.as_string() - } else { - Result::Ok(String::from("no return value")) - }; - - debug!("Something returned from simple_call_func0: {:?}", dgbstr); -} - -pub fn simple_call_func1(need_result: bool) { - let stub = caller::DartCallStub { - instance_hash: String::from("0"), - fn_name: String::from("func1"), - args: vec![ - caller::DynamicValue::String(String::from( - "Hello from rust, this is simple_call_func1", - )), - caller::DynamicValue::I64(42), - caller::DynamicValue::F64(42.42), - ], - named_args: vec![ - caller::DynamicNamedValue { - name: String::from("arg0"), - value: Some(caller::DynamicValue::I64(420)), - }, - caller::DynamicNamedValue { - name: String::from("arg1"), - value: Some(caller::DynamicValue::F64(420.42)), - }, - ], - }; - - debug!( - "Something returned from simple_call_func1: {:?}", - caller::call(stub, need_result) - ); -} - -pub fn simple_call_func2() { - let mut props = HashMap::new(); - props.insert(String::from("Key0"), String::from("Value0")); - props.insert(String::from("Key1"), String::from("Value1")); - - let to_send_mega_struct = mega_struct::MegaStruct { - name: String::from("megastruct from rust"), - coords: mega_struct::Coords { - x: 1.1, - y: 2.2, - z: 3.3, - }, - props, - }; - - let to_send_dynamic_value = caller::DynamicValue::MegaStruct(to_send_mega_struct.to_json()); - - let stub = caller::DartCallStub { - instance_hash: String::from("0"), - fn_name: String::from("func2"), - args: vec![to_send_dynamic_value], - named_args: vec![], - }; - - let mega_struct = caller::call(stub, true).as_mega_struct(); - - debug!( - "Something returned from simple_call_func2: name: {} debug: {:?}", - mega_struct.name, mega_struct, - ); -} - -pub fn simple_call_func3() { - let duration = time::Duration::from_secs(2); - thread::sleep(duration); - - debug!("Returned from simple_call_func3"); -} - -pub struct CallerTestClass { - pub instance_hash: String, - pub value: i32, -} - -impl CallerTestClass { - pub fn new(instance_hash: String, value: i32) -> CallerTestClass { - Self { - instance_hash, - value, - } - } - - pub fn call_some_func(&self) { - let stub = caller::DartCallStub { - instance_hash: self.instance_hash.clone(), - fn_name: String::from("request"), - args: vec![caller::DynamicValue::String(String::from( - "RequestOptionData", - ))], - named_args: vec![], - }; - let result = caller::call(stub, true).as_string(); - debug!("Returned request from CallerTestClass: {}", result.unwrap()); - } -} - -// TODO: remove all non-integration test related things TO here diff --git a/packages/nekoton_bridge/rust/src/utils/caller.rs b/packages/nekoton_bridge/rust/src/utils/caller.rs deleted file mode 100644 index 02e4ae3b..00000000 --- a/packages/nekoton_bridge/rust/src/utils/caller.rs +++ /dev/null @@ -1,188 +0,0 @@ -#![allow(dead_code, unused_must_use)] - -use flutter_rust_bridge::frb; -use std::{ - collections::HashMap, - sync::{ - mpsc::{self, Sender}, - Mutex, - }, -}; -use thiserror::Error; - -use lazy_static::lazy_static; -use parking_lot::RwLock; -use uuid::Uuid; - -use crate::{frb_generated::StreamSink, utils::mega_struct}; - -#[derive(Clone, Debug, Error)] -pub enum ErrorCode { - #[error("No error, ok")] - Ok, - #[error("Network error")] - Network, - #[error("Some error in logic")] - Generic, - #[error("Exception while invoking caller function that threw not ErrorCode")] - InvokeException, - #[error("Operation cancelled")] - Cancelled, -} - -// / Dynamic value for transmitting between Dart and Rust. We can't use Box because frb doesn't support it. -#[derive(Clone, Debug, Default)] -pub enum DynamicValue { - U16(u16), - - U32(u32), - I32(i32), - - U64(u64), - I64(i64), - - F32(f32), - F64(f64), - - String(String), - - VecU8(Vec), - - MegaStruct(String), - - Error(ErrorCode), - - #[default] - None, -} - -/// Hand-written converters for structures -impl DynamicValue { - pub fn as_vec_u8(&self) -> anyhow::Result> { - match self { - DynamicValue::VecU8(data) => anyhow::Result::Ok(data.clone()), - DynamicValue::Error(e) => anyhow::Result::Err(anyhow::Error::new(e.clone())), - _ => panic!("Can't convert DynamicValue to String {:?}", &self), - } - } - - pub fn as_string(&self) -> anyhow::Result { - match self { - DynamicValue::String(string) => anyhow::Result::Ok(string.clone()), - DynamicValue::Error(e) => anyhow::Result::Err(anyhow::Error::new(e.clone())), - _ => panic!("Can't convert DynamicValue to String {:?}", &self), - } - } - - pub fn as_string_option(&self) -> anyhow::Result> { - match self { - DynamicValue::String(string) => anyhow::Result::Ok(Option::Some(string.clone())), - DynamicValue::None => anyhow::Result::Ok(Option::None), - DynamicValue::Error(e) => anyhow::Result::Err(anyhow::Error::new(e.clone())), - _ => panic!("Can't convert DynamicValue to String? {:?}", &self), - } - } - - pub fn as_void(&self) -> anyhow::Result<()> { - match self { - DynamicValue::None => anyhow::Result::Ok(()), - DynamicValue::Error(e) => anyhow::Result::Err(anyhow::Error::new(e.clone())), - _ => panic!("Can't convert DynamicValue to void {:?}", &self), - } - } - - pub fn as_mega_struct(&self) -> mega_struct::MegaStruct { - match self { - DynamicValue::MegaStruct(string) => mega_struct::MegaStruct::from_json(string), - _ => panic!("Can't convert DynamicValue to MegaStruct {:?}", &self), - } - } - - pub fn as_error(&self) -> ErrorCode { - match self { - DynamicValue::Error(error_code) => error_code.clone(), - _ => panic!("Can't convert DynamicValue to ErrorCode {:?}", &self), - } - } -} - -/// Value of function call that should be placed in dart as named parameter. -/// EX: void funcCall({int? valueName}) -> DynamicNamedValue(name: "valueName", value: DynamicValue::U32(10)) -#[derive(Default, Debug, Clone)] -pub struct DynamicNamedValue { - pub name: String, - pub value: Option, -} - -/// Instruction for dart side that should call some method of some class instance. -#[derive(Default, Debug, Clone)] -pub struct DartCallStub { - /// Hash is unique id for any instance of any class, used to identify where to call method - pub instance_hash: String, - /// name of function that should be called - pub fn_name: String, - /// List of positional arguments in function - pub args: Vec, - /// List of named arguments of function, empty if no such arguments - pub named_args: Vec, -} - -/// Registered call of dart function that is tracked in rust side -#[derive(Default, Debug, Clone)] -pub struct DartCallStubRegistred { - /// Unique identifier of call of some method - pub id: Option, - /// Call itself - pub stub: DartCallStub, -} - -lazy_static! { - static ref SEND_TO_DART_CALLER_STREAM_SINK: RwLock>> = - RwLock::new(None); - static ref CALLBACK_MAP: Mutex>> = - Mutex::new(HashMap::new()); -} - -pub fn set_stream_sink(stream_sink: StreamSink) { - let mut guard = SEND_TO_DART_CALLER_STREAM_SINK.write(); - - *guard = Some(stream_sink); - - drop(guard); -} - -/// Call Dart method -pub fn call(stub: DartCallStub, need_result: bool) -> DynamicValue { - let (id, rx) = if need_result { - let mut mutex = CALLBACK_MAP.lock(); - let map = mutex.as_mut().unwrap(); - let (tx, rx) = mpsc::channel::(); - let id = Uuid::new_v4().to_string(); - map.insert(id.clone(), tx); - // We want to be shure that we unlock mutex before sending message to dart - // and wait for response - drop(mutex); - (Some(id), Some(rx)) - } else { - (None, None) - }; - - if let Some(sink) = &*SEND_TO_DART_CALLER_STREAM_SINK.read() { - let stub_registred = DartCallStubRegistred { id, stub }; - sink.add(stub_registred); - if rx.is_none() { - return DynamicValue::None; - } - return rx.unwrap().recv().unwrap(); - } - - panic!("Can't call Dart function {:?}", stub); -} - -/// Get result from dart side and return it to rust function that had initiated call -#[frb(sync)] -pub fn call_send_result(id: String, value: DynamicValue) { - let mut map = CALLBACK_MAP.lock().unwrap(); - let sender = map.remove(&id).expect("Can't find caller Sender"); - sender.send(value).expect("Can't send to caller"); -} diff --git a/packages/nekoton_bridge/rust/src/utils/mega_struct.rs b/packages/nekoton_bridge/rust/src/utils/mega_struct.rs deleted file mode 100644 index 49d327ec..00000000 --- a/packages/nekoton_bridge/rust/src/utils/mega_struct.rs +++ /dev/null @@ -1,28 +0,0 @@ -use serde::{Deserialize, Serialize}; -use std::collections::HashMap; - -// TODO: remove this class as it is a non-integration test related thing - -#[derive(Serialize, Deserialize, Debug)] -pub struct Coords { - pub x: f64, - pub y: f64, - pub z: f64, -} - -#[derive(Serialize, Deserialize, Debug)] -pub struct MegaStruct { - pub(crate) name: String, - pub coords: Coords, - pub props: HashMap, -} - -impl MegaStruct { - pub fn to_json(&self) -> String { - serde_json::to_string(self).unwrap() - } - - pub fn from_json(json: &str) -> MegaStruct { - serde_json::from_str(json).unwrap() - } -} diff --git a/packages/nekoton_bridge/rust/src/utils/mod.rs b/packages/nekoton_bridge/rust/src/utils/mod.rs index 9ea883f8..da6faa9f 100644 --- a/packages/nekoton_bridge/rust/src/utils/mod.rs +++ b/packages/nekoton_bridge/rust/src/utils/mod.rs @@ -1,5 +1,2 @@ pub mod api; -pub mod caller; pub mod logger; -pub mod mega_struct; -mod tests_api; diff --git a/packages/nekoton_bridge/rust/src/utils/tests_api.rs b/packages/nekoton_bridge/rust/src/utils/tests_api.rs deleted file mode 100644 index 437ae380..00000000 --- a/packages/nekoton_bridge/rust/src/utils/tests_api.rs +++ /dev/null @@ -1,71 +0,0 @@ -#![allow(unused_variables, dead_code, unused_imports)] - -use std::collections::HashMap; - -use flutter_rust_bridge::*; -use log::*; - -use crate::utils::caller; -use crate::utils::logger; -use crate::utils::mega_struct; - -// logger tests - -pub fn test_logger_info(string: String) { - info!("Info: {string}"); -} - -pub fn test_logger_debug(string: String) { - debug!("Debug: {string}"); -} - -pub fn test_logger_warn(string: String) { - warn!("Warn: {string}"); -} - -pub fn test_logger_error(string: String) { - error!("Error: {string}"); -} - -pub fn test_logger_panic(string: String) { - panic!("Panic: {}", string); -} - -// caller tests - -pub fn test_caller_call_test0_async(string: String, need_result: bool) -> caller::DynamicValue { - info!("test_caller_call_test0_async {string}"); - let stub = caller::DartCallStub { - instance_hash: String::from("0"), - fn_name: String::from("test0"), - args: vec![caller::DynamicValue::String(string)], - named_args: vec![], - }; - - caller::call(stub, need_result) -} - -#[frb(sync)] -pub fn test_caller_call_test0_sync(string: String, need_result: bool) -> caller::DynamicValue { - info!("test_caller_call_test0_sync {string}"); - let stub = caller::DartCallStub { - instance_hash: String::from("0"), - fn_name: String::from("test0"), - args: vec![caller::DynamicValue::String(string)], - named_args: vec![], - }; - - caller::call(stub, need_result) -} - -pub fn test_caller_call_test1_async(string: String, need_result: bool) -> caller::DynamicValue { - info!("test_caller_call_test1_async {string}"); - let stub = caller::DartCallStub { - instance_hash: String::from("0"), - fn_name: String::from("test1"), - args: vec![caller::DynamicValue::String(string)], - named_args: vec![], - }; - - caller::call(stub, need_result) -} diff --git a/packages/nekoton_bridge/test/merger_hierarchy_parse_test.dart b/packages/nekoton_bridge/test/merger_hierarchy_parse_test.dart index 43d74181..068ff7f0 100644 --- a/packages/nekoton_bridge/test/merger_hierarchy_parse_test.dart +++ b/packages/nekoton_bridge/test/merger_hierarchy_parse_test.dart @@ -21,21 +21,20 @@ void main() { final nekotonCrate = rootCrate.subModules['nekoton_wrapper']!; expect(nekotonCrate.moduleName, 'nekoton_wrapper'); expect(nekotonCrate.subModules.keys.toSet(), {'crypto'}); - expect( - nekotonCrate.directImports, - { - 'str_list_to_string_vec', - 'str_vec_to_string_vec', - 'HandleError', - 'MatchResult' - }, - ); + expect(nekotonCrate.directImports, { + 'str_list_to_string_vec', + 'str_vec_to_string_vec', + 'HandleError', + 'MatchResult', + }); final cryptoModule = nekotonCrate.subModules['crypto']!; expect(cryptoModule.directImports.isEmpty, true); expect( cryptoModule - .subModules['mnemonic']!.subModules['models']!.directImports, + .subModules['mnemonic']! + .subModules['models']! + .directImports, {'KeypairHelper'}, ); }); @@ -58,21 +57,20 @@ void main() { final nekotonCrate = rootCrate.subModules['nekoton_wrapper']!; expect(nekotonCrate.moduleName, 'nekoton_wrapper'); expect(nekotonCrate.subModules.keys.toSet(), {'crypto'}); - expect( - nekotonCrate.directImports, - { - 'str_list_to_string_vec', - 'str_vec_to_string_vec', - 'HandleError', - 'MatchResult' - }, - ); + expect(nekotonCrate.directImports, { + 'str_list_to_string_vec', + 'str_vec_to_string_vec', + 'HandleError', + 'MatchResult', + }); final cryptoModule = nekotonCrate.subModules['crypto']!; expect(cryptoModule.directImports.isEmpty, true); expect( cryptoModule - .subModules['mnemonic']!.subModules['models']!.directImports, + .subModules['mnemonic']! + .subModules['models']! + .directImports, {'KeypairHelper'}, ); }); @@ -159,8 +157,11 @@ void main() { expect(nekotonCrate.directImports.length, 0); final cryptoCrate = nekotonCrate.subModules['crypto']!; expect(cryptoCrate.subModules.length, 0); - expect(cryptoCrate.directImports, - {'dict', 'derive_from_phrase', 'generate_key'}); + expect(cryptoCrate.directImports, { + 'dict', + 'derive_from_phrase', + 'generate_key', + }); expect(cryptoCrate.moduleName, 'crypto'); }); @@ -173,17 +174,18 @@ void main() { expect(base64Crate.directImports.length, 1); expect(base64Crate.directImports, {'Engine as _'}); expect(base64Crate.subModules.length, 1); - expect( - base64Crate.subModules['engine']!.directImports, - {'general_purpose'}, - ); + expect(base64Crate.subModules['engine']!.directImports, { + 'general_purpose', + }); }); }); group('Test hierarchy converting to string', () { test('Convert plain hierarchy not public', () { - final nekoton = - ModuleHierarchy(moduleName: 'nekoton_wrapper', isRoot: false); + final nekoton = ModuleHierarchy( + moduleName: 'nekoton_wrapper', + isRoot: false, + ); nekoton.directImports.add('SomeModule'); final crate = ModuleHierarchy(moduleName: 'crate', isRoot: true); crate.subModules['nekoton_wrapper'] = nekoton; @@ -191,21 +193,20 @@ void main() { final buffer = StringBuffer(); convertCrateToString(hierarchy, buffer); - expect( - ''' + expect(''' use crate::{ nekoton_wrapper::{ SomeModule, }, }; -''', - buffer.toString(), - ); +''', buffer.toString()); }); test('Convert plain hierarchy public', () { - final nekoton = - ModuleHierarchy(moduleName: 'nekoton_wrapper', isRoot: false); + final nekoton = ModuleHierarchy( + moduleName: 'nekoton_wrapper', + isRoot: false, + ); nekoton.directImports.add('SomeModule'); final crate = ModuleHierarchy(moduleName: 'crate', isRoot: true); crate.subModules['nekoton_wrapper'] = nekoton; @@ -214,16 +215,13 @@ SomeModule, final buffer = StringBuffer(); convertCrateToString(hierarchy, buffer); - expect( - ''' + expect(''' pub use crate::{ nekoton_wrapper::{ SomeModule, }, }; -''', - buffer.toString(), - ); +''', buffer.toString()); }); test('Convert difficult hierarchy', () { @@ -237,8 +235,10 @@ SomeModule, final models = ModuleHierarchy(moduleName: 'models', isRoot: false); models.directImports.add('ModelType'); - final nekoton = - ModuleHierarchy(moduleName: 'nekoton_wrapper', isRoot: false); + final nekoton = ModuleHierarchy( + moduleName: 'nekoton_wrapper', + isRoot: false, + ); nekoton.directImports.add('SomeType'); nekoton.subModules['crypto'] = crypto; nekoton.subModules['models'] = models; @@ -256,8 +256,7 @@ SomeModule, final buffer = StringBuffer(); convertCrateToString(hierarchy, buffer); - expect( - ''' + expect(''' use crate::{ nekoton_wrapper::{ SomeType, @@ -271,9 +270,7 @@ ModelType, }, }; use utils::{*}; -''', - buffer.toString(), - ); +''', buffer.toString()); }); }); } diff --git a/pubspec.yaml b/pubspec.yaml index 3697e9c7..a53ef849 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,94 @@ name: nekoton_bridge_workspace environment: - sdk: '>=3.5.0 <4.0.0' + sdk: '>=3.9.0 <4.0.0' + +workspace: + - packages/nekoton_bridge + - packages/flutter_nekoton_bridge + - packages/flutter_nekoton_bridge/example + dev_dependencies: - melos: ^6.3.0 + melos: ^7.1.0 + +melos: + scripts: + analyze: + exec: flutter analyze . + description: Analyze a specific package in this project. + + check-format: + exec: dart format --set-exit-if-changed . + description: Check the format of a specific package in this project. + + check-rust: + exec: rustfmt --check --edition 2021 rust/src/lib.rs && cargo clippy -- -D warnings + description: Check the format of a rust code. + packageFilters: + dirExists: rust + + format: + exec: dart format . + description: Format a specific package in this project. + + build: + run: melos run build:ios && melos run build:android + description: Build all native libraries for the project. + + codegen: + run: bash scripts/codegen.sh + description: Generate code. + + git-check: + run: bash scripts/git-check.sh + description: Check if some code changed during build + + build:ios: + run: bash scripts/build-ios.sh + description: Build the XCFramework for iOS. + + build:android: + run: bash scripts/build-android.sh + description: Build the .tar.gz for Android. + + test: + run: melos run test:dart --no-select && melos run test:flutter --no-select + description: Run all Dart & Flutter tests in this project. + + test:dart: + run: melos exec -c 1 --fail-fast -- "dart test test" + description: Run Dart tests for a specific package in this project. + packageFilters: + flutter: false + dirExists: test + + test:flutter: + run: melos exec -c 1 --fail-fast -- "flutter test test" + description: Run Flutter tests for a specific package in this project. + packageFilters: + flutter: true + dirExists: test + + test:integration: + run: melos exec -c 1 --fail-fast -- "flutter test integration_test" + description: Run Flutter teintegration teststs for a specific package in this project. + packageFilters: + flutter: true + dirExists: integration_test + + check-all: + description: Prepare to commit by checking all things + run: melos analyze && melos check-format && melos check-rust && melos test && melos test:integration + + clean-example: + run: bash scripts/clean-example.sh + description: Clean example for rebuilding after FNB update + + command: + clean: + hooks: + post: bash scripts/clean.sh + version: + updateGitTagRefs: true + hooks: + preCommit: bash scripts/version.sh diff --git a/scripts/clean.sh b/scripts/clean.sh index 2d2a6cea..e0255b50 100644 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -4,7 +4,6 @@ find . -type f -name "*_generated.*" -delete find . -type f -name "*.freezed.dart" -delete find . -type f -name "*.g.dart" -delete -find . -type f -name "*.reflectable.dart" -delete rm -rdf packages/nekoton_bridge/rust/src/api/merged.rs rm -rdf packages/flutter_nekoton_bridge/ios/Classes/frb.h