diff --git a/Cargo.lock b/Cargo.lock index b5bd85d..c5ae0e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "ab_glyph" @@ -743,18 +743,17 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" -version = "0.6.20" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "itoa", "matchit", "memchr", @@ -763,25 +762,28 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper 0.1.2", - "tower", + "sync_wrapper 1.0.1", + "tower 0.5.1", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper 1.0.1", "tower-layer", "tower-service", ] @@ -2834,12 +2836,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "http-range-header" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" - [[package]] name = "httparse" version = "1.9.4" @@ -2895,6 +2891,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "httparse", + "httpdate", "itoa", "pin-project-lite", "smallvec", @@ -2912,24 +2909,25 @@ dependencies = [ "http 1.1.0", "hyper 1.4.1", "hyper-util", - "rustls 0.23.13", + "rustls", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.0", + "tokio-rustls", "tower-service", - "webpki-roots 0.26.5", + "webpki-roots", ] [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 0.14.30", + "hyper 1.4.1", + "hyper-util", "pin-project-lite", "tokio", - "tokio-io-timeout", + "tower-service", ] [[package]] @@ -2950,9 +2948,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.8" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -2963,7 +2961,6 @@ dependencies = [ "pin-project-lite", "socket2 0.5.7", "tokio", - "tower", "tower-service", "tracing", ] @@ -3293,8 +3290,8 @@ dependencies = [ [[package]] name = "kaspa-addresses" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "borsh", "js-sys", @@ -3308,8 +3305,8 @@ dependencies = [ [[package]] name = "kaspa-addressmanager" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "borsh", "igd-next", @@ -3330,16 +3327,16 @@ dependencies = [ [[package]] name = "kaspa-alloc" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "mimalloc", ] [[package]] name = "kaspa-bip32" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "borsh", "bs58", @@ -3365,8 +3362,8 @@ dependencies = [ [[package]] name = "kaspa-cli" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-trait", "borsh", @@ -3413,8 +3410,8 @@ dependencies = [ [[package]] name = "kaspa-connectionmanager" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "duration-string", "futures-util", @@ -3431,8 +3428,8 @@ dependencies = [ [[package]] name = "kaspa-consensus" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "arc-swap", "async-channel 2.3.1", @@ -3471,8 +3468,8 @@ dependencies = [ [[package]] name = "kaspa-consensus-client" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "ahash", "cfg-if 1.0.0", @@ -3500,9 +3497,10 @@ dependencies = [ [[package]] name = "kaspa-consensus-core" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ + "arc-swap", "async-trait", "borsh", "cfg-if 1.0.0", @@ -3535,8 +3533,8 @@ dependencies = [ [[package]] name = "kaspa-consensus-notify" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-channel 2.3.1", "cfg-if 1.0.0", @@ -3555,8 +3553,8 @@ dependencies = [ [[package]] name = "kaspa-consensus-wasm" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "cfg-if 1.0.0", "faster-hex", @@ -3580,8 +3578,8 @@ dependencies = [ [[package]] name = "kaspa-consensusmanager" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "duration-string", "futures", @@ -3599,8 +3597,8 @@ dependencies = [ [[package]] name = "kaspa-core" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "cfg-if 1.0.0", "ctrlc", @@ -3618,8 +3616,8 @@ dependencies = [ [[package]] name = "kaspa-daemon" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-trait", "borsh", @@ -3641,8 +3639,8 @@ dependencies = [ [[package]] name = "kaspa-database" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "bincode", "enum-primitive-derive", @@ -3664,8 +3662,8 @@ dependencies = [ [[package]] name = "kaspa-grpc-client" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-channel 2.3.1", "async-stream", @@ -3687,7 +3685,7 @@ dependencies = [ "prost", "rand", "regex", - "rustls 0.23.13", + "rustls", "thiserror", "tokio", "tokio-stream", @@ -3697,8 +3695,8 @@ dependencies = [ [[package]] name = "kaspa-grpc-core" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-channel 2.3.1", "async-stream", @@ -3727,8 +3725,8 @@ dependencies = [ [[package]] name = "kaspa-grpc-server" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-channel 2.3.1", "async-stream", @@ -3752,7 +3750,7 @@ dependencies = [ "paste", "prost", "rand", - "rustls 0.23.13", + "rustls", "thiserror", "tokio", "tokio-stream", @@ -3763,8 +3761,8 @@ dependencies = [ [[package]] name = "kaspa-hashes" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "blake2b_simd", "borsh", @@ -3782,8 +3780,8 @@ dependencies = [ [[package]] name = "kaspa-index-core" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-channel 2.3.1", "async-trait", @@ -3802,8 +3800,8 @@ dependencies = [ [[package]] name = "kaspa-index-processor" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-channel 2.3.1", "async-trait", @@ -3828,8 +3826,8 @@ dependencies = [ [[package]] name = "kaspa-math" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "borsh", "faster-hex", @@ -3848,16 +3846,16 @@ dependencies = [ [[package]] name = "kaspa-merkle" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "kaspa-hashes", ] [[package]] name = "kaspa-metrics-core" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-trait", "borsh", @@ -3873,8 +3871,8 @@ dependencies = [ [[package]] name = "kaspa-mining" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "futures-util", "itertools 0.13.0", @@ -3899,8 +3897,8 @@ dependencies = [ [[package]] name = "kaspa-mining-errors" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "kaspa-consensus-core", "thiserror", @@ -3908,8 +3906,8 @@ dependencies = [ [[package]] name = "kaspa-muhash" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "kaspa-hashes", "kaspa-math", @@ -4049,8 +4047,8 @@ dependencies = [ [[package]] name = "kaspa-notify" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-channel 2.3.1", "async-trait", @@ -4081,8 +4079,8 @@ dependencies = [ [[package]] name = "kaspa-p2p-flows" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-trait", "chrono", @@ -4113,8 +4111,8 @@ dependencies = [ [[package]] name = "kaspa-p2p-lib" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "borsh", "ctrlc", @@ -4144,8 +4142,8 @@ dependencies = [ [[package]] name = "kaspa-perf-monitor" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "kaspa-core", "log", @@ -4157,8 +4155,8 @@ dependencies = [ [[package]] name = "kaspa-pow" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "js-sys", "kaspa-consensus-client", @@ -4173,8 +4171,8 @@ dependencies = [ [[package]] name = "kaspa-rpc-core" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-channel 2.3.1", "async-trait", @@ -4215,8 +4213,8 @@ dependencies = [ [[package]] name = "kaspa-rpc-macros" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "convert_case 0.6.0", "proc-macro-error", @@ -4228,8 +4226,8 @@ dependencies = [ [[package]] name = "kaspa-rpc-service" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-trait", "kaspa-addresses", @@ -4258,8 +4256,8 @@ dependencies = [ [[package]] name = "kaspa-txscript" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "blake2b_simd", "borsh", @@ -4289,8 +4287,8 @@ dependencies = [ [[package]] name = "kaspa-txscript-errors" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "secp256k1", "thiserror", @@ -4298,8 +4296,8 @@ dependencies = [ [[package]] name = "kaspa-utils" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "arc-swap", "async-channel 2.3.1", @@ -4328,23 +4326,25 @@ dependencies = [ [[package]] name = "kaspa-utils-tower" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ + "bytes", "cfg-if 1.0.0", "futures", - "hyper 0.14.30", + "http-body 1.0.1", + "http-body-util", "log", "pin-project-lite", "tokio", - "tower", + "tower 0.5.1", "tower-http", ] [[package]] name = "kaspa-utxoindex" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "futures", "kaspa-consensus-core", @@ -4363,8 +4363,8 @@ dependencies = [ [[package]] name = "kaspa-wallet-core" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "aes", "ahash", @@ -4442,8 +4442,8 @@ dependencies = [ [[package]] name = "kaspa-wallet-keys" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-trait", "borsh", @@ -4475,8 +4475,8 @@ dependencies = [ [[package]] name = "kaspa-wallet-macros" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "convert_case 0.5.0", "proc-macro-error", @@ -4489,8 +4489,8 @@ dependencies = [ [[package]] name = "kaspa-wallet-pskt" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "bincode", "derive_builder", @@ -4517,8 +4517,8 @@ dependencies = [ [[package]] name = "kaspa-wasm-core" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "faster-hex", "hexplay", @@ -4529,8 +4529,8 @@ dependencies = [ [[package]] name = "kaspa-wrpc-client" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-std", "async-trait", @@ -4547,7 +4547,7 @@ dependencies = [ "paste", "rand", "regex", - "rustls 0.23.13", + "rustls", "serde", "serde-wasm-bindgen", "serde_json", @@ -4566,8 +4566,8 @@ dependencies = [ [[package]] name = "kaspa-wrpc-server" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-trait", "borsh", @@ -4583,7 +4583,7 @@ dependencies = [ "log", "num_cpus", "paste", - "rustls 0.23.13", + "rustls", "serde", "thiserror", "tokio", @@ -4595,8 +4595,8 @@ dependencies = [ [[package]] name = "kaspa-wrpc-wasm" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "ahash", "async-std", @@ -4626,14 +4626,15 @@ dependencies = [ [[package]] name = "kaspad" -version = "0.15.1" -source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=gamma#29e32c91c5bf50d40ad1c3e77dd0a79c897a189f" +version = "0.15.4" +source = "git+https://github.com/aspectron/rusty-kaspa.git?branch=sigma#e0dc85f5e3c28909591fbaacd4dfced489438bb2" dependencies = [ "async-channel 2.3.1", "cfg-if 1.0.0", "clap 4.5.17", "dirs", "futures-util", + "itertools 0.13.0", "kaspa-addresses", "kaspa-addressmanager", "kaspa-alloc", @@ -4661,6 +4662,7 @@ dependencies = [ "num_cpus", "rand", "rayon", + "rocksdb", "serde", "serde_with", "tempfile", @@ -6081,9 +6083,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.6" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ "bytes", "prost-derive", @@ -6091,13 +6093,13 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.12.6" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" +checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" dependencies = [ "bytes", "heck", - "itertools 0.12.1", + "itertools 0.13.0", "log", "multimap", "once_cell", @@ -6112,12 +6114,12 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.6" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", - "itertools 0.12.1", + "itertools 0.13.0", "proc-macro2", "quote", "syn 2.0.77", @@ -6125,9 +6127,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.12.6" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" dependencies = [ "prost", ] @@ -6162,7 +6164,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.0.0", - "rustls 0.23.13", + "rustls", "socket2 0.5.7", "thiserror", "tokio", @@ -6179,7 +6181,7 @@ dependencies = [ "rand", "ring", "rustc-hash 2.0.0", - "rustls 0.23.13", + "rustls", "slab", "thiserror", "tinyvec", @@ -6402,8 +6404,8 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.13", - "rustls-pemfile 2.1.3", + "rustls", + "rustls-pemfile", "rustls-pki-types", "serde", "serde_json", @@ -6412,13 +6414,13 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls 0.26.0", + "tokio-rustls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.26.5", + "webpki-roots", "windows-registry", ] @@ -6589,41 +6591,21 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.21.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.7", - "sct", -] - [[package]] name = "rustls" version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" dependencies = [ + "log", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki", "subtle", "zeroize", ] -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - [[package]] name = "rustls-pemfile" version = "2.1.3" @@ -6640,16 +6622,6 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "rustls-webpki" version = "0.102.8" @@ -6712,16 +6684,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "secp256k1" version = "0.29.1" @@ -7478,16 +7440,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.4.0" @@ -7509,23 +7461,13 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.12", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.13", + "rustls", "rustls-pki-types", "tokio", ] @@ -7549,12 +7491,12 @@ checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" dependencies = [ "futures-util", "log", - "rustls 0.23.13", + "rustls", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.0", + "tokio-rustls", "tungstenite", - "webpki-roots 0.26.5", + "webpki-roots", ] [[package]] @@ -7617,45 +7559,48 @@ dependencies = [ [[package]] name = "tonic" -version = "0.10.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.7", + "base64 0.22.1", "bytes", "flate2", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", "prost", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", + "rustls-pemfile", + "socket2 0.5.7", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", - "webpki-roots 0.25.4", + "webpki-roots", ] [[package]] name = "tonic-build" -version = "0.10.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" dependencies = [ "prettyplease", "proc-macro2", "prost-build", + "prost-types", "quote", "syn 2.0.77", ] @@ -7680,19 +7625,31 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-http" -version = "0.4.4" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" +checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ "bitflags 2.6.0", "bytes", - "futures-core", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "http-range-header", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "pin-project-lite", "tower-layer", "tower-service", @@ -7716,7 +7673,6 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -7773,7 +7729,7 @@ dependencies = [ "httparse", "log", "rand", - "rustls 0.23.13", + "rustls", "rustls-pki-types", "sha1", "thiserror", @@ -8291,12 +8247,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - [[package]] name = "webpki-roots" version = "0.26.5" diff --git a/Cargo.toml b/Cargo.toml index 1429cde..187138f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -126,23 +126,23 @@ egui-notify = { git = "https://github.com/aspectron/egui-notify", branch = "gam # kaspa-txscript = { path = "../rusty-kaspa/crypto/txscript" } # kaspad = { path = "../rusty-kaspa/kaspad" } -kaspa-addresses = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-alloc = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-bip32 = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-cli = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-consensus-core = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-core = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-metrics-core = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-notify = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-rpc-core = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-rpc-service = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-utils = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-wallet-core = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-wallet-keys = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-wrpc-client = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-wrpc-server = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspa-txscript = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } -kaspad = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "gamma" } +kaspa-addresses = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-alloc = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-bip32 = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-cli = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-consensus-core = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-core = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-metrics-core = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-notify = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-rpc-core = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-rpc-service = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-utils = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-wallet-core = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-wallet-keys = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-wrpc-client = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-wrpc-server = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspa-txscript = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } +kaspad = { git = "https://github.com/aspectron/rusty-kaspa.git", branch = "sigma" } # kaspa-addresses = { git = "https://github.com/kaspanet/rusty-kaspa.git", branch = "master" } # kaspa-alloc = { git = "https://github.com/kaspanet/rusty-kaspa.git", branch = "master" } diff --git a/core/resources/i18n/i18n.json b/core/resources/i18n/i18n.json index 0255108..c12af4f 100644 --- a/core/resources/i18n/i18n.json +++ b/core/resources/i18n/i18n.json @@ -3668,6 +3668,7 @@ "Activate custom daemon arguments": "Activate custom daemon arguments", "Active p2p Peers": "Active p2p Peers", "Add Account": "Add Account", + "Add a new account by importing a mnemonic": "Add a new account by importing a mnemonic", "Address copied to clipboard": "Address copied to clipboard", "Address derivation scan": "Address derivation scan", "Address:": "Address:", @@ -3723,8 +3724,10 @@ "Copied to clipboard": "Copied to clipboard", "Copy": "Copy", "Copy logs to clipboard": "Copy logs to clipboard", + "Create Account": "Create Account", "Create New Wallet": "Create New Wallet", "Create Wallet": "Create Wallet", + "Create an account by importing a private key.": "Create an account by importing a private key.", "Create new wallet": "Create new wallet", "Creating Account": "Creating Account", "Creating Wallet": "Creating Wallet", @@ -3749,6 +3752,7 @@ "Delete Data Folder": "Delete Data Folder", "Dependencies": "Dependencies", "Derivation Indexes": "Derivation Indexes", + "Derive a private key to create a new account.": "Derive a private key to create a new account.", "Details": "Details", "Developer Mode": "Developer Mode", "Developer Resources": "Developer Resources", @@ -3790,6 +3794,7 @@ "Enter your wallet secret": "Enter your wallet secret", "Enter {suffix} amount to send": "Enter {suffix} amount to send", "Error": "Error", + "Error creating a wallet": "Error creating a wallet", "Error importing a wallet": "Error importing a wallet", "Error processing mnemonic: {err}": "Error processing mnemonic: {err}", "Exit Full Screen": "Exit Full Screen", @@ -3818,6 +3823,7 @@ "IBD:": "IBD:", "If not specified, the account will be represented by the numeric id.": "If not specified, the account will be represented by the numeric id.", "If you are running locally, use: ": "If you are running locally, use: ", + "Import Account": "Import Account", "Import Existing Private Key": "Import Existing Private Key", "Import existing": "Import existing", "Import existing file": "Import existing file", @@ -3889,6 +3895,7 @@ "Network Peers": "Network Peers", "Network Pressure: ~{number}%": "Network Pressure: ~{number}%", "Never share your mnemonic with anyone!": "Never share your mnemonic with anyone!", + "No BIP-44 private keys found": "No BIP-44 private keys found", "No peers": "No peers", "No public node selected - please select a public node": "No public node selected - please select a public node", "No transactions": "No transactions", @@ -3918,6 +3925,7 @@ "Payment & Recovery Password": "Payment & Recovery Password", "Payment Request": "Payment Request", "Payment request to account: {account}": "Payment request to account: {account}", + "Payment secret is empty": "Payment secret is empty", "Peers": "Peers", "Pending: {amount}": "Pending: {amount}", "Performance": "Performance", @@ -3936,6 +3944,7 @@ "Please enter the wallet secret": "Please enter the wallet secret", "Please enter {suffix} amount to send": "Please enter {suffix} amount to send", "Please note, copying to clipboard carries a risk of exposing your mnemonic to malware.": "Please note, copying to clipboard carries a risk of exposing your mnemonic to malware.", + "Please provide BIP39 passphrase.": "Please provide BIP39 passphrase.", "Please select 'Apply' and restart the application.": "Please select 'Apply' and restart the application.", "Please select account to scan": "Please select account to scan", "Please select an account type": "Please select an account type", @@ -4130,6 +4139,7 @@ "gRPC Tx": "gRPC Tx", "gRPC Tx/s": "gRPC Tx/s", "of": "of", + "or by deriving an already imported BIP-44 private key.": "or by deriving an already imported BIP-44 private key.", "p2p RPC": "p2p RPC", "p2p Rx": "p2p Rx", "p2p Rx/s": "p2p Rx/s", diff --git a/core/src/core.rs b/core/src/core.rs index f83334f..8b21596 100644 --- a/core/src/core.rs +++ b/core/src/core.rs @@ -812,16 +812,16 @@ impl Core { match metrics { MetricsUpdate::WalletMetrics { mempool_size, - node_peers: peers, - network_tps: tps, + // node_peers: peers, + // network_tps: tps, } => { self.sender().try_send(Events::MempoolSize { mempool_size: mempool_size as usize, })?; - self.state.node_peers = Some(peers as usize); + // self.state.node_peers = None; self.state.node_mempool_size = Some(mempool_size as usize); - self.state.network_tps = Some(tps); + // self.state.network_tps = None; } } } @@ -1115,7 +1115,7 @@ impl Core { if let Some(account) = account_collection.get(&id.into()) { account.update_balance(balance)?; } else { - log_error!("unable to find account {}", id); + log_error!("unable to find account {} while updating balance.", id); } } else { log_error!( @@ -1298,6 +1298,15 @@ impl Core { }); if let Some(first) = accounts.first() { + self.load_account_transactions_with_range(first, 0..TRANSACTION_PAGE_SIZE) + .map_err(|err| { + log_error!( + "error loading transactions for account {}: {}", + first.id(), + err + ); + }) + .ok(); let device = self.device().clone(); let wallet = self.wallet(); self.get_mut::().select( diff --git a/core/src/egui/mnemonic.rs b/core/src/egui/mnemonic.rs index 618f6c4..6f24f2f 100644 --- a/core/src/egui/mnemonic.rs +++ b/core/src/egui/mnemonic.rs @@ -91,7 +91,7 @@ impl<'render> MnemonicPresenter<'render> { .show(ui, |ui| { let frame_width = ui.available_width(); let num_cols = (frame_width / width_per_col).max(1.0) as usize; - let num_rows = (words.len() + (num_cols - 1)) / num_cols; + let num_rows = words.len().div_ceil(num_cols); ui.set_max_height(num_rows as f32 * 32.); diff --git a/core/src/egui/panel.rs b/core/src/egui/panel.rs index 1f09d72..0e732ab 100644 --- a/core/src/egui/panel.rs +++ b/core/src/egui/panel.rs @@ -117,9 +117,10 @@ impl<'panel, Context> Panel<'panel, Context> { } pub fn render(self, ui: &mut Ui) { - let icon_size = theme_style().panel_icon_size(); + let theme_style = theme_style(); + let icon_size = theme_style.panel_icon_size(); let icon_padding = (icon_size.outer - icon_size.inner) / 2.0; - let panel_margin_size = theme_style().panel_margin_size(); + let panel_margin_size = theme_style.panel_margin_size(); let panel_width = ui.available_width(); let inner_panel_width = panel_width - panel_margin_size * 2.; @@ -190,7 +191,7 @@ impl<'panel, Context> Panel<'panel, Context> { }); } - let padding = ui.available_height() - theme_style().panel_footer_height; + let padding = ui.available_height() - theme_style.panel_footer_height; if padding > 0. { ui.add_space(padding); } diff --git a/core/src/egui/theme/color.rs b/core/src/egui/theme/color.rs index 30f5c2b..135718b 100644 --- a/core/src/egui/theme/color.rs +++ b/core/src/egui/theme/color.rs @@ -220,17 +220,20 @@ impl ThemeColor { } } -static mut THEME_COLOR_LIST: Option> = None; -pub fn theme_colors() -> &'static HashMap { - unsafe { - THEME_COLOR_LIST.get_or_insert_with(|| { +static THEME_COLOR_LIST: Mutex>>> = Mutex::new(None); + +#[inline(always)] +pub fn theme_colors() -> Arc> { + let mut colors_lock = THEME_COLOR_LIST.lock().unwrap(); + colors_lock + .get_or_insert_with(|| { let mut themes = HashMap::new(); [ThemeColor::dark(), ThemeColor::light()] .into_iter() .for_each(|theme| { themes.insert(theme.name.clone(), theme.clone()); }); - themes + Arc::new(themes) }) - } + .clone() } diff --git a/core/src/egui/theme/mod.rs b/core/src/egui/theme/mod.rs index b41340b..c4668bf 100644 --- a/core/src/egui/theme/mod.rs +++ b/core/src/egui/theme/mod.rs @@ -3,18 +3,17 @@ use kaspa_metrics_core::MetricGroup; mod color; pub use color::*; mod style; -pub use style::*; - use crate::imports::*; +pub use style::*; #[derive(Clone)] pub struct AppTheme { - pub color: ThemeColor, - pub style: ThemeStyle, + pub color: Arc, + pub style: Arc, } impl AppTheme { - pub fn new(color: ThemeColor, style: ThemeStyle) -> Self { + pub fn new(color: Arc, style: Arc) -> Self { Self { color, style } } @@ -32,8 +31,8 @@ impl AppTheme { impl Default for AppTheme { fn default() -> Self { Self { - color: ThemeColor::dark(), - style: ThemeStyle::rounded(), + color: Arc::new(ThemeColor::dark()), + style: Arc::new(ThemeStyle::rounded()), } } } @@ -68,20 +67,24 @@ impl AsRef for AppTheme { } } -static mut THEME: Option = None; +static THEME: Mutex>> = Mutex::new(None); + #[inline(always)] -pub fn theme() -> &'static AppTheme { - unsafe { THEME.get_or_insert_with(AppTheme::default) } +pub fn theme() -> Arc { + let mut theme_lock = THEME.lock().unwrap(); + theme_lock + .get_or_insert_with(|| Arc::new(AppTheme::default())) + .clone() } #[inline(always)] -pub fn theme_color() -> &'static ThemeColor { - &theme().color +pub fn theme_color() -> Arc { + Arc::clone(&theme().color) } #[inline(always)] -pub fn theme_style() -> &'static ThemeStyle { - &theme().style +pub fn theme_style() -> Arc { + Arc::clone(&theme().style) } pub fn apply_theme_by_name( @@ -107,7 +110,7 @@ pub fn apply_theme_by_name( ThemeStyle::default() }); - apply_theme(ctx, AppTheme::new(theme_color, theme_style)); + apply_theme(ctx, AppTheme::new(theme_color.into(), theme_style.into())); } pub fn apply_theme_color_by_name(ctx: &Context, theme_color_name: impl Into) { @@ -120,7 +123,10 @@ pub fn apply_theme_color_by_name(ctx: &Context, theme_color_name: impl Into) { @@ -133,13 +139,14 @@ pub fn apply_theme_style_by_name(ctx: &Context, theme_style_name: impl Into> = None; -pub fn theme_styles() -> &'static HashMap { - unsafe { - THEME_STYLE_LIST.get_or_insert_with(|| { +static THEME_STYLE_LIST: Mutex>>> = Mutex::new(None); + +#[inline(always)] +pub fn theme_styles() -> Arc> { + let mut theme_styles_lock = THEME_STYLE_LIST.lock().unwrap(); + theme_styles_lock + .get_or_insert_with(|| { let mut themes = HashMap::new(); [ThemeStyle::rounded(), ThemeStyle::sharp()] .into_iter() .for_each(|theme| { themes.insert(theme.name.clone(), theme.clone()); }); - themes + Arc::new(themes) }) - } + .clone() } diff --git a/core/src/menu.rs b/core/src/menu.rs index 31a3e26..9e5c1e1 100644 --- a/core/src/menu.rs +++ b/core/src/menu.rs @@ -531,7 +531,8 @@ impl<'core> Menu<'core> { ui.label(i18n("Theme Color")); ui.vertical(|ui| { ui.horizontal(|ui| { - let current_theme_color_name = theme_color().name(); + let theme_color = theme_color(); + let current_theme_color_name = theme_color.name(); ui.menu_button(format!("{} ⏷", current_theme_color_name), |ui| { theme_colors().keys().for_each(|name| { if name.as_str() != current_theme_color_name @@ -552,7 +553,8 @@ impl<'core> Menu<'core> { ui.label(i18n("Theme Style")); ui.horizontal(|ui| { - let current_theme_style_name = theme_style().name(); + let theme_style = theme_style(); + let current_theme_style_name = theme_style.name(); ui.menu_button(format!("{} ⏷", current_theme_style_name), |ui| { theme_styles().keys().for_each(|name| { if name.as_str() != current_theme_style_name diff --git a/core/src/modules/changelog.rs b/core/src/modules/changelog.rs index 1dbc198..b978be5 100644 --- a/core/src/modules/changelog.rs +++ b/core/src/modules/changelog.rs @@ -41,7 +41,7 @@ impl ModuleT for Changelog { .auto_shrink([false; 2]) .max_height(max_height) .show(ui, |ui| { - easy_mark(ui, self.changelog.as_str()); + easy_mark(ui, self.changelog); }); ui.vertical_centered(|ui|{ diff --git a/core/src/modules/overview.rs b/core/src/modules/overview.rs index f1ad6b9..c69266b 100644 --- a/core/src/modules/overview.rs +++ b/core/src/modules/overview.rs @@ -304,7 +304,7 @@ impl Overview { }); if let Some(release) = core.release.as_ref() { - let is_greater = is_version_greater(crate::app::VERSION.as_str(), release.version.as_str()).ok().unwrap_or(false); + let is_greater = is_version_greater(crate::app::VERSION, release.version.as_str()).ok().unwrap_or(false); if is_wasm() || !is_greater { CollapsingHeader::new(i18n("Redistributables")) .id_source("redistributables") diff --git a/core/src/modules/request.rs b/core/src/modules/request.rs index 50524b4..b871304 100644 --- a/core/src/modules/request.rs +++ b/core/src/modules/request.rs @@ -64,7 +64,7 @@ impl Request { Entry::Vacant(entry) => { let uri = format!("bytes://{hash}.svg"); // let bits = qrcode::types::Mode::Alphanumeric.data_bits_count(request_uri.len()); - let qr = render_qrcode_with_version(request_uri.as_str(), 192, 192, qrcode::Version::Normal(10)); + let qr = render_qrcode_with_version(request_uri, 192, 192, qrcode::Version::Normal(10)); entry.insert((uri, qr.as_bytes().to_vec().into())) }, }; diff --git a/core/src/modules/scanner.rs b/core/src/modules/scanner.rs index 6716861..2b901cb 100644 --- a/core/src/modules/scanner.rs +++ b/core/src/modules/scanner.rs @@ -284,6 +284,7 @@ impl ModuleT for Scanner { transfer_funds, None, &abortable, + true, Some(Arc::new(move |index,utxo_count, balance, txid|{ if let Some(_txid) = txid { // println!("txid: {}", txid); diff --git a/core/src/modules/settings/mod.rs b/core/src/modules/settings/mod.rs index 11d7883..9c9db9e 100644 --- a/core/src/modules/settings/mod.rs +++ b/core/src/modules/settings/mod.rs @@ -460,7 +460,8 @@ impl Settings { .show(ui, |ui| { ui.vertical(|ui| { ui.horizontal(|ui| { - let current_theme_color_name = theme_color().name(); + let theme_color = theme_color(); + let current_theme_color_name = theme_color.name(); ui.menu_button( format!("{} ⏷", current_theme_color_name), |ui| { @@ -492,7 +493,8 @@ impl Settings { .default_open(true) .show(ui, |ui| { ui.horizontal(|ui| { - let current_theme_style_name = theme_style().name(); + let theme_style = theme_style(); + let current_theme_style_name = theme_style.name(); ui.menu_button( format!("{} ⏷", current_theme_style_name), |ui| { diff --git a/core/src/modules/wallet_create.rs b/core/src/modules/wallet_create.rs index 08f7b7a..6a725db 100644 --- a/core/src/modules/wallet_create.rs +++ b/core/src/modules/wallet_create.rs @@ -69,6 +69,7 @@ struct Context { payment_secret_confirm: String, payment_secret_show : bool, payment_secret_score: Option, + payment_secret_submitted: bool, mnemonic_presenter_context : MnemonicPresenterContext, import_private_key : bool, import_private_key_file: bool, @@ -99,6 +100,7 @@ impl Zeroize for Context { self.decrypt_wallet_secret.zeroize(); self.import_legacy.zeroize(); self.import_advanced.zeroize(); + self.payment_secret_submitted = false; } } @@ -699,6 +701,7 @@ impl ModuleT for WalletCreate { State::PaymentSecret => { let mut proceed = self.context.import_legacy || (self.context.import_private_key && !self.context.import_with_bip39_passphrase); + let mut continue_or_skip = false; if !self.context.import_legacy { Panel::new(self) .with_caption(i18n("Payment & Recovery Password")) @@ -725,8 +728,8 @@ impl ModuleT for WalletCreate { let mut change = false; - if !this.context.import_with_bip39_passphrase { - ui.checkbox(&mut this.context.enable_payment_secret, i18n("Enable optional BIP39 passphrase")); + if !this.context.import_with_bip39_passphrase && ui.checkbox(&mut this.context.enable_payment_secret, i18n("Enable optional BIP39 passphrase")).changed() { + this.context.payment_secret_submitted = false; } if this.context.enable_payment_secret || this.context.import_with_bip39_passphrase { @@ -779,6 +782,7 @@ impl ModuleT for WalletCreate { ui.label(""); if change { + this.context.payment_secret_submitted = false; let payment_secret = this .context .payment_secret @@ -787,7 +791,7 @@ impl ModuleT for WalletCreate { .or(this.context .payment_secret_confirm .is_not_empty() - .then_some(this.context.wallet_secret_confirm.clone()) + .then_some(this.context.payment_secret_confirm.clone()) ); this.context.payment_secret_score = payment_secret.map(secret_score); } @@ -798,15 +802,15 @@ impl ModuleT for WalletCreate { if score < 80.0 { ui.label(""); ui.label(RichText::new(i18n("Passphrase is too weak")).color(warning_color())); - // if !core.settings.developer.password_restrictions_disabled() { - // // submit = false; - // ui.label(RichText::new(i18n("Please create a stronger passphrase")).color(egui::Color32::from_rgb(255, 120, 120))); - // } + if !core.settings.developer.password_restrictions_disabled() { + submit = false; + //ui.label(RichText::new(i18n("Please create a stronger passphrase")).color(egui::Color32::from_rgb(255, 120, 120))); + } } } ui.label(""); - if this.context.payment_secret_confirm.is_not_empty() && this.context.payment_secret != this.context.payment_secret_confirm { + if this.context.payment_secret.is_not_empty() && this.context.payment_secret != this.context.payment_secret_confirm { ui.label(" "); ui.label(RichText::new(i18n("Passphrases do not match")).color(egui::Color32::from_rgb(255, 120, 120))); ui.label(" "); @@ -816,28 +820,38 @@ impl ModuleT for WalletCreate { } if submit { - this.state = State::CreateWalletConfirm; - this.focus.clear(); + if this.context.payment_secret.is_empty() { + this.context.payment_secret_submitted = true; + } else if this.context.import_with_bip39_passphrase { + proceed = true; + } else { + this.state = State::CreateWalletConfirm; + this.focus.clear(); + } + } + if this.context.payment_secret_submitted { + ui.label(RichText::new(i18n("Please provide BIP39 passphrase.")).color(egui::Color32::from_rgb(255, 120, 120))); } } }) .with_footer(|this,ui| { - if this.context.enable_payment_secret { + if this.context.enable_payment_secret || this.context.import_with_bip39_passphrase { let is_weak = !core.settings.developer.password_restrictions_disabled() && this.context.payment_secret_score.unwrap_or_default() < 80.0; - let enabled = this.context.wallet_secret == this.context.wallet_secret_confirm && this.context.wallet_secret.is_not_empty(); + let enabled = this.context.payment_secret == this.context.payment_secret_confirm && this.context.payment_secret.is_not_empty(); if ui.large_button_enabled(enabled && !is_weak, i18n("Continue")).clicked() { - proceed = true; + continue_or_skip = true; } } else if ui.large_button_enabled(true, i18n("Skip")).clicked() { - proceed = true; + this.context.payment_secret.zeroize(); + continue_or_skip = true; } }) .render(ui); } - if proceed { + if proceed || continue_or_skip{ if self.context.import_private_key_file { self.state = State::ImportWallet; self.focus.clear(); @@ -1167,7 +1181,7 @@ impl ModuleT for WalletCreate { prv_key_data_id, args.account_name.is_not_empty().then_some(args.account_name.clone()), ); - account_descriptors.push(wallet.clone().accounts_create(wallet_secret.clone(), account_create_args).await?); + account_descriptors.push(wallet.clone().accounts_import(wallet_secret.clone(), account_create_args).await?); } }else{ for account_index in 0..number_of_accounts { @@ -1177,7 +1191,8 @@ impl ModuleT for WalletCreate { args.account_name.is_not_empty().then_some(args.account_name.clone()), Some(account_index as u64), ); - account_descriptors.push(wallet.clone().accounts_create(wallet_secret.clone(), account_create_args).await?); + // log_info!("account_create_args: {:?}", account_create_args); + account_descriptors.push(wallet.clone().accounts_import(wallet_secret.clone(), account_create_args).await?); } } diff --git a/core/src/primitives/account.rs b/core/src/primitives/account.rs index 5d85f42..65b9969 100644 --- a/core/src/primitives/account.rs +++ b/core/src/primitives/account.rs @@ -150,8 +150,6 @@ impl Account { } pub fn update(&self, descriptor: AccountDescriptor) { - println!("$$$$$ UPDATING ACCOUNT: {:?}", descriptor); - *self.inner.context.lock().unwrap() = AccountContext::new(&descriptor); *self.inner.descriptor.lock().unwrap() = descriptor; } diff --git a/core/src/tests/transactions.rs b/core/src/tests/transactions.rs index c0f9311..6cc08ee 100644 --- a/core/src/tests/transactions.rs +++ b/core/src/tests/transactions.rs @@ -1,6 +1,5 @@ use crate::imports::*; use kaspa_wallet_core::tx::mass::MassCalculator; -use kaspa_wallet_core::utxo::NetworkParams; #[test] fn test_generic_transaction_mass() { @@ -61,7 +60,7 @@ fn test_generic_transaction_mass() { ); for network in Network::iter() { - let calc = MassCalculator::new(&network.into(), NetworkParams::from(network.into())); + let calc = MassCalculator::new(&network.into()); let mass = calc.calc_compute_mass_for_unsigned_consensus_transaction(&tx, 1); println!("compute transaction mass for {} is {}", network, mass); } diff --git a/core/src/utils/secret.rs b/core/src/utils/secret.rs index ced9acb..b90cebe 100644 --- a/core/src/utils/secret.rs +++ b/core/src/utils/secret.rs @@ -8,23 +8,23 @@ pub fn secret_score(password: impl AsRef) -> f64 { pub fn secret_score_to_text(score: f64) -> String { if (0.0..=20.0).contains(&score) { - return String::from(i18n("Very dangerous (may be cracked within few seconds)")); + String::from(i18n("Very dangerous (may be cracked within few seconds)")) } else if score > 20.0 && score <= 40.0 { - return String::from(i18n("Dangerous")); + String::from(i18n("Dangerous")) } else if score > 40.0 && score <= 60.0 { - return String::from(i18n("Very weak")); + String::from(i18n("Very weak")) } else if score > 60.0 && score <= 80.0 { - return String::from(i18n("Weak")); + String::from(i18n("Weak")) } else if score > 80.0 && score <= 90.0 { - return String::from(i18n("Good")); + String::from(i18n("Good")) } else if score > 90.0 && score <= 95.0 { - return String::from(i18n("Strong")); + String::from(i18n("Strong")) } else if score > 95.0 && score <= 99.0 { - return String::from(i18n("Very strong")); + String::from(i18n("Very strong")) } else if score > 99.0 && score <= 100.0 { - return String::from(i18n("Invulnerable")); + String::from(i18n("Invulnerable")) } else { - return String::from("Value is outside the defined range"); + String::from("Value is outside the defined range") } }