diff --git a/Cargo.lock b/Cargo.lock index 03f0cd7..34f43c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,19 +25,21 @@ dependencies = [ [[package]] name = "aluvm" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6385af946e0be015f5e1ca29c5e69c1ed455e6d955e0ba05db8537e666c144ea" +checksum = "f3856ee4be23c8a4b44c4119656e92aeb654c69244290c4c81feb467d49354ce" dependencies = [ "amplify 4.0.0", "baid58", + "getrandom", "half", - "paste 1.0.13", + "paste 1.0.14", "ripemd", "serde", "sha2", - "strict_encoding 2.4.2", + "strict_encoding 2.5.0", "strict_types", + "wasm-bindgen", ] [[package]] @@ -180,9 +182,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" [[package]] name = "arrayref" @@ -296,9 +298,9 @@ dependencies = [ [[package]] name = "bitcoin" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b36f4c848f6bd9ff208128f08751135846cc23ae57d66ab10a22efff1c675f3c" +checksum = "4e99ff7289b20a7385f66a0feda78af2fc119d28fb56aea8886a9cd0a4abdd75" dependencies = [ "bech32", "bitcoin-private", @@ -428,9 +430,9 @@ dependencies = [ [[package]] name = "bp-core" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20eee52cf1c0d1fb6820436cd73b709483a14257fcb66753b0002d5f61151d88" +checksum = "d41afe7b8aa5dd71d257ca38e5bc922bd3024e0cca9e2ad52a076f2bdeddb901" dependencies = [ "amplify 4.0.0", "bp-dbc", @@ -439,15 +441,15 @@ dependencies = [ "commit_verify", "serde", "single_use_seals", - "strict_encoding 2.4.2", + "strict_encoding 2.5.0", "strict_types", ] [[package]] name = "bp-dbc" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e93be8147fe47376f1144a78b6e4cf11999efa8328fcca1b25b7f030491bb27" +checksum = "1bd7e637529d70db7881fcaf2aaa6a09ae8ee1a1e6ca499dbbf041e032ff3f73" dependencies = [ "amplify 4.0.0", "baid58", @@ -455,28 +457,28 @@ dependencies = [ "commit_verify", "secp256k1 0.27.0", "serde", - "strict_encoding 2.4.2", + "strict_encoding 2.5.0", ] [[package]] name = "bp-primitives" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52baa67a14cf94e4e35c1f279b2b8bdac342e2a6a3e57afd8887d46855d8d0b9" +checksum = "8786660637d2ad9e6da09f55d2e67992eb39c0edb52333b478bb3c03e377218e" dependencies = [ "amplify 4.0.0", "commit_verify", "secp256k1 0.27.0", "serde", - "strict_encoding 2.4.2", + "strict_encoding 2.5.0", "strict_types", ] [[package]] name = "bp-seals" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f5b4ab2ba908733c37d4259474920c87b31d69453c3acd59298bf1d69e59392" +checksum = "15f5f82a3813921ffd1d668dbcfd17bcb7c90a08de7af76dffb7b9e77c72c7d0" dependencies = [ "amplify 4.0.0", "baid58", @@ -486,13 +488,13 @@ dependencies = [ "rand", "serde", "single_use_seals", - "strict_encoding 2.4.2", + "strict_encoding 2.5.0", ] [[package]] name = "bpro" -version = "0.4.0" -source = "git+https://github.com/pandora-prime/bpro#acb59fe7395c04233371656d43b1a1665746cdec" +version = "0.5.0" +source = "git+https://github.com/pandora-prime/bpro?branch=v0.5#9d151d4ba11701a9e399ef93dea74040fd773ba6" dependencies = [ "amplify 3.14.2", "bitcoin 0.29.2", @@ -508,7 +510,7 @@ dependencies = [ "serde", "serde_with 2.3.3", "strict_encoding 0.9.0", - "strict_encoding 2.4.2", + "strict_encoding 2.5.0", ] [[package]] @@ -650,16 +652,16 @@ dependencies = [ [[package]] name = "commit_verify" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395d2cf275f1359bf36f26e15f68d2be5edc16fe0b210bc47ad9d6cefc1a3c5f" +checksum = "1459c7274450984c0f2dbe89a250817f2275c02001b1cf3da4a6e8e74bc56421" dependencies = [ "amplify 4.0.0", "commit_encoding_derive", "rand", "serde", "sha2", - "strict_encoding 2.4.2", + "strict_encoding 2.5.0", "strict_types", ] @@ -721,12 +723,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core 0.20.1", - "darling_macro 0.20.1", + "darling_core 0.20.3", + "darling_macro 0.20.3", ] [[package]] @@ -745,16 +747,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.25", + "syn 2.0.26", ] [[package]] @@ -770,13 +772,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core 0.20.1", + "darling_core 0.20.3", "quote", - "syn 2.0.25", + "syn 2.0.26", ] [[package]] @@ -861,7 +863,7 @@ version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06bd24afe8bbe869220a7f03ff413dcb9c4824a663e8f06f3cbd7f1c75126d21" dependencies = [ - "bitcoin 0.30.0", + "bitcoin 0.30.1", "bitcoin-private", "byteorder", "libc", @@ -1479,9 +1481,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" @@ -1623,7 +1625,7 @@ dependencies = [ [[package]] name = "mycitadel-desktop" -version = "1.3.0" +version = "2.0.0" dependencies = [ "amplify 3.14.2", "bitcoin 0.29.2", @@ -1737,9 +1739,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "paste-impl" @@ -1822,9 +1824,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.64" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -1898,9 +1900,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.29" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" dependencies = [ "proc-macro2", ] @@ -1958,9 +1960,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83d3daa6976cffb758ec878f108ba0e062a45b2d6ca3a2cca965338855476caf" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" dependencies = [ "aho-corasick", "memchr", @@ -1969,9 +1971,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "relm" @@ -2003,12 +2005,13 @@ dependencies = [ [[package]] name = "rgb-contracts" -version = "0.10.0-beta.2" -source = "git+https://github.com/RGB-WG/rgb#32dbfac0b3d0e028a2aece66f679ad3d1a1e5aa7" +version = "0.10.0-rc.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7449326909378abc94f2e627984dd839f20fa58d073f2684420a1248b9b77ffb" dependencies = [ "amplify 4.0.0", "baid58", - "bitcoin 0.30.0", + "bitcoin 0.30.1", "bp-core", "commit_verify", "electrum-client 0.15.1", @@ -2024,8 +2027,9 @@ dependencies = [ [[package]] name = "rgb-core" -version = "0.10.4" -source = "git+https://github.com/RGB-WG/rgb-core#8e09cad6199aeba6963176bc719b43ea201d1c83" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee6f3eb3d437e8ac1f80dcc5e5ee9b1e70d33b81bd423e8391e376986befd74" dependencies = [ "aluvm", "amplify 4.0.0", @@ -2033,12 +2037,11 @@ dependencies = [ "bp-core", "commit_verify", "getrandom", - "half", "mime", "secp256k1-zkp", "serde", "single_use_seals", - "strict_encoding 2.4.2", + "strict_encoding 2.5.0", "strict_types", "wasm-bindgen", ] @@ -2046,17 +2049,19 @@ dependencies = [ [[package]] name = "rgb-persist-fs" version = "0.10.0" -source = "git+https://github.com/RGB-WG/rgb#32dbfac0b3d0e028a2aece66f679ad3d1a1e5aa7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d56de85517eb858c8fc46075032212d964be44a6d90c86eddeea6f5cb30c64a" dependencies = [ "amplify 4.0.0", "rgb-std", - "strict_encoding 2.4.2", + "strict_encoding 2.5.0", ] [[package]] name = "rgb-std" -version = "0.10.2" -source = "git+https://github.com/RGB-WG/rgb-wallet#11fc461b38bf2de693501bb5d51bdb83d10f6367" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dc78835a03d99c91c1f190df971589ea195a4dce933cf00ba5efe163c082413" dependencies = [ "amplify 4.0.0", "baid58", @@ -2066,19 +2071,20 @@ dependencies = [ "getrandom", "rgb-core", "serde", - "strict_encoding 2.4.2", + "strict_encoding 2.5.0", "strict_types", "wasm-bindgen", ] [[package]] name = "rgb-wallet" -version = "0.10.2" -source = "git+https://github.com/RGB-WG/rgb-wallet#11fc461b38bf2de693501bb5d51bdb83d10f6367" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9231c9e20558f36616a9ae84e2e943146acff88649f1f95ec132738f0237a3d0" dependencies = [ "amplify 4.0.0", "baid58", - "bitcoin 0.30.0", + "bitcoin 0.30.1", "bp-core", "chrono", "commit_verify", @@ -2088,7 +2094,7 @@ dependencies = [ "percent-encoding", "rgb-core", "rgb-std", - "strict_encoding 2.4.2", + "strict_encoding 2.5.0", "wasm-bindgen", ] @@ -2127,9 +2133,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.3" +version = "0.38.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5ffa1efe7548069688cd7028f32591853cd7b5b756d41bcffd2353e4fc75b4" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" dependencies = [ "bitflags 2.3.3", "errno", @@ -2184,15 +2190,15 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -2261,9 +2267,9 @@ dependencies = [ [[package]] name = "secp256k1-zkp-sys" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4237cd927cb5b153fb764b766ced70a7df76d0dacdbaabb49e75bdab03b49c26" +checksum = "d03ab1ca75a18e1899e8d9b8d28b5998ae1ddcb42fec5956769718543293c723" dependencies = [ "cc", "secp256k1-sys 0.8.1", @@ -2271,35 +2277,35 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "serde" -version = "1.0.171" +version = "1.0.173" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" +checksum = "e91f70896d6720bc714a4a57d22fc91f1db634680e65c8efe13323f1fa38d53f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.171" +version = "1.0.173" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +checksum = "a6250dde8342e0232232be9ca3db7aa40aceb5a3e5dd9bddbc00d99a007cde49" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.26", ] [[package]] name = "serde_json" -version = "1.0.100" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" +checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" dependencies = [ "itoa", "ryu", @@ -2370,17 +2376,17 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.1", + "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.26", ] [[package]] name = "serde_yaml" -version = "0.9.22" +version = "0.9.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "452e67b9c20c37fa79df53201dc03839651086ed9bbe92b3ca585ca9fdaa7d85" +checksum = "bd5f51e3fdb5b9cdd1577e1cb7a733474191b1aca6a72c2e50913241632c1180" dependencies = [ "indexmap 2.0.0", "itoa", @@ -2469,9 +2475,9 @@ dependencies = [ [[package]] name = "strict_encoding" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "127000718020d3da8bb1a0b64854e49107607463cb0fd6df9960e0642ef53095" +checksum = "23b1c91b79e62afc09025d828fa0b8dbf4105513de38f126a017919c09bca472" dependencies = [ "amplify 4.0.0", "half", @@ -2506,9 +2512,9 @@ dependencies = [ [[package]] name = "strict_types" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e3b226d85e2961fee06594323a1a98bc79987aa44b9e977d2f834e52eb0361a" +checksum = "75574939fc4c5a13ab4f49d06e965a9d4bd0aa1deff4e227a2afb6dbebff1249" dependencies = [ "amplify 4.0.0", "baid58", @@ -2520,7 +2526,7 @@ dependencies = [ "serde_with 2.3.3", "serde_yaml", "sha2", - "strict_encoding 2.4.2", + "strict_encoding 2.5.0", "toml 0.7.6", ] @@ -2530,7 +2536,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff63080f492dd4d289ffcaed8d7ece38adfb423db910eb342c0e04d409536a7a" dependencies = [ - "paste 1.0.13", + "paste 1.0.14", "serde_str_helpers", ] @@ -2559,9 +2565,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.25" +version = "2.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" +checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970" dependencies = [ "proc-macro2", "quote", @@ -2583,9 +2589,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.8" +version = "0.12.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1c7f239eb94671427157bd93b3694320f3668d4e1eff08c7285366fd777fac" +checksum = "1d2faeef5759ab89935255b1a4cd98e0baf99d1085e37d36599c625dac49ae8e" [[package]] name = "termcolor" @@ -2619,7 +2625,7 @@ checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.26", ] [[package]] @@ -2707,9 +2713,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.12" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ "indexmap 2.0.0", "serde", @@ -2732,9 +2738,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -2753,9 +2759,9 @@ checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" [[package]] name = "unsafe-libyaml" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" +checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" [[package]] name = "untrusted" @@ -2863,7 +2869,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.26", "wasm-bindgen-shared", ] @@ -2885,7 +2891,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.26", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3042,9 +3048,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.9" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a2094c43cc94775293eaa0e499fbc30048a6d824ac82c0351a8c0bf9112529" +checksum = "81fac9742fd1ad1bd9643b991319f72dd031016d44b77039a26977eb667141e7" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 2c75cf4..e22002b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mycitadel-desktop" -version = "1.3.0" +version = "2.0.0" authors = ["Dr Maxim Orlovsky "] description = "Bitcoin, Lightning and RGB wallet; part of MyCitadel software suite." repository = "https://github.com/mycitadel/mycitadel-desktop" @@ -45,7 +45,7 @@ rgb-contracts = { version = "0.10.0-beta.2", features = ["electrum"] } bitcoin_scripts = "0.10.0" bitcoin_blockchain = "0.10.0" descriptor-wallet = { version = "0.10.0", features = ["miniscript", "keygen", "hwi", "construct"] } -bpro = { version = "0.4.0", features = ["electrum"] } +bpro = { version = "0.5.0", features = ["electrum"] } hwi = "0.6.0" electrum-client = "0.14.0" @@ -67,8 +67,4 @@ serde = ["serde_with", "serde_yaml", "amplify/serde", "chrono/serde", "bitcoin/serde", "miniscript/serde", "descriptor-wallet/serde"] [patch.crates-io] -rgb-core = { git = "https://github.com/RGB-WG/rgb-core" } -rgb-std = { git = "https://github.com/RGB-WG/rgb-wallet" } -rgb-wallet = { git = "https://github.com/RGB-WG/rgb-wallet" } -rgb-contracts = { git = "https://github.com/RGB-WG/rgb" } -bpro = { git = "https://github.com/pandora-prime/bpro" } +bpro = { git = "https://github.com/pandora-prime/bpro", branch = "v0.5" } diff --git a/src/view/wallet/component.rs b/src/view/wallet/component.rs index e108e17..6ed552d 100644 --- a/src/view/wallet/component.rs +++ b/src/view/wallet/component.rs @@ -33,6 +33,7 @@ use wallet::lex_order::lex_order::LexOrder; use super::pay::beneficiary_row::Beneficiary; use super::pay::FeeRate; use super::{pay, ElectrumState, Msg, ViewModel, Widgets}; +use crate::view::wallet::payto; use crate::view::{error_dlg, launch, settings, NotificationBoxExt}; use crate::worker::{electrum, exchange, ElectrumWorker, ExchangeWorker}; @@ -40,6 +41,7 @@ pub struct Component { model: ViewModel, widgets: Widgets, pay_widgets: pay::Widgets, + payto_widgets: payto::Widgets, exchange_channel: Channel, exchange_worker: ExchangeWorker, @@ -376,6 +378,7 @@ impl Update for Component { .map(|stream| stream.emit(launch::Msg::About)); } Msg::Pay(msg) => self.update_pay(msg), + Msg::PayTo(msg) => self.update_payto(msg), Msg::Settings => self.settings.emit(settings::Msg::View( self.model.to_settings(), self.model.path().clone(), @@ -539,6 +542,44 @@ impl Component { } } +impl Component { + fn update_payto(&mut self, event: payto::Msg) { + match event { + payto::Msg::Show => { + self.payto_widgets.init_ui(&self.model); + self.payto_widgets.show(); + } + payto::Msg::Response(ResponseType::Ok) => { + let (psbt, change_index) = match self.sync_pay() { + Some(data) => data, + None => return, + }; + self.payto_widgets.hide(); + self.launcher_stream.as_ref().map(|stream| { + stream.emit(launch::Msg::CreatePsbt( + psbt, + self.model.as_settings().network(), + )) + }); + // Update latest change index in wallet settings by sending message to the wallet + // component + if self + .model + .wallet_mut() + .update_next_change_index(change_index) + { + self.save(); + } + } + payto::Msg::Response(ResponseType::Cancel) => { + self.payto_widgets.hide(); + } + payto::Msg::Response(_) => {} + _ => {} // Changes which update wallet tx + } + } +} + impl Widget for Component { // Specify the type of the root widget. type Root = ApplicationWindow; @@ -571,11 +612,15 @@ impl Widget for Component { let glade_src = include_str!("pay/pay.glade"); let pay_widgets = pay::Widgets::from_string(glade_src).expect("glade file broken"); - pay_widgets.connect(relm); pay_widgets.bind_beneficiary_model(relm, &model); pay_widgets.init_ui(&model); + let glade_src = include_str!("payto/payto.glade"); + let payto_widgets = payto::Widgets::from_string(glade_src).expect("glade file broken"); + payto_widgets.connect(relm); + payto_widgets.init_ui(&model); + electrum_worker.sync(); // TODO: remove the panic and allow user to fix resolver settings @@ -587,6 +632,7 @@ impl Widget for Component { model, widgets, pay_widgets, + payto_widgets, settings, exchange_channel, diff --git a/src/view/wallet/mod.rs b/src/view/wallet/mod.rs index 96c94f8..3193adb 100644 --- a/src/view/wallet/mod.rs +++ b/src/view/wallet/mod.rs @@ -12,6 +12,7 @@ mod asset_row; mod component; mod pay; +mod payto; mod view_model; mod widget; @@ -41,6 +42,7 @@ pub enum Msg { Settings, Update(Vec, BTreeSet, ElectrumServer), Pay(pay::Msg), + PayTo(payto::Msg), Fiat(Fiat), Refresh, InvoiceAmountToggle(bool), diff --git a/src/view/wallet/payto/mod.rs b/src/view/wallet/payto/mod.rs new file mode 100644 index 0000000..f6bda42 --- /dev/null +++ b/src/view/wallet/payto/mod.rs @@ -0,0 +1,22 @@ +// MyCitadel desktop wallet: bitcoin & RGB wallet based on GTK framework. +// +// Written in 2022 by +// Dr. Maxim Orlovsky +// +// Copyright (C) 2022 by Pandora Prime SA, Switzerland. +// +// This software is distributed without any warranty. You should have received +// a copy of the AGPL-3.0 License along with this software. If not, see +// . + +mod widget; + +use gtk::ResponseType; +pub use widget::Widgets; + +#[derive(Msg)] +pub enum Msg { + Show, + Advanced, + Response(ResponseType), +} diff --git a/src/view/wallet/payto/payto.glade b/src/view/wallet/payto/payto.glade index 83b7fa6..01b6527 100644 --- a/src/view/wallet/payto/payto.glade +++ b/src/view/wallet/payto/payto.glade @@ -2,7 +2,7 @@ - + False center dialog @@ -232,7 +232,7 @@ - + Batch True True diff --git a/src/view/wallet/payto/widget.rs b/src/view/wallet/payto/widget.rs new file mode 100644 index 0000000..30d4b04 --- /dev/null +++ b/src/view/wallet/payto/widget.rs @@ -0,0 +1,48 @@ +// MyCitadel desktop wallet: bitcoin & RGB wallet based on GTK framework. +// +// Written in 2022 by +// Dr. Maxim Orlovsky +// +// Copyright (C) 2022 by Pandora Prime SA, Switzerland. +// +// This software is distributed without any warranty. You should have received +// a copy of the AGPL-3.0 License along with this software. If not, see +// . + +use gladis::Gladis; +use gtk::prelude::*; +use gtk::{Button, Dialog, Entry, HeaderBar, InfoBar, Label, ToggleButton}; +use relm::Relm; + +use crate::view::wallet; + +// Create the structure that holds the widgets used in the view. +#[derive(Clone, Gladis)] +pub struct Widgets { + dialog: Dialog, + header_bar: HeaderBar, + + info_bar: InfoBar, + info_lbl: Label, + + cancel_btn: Button, + compose_btn: Button, + batch_btn: Button, + + invoice_fld: Entry, + amount_fld: Entry, + max_btn: ToggleButton, + asset_lbl: Label, +} + +impl Widgets { + pub fn init_ui(&self, model: &wallet::ViewModel) {} + + pub fn show(&self) { self.dialog.show() } + pub fn hide(&self) { self.dialog.hide() } + + pub fn to_root(&self) -> Dialog { self.dialog.clone() } + pub fn as_root(&self) -> &Dialog { &self.dialog } + + pub fn connect(&self, relm: &Relm) {} +}