diff --git a/lib/Cargo.lock b/lib/Cargo.lock index c6b8ef0..8a98df5 100644 --- a/lib/Cargo.lock +++ b/lib/Cargo.lock @@ -128,6 +128,14 @@ name = "base58" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "base64" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "base64" version = "0.11.0" @@ -307,16 +315,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "core-foundation" -version = "0.7.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "core-foundation-sys" -version = "0.7.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1042,7 +1050,7 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.1.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1184,7 +1192,7 @@ dependencies = [ "blake3 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=6c3f6f22bfc642c714c1e43f6e09cb4d34c7a1de)", + "silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=07288de82d84b9bf35d1210ccc98eb1e4b757eb7)", ] [[package]] @@ -1482,10 +1490,10 @@ dependencies = [ [[package]] name = "rustls" -version = "0.17.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1494,13 +1502,13 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.3.0" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1549,22 +1557,21 @@ dependencies = [ [[package]] name = "security-framework" -version = "0.4.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework-sys" -version = "0.4.3" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1648,7 +1655,7 @@ dependencies = [ [[package]] name = "silentdragonlitelib" version = "0.1.0" -source = "git+https://github.com/MyHush/silentdragonlite-cli?rev=6c3f6f22bfc642c714c1e43f6e09cb4d34c7a1de#6c3f6f22bfc642c714c1e43f6e09cb4d34c7a1de" +source = "git+https://github.com/MyHush/silentdragonlite-cli?rev=07288de82d84b9bf35d1210ccc98eb1e4b757eb7#07288de82d84b9bf35d1210ccc98eb1e4b757eb7" dependencies = [ "base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "bellman 0.1.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)", @@ -1676,8 +1683,8 @@ dependencies = [ "sodiumoxide 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-rustls 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tonic 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-rustls 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tonic 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tonic-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", "webpki-roots 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1869,15 +1876,28 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.13.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures-core 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio-util" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tokio-util" version = "0.3.1" @@ -1893,26 +1913,26 @@ dependencies = [ [[package]] name = "tonic" -version = "0.2.1" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "async-stream 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "async-trait 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures-core 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures-util 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.13.6 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "prost-derive 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls-native-certs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls-native-certs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-rustls 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-rustls 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "tower 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "tower-balance 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "tower-load 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2461,6 +2481,7 @@ dependencies = [ "checksum backtrace 0.3.43 (registry+https://github.com/rust-lang/crates.io-index)" = "7f80256bc78f67e7df7e36d77366f636ed976895d91fe2ab9efa3973e8fe8c4f" "checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" "checksum base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" +"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" "checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" "checksum bech32 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cdcf67bb7ba7797a081cd19009948ab533af7c355d5caf1d08c777582d351e9c" "checksum bellman 0.1.0 (git+https://github.com/MyHush/librustzcash.git?rev=1a0204113d487cdaaf183c2967010e5214ff9e37)" = "" @@ -2484,8 +2505,8 @@ dependencies = [ "checksum chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" -"checksum core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" -"checksum core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" +"checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" +"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" "checksum crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24ce9782d4d5c53674646a6a4c1863a21a8fc0cb649b3c94dfc16e45071dea19" "checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" @@ -2570,7 +2591,7 @@ dependencies = [ "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" "checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" -"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum petgraph 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29c127eea4a29ec6c85d153c59dc1213f33ec74cead30fe4730aecc88cc1fd92" "checksum pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c" "checksum pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" @@ -2620,16 +2641,16 @@ dependencies = [ "checksum rust-embed-utils 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97655158074ccb2d2cfb1ccb4c956ef0f4054e43a2c1e71146d4991e6961e105" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0d4a31f5d68413404705d6982529b0e11a9aacd4839d1d6222ee3b8cb4015e1" -"checksum rustls-native-certs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a75ffeb84a6bd9d014713119542ce415db3a3e4748f0bfce1e1416cd224a23a5" +"checksum rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" +"checksum rustls-native-certs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51ffebdbb48c14f84eba0b715197d673aff1dd22cc1007ca647e28483bbcc307" "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" "checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" "checksum schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" "checksum secp256k1 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e0344a794ff109f85547039536028e12f313178ac1545e49fdf16a530d900a7b" -"checksum security-framework 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "97bbedbe81904398b6ebb054b3e912f99d55807125790f3198ac990d98def5b0" -"checksum security-framework-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" +"checksum security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" +"checksum security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" @@ -2639,7 +2660,7 @@ dependencies = [ "checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35" "checksum sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0" "checksum signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" -"checksum silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=6c3f6f22bfc642c714c1e43f6e09cb4d34c7a1de)" = "" +"checksum silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=07288de82d84b9bf35d1210ccc98eb1e4b757eb7)" = "" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" "checksum socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85" @@ -2659,9 +2680,10 @@ dependencies = [ "checksum tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c1c5676413eaeb1ea35300a0224416f57abc3bd251657e0fafc12c47ff98c060" "checksum tokio 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d099fa27b9702bed751524694adbe393e18b36b204da91eb1cbbbbb4a5ee2d58" "checksum tokio-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" -"checksum tokio-rustls 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4adb8b3e5f86b707f1b54e7c15b6de52617a823608ccda98a15d3a24222f265a" +"checksum tokio-rustls 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3068d891551949b37681724d6b73666787cc63fa8e255c812a41d2513aff9775" +"checksum tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" "checksum tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" -"checksum tonic 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4afef9ce97ea39593992cf3fa00ff33b1ad5eb07665b31355df63a690e38c736" +"checksum tonic 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08283643b1d483eb7f3fc77069e63b5cba3e4db93514b3d45470e67f123e4e48" "checksum tonic-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0436413ba71545bcc6c2b9a0f9d78d72deb0123c6a75ccdfe7c056f9930f5e52" "checksum tower 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd3169017c090b7a28fce80abaad0ab4f5566423677c9331bb320af7e49cfe62" "checksum tower-balance 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a792277613b7052448851efcf98a2c433e6f1d01460832dc60bef676bc275d4c" diff --git a/lib/Cargo.toml b/lib/Cargo.toml index d0c3d50..5d7a33c 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -12,4 +12,4 @@ crate-type = ["staticlib"] libc = "0.2.58" lazy_static = "1.4.0" blake3 = "0.3.4" -silentdragonlitelib = { git = "https://github.com/MyHush/silentdragonlite-cli", rev = "6c3f6f22bfc642c714c1e43f6e09cb4d34c7a1de" } +silentdragonlitelib = { git = "https://github.com/MyHush/silentdragonlite-cli", rev = "07288de82d84b9bf35d1210ccc98eb1e4b757eb7" } diff --git a/lib/silentdragonlitelib.h b/lib/silentdragonlitelib.h index 4e1c983..ef856d8 100644 --- a/lib/silentdragonlitelib.h +++ b/lib/silentdragonlitelib.h @@ -6,11 +6,11 @@ extern "C" { #endif extern bool litelib_wallet_exists (const char* chain_name); -extern char * litelib_initialize_new (const char* server); +extern char * litelib_initialize_new (bool dangerous, const char* server); extern char * litelib_initialize_new_from_phrase - (const char* server, const char* seed, + (bool dangerous, const char* server, const char* seed, unsigned long long birthday, unsigned long long number); -extern char * litelib_initialize_existing (const char* server); +extern char * litelib_initialize_existing (bool dangerous,const char* server); extern char * litelib_execute (const char* s, const char* args); extern void litelib_rust_free_string (char* s); extern char * blake3_PW (char* pw); diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 3314c90..7bd193f 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -57,7 +57,7 @@ return e_str.into_raw(); /// Create a new wallet and return the seed for the newly created wallet. #[no_mangle] -pub extern fn litelib_initialize_new(server: *const c_char) -> *mut c_char { +pub extern fn litelib_initialize_new(dangerous: bool,server: *const c_char) -> *mut c_char { let server_str = unsafe { assert!(!server.is_null()); @@ -65,7 +65,7 @@ pub extern fn litelib_initialize_new(server: *const c_char) -> *mut c_char { }; let server = LightClientConfig::get_server_or_default(Some(server_str)); - let (config, latest_block_height) = match LightClientConfig::create(server) { + let (config, latest_block_height) = match LightClientConfig::create(server, dangerous) { Ok((c, h)) => (c, h), Err(e) => { let e_str = CString::new(format!("Error: {}", e)).unwrap(); @@ -101,7 +101,7 @@ pub extern fn litelib_initialize_new(server: *const c_char) -> *mut c_char { /// Restore a wallet from the seed phrase #[no_mangle] -pub extern fn litelib_initialize_new_from_phrase(server: *const c_char, +pub extern fn litelib_initialize_new_from_phrase(dangerous: bool,server: *const c_char, seed: *const c_char, birthday: u64, number: u64, overwrite: bool) -> *mut c_char { let server_str = unsafe { assert!(!server.is_null()); @@ -116,7 +116,7 @@ pub extern fn litelib_initialize_new_from_phrase(server: *const c_char, }; let server = LightClientConfig::get_server_or_default(Some(server_str)); - let (config, _latest_block_height) = match LightClientConfig::create(server) { + let (config, _latest_block_height) = match LightClientConfig::create(server,dangerous) { Ok((c, h)) => (c, h), Err(e) => { let e_str = CString::new(format!("Error: {}", e)).unwrap(); @@ -143,7 +143,7 @@ pub extern fn litelib_initialize_new_from_phrase(server: *const c_char, // Initialize a new lightclient and store its value #[no_mangle] -pub extern fn litelib_initialize_existing(server: *const c_char) -> *mut c_char { +pub extern fn litelib_initialize_existing(dangerous: bool, server: *const c_char) -> *mut c_char { let server_str = unsafe { assert!(!server.is_null()); @@ -151,7 +151,7 @@ pub extern fn litelib_initialize_existing(server: *const c_char) -> *mut c_char }; let server = LightClientConfig::get_server_or_default(Some(server_str)); - let (config, _latest_block_height) = match LightClientConfig::create(server) { + let (config, _latest_block_height) = match LightClientConfig::create(server,dangerous) { Ok((c, h)) => (c, h), Err(e) => { let e_str = CString::new(format!("Error: {}", e)).unwrap(); diff --git a/src/connection.cpp b/src/connection.cpp index 163be4b..def0751 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -69,6 +69,7 @@ void ConnectionLoader::doAutoConnect() { qDebug() << "Doing autoconnect"; auto config = std::shared_ptr(new ConnectionConfig()); + config->dangerous = false; config->server = Settings::getInstance()->getSettings().server; // Initialize the library @@ -79,6 +80,7 @@ void ConnectionLoader::doAutoConnect() { main->logger->write(QObject::tr("Using existing wallet.")); char* resp = litelib_initialize_existing( + config->dangerous, config->server.toStdString().c_str() ); QString response = litelib_process_response(resp); @@ -93,7 +95,7 @@ void ConnectionLoader::doAutoConnect() else { main->logger->write(QObject::tr("Create/restore wallet.")); - createOrRestore(config->server); + createOrRestore(config->dangerous, config->server); d->show(); } @@ -160,12 +162,12 @@ void ConnectionLoader::doAutoConnect() }); } -void ConnectionLoader::createOrRestore(QString server) +void ConnectionLoader::createOrRestore(bool dangerous, QString server) { // Close the startup dialog, since we'll be showing the wizard d->hide(); // Create a wizard - FirstTimeWizard wizard(server); + FirstTimeWizard wizard(dangerous,server); main->logger->write("Start new Wallet with FirstimeWizard"); wizard.exec(); } diff --git a/src/connection.h b/src/connection.h index 715fd1d..32eb230 100644 --- a/src/connection.h +++ b/src/connection.h @@ -11,6 +11,7 @@ class Controller; struct ConnectionConfig { QString server; + bool dangerous; QString proxy; }; @@ -32,7 +33,7 @@ private: void doAutoConnect(); - void createOrRestore(QString server); + void createOrRestore(bool dangerous, QString server); void showError(QString explanation); void showInformation(QString info, QString detail = ""); diff --git a/src/firsttimewizard.cpp b/src/firsttimewizard.cpp index 47941ea..c08b8a0 100644 --- a/src/firsttimewizard.cpp +++ b/src/firsttimewizard.cpp @@ -9,9 +9,10 @@ #include "../lib/silentdragonlitelib.h" -FirstTimeWizard::FirstTimeWizard(QString server) +FirstTimeWizard::FirstTimeWizard(bool dangerous, QString server) { setWindowTitle("New wallet wizard"); + this->dangerous = dangerous; this->server = server; ////backup addresslabels.dat if there is one, to restore it later @@ -193,7 +194,7 @@ NewSeedPage::NewSeedPage(FirstTimeWizard *parent) : QWizardPage(parent) { void NewSeedPage::initializePage() { // Call the library to create a new wallet. - char* resp = litelib_initialize_new(parent->server.toStdString().c_str()); + char* resp = litelib_initialize_new(parent->dangerous,parent->server.toStdString().c_str()); QString reply = litelib_process_response(resp); auto parsed = json::parse(reply.toStdString().c_str(), nullptr, false); @@ -267,7 +268,7 @@ QString number_str = form.number->text(); qint64 number = number_str.toUInt(); // 3. Attempt to restore wallet with the seed phrase { - char* resp = litelib_initialize_new_from_phrase(parent->server.toStdString().c_str(), + char* resp = litelib_initialize_new_from_phrase(parent->dangerous, parent->server.toStdString().c_str(), seed.toStdString().c_str(), birthday, number); QString reply = litelib_process_response(resp); diff --git a/src/firsttimewizard.h b/src/firsttimewizard.h index 8b6de40..324f115 100644 --- a/src/firsttimewizard.h +++ b/src/firsttimewizard.h @@ -16,7 +16,7 @@ class FirstTimeWizard: public QWizard public: - FirstTimeWizard(QString server); + FirstTimeWizard(bool dangerous, QString server); protected: @@ -29,6 +29,7 @@ private: Page_Restore }; + bool dangerous; QString server; friend class NewOrRestorePage; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 64a3148..0ba9943 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -166,7 +166,7 @@ MainWindow::MainWindow(QWidget *parent) : // Rescan QObject::connect(ui->actionRescan, &QAction::triggered, [=]() { - QFile file(dirwalletenc); + /* QFile file(dirwalletenc); QFile file1(dirwallet); if(fileExists(dirwalletenc)) @@ -174,7 +174,7 @@ MainWindow::MainWindow(QWidget *parent) : { file.remove(); file1.remove(); - } + }*/ Ui_Restore restoreSeed; @@ -234,7 +234,7 @@ MainWindow::MainWindow(QWidget *parent) : config->server = Settings::getInstance()->getSettings().server; // 3. Attempt to restore wallet with the seed phrase { - char* resp = litelib_initialize_new_from_phrase(config->server.toStdString().c_str(), + char* resp = litelib_initialize_new_from_phrase(config->dangerous, config->server.toStdString().c_str(), seed.toStdString().c_str(), birthday, number); QString reply = litelib_process_response(resp);