diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 82f8d75..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,3911 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "getrandom", - "once_cell", - "serde", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstream" -version = "0.6.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" - -[[package]] -name = "anstyle-parse" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "anyhow" -version = "1.0.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37bf3594c4c988a53154954629820791dde498571819ae4ca50ca811e060cc95" - -[[package]] -name = "arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" -dependencies = [ - "derive_arbitrary", -] - -[[package]] -name = "arrayref" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "async-stream" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "async-trait" -version = "0.1.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "axum" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" -dependencies = [ - "async-trait", - "axum-core", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper 1.0.1", - "tower 0.5.1", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper 1.0.1", - "tower-layer", - "tower-service", -] - -[[package]] -name = "backon" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4fa97bb310c33c811334143cf64c5bb2b7b3c06e453db6b095d7061eff8f113" -dependencies = [ - "fastrand", - "gloo-timers", - "tokio", -] - -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets", -] - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - -[[package]] -name = "bincode" -version = "2.0.0-rc.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11ea1a0346b94ef188834a65c068a03aec181c94896d481d7a0a40d85b0ce95" -dependencies = [ - "bincode_derive", - "serde", -] - -[[package]] -name = "bincode_derive" -version = "2.0.0-rc.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e30759b3b99a1b802a7a3aa21c85c3ded5c28e1c83170d82d70f08bbf7f3e4c" -dependencies = [ - "virtue 0.0.13", -] - -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitcoin-io" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "340e09e8399c7bd8912f495af6aa58bea0c9214773417ffaa8f6460f93aaee56" - -[[package]] -name = "bitcoin_hashes" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" -dependencies = [ - "bitcoin-io", - "hex-conservative", -] - -[[package]] -name = "bitflags" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "blsful" -version = "3.0.0-pre6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9de4566ea9f21109f6b3f11551b591ff22683ff47c3a30d97e2feb23257427" -dependencies = [ - "anyhow", - "arrayref", - "blstrs_plus", - "hex", - "hkdf", - "merlin", - "pairing", - "rand", - "rand_chacha", - "rand_core", - "serde", - "serde_bare", - "sha2", - "sha3", - "subtle", - "thiserror", - "uint-zigzag", - "vsss-rs", - "zeroize", -] - -[[package]] -name = "blst" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62dc83a094a71d43eeadd254b1ec2d24cb6a0bb6cadce00df51f0db594711a32" -dependencies = [ - "cc", - "glob", - "threadpool", - "zeroize", -] - -[[package]] -name = "blstrs_plus" -version = "0.8.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a16dd4b0d6b4538e1fa0388843acb186363082713a8fc8416d802a04d013818" -dependencies = [ - "arrayref", - "blst", - "elliptic-curve", - "ff", - "group", - "pairing", - "rand_core", - "serde", - "subtle", - "zeroize", -] - -[[package]] -name = "borsh" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" -dependencies = [ - "borsh-derive", - "cfg_aliases", -] - -[[package]] -name = "borsh-derive" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" -dependencies = [ - "once_cell", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.79", - "syn_derive", -] - -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "bytecheck" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" -dependencies = [ - "bytecheck_derive", - "ptr_meta", - "simdutf8", -] - -[[package]] -name = "bytecheck_derive" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "bytecount" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" -dependencies = [ - "serde", -] - -[[package]] -name = "cc" -version = "1.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" -dependencies = [ - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "serde", - "wasm-bindgen", - "windows-targets", -] - -[[package]] -name = "ciborium" -version = "0.2.0" -source = "git+https://github.com/qrayven/ciborium?branch=feat-ser-null-as-undefined#5fbba76d132caf04cd1f271336d9daafdc747f10" -dependencies = [ - "ciborium-io", - "ciborium-ll", - "serde", -] - -[[package]] -name = "ciborium-io" -version = "0.2.0" -source = "git+https://github.com/qrayven/ciborium?branch=feat-ser-null-as-undefined#5fbba76d132caf04cd1f271336d9daafdc747f10" - -[[package]] -name = "ciborium-ll" -version = "0.2.0" -source = "git+https://github.com/qrayven/ciborium?branch=feat-ser-null-as-undefined#5fbba76d132caf04cd1f271336d9daafdc747f10" -dependencies = [ - "ciborium-io", - "half", -] - -[[package]] -name = "clap" -version = "4.5.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "clap_lex" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" - -[[package]] -name = "colorchoice" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "core2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" -dependencies = [ - "memchr", -] - -[[package]] -name = "cpufeatures" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array 0.14.7", - "rand_core", - "serdect", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array 0.14.7", - "typenum", -] - -[[package]] -name = "curve25519-dalek" -version = "4.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" -dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest", - "fiat-crypto", - "rustc_version", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "dapi-grpc" -version = "1.4.1" -source = "git+https://github.com/dashpay/platform?branch=fix/address-list-error#8c1501b7ad71e06d06aba3c9ed38372c02af492d" -dependencies = [ - "dapi-grpc-macros", - "futures-core", - "platform-version", - "prost", - "serde", - "serde_bytes", - "serde_json", - "tenderdash-proto", - "tonic", - "tonic-build", -] - -[[package]] -name = "dapi-grpc-macros" -version = "1.4.1" -source = "git+https://github.com/dashpay/platform?branch=fix/address-list-error#8c1501b7ad71e06d06aba3c9ed38372c02af492d" -dependencies = [ - "heck", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "darling" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.79", -] - -[[package]] -name = "darling_macro" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "dashcore" -version = "0.33.1" -source = "git+https://github.com/dashpay/rust-dashcore?tag=0.33.1#eb700aeff1610188414d0250254d0a6daaa4db46" -dependencies = [ - "anyhow", - "bech32", - "bitflags", - "blsful", - "dashcore-private 0.1.0 (git+https://github.com/dashpay/rust-dashcore?tag=0.33.1)", - "dashcore_hashes", - "ed25519-dalek", - "hex", - "hex_lit", - "lazy_static", - "rustversion", - "secp256k1", - "serde", - "serde_repr", - "strum", -] - -[[package]] -name = "dashcore-private" -version = "0.1.0" -source = "git+https://github.com/dashpay/rust-dashcore.git?tag=0.32.0#6a0ec164ca1bdcb8d19b29f40e946120e99473eb" - -[[package]] -name = "dashcore-private" -version = "0.1.0" -source = "git+https://github.com/dashpay/rust-dashcore?tag=0.33.1#eb700aeff1610188414d0250254d0a6daaa4db46" - -[[package]] -name = "dashcore-rpc" -version = "0.15.9" -source = "git+https://github.com/dashpay/rust-dashcore-rpc?tag=v0.15.9#dcfa6b34da596c52093ed6a1f26f15bcf2196c0d" -dependencies = [ - "dashcore-private 0.1.0 (git+https://github.com/dashpay/rust-dashcore.git?tag=0.32.0)", - "dashcore-rpc-json", - "env_logger 0.10.2", - "hex", - "jsonrpc", - "log", - "serde", - "serde_json", -] - -[[package]] -name = "dashcore-rpc-json" -version = "0.15.9" -source = "git+https://github.com/dashpay/rust-dashcore-rpc?tag=v0.15.9#dcfa6b34da596c52093ed6a1f26f15bcf2196c0d" -dependencies = [ - "bincode", - "dashcore", - "hex", - "serde", - "serde_json", - "serde_repr", - "serde_with", -] - -[[package]] -name = "dashcore_hashes" -version = "0.14.0" -source = "git+https://github.com/dashpay/rust-dashcore?tag=0.33.1#eb700aeff1610188414d0250254d0a6daaa4db46" -dependencies = [ - "dashcore-private 0.1.0 (git+https://github.com/dashpay/rust-dashcore?tag=0.33.1)", - "secp256k1", - "serde", -] - -[[package]] -name = "der" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", - "serde", -] - -[[package]] -name = "derive_arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "derive_more" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" -dependencies = [ - "derive_more-impl", -] - -[[package]] -name = "derive_more-impl" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", - "unicode-xid", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", - "subtle", -] - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "dpp" -version = "1.4.1" -source = "git+https://github.com/dashpay/platform?branch=fix/address-list-error#8c1501b7ad71e06d06aba3c9ed38372c02af492d" -dependencies = [ - "anyhow", - "async-trait", - "base64 0.22.1", - "bincode", - "bs58", - "byteorder", - "chrono", - "dashcore", - "derive_more", - "env_logger 0.11.5", - "getrandom", - "hex", - "indexmap 2.6.0", - "integer-encoding", - "itertools", - "json-schema-compatibility-validator", - "jsonschema", - "lazy_static", - "log", - "nohash-hasher", - "num_enum", - "once_cell", - "platform-serialization", - "platform-serialization-derive", - "platform-value", - "platform-version", - "platform-versioning", - "rand", - "regex", - "rust_decimal", - "rust_decimal_macros", - "serde", - "serde_json", - "serde_repr", - "sha2", - "strum", - "thiserror", -] - -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "pkcs8", - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand_core", - "serde", - "sha2", - "subtle", - "zeroize", -] - -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest", - "ff", - "generic-array 0.14.7", - "group", - "hkdf", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "tap", - "zeroize", -] - -[[package]] -name = "elliptic-curve-tools" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48843edfbd0a370b3dd14cdbb4e446e9a8855311e6b2b57bf9a1fd1367bc317" -dependencies = [ - "elliptic-curve", - "heapless", - "hex", - "multiexp", - "serde", - "zeroize", -] - -[[package]] -name = "env_filter" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "env_logger" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" -dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "env_logger" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "humantime", - "log", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "fancy-regex" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" -dependencies = [ - "bit-set", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "fastrand" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "bitvec", - "rand_core", - "subtle", -] - -[[package]] -name = "fiat-crypto" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" - -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - -[[package]] -name = "flate2" -version = "1.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "flex-error" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" -dependencies = [ - "paste", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foldhash" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fraction" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f158e3ff0a1b334408dc9fb811cd99b446986f4d8b741bb08f9df1604085ae7" -dependencies = [ - "lazy_static", - "num", -] - -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "generic-array" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96512db27971c2c3eece70a1e106fbe6c87760234e31e8f7e5634912fe52794a" -dependencies = [ - "serde", - "typenum", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "gloo-timers" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand", - "rand_core", - "rand_xorshift", - "subtle", -] - -[[package]] -name = "grovedb-version" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4be0c1a1ef97068fe93212e7b6f349e0b44a9fc90063c8c28e110cfb8c2fcb2" -dependencies = [ - "thiserror", - "versioned-feature-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "h2" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http", - "indexmap 2.6.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "half" -version = "1.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" - -[[package]] -name = "hash32" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" -dependencies = [ - "byteorder", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.8", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash 0.8.11", - "allocator-api2", -] - -[[package]] -name = "hashbrown" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash", -] - -[[package]] -name = "heapless" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" -dependencies = [ - "hash32", - "stable_deref_trait", -] - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hermit-abi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -dependencies = [ - "serde", -] - -[[package]] -name = "hex-conservative" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" -dependencies = [ - "arrayvec", -] - -[[package]] -name = "hex_lit" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" - -[[package]] -name = "hkdf" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" -dependencies = [ - "hmac", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "http-serde" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f056c8559e3757392c8d091e796416e4649d8e49e88b8d76df6c002f05027fd" -dependencies = [ - "http", - "serde", -] - -[[package]] -name = "httparse" -version = "1.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-timeout" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" -dependencies = [ - "hyper", - "hyper-util", - "pin-project-lite", - "tokio", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "indexmap" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" -dependencies = [ - "equivalent", - "hashbrown 0.15.0", - "serde", -] - -[[package]] -name = "integer-encoding" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d762194228a2f1c11063e46e32e5acb96e66e906382b9eb5441f2e0504bbd5a" - -[[package]] -name = "is-terminal" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" -dependencies = [ - "hermit-abi 0.4.0", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" - -[[package]] -name = "iso8601" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924e5d73ea28f59011fec52a0d12185d496a9b075d360657aed2a5707f701153" -dependencies = [ - "nom", -] - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "js-sys" -version = "0.3.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "json-patch" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec9ad60d674508f3ca8f380a928cfe7b096bc729c4e2dbfe3852bc45da3ab30b" -dependencies = [ - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "json-schema-compatibility-validator" -version = "1.4.1" -source = "git+https://github.com/dashpay/platform?branch=fix/address-list-error#8c1501b7ad71e06d06aba3c9ed38372c02af492d" -dependencies = [ - "json-patch", - "once_cell", - "serde_json", - "thiserror", -] - -[[package]] -name = "jsonrpc" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8128f36b47411cd3f044be8c1f5cc0c9e24d1d1bfdc45f0a57897b32513053f2" -dependencies = [ - "base64 0.13.1", - "serde", - "serde_json", -] - -[[package]] -name = "jsonschema" -version = "0.18.0" -source = "git+https://github.com/dashpay/jsonschema-rs?branch=configure_regexp#7b00a2442ce44772e278b468bc4c2adc5e252226" -dependencies = [ - "ahash 0.8.11", - "anyhow", - "base64 0.22.1", - "bytecount", - "fancy-regex", - "fraction", - "getrandom", - "iso8601", - "itoa", - "memchr", - "num-cmp", - "once_cell", - "parking_lot", - "percent-encoding", - "regex", - "serde", - "serde_json", - "time", - "url", - "uuid", -] - -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "libc" -version = "0.2.161" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "lockfree-object-pool" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "lru" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" -dependencies = [ - "hashbrown 0.15.0", -] - -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "merlin" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" -dependencies = [ - "byteorder", - "keccak", - "rand_core", - "zeroize", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "wasi", - "windows-sys 0.52.0", -] - -[[package]] -name = "multiexp" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a383da1ae933078ddb1e4141f1dd617b512b4183779d6977e6451b0e644806" -dependencies = [ - "ff", - "group", - "rustversion", - "std-shims", - "zeroize", -] - -[[package]] -name = "multimap" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" - -[[package]] -name = "nohash-hasher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", - "rand", - "serde", -] - -[[package]] -name = "num-cmp" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63335b2e2c34fae2fb0aa2cecfd9f0832a1e24b3b32ecec612c3426d46dc8aaa" - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", - "rand", - "serde", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", - "serde", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "object" -version = "0.36.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "pairing" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" -dependencies = [ - "group", -] - -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "petgraph" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" -dependencies = [ - "fixedbitset", - "indexmap 2.6.0", -] - -[[package]] -name = "pin-project" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "platform-cli" -version = "0.1.5" -dependencies = [ - "anyhow", - "base64 0.21.7", - "clap", - "dapi-grpc", - "dpp", - "getrandom", - "hex", - "http", - "log", - "rand", - "regex", - "rs-dapi-client", - "sha256", - "simple-signer", - "tokio", - "tonic", - "tonic-build", -] - -[[package]] -name = "platform-serialization" -version = "1.4.1" -source = "git+https://github.com/dashpay/platform?branch=fix/address-list-error#8c1501b7ad71e06d06aba3c9ed38372c02af492d" -dependencies = [ - "bincode", - "platform-version", -] - -[[package]] -name = "platform-serialization-derive" -version = "1.4.1" -source = "git+https://github.com/dashpay/platform?branch=fix/address-list-error#8c1501b7ad71e06d06aba3c9ed38372c02af492d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", - "virtue 0.0.17", -] - -[[package]] -name = "platform-value" -version = "1.4.1" -source = "git+https://github.com/dashpay/platform?branch=fix/address-list-error#8c1501b7ad71e06d06aba3c9ed38372c02af492d" -dependencies = [ - "base64 0.22.1", - "bincode", - "bs58", - "ciborium", - "hex", - "indexmap 2.6.0", - "lazy_static", - "platform-serialization", - "platform-version", - "rand", - "regex", - "serde", - "serde_json", - "thiserror", - "treediff", -] - -[[package]] -name = "platform-version" -version = "1.4.1" -source = "git+https://github.com/dashpay/platform?branch=fix/address-list-error#8c1501b7ad71e06d06aba3c9ed38372c02af492d" -dependencies = [ - "bincode", - "grovedb-version", - "once_cell", - "thiserror", - "versioned-feature-core 1.0.0 (git+https://github.com/dashpay/versioned-feature-core)", -] - -[[package]] -name = "platform-versioning" -version = "1.4.1" -source = "git+https://github.com/dashpay/platform?branch=fix/address-list-error#8c1501b7ad71e06d06aba3c9ed38372c02af492d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "prettyplease" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" -dependencies = [ - "proc-macro2", - "syn 2.0.79", -] - -[[package]] -name = "proc-macro-crate" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" -dependencies = [ - "toml_edit", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "prost" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-build" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" -dependencies = [ - "bytes", - "heck", - "itertools", - "log", - "multimap", - "once_cell", - "petgraph", - "prettyplease", - "prost", - "prost-types", - "regex", - "syn 2.0.79", - "tempfile", -] - -[[package]] -name = "prost-derive" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "prost-types" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" -dependencies = [ - "prost", -] - -[[package]] -name = "ptr_meta" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" -dependencies = [ - "ptr_meta_derive", -] - -[[package]] -name = "ptr_meta_derive" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "quote" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core", -] - -[[package]] -name = "redox_syscall" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rend" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" -dependencies = [ - "bytecheck", -] - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys 0.52.0", -] - -[[package]] -name = "rkyv" -version = "0.7.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" -dependencies = [ - "bitvec", - "bytecheck", - "bytes", - "hashbrown 0.12.3", - "ptr_meta", - "rend", - "rkyv_derive", - "seahash", - "tinyvec", - "uuid", -] - -[[package]] -name = "rkyv_derive" -version = "0.7.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "rs-dapi-client" -version = "1.4.1" -source = "git+https://github.com/dashpay/platform?branch=fix/address-list-error#8c1501b7ad71e06d06aba3c9ed38372c02af492d" -dependencies = [ - "backon", - "chrono", - "dapi-grpc", - "futures", - "hex", - "http-serde", - "lru", - "rand", - "serde", - "serde_json", - "sha2", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "rust_decimal" -version = "1.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" -dependencies = [ - "arrayvec", - "borsh", - "bytes", - "num-traits", - "rand", - "rkyv", - "serde", - "serde_json", -] - -[[package]] -name = "rust_decimal_macros" -version = "1.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da991f231869f34268415a49724c6578e740ad697ba0999199d6f22b3949332c" -dependencies = [ - "quote", - "rust_decimal", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.38.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.23.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" -dependencies = [ - "log", - "once_cell", - "ring", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-native-certs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" -dependencies = [ - "openssl-probe", - "rustls-pemfile", - "rustls-pki-types", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "rustls-pki-types" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" - -[[package]] -name = "rustls-webpki" -version = "0.102.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "seahash" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array 0.14.7", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "secp256k1" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" -dependencies = [ - "bitcoin_hashes", - "rand", - "secp256k1-sys", - "serde", -] - -[[package]] -name = "secp256k1-sys" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" -dependencies = [ - "cc", -] - -[[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" - -[[package]] -name = "serde" -version = "1.0.210" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_bare" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51c55386eed0f1ae957b091dc2ca8122f287b60c79c774cbe3d5f2b69fded660" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_bytes" -version = "0.11.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.210" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "serde_json" -version = "1.0.131" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67d42a0bd4ac281beff598909bb56a86acaf979b84483e1c79c10dcaf98f8cf3" -dependencies = [ - "indexmap 2.6.0", - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serde_repr" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "serde_with" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" -dependencies = [ - "base64 0.13.1", - "chrono", - "hex", - "indexmap 1.9.3", - "serde", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "serdect" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" -dependencies = [ - "base16ct", - "serde", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha256" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18278f6a914fa3070aa316493f7d2ddfb9ac86ebc06fa3b83bffda487e9065b0" -dependencies = [ - "async-trait", - "bytes", - "hex", - "sha2", - "tokio", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest", - "keccak", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "rand_core", -] - -[[package]] -name = "simd-adler32" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" - -[[package]] -name = "simdutf8" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" - -[[package]] -name = "simple-signer" -version = "1.4.1" -source = "git+https://github.com/dashpay/platform?branch=fix/address-list-error#8c1501b7ad71e06d06aba3c9ed38372c02af492d" -dependencies = [ - "base64 0.22.1", - "bincode", - "dashcore-rpc", - "dpp", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "std-shims" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e49360f31b0b75a6a82a5205c6103ea07a79a60808d44f5cc879d303337926" -dependencies = [ - "hashbrown 0.14.5", - "spin", -] - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "strum" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.79", -] - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "subtle-encoding" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" -dependencies = [ - "zeroize", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" -dependencies = [ - "cfg-if", - "fastrand", - "once_cell", - "rustix", - "windows-sys 0.59.0", -] - -[[package]] -name = "tenderdash-proto" -version = "1.2.1+1.3.0" -source = "git+https://github.com/dashpay/rs-tenderdash-abci?tag=v1.2.1+1.3.0#aad72f4d25816bdf0f584ee4ba3cd383addf8a33" -dependencies = [ - "bytes", - "chrono", - "derive_more", - "flex-error", - "num-derive", - "num-traits", - "prost", - "serde", - "subtle-encoding", - "tenderdash-proto-compiler", - "time", - "tonic", -] - -[[package]] -name = "tenderdash-proto-compiler" -version = "1.2.1+1.3.0" -source = "git+https://github.com/dashpay/rs-tenderdash-abci?tag=v1.2.1+1.3.0#aad72f4d25816bdf0f584ee4ba3cd383addf8a33" -dependencies = [ - "fs_extra", - "prost-build", - "regex", - "tempfile", - "tonic-build", - "ureq", - "walkdir", - "zip", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "thiserror-impl-no-std" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e6318948b519ba6dc2b442a6d0b904ebfb8d411a3ad3e07843615a72249758" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "thiserror-no-std" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ad459d94dd517257cc96add8a43190ee620011bb6e6cdc82dafd97dfafafea" -dependencies = [ - "thiserror-impl-no-std", -] - -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tinyvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "pin-project-lite", - "socket2", - "tokio-macros", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-macros" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" -dependencies = [ - "rustls", - "rustls-pki-types", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml_datetime" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" - -[[package]] -name = "toml_edit" -version = "0.22.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" -dependencies = [ - "indexmap 2.6.0", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tonic" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" -dependencies = [ - "async-stream", - "async-trait", - "axum", - "base64 0.22.1", - "bytes", - "h2", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-timeout", - "hyper-util", - "percent-encoding", - "pin-project", - "prost", - "rustls-native-certs", - "rustls-pemfile", - "socket2", - "tokio", - "tokio-rustls", - "tokio-stream", - "tower 0.4.13", - "tower-layer", - "tower-service", - "tracing", - "webpki-roots", -] - -[[package]] -name = "tonic-build" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" -dependencies = [ - "prettyplease", - "proc-macro2", - "prost-build", - "prost-types", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand", - "slab", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "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-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", -] - -[[package]] -name = "treediff" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2ce481b2b7c2534fe7b5242cccebf37f9084392665c6a3783c414a1bada5432" - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "uint-zigzag" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abbf77aed65cb885a8ba07138c365879be3d9a93dce82bf6cc50feca9138ec15" -dependencies = [ - "core2", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - -[[package]] -name = "unicode-ident" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" - -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "ureq" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a" -dependencies = [ - "base64 0.22.1", - "flate2", - "log", - "once_cell", - "rustls", - "rustls-pki-types", - "url", - "webpki-roots", -] - -[[package]] -name = "url" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "uuid" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "versioned-feature-core" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "898c0ad500fdb1914df465a2c729fce33646ef65dfbbbd16a6d8050e0d2404df" - -[[package]] -name = "versioned-feature-core" -version = "1.0.0" -source = "git+https://github.com/dashpay/versioned-feature-core#560157096c8405a46ce0f21a2e7e1bd11d6625b4" - -[[package]] -name = "virtue" -version = "0.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dcc60c0624df774c82a0ef104151231d37da4962957d691c011c852b2473314" - -[[package]] -name = "virtue" -version = "0.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7302ac74a033bf17b6e609ceec0f891ca9200d502d31f02dc7908d3d98767c9d" - -[[package]] -name = "vsss-rs" -version = "5.0.0-rc1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9860fb75908021ae4cc125917c9763134f7f236a716d181ed644627783230c5d" -dependencies = [ - "crypto-bigint", - "elliptic-curve", - "elliptic-curve-tools", - "generic-array 1.1.0", - "hex", - "num", - "rand_core", - "serde", - "sha3", - "subtle", - "thiserror-no-std", - "zeroize", -] - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" -dependencies = [ - "cfg-if", - "once_cell", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.79", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" - -[[package]] -name = "webpki-roots" -version = "0.26.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winnow" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" -dependencies = [ - "memchr", -] - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "zip" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" -dependencies = [ - "arbitrary", - "crc32fast", - "crossbeam-utils", - "displaydoc", - "flate2", - "indexmap 2.6.0", - "memchr", - "thiserror", - "zopfli", -] - -[[package]] -name = "zopfli" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" -dependencies = [ - "bumpalo", - "crc32fast", - "lockfree-object-pool", - "log", - "once_cell", - "simd-adler32", -] diff --git a/Cargo.toml b/Cargo.toml index 6655e6d..e45b8d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.5" edition = "2021" [dependencies] -dpp = { git = "https://github.com/dashpay/platform", branch = "fix/address-list-error" , features = ["state-transition-signing", "data-contract-value-conversion"]} +dpp = { git = "https://github.com/dashpay/platform", branch = "fix/address-list-error" , features = ["all_features"]} rs-dapi-client = { git = "https://github.com/dashpay/platform", branch = "fix/address-list-error" } dapi-grpc = { git = "https://github.com/dashpay/platform", branch = "fix/address-list-error" } simple-signer = { git = "https://github.com/dashpay/platform", branch = "fix/address-list-error" } @@ -20,4 +20,9 @@ rand = "0.8.5" getrandom = "0.2.15" anyhow = "1.0.89" log = "0.4.22" -regex = "1.11.0" \ No newline at end of file +regex = "1.11.0" +serde = { version = "1.0", features = ["derive"] } +serde_json = { version = "1.0" } +reqwest = { version = "0.12.9", features = ["json"] } +dashcore-rpc = { path = "../rust-dashcore-rpc/client" } +rust_decimal = "1.36.0" diff --git a/src/api/digitalcash.rs b/src/api/digitalcash.rs new file mode 100644 index 0000000..18b89f6 --- /dev/null +++ b/src/api/digitalcash.rs @@ -0,0 +1,122 @@ +use std::collections::HashMap; +use dpp::dashcore::{Address, InstantLock, Network, Txid}; +use http::StatusCode; +use serde::{Deserialize, Serialize}; +use serde_json::Value; +use crate::errors::Error; + +pub struct DigitalCashAPI { + url: String, +} + +#[derive(Serialize)] +pub struct JsonRPCHashMapArguments { + method: String, + params: Vec>> +} +#[derive(Serialize)] +pub struct JsonRPCArrayArguments { + method: String, + params: Vec> +} +#[derive(Serialize, Deserialize)] +pub struct UTXO { + pub address: String, + pub txid: String, + #[serde(rename(deserialize = "outputIndex"))] + pub output_index: u32, + pub script: String, + pub satoshis: u64, + pub height: u32 +} +#[derive(Serialize, Deserialize)] +pub struct GetTxChainLocksResult { + pub height: i32, + pub chainlock: bool, + pub mempool: bool, +} + +#[derive(Serialize, Deserialize)] +pub struct JsonResponse { + result: T, +} + +impl DigitalCashAPI { + pub fn new(network: Network) -> Self { + let url = match network { + Network::Dash => "https://rpc.digitalcash.dev", + Network::Testnet => "https://trpc.digitalcash.dev", + _ => panic!("Network {} is not supported by digitalcash.dev", network) + }; + + return DigitalCashAPI { url: String::from(url) }; + } + + pub async fn get_address_utxos(&self, address: Address) -> Result, Error> { + let mut params: HashMap> = HashMap::new(); + + params.insert(String::from("addresses"), vec![address.to_string()]); + + let p = JsonRPCHashMapArguments { + method: String::from("getaddressutxos"), + params: vec![params], + }; + + let res = reqwest::Client::new() + .post(&self.url) + .json(&p) + .send() + .await.unwrap(); + + let status_code = res.status(); + + match status_code.as_u16() { + 420 => { + panic!("Rate limit") + }, + 200 => { + let json = res + .json::>>() + .await.unwrap(); + + Ok(json.result) + }, + _ => { + panic!("Unknown status code") + } + } + } + + pub async fn get_tx_chain_locks(&self, txid: Txid) -> Result { + let params: Vec = vec![txid.to_hex()]; + + let p = JsonRPCArrayArguments { + method: String::from("gettxchainlocks"), + params: vec![params], + }; + + let res = reqwest::Client::new() + .post(&self.url) + .json(&p) + .send() + .await.unwrap(); + + let status_code = res.status(); + + match status_code.as_u16() { + 420 => { + panic!("Rate limit") + }, + 200 => { + let json = res + .json::>>() + .await.unwrap(); + + return Ok(json.result.into_iter().nth(0).unwrap()) + }, + _ => { + panic!("Unknown status code") + } + } + } +} \ No newline at end of file diff --git a/src/api/mod.rs b/src/api/mod.rs new file mode 100644 index 0000000..1241f13 --- /dev/null +++ b/src/api/mod.rs @@ -0,0 +1 @@ +pub mod digitalcash; diff --git a/src/commands/masternode_vote_dpns_name.rs b/src/commands/masternode_vote_dpns_name.rs index 5acaa2b..9e79101 100644 --- a/src/commands/masternode_vote_dpns_name.rs +++ b/src/commands/masternode_vote_dpns_name.rs @@ -103,7 +103,7 @@ impl MasternodeVoteDPNSNameCommand { debug!("Identity with identifier {} found in the network", identity.id()); let identity_public_keys = platform_grpc_client - .get_identity_keys(identity.id()).await; + .get_identity_keys(identity.id()).await?; debug!("Finding matching IdentityPublicKey in the Identity against applied private key"); @@ -122,7 +122,7 @@ impl MasternodeVoteDPNSNameCommand { identity_public_key.purpose(), identity_public_key.security_level()); - let nonce = platform_grpc_client.get_identity_nonce(identity.id()).await; + let nonce = platform_grpc_client.get_identity_nonce(identity.id()).await?; debug!("Identity nonce for identifier {} is {}", identity.id(), nonce.clone()); diff --git a/src/commands/mod.rs b/src/commands/mod.rs index c857268..ae70847 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -1,3 +1,4 @@ pub mod register_dpns_name; pub mod withdraw; pub mod masternode_vote_dpns_name; +pub mod register_identity; diff --git a/src/commands/register_dpns_name.rs b/src/commands/register_dpns_name.rs index ff05771..bc3636b 100644 --- a/src/commands/register_dpns_name.rs +++ b/src/commands/register_dpns_name.rs @@ -118,7 +118,7 @@ impl RegisterDPNSNameCommand { debug!("Identity with identifier {} found in the network", identity.id()); let identity_public_keys = platform_grpc_client - .get_identity_keys(identity.id()).await; + .get_identity_keys(identity.id()).await?; debug!("Finding matching IdentityPublicKey in the Identity against applied private key"); @@ -137,7 +137,7 @@ impl RegisterDPNSNameCommand { identity_public_key.purpose(), identity_public_key.security_level()); - let identity_contract_nonce = platform_grpc_client.get_identity_contract_nonce(identity.id(), dpns_contract.id()).await; + let identity_contract_nonce = platform_grpc_client.get_identity_contract_nonce(identity.id(), dpns_contract.id()).await.unwrap(); debug!("Identity contract nonce for identifier {} is {}", identity.id(), identity_contract_nonce.clone()); diff --git a/src/commands/register_identity.rs b/src/commands/register_identity.rs new file mode 100644 index 0000000..8b691f7 --- /dev/null +++ b/src/commands/register_identity.rs @@ -0,0 +1,251 @@ +use std::{fs, thread}; +use std::ops::{Add, Mul}; +use std::str::FromStr; +use std::time::Duration; +use clap::{Parser}; +use dashcore_rpc::{Auth, Client, json, RpcApi}; +use dpp::dashcore::hashes::Hash; +use dashcore::hash_types::Txid; +use dashcore_rpc::dashcore::address::AddressEncoding; +use dashcore_rpc::jsonrpc::Response; +use dpp::dashcore::{Address, Network, OutPoint, PrivateKey, ScriptBuf, Transaction, TxIn, TxOut}; +use dpp::dashcore::psbt::serialize::Serialize; +use dpp::dashcore::secp256k1::hashes::hex::DisplayHex; +use dpp::dashcore::secp256k1::{Message, Secp256k1}; +use dpp::dashcore::sighash::{LegacySighash, SighashCache}; +use dpp::dashcore::transaction::special_transaction::asset_lock::AssetLockPayload; +use dpp::dashcore::transaction::special_transaction::TransactionPayload; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::serialization::PlatformSerializable; +use crate::errors::cli_argument_missing_error::CommandLineArgumentMissingError; +use crate::errors::Error; +use crate::utils::{MyDefaultEntropyGenerator, Utils}; +use crate::api::digitalcash::DigitalCashAPI; +use dpp::dashcore; +use dpp::ed25519_dalek::ed25519::signature::SignerMut; +use dpp::identifier::Identifier; +use dpp::identity::{KeyType, Purpose, SecurityLevel}; +use dpp::identity::state_transition::asset_lock_proof::chain::ChainAssetLockProof; +use dpp::platform_value::BinaryData; +use dpp::platform_value::string_encoding::Encoding::Base58; +use dpp::prelude::{AssetLockProof, Identity, IdentityPublicKey}; +use dpp::state_transition::public_key_in_creation::accessors::IdentityPublicKeyInCreationV0Setters; +use dpp::state_transition::public_key_in_creation::IdentityPublicKeyInCreation; +use dpp::state_transition::public_key_in_creation::v0::IdentityPublicKeyInCreationV0; +use dpp::state_transition::StateTransition; +use log::debug; +use serde_json::{json, Value}; +use sha256::digest; +use crate::factories::Factories; +use crate::grpc::PlatformGRPCClient; +use crate::MockBLS; +use rust_decimal::prelude::*; +use tokio::task::id; + +/// Register an Identity Name in the Dash Platform DPNS system. +#[derive(Parser)] +pub struct RegisterIdentityCommand { + /// Network, mainnet or testnet + #[clap(long, default_value(""))] + network: String, + + /// DAPI GRPC Endpoint URL, ex. https://127.0.0.1:1443 + #[clap(long, default_value(""))] + dapi_url: String, + + /// Path to file with private key from Identity in WIF format + #[clap(long, default_value(""))] + private_key: String, + + /// Amount in DASH + #[clap(long, default_value(""))] + amount: String, + + /// Enable verbose logging for a debugging + #[clap(long)] + pub verbose: bool, +} + +// create assetlock ( +// create identitycreate transition + +impl RegisterIdentityCommand { + pub async fn run(&self) -> Result<(), Error> { + if self.network.is_empty() { + return Err(Error::CommandLineArgumentMissingError(CommandLineArgumentMissingError::from("network"))); + } + + if self.dapi_url.is_empty() { + return Err(Error::CommandLineArgumentMissingError(CommandLineArgumentMissingError::from("dapi_url"))); + } + + if self.private_key.is_empty() { + return Err(Error::CommandLineArgumentMissingError(CommandLineArgumentMissingError::from("private_key"))); + } + + let secp = Secp256k1::new(); + let network_type: Network = Network::from_str(&self.network).expect("Could not parse network"); + let private_key_data = fs::read_to_string(&self.private_key).expect("Unable to read private key file"); + + let funding_private_key = Utils::decode_private_key_from_input_string(private_key_data.as_str(), network_type)?; + let funding_public_key = funding_private_key.public_key(&secp); + let funding_address = Address::p2pkh(&funding_public_key, network_type); + + let duffs_amount: u64 = Decimal::from_str(&self.amount).unwrap().mul(Decimal::new(100000000, 0)).to_u64().unwrap(); + let core_tx_fee: u64 = 10000; + + let asset_lock_onetime_private_key_bytes: [u8; 32] = rand::random(); + let asset_lock_onetime_private_key = PrivateKey::from_slice(asset_lock_onetime_private_key_bytes.as_slice(), network_type).unwrap(); + let asset_lock_onetime_public_key = asset_lock_onetime_private_key.public_key(&secp); + + let platform_grpc_client = PlatformGRPCClient::new(&self.dapi_url); + let rpc = DigitalCashAPI::new(network_type); + let core_client = Client::new( + &"127.0.0.1:19998", + Auth::UserPass( + String::from("dashmate"), + String::from("nQf1xDUKsEkG"), + ), + ) + .ok().unwrap(); + + println!("Funding address {}", &funding_address.to_string()); + + let inputs: Vec<(TxIn, u64)> = Utils::wait_for_balance(&rpc, funding_address, duffs_amount).await?; + + let core_transaction = Factories::create_assetlock_transaction(inputs, + duffs_amount, + core_tx_fee, + funding_private_key, + asset_lock_onetime_public_key, + network_type); + + let vout = core_transaction.output.iter().position(|tx_out|{tx_out.script_pubkey.is_op_return()}).unwrap() as u32; + let txid = platform_grpc_client.broadcast_core_transaction(core_transaction.clone()).await; + + println!("Core Transaction AssetLock tx hash {}", txid.to_hex()); + + let asset_lock_proof = Utils::wait_for_asset_lock_proof(&rpc, &core_client, core_transaction, vout).await?; + let identity_id = asset_lock_proof.create_identifier().unwrap(); + + let auth_master_private_key_bytes: [u8; 32] = rand::random(); + let auth_master_private_key = PrivateKey::from_slice(auth_master_private_key_bytes.as_slice(), network_type).unwrap(); + let auth_master_public_key = auth_master_private_key.public_key(&secp); + + println!("Auth Master Private Key: {}", auth_master_private_key.to_string()); + + let mut auth_master_identity_public_key = IdentityPublicKeyInCreation::V0(IdentityPublicKeyInCreationV0 { + id: 0, + key_type: KeyType::ECDSA_SECP256K1, + purpose: Purpose::AUTHENTICATION, + security_level: SecurityLevel::MASTER, + contract_bounds: None, + read_only: false, + data: auth_master_public_key.to_bytes().into(), + signature: Default::default(), + }); + + + let auth_high_private_key_bytes: [u8; 32] = rand::random(); + let auth_high_private_key = PrivateKey::from_slice(auth_high_private_key_bytes.as_slice(), network_type).unwrap(); + let auth_high_public_key = auth_high_private_key.public_key(&secp); + + println!("Auth High Private Key: {}", auth_high_private_key.to_string()); + + let mut auth_high_identity_public_key = IdentityPublicKeyInCreation::V0(IdentityPublicKeyInCreationV0 { + id: 1, + key_type: KeyType::ECDSA_SECP256K1, + purpose: Purpose::AUTHENTICATION, + security_level: SecurityLevel::HIGH, + contract_bounds: None, + read_only: false, + data: auth_high_public_key.to_bytes().into(), + signature: Default::default(), + }); + + let auth_critical_private_key_bytes: [u8;32] = rand::random(); + let auth_critical_private_key = PrivateKey::from_slice(auth_critical_private_key_bytes.as_slice(), network_type).unwrap(); + let auth_critical_public_key = auth_critical_private_key.public_key(&secp); + + println!("Auth Critical Private Key: {}", auth_critical_private_key.to_string()); + + let mut auth_critical_identity_public_key = IdentityPublicKeyInCreation::V0(IdentityPublicKeyInCreationV0 { + id: 2, + key_type: KeyType::ECDSA_SECP256K1, + purpose: Purpose::AUTHENTICATION, + security_level: SecurityLevel::CRITICAL, + contract_bounds: None, + read_only: false, + data: auth_critical_public_key.to_bytes().into(), + signature: Default::default(), + }); + + let transfer_critical_private_key_bytes: [u8;32] = rand::random(); + let transfer_critical_private_key = PrivateKey::from_slice(transfer_critical_private_key_bytes.as_slice(), network_type).unwrap(); + let transfer_critical_public_key = transfer_critical_private_key.public_key(&secp); + + println!("Transfer Critical Private Key: {}", transfer_critical_private_key.to_string()); + + let mut transfer_critical_identity_public_key = IdentityPublicKeyInCreation::V0(IdentityPublicKeyInCreationV0 { + id: 3, + key_type: KeyType::ECDSA_SECP256K1, + purpose: Purpose::TRANSFER, + security_level: SecurityLevel::CRITICAL, + contract_bounds: None, + read_only: false, + data: transfer_critical_public_key.to_bytes().into(), + signature: Default::default(), + }); + + let mut identity_create_transition = Factories::create_identity_create_transition(identity_id, asset_lock_proof.clone(), vec![ + auth_master_identity_public_key.clone(), + auth_high_identity_public_key.clone(), + auth_critical_identity_public_key.clone(), + transfer_critical_identity_public_key.clone() + ]); + + let mut state_transition = StateTransition::from(identity_create_transition.clone()); + state_transition.sign_by_private_key(auth_master_private_key_bytes.as_slice(), KeyType::ECDSA_SECP256K1, &MockBLS {}).unwrap(); + let mut signature = state_transition.signature().clone(); + auth_master_identity_public_key.set_signature(signature); + state_transition.set_signature(Default::default()); + + state_transition = StateTransition::from(identity_create_transition.clone()); + state_transition.sign_by_private_key(auth_critical_private_key_bytes.as_slice(), KeyType::ECDSA_SECP256K1, &MockBLS {}).unwrap(); + signature = state_transition.signature().clone(); + auth_critical_identity_public_key.set_signature(signature); + state_transition.set_signature(Default::default()); + + state_transition = StateTransition::from(identity_create_transition.clone()); + state_transition.sign_by_private_key(auth_high_private_key_bytes.as_slice(), KeyType::ECDSA_SECP256K1, &MockBLS {}).unwrap(); + signature = state_transition.signature().clone(); + auth_high_identity_public_key.set_signature(signature); + state_transition.set_signature(Default::default()); + + state_transition = StateTransition::from(identity_create_transition.clone()); + state_transition.sign_by_private_key(transfer_critical_private_key_bytes.as_slice(), KeyType::ECDSA_SECP256K1, &MockBLS {}).unwrap(); + signature = state_transition.signature().clone(); + transfer_critical_identity_public_key.set_signature(signature); + state_transition.set_signature(Default::default()); + + identity_create_transition = Factories::create_identity_create_transition(identity_id, asset_lock_proof, vec![ + auth_master_identity_public_key.clone(), + auth_high_identity_public_key.clone(), + auth_critical_identity_public_key.clone(), + transfer_critical_identity_public_key.clone() + ]); + + state_transition = StateTransition::from(identity_create_transition.clone()); + + state_transition.sign_by_private_key(asset_lock_onetime_private_key.to_bytes().as_slice(), KeyType::ECDSA_SECP256K1, &MockBLS {}).unwrap(); + + let state_transition_buffer = state_transition.clone().serialize_to_bytes().unwrap(); + let state_transition_hash = digest(state_transition_buffer.clone()); + println!("Signed IdentityCreate Transaction Hash: {}", state_transition_hash); + println!("Signed IdentityCreate Transaction Hex: {}", state_transition_buffer.to_lower_hex_string()); + platform_grpc_client.broadcast_state_transition(state_transition).await; + println!(""); + Ok(()) + } +} + diff --git a/src/commands/withdraw.rs b/src/commands/withdraw.rs index 42e4419..bc46fe8 100644 --- a/src/commands/withdraw.rs +++ b/src/commands/withdraw.rs @@ -1,7 +1,7 @@ use std::fs; use std::str::FromStr; use clap::Parser; -use dpp::dashcore::{Network}; +use dpp::dashcore::{Address, Network}; use dpp::dashcore::hashes::Hash; use dpp::dashcore::secp256k1::hashes::hex::DisplayHex; use dpp::dashcore::secp256k1::Secp256k1; @@ -11,7 +11,7 @@ use dpp::identity::core_script::CoreScript; use dpp::identity::hash::IdentityPublicKeyHashMethodsV0; use dpp::identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0; use dpp::identity::IdentityPublicKey; -use dpp::platform_value::string_encoding::Encoding::{Base58}; +use dpp::platform_value::string_encoding::Encoding::{Base58, Hex}; use dpp::serialization::{PlatformSerializable}; use dpp::state_transition::identity_credit_withdrawal_transition::v1::IdentityCreditWithdrawalTransitionV1; use dpp::state_transition::StateTransition; @@ -103,7 +103,7 @@ impl WithdrawCommand { debug!("Identity with identifier {} found in the network", identity.id()); let identity_public_keys = platform_grpc_client - .get_identity_keys(identity.id()).await; + .get_identity_keys(identity.id()).await.unwrap(); debug!("Finding matching IdentityPublicKey in the Identity against applied private key"); @@ -122,18 +122,19 @@ impl WithdrawCommand { identity_public_key.purpose(), identity_public_key.security_level()); - let nonce = platform_grpc_client.get_identity_nonce(identity.id()).await; + let nonce = platform_grpc_client.get_identity_nonce(identity.id()).await?; debug!("Identity nonce for identifier {} is {}", identity.id(), nonce.clone()); - let output_script = CoreScript::new_p2pkh(public_key.pubkey_hash().into()); + let address: Address = Address::from_str(&self.withdrawal_address).unwrap() + .require_network(network_type).unwrap(); let identity_credit_withdrawal_transition = IdentityCreditWithdrawalTransitionV1 { identity_id: identifier, amount: self.amount, core_fee_per_byte: 1, pooling: Pooling::Never, - output_script: Some(output_script), + output_script: Some(CoreScript::from_bytes(address.script_pubkey().to_bytes())), nonce: &nonce + 1, user_fee_increase: 0, signature_public_key_id: 0, diff --git a/src/errors/mod.rs b/src/errors/mod.rs index 9ba2653..8c89705 100644 --- a/src/errors/mod.rs +++ b/src/errors/mod.rs @@ -11,7 +11,7 @@ pub mod dapi_response_error; pub mod identity_public_key_hash_mismatch_error; pub mod cli_argument_invalid_input; - +#[derive(Debug)] pub enum Error { CommandLineArgumentMissingError(CommandLineArgumentMissingError), CommandLineArgumentInvalidInput(CommandLineArgumentInvalidInput), diff --git a/src/factories/create_core_transaction.rs b/src/factories/create_core_transaction.rs new file mode 100644 index 0000000..5e0846e --- /dev/null +++ b/src/factories/create_core_transaction.rs @@ -0,0 +1,102 @@ +use dashcore_rpc::dashcore::key::Secp256k1; +use dashcore_rpc::dashcore::psbt::serialize::Serialize; +use dashcore_rpc::dashcore::secp256k1::hashes::hex::DisplayHex; +use dashcore_rpc::dashcore::secp256k1::Message; +use dashcore_rpc::dashcore::sighash::{LegacySighash, SighashCache}; +use dashcore_rpc::dashcore::{Address, PrivateKey, PublicKey, ScriptBuf, Transaction, TxOut}; +use dashcore_rpc::dashcore::transaction::special_transaction::asset_lock::AssetLockPayload; +use dashcore_rpc::dashcore::transaction::special_transaction::TransactionPayload; +use dpp::dashcore::{Network, TxIn}; +use crate::factories::Factories; +use crate::utils::Utils; + +impl Factories { + pub fn create_assetlock_transaction(inputs: Vec<(TxIn, u64)>, + funding_amount: u64, + fee: u64, + private_key: PrivateKey, + asset_lock_public_key: PublicKey, + network_type: Network) -> Transaction { + let secp = Secp256k1::new(); + enum OpCode { + Return, + Dup, + Hash160, + EqualVerify, + CheckSig, + } + + let (assetlock_amount, change_amount) = Utils::coin_select(inputs.clone(), funding_amount, 10000); + + let assetlock_output = TxOut { + value: assetlock_amount, + script_pubkey: ScriptBuf::from(vec![ + 0x6a, + 0x00, + ]), + }; + + let change_output = TxOut { + value: change_amount, + script_pubkey: ScriptBuf::new_p2pkh(&private_key.public_key(&secp).pubkey_hash()) + }; + + let credit_output = TxOut { value: assetlock_amount, script_pubkey: Address::p2pkh(&asset_lock_public_key, network_type).script_pubkey() }; + + let mut transaction = Transaction { + version: 3, + lock_time: 0, + input: inputs.iter().map(|(input, _)| { input.clone() }).collect::>(), + output: vec![assetlock_output, change_output], + special_transaction_payload: Some(TransactionPayload::AssetLockPayloadType(AssetLockPayload { + version: 1, + credit_outputs: vec![credit_output], + })), + }; + + println!("{}", transaction.serialize().to_lower_hex_string()); + let cache = SighashCache::new(&transaction); + + let sighashes: Vec = transaction + .input + .iter() + .enumerate() + .map(|(i, input)| { + cache + .legacy_signature_hash(i, &input.script_sig, 1u32) + .expect("expected sighash") + }) + .collect(); + + transaction.input + .iter_mut() + .zip(sighashes.into_iter()) + .try_for_each(|(input, sighash)| { + let message = Message::from_digest(sighash.into()); + + // Sign the message with the private key + let sig = secp.sign_ecdsa(&message, &private_key.inner); + + // Serialize the DER-encoded signature and append the sighash type + let mut serialized_sig = sig.serialize_der().to_vec(); + + let mut sig_script = vec![serialized_sig.len() as u8 + 1]; + + sig_script.append(&mut serialized_sig); + + sig_script.push(1); + + let mut serialized_pub_key = private_key.public_key(&secp).serialize(); + + sig_script.push(serialized_pub_key.len() as u8); + sig_script.append(&mut serialized_pub_key); + // Create script_sig + input.script_sig = ScriptBuf::from_bytes(sig_script); + Ok::<(), String>(()) + }).unwrap(); + + println!("AssetLock TX {}", transaction.serialize().to_lower_hex_string()); + + transaction + } +} \ No newline at end of file diff --git a/src/factories/create_identity.rs b/src/factories/create_identity.rs new file mode 100644 index 0000000..71e0a45 --- /dev/null +++ b/src/factories/create_identity.rs @@ -0,0 +1,16 @@ +use std::collections::BTreeMap; +use dpp::identifier::Identifier; +use dpp::identity::{Identity, IdentityFacade, KeyID}; +use dpp::prelude::IdentityPublicKey; +use crate::factories::Factories; +use dpp::version::PlatformVersion; + +impl Factories { + pub fn create_identity( + identity_id: Identifier, + public_keys: BTreeMap + ) -> Identity { + IdentityFacade::new(PlatformVersion::latest().protocol_version) + .create(identity_id, public_keys).unwrap() + } +} \ No newline at end of file diff --git a/src/factories/create_identity_create_transition.rs b/src/factories/create_identity_create_transition.rs new file mode 100644 index 0000000..73f269a --- /dev/null +++ b/src/factories/create_identity_create_transition.rs @@ -0,0 +1,20 @@ +use dpp::identifier::Identifier; +use dpp::prelude::AssetLockProof; +use dpp::state_transition::identity_create_transition::IdentityCreateTransition; +use dpp::state_transition::identity_create_transition::v0::IdentityCreateTransitionV0; +use dpp::state_transition::public_key_in_creation::IdentityPublicKeyInCreation; +use crate::factories::Factories; + +impl Factories { + pub fn create_identity_create_transition(identity_id: Identifier, asset_lock_proof: AssetLockProof, public_keys: Vec) -> IdentityCreateTransition { + let mut identity_create_transition = IdentityCreateTransition::V0(IdentityCreateTransitionV0 { + public_keys, + asset_lock_proof, + user_fee_increase: 0, + signature: Default::default(), + identity_id, + }); + + identity_create_transition + } +} \ No newline at end of file diff --git a/src/factories/mod.rs b/src/factories/mod.rs index a4ba3bb..1175af8 100644 --- a/src/factories/mod.rs +++ b/src/factories/mod.rs @@ -1,5 +1,8 @@ pub(crate) mod create_documents_batch; mod create_document; mod create_masternode_vote_state_transition; +pub mod create_identity_create_transition; +pub mod create_core_transaction; +pub mod create_identity; pub struct Factories{} \ No newline at end of file diff --git a/src/grpc/broadcast_core_transaction.rs b/src/grpc/broadcast_core_transaction.rs new file mode 100644 index 0000000..3a933ce --- /dev/null +++ b/src/grpc/broadcast_core_transaction.rs @@ -0,0 +1,24 @@ +use std::str::FromStr; +use dapi_grpc::core::v0::BroadcastTransactionRequest; +use dpp::dashcore::psbt::serialize::Serialize; +use dpp::dashcore::{Transaction, Txid}; +use rs_dapi_client::{DapiRequestExecutor, RequestSettings}; +use crate::grpc::{PlatformGRPCClient}; + +impl PlatformGRPCClient { + pub async fn broadcast_core_transaction(&self, transaction: Transaction) -> Txid { + let buffer = transaction.serialize(); + + let broadcast_req = BroadcastTransactionRequest { + transaction: buffer, + allow_high_fees: false, + bypass_limits: false, + }; + + let execution_response = self.dapi_client.execute(broadcast_req, RequestSettings::default()).await.unwrap(); + + let txid = execution_response.inner.transaction_id; + + return Txid::from_str(&txid).unwrap(); + } +} \ No newline at end of file diff --git a/src/grpc/get_identity_by_public_key_hash.rs b/src/grpc/get_identity_by_public_key_hash.rs index ef2542b..b4dad90 100644 --- a/src/grpc/get_identity_by_public_key_hash.rs +++ b/src/grpc/get_identity_by_public_key_hash.rs @@ -1,12 +1,13 @@ use dapi_grpc::platform::v0::{get_identity_by_public_key_hash_request, get_identity_by_public_key_hash_response, GetIdentityByPublicKeyHashRequest}; use dapi_grpc::platform::v0::get_identity_by_public_key_hash_request::GetIdentityByPublicKeyHashRequestV0; -use dapi_grpc::platform::v0::get_identity_by_public_key_hash_response::get_identity_by_public_key_hash_response_v0; +use dapi_grpc::platform::v0::get_identity_by_public_key_hash_response::{get_identity_by_public_key_hash_response_v0, Version}; use dpp::dashcore::hashes::Hash; use dpp::dashcore::{PubkeyHash}; use dpp::identity::Identity; use dpp::serialization::PlatformDeserializable; use rs_dapi_client::{DapiClientError, DapiRequestExecutor, RequestSettings}; use rs_dapi_client::address_list::AddressListError; +use rs_dapi_client::transport::TransportError; use tonic::Code; use crate::errors::dapi_response_error::DapiResponseError; use crate::errors::Error; @@ -22,23 +23,20 @@ impl PlatformGRPCClient { })) }; - let response = self - .dapi_client - .execute(request, RequestSettings::default()) - .await; + let execution_result = self.dapi_client.execute(request, RequestSettings::default()).await; - let identity = response - .map(|get_identity_by_public_key_hash_response |{ - let data = get_identity_by_public_key_hash_response.version.unwrap(); + let result = execution_result + .map(|execution_response| { + let get_identity_by_public_key_hash_response = execution_response.inner; - let identity: Identity = match data { - get_identity_by_public_key_hash_response::Version::V0(v0) => { - let result = v0.result.unwrap(); + match get_identity_by_public_key_hash_response.version.unwrap() { + Version::V0(get_identity_by_public_key_hash_response_v0) => { + let result = get_identity_by_public_key_hash_response_v0.result.unwrap(); match result { get_identity_by_public_key_hash_response_v0::Result::Identity(bytes) => { - Identity::deserialize_from_bytes(bytes.as_slice()).unwrap() + return Identity::deserialize_from_bytes(bytes.as_slice()).unwrap(); } get_identity_by_public_key_hash_response_v0::Result::Proof(_) => { panic!("We don't expect proofs") @@ -46,34 +44,36 @@ impl PlatformGRPCClient { } } }; - - return identity }) - .map_err(|dapi_client_error| { - match dapi_client_error { - DapiClientError::Transport(status, _) => { - if status.code() == Code::NotFound { - return Error::IdentityNotFoundError(IdentityNotFoundError::from(public_key_hash)) - } + .map_err(|execution_error| { + match execution_error.inner { + DapiClientError::Transport(transport_error) => { + match transport_error { + TransportError::Grpc(status) => { + if status.code() == Code::NotFound { + return Error::IdentityNotFoundError(IdentityNotFoundError::from(public_key_hash)); + } - return Error::DapiResponseError(DapiResponseError::from(format!("Unknown DAPI Response, status code: {}, message: {}", status.code(), status.message()).as_str())) - } - DapiClientError::NoAvailableAddresses => { - return Error::DapiResponseError(DapiResponseError::from("No available addresses")) - } - DapiClientError::AddressList(addresses) => { - return match addresses { - AddressListError::AddressNotFound(url) => { - Error::DapiResponseError(DapiResponseError::from(format!("Invalid DAPI endpoint address {}", url.to_string()).as_str())) + return Error::DapiResponseError(DapiResponseError::from(format!("Unknown DAPI Response, status code: {}, message: {}", status.code(), status.message()).as_str())); + } } } + DapiClientError::NoAvailableAddresses => { + return Error::DapiResponseError(DapiResponseError::from("No available addresses")); + } + DapiClientError::AddressList(addresses) => { + return match addresses { + AddressListError::InvalidAddressUri(url) => { + Error::DapiResponseError(DapiResponseError::from(format!("Invalid DAPI endpoint address {}", url.to_string()).as_str())) + } + }; + } + DapiClientError::Mock(_) => { + return Error::DapiResponseError(DapiResponseError::from("Mock dapi client response is not supported")); + } } - DapiClientError::Mock(_) => { - return Error::DapiResponseError(DapiResponseError::from("Mock dapi client response is not supported")) - } - } - }); + }); - identity + result } } \ No newline at end of file diff --git a/src/grpc/get_identity_contract_nonce.rs b/src/grpc/get_identity_contract_nonce.rs index 9a74086..7ebaf47 100644 --- a/src/grpc/get_identity_contract_nonce.rs +++ b/src/grpc/get_identity_contract_nonce.rs @@ -1,13 +1,19 @@ use dapi_grpc::platform::v0::{get_identity_contract_nonce_request, GetIdentityContractNonceRequest, get_identity_contract_nonce_response}; use dapi_grpc::platform::v0::get_identity_contract_nonce_request::GetIdentityContractNonceRequestV0; -use dapi_grpc::platform::v0::get_identity_contract_nonce_response::get_identity_contract_nonce_response_v0; +use dapi_grpc::platform::v0::get_identity_contract_nonce_response::{get_identity_contract_nonce_response_v0, Version}; use dpp::identifier::Identifier; +use dpp::identity::IdentityPublicKey; use dpp::prelude::IdentityNonce; -use rs_dapi_client::{DapiRequestExecutor, RequestSettings}; +use rs_dapi_client::{AddressListError, DapiClientError, DapiRequestExecutor, RequestSettings}; +use rs_dapi_client::transport::TransportError; +use tonic::Code; +use crate::errors::dapi_response_error::DapiResponseError; +use crate::errors::Error; +use crate::errors::identity_not_found_error::IdentityNotFoundError; use crate::grpc::{PlatformGRPCClient}; impl PlatformGRPCClient { - pub async fn get_identity_contract_nonce(&self, identifier: Identifier, data_contract_identifier: Identifier) -> IdentityNonce { + pub async fn get_identity_contract_nonce(&self, identifier: Identifier, data_contract_identifier: Identifier) -> Result { let request = GetIdentityContractNonceRequest { version: Some(get_identity_contract_nonce_request::Version::V0(GetIdentityContractNonceRequestV0 { identity_id: identifier.to_vec(), @@ -16,25 +22,55 @@ impl PlatformGRPCClient { })) }; - let response = self.dapi_client.execute(request, RequestSettings::default()).await.unwrap(); + let execution_result = self.dapi_client.execute(request, RequestSettings::default()).await; - let data = response.version.unwrap(); + let result = execution_result + .map(|execution_response| { + let get_identity_contract_nonce_response = execution_response.inner; - let identity_nonce: IdentityNonce = match data { - get_identity_contract_nonce_response::Version::V0(v0) => { - let result = v0.result.unwrap(); + match get_identity_contract_nonce_response.version.unwrap() { + Version::V0(get_identity_contract_nonce_response_v0) => { + let result = get_identity_contract_nonce_response_v0.result.unwrap(); - match result { - get_identity_contract_nonce_response_v0::Result::IdentityContractNonce(nonce) => { - IdentityNonce::from(nonce) + match result { + get_identity_contract_nonce_response_v0::Result::IdentityContractNonce(nonce) => { + return IdentityNonce::from(nonce) + } + get_identity_contract_nonce_response_v0::Result::Proof(_) => { + panic!("We don't expect proofs") + } + } } - get_identity_contract_nonce_response_v0::Result::Proof(_) => { - panic!("We don't expect proofs") + }; + }) + .map_err(|execution_error| { + match execution_error.inner { + DapiClientError::Transport(transport_error) => { match transport_error { + TransportError::Grpc(status) => { + if status.code() == Code::NotFound { + return Error::IdentityNotFoundError(IdentityNotFoundError::from(identifier)); + } + + return Error::DapiResponseError(DapiResponseError::from(format!("Unknown DAPI Response, status code: {}, message: {}", status.code(), status.message()).as_str())); + } + } + } + DapiClientError::NoAvailableAddresses => { + return Error::DapiResponseError(DapiResponseError::from("No available addresses")); + } + DapiClientError::AddressList(addresses) => { + return match addresses { + AddressListError::InvalidAddressUri(url) => { + Error::DapiResponseError(DapiResponseError::from(format!("Invalid DAPI endpoint address {}", url.to_string()).as_str())) + } + }; + } + DapiClientError::Mock(_) => { + return Error::DapiResponseError(DapiResponseError::from("Mock dapi client response is not supported")); } } - } - }; + }); - identity_nonce + result } } \ No newline at end of file diff --git a/src/grpc/get_identity_identifier.rs b/src/grpc/get_identity_identifier.rs index 042b745..2559740 100644 --- a/src/grpc/get_identity_identifier.rs +++ b/src/grpc/get_identity_identifier.rs @@ -1,11 +1,12 @@ use dapi_grpc::platform::v0::{get_identity_request, get_identity_response, GetIdentityRequest}; use dapi_grpc::platform::v0::get_identity_request::GetIdentityRequestV0; -use dapi_grpc::platform::v0::get_identity_response::get_identity_response_v0; +use dapi_grpc::platform::v0::get_identity_response::{get_identity_response_v0, Version}; use dpp::identity::Identity; use dpp::prelude::Identifier; use dpp::serialization::PlatformDeserializable; -use rs_dapi_client::{DapiClientError, DapiRequestExecutor, RequestSettings}; +use rs_dapi_client::{DapiClientError, DapiRequestExecutor, ExecutionError, ExecutionResult, RequestSettings}; use rs_dapi_client::address_list::AddressListError; +use rs_dapi_client::transport::TransportError; use tonic::{Code}; use crate::errors::dapi_response_error::DapiResponseError; use crate::errors::Error; @@ -21,19 +22,19 @@ impl PlatformGRPCClient { })) }; - let response = self.dapi_client.execute(request, RequestSettings::default()).await; + let execution_result = self.dapi_client.execute(request, RequestSettings::default()).await; - let result = response - .map(|get_identity_response|{ - let data = get_identity_response.version.unwrap(); + let result = execution_result + .map(|execution_response| { + let get_identity_response = execution_response.inner; - let identity: Identity = match data { - get_identity_response::Version::V0(v0) => { - let result = v0.result.unwrap(); + match get_identity_response.version.unwrap() { + Version::V0(get_identity_response_v0) => { + let result = get_identity_response_v0.result.unwrap(); match result { get_identity_response_v0::Result::Identity(bytes) => { - Identity::deserialize_from_bytes(bytes.as_slice()).unwrap() + return Identity::deserialize_from_bytes(bytes.as_slice()).unwrap() } get_identity_response_v0::Result::Proof(_) => { panic!("We don't expect proofs") @@ -41,30 +42,31 @@ impl PlatformGRPCClient { } } }; - - return identity }) - .map_err(|dapi_client_error| { - match dapi_client_error { - DapiClientError::Transport(status, _) => { - if status.code() == Code::NotFound { - return Error::IdentityNotFoundError(IdentityNotFoundError::from(identifier)) - } + .map_err(|execution_error| { + match execution_error.inner { + DapiClientError::Transport(transport_error) => { match transport_error { + TransportError::Grpc(status) => { + if status.code() == Code::NotFound { + return Error::IdentityNotFoundError(IdentityNotFoundError::from(identifier)); + } - return Error::DapiResponseError(DapiResponseError::from(format!("Unknown DAPI Response, status code: {}, message: {}", status.code(), status.message()).as_str())) + return Error::DapiResponseError(DapiResponseError::from(format!("Unknown DAPI Response, status code: {}, message: {}", status.code(), status.message()).as_str())); + } + } } DapiClientError::NoAvailableAddresses => { - return Error::DapiResponseError(DapiResponseError::from("No available addresses")) + return Error::DapiResponseError(DapiResponseError::from("No available addresses")); } DapiClientError::AddressList(addresses) => { return match addresses { - AddressListError::AddressNotFound(url) => { + AddressListError::InvalidAddressUri(url) => { Error::DapiResponseError(DapiResponseError::from(format!("Invalid DAPI endpoint address {}", url.to_string()).as_str())) } - } + }; } DapiClientError::Mock(_) => { - return Error::DapiResponseError(DapiResponseError::from("Mock dapi client response is not supported")) + return Error::DapiResponseError(DapiResponseError::from("Mock dapi client response is not supported")); } } }); diff --git a/src/grpc/get_identity_keys.rs b/src/grpc/get_identity_keys.rs index 3762e58..f87fa83 100644 --- a/src/grpc/get_identity_keys.rs +++ b/src/grpc/get_identity_keys.rs @@ -1,15 +1,20 @@ -use dapi_grpc::platform::v0::{AllKeys, get_identity_keys_request, get_identity_keys_response, GetIdentityKeysRequest, KeyRequestType}; +use dapi_grpc::platform::v0::{AllKeys, get_identity_keys_request, GetIdentityKeysRequest, KeyRequestType}; use dapi_grpc::platform::v0::get_identity_keys_request::GetIdentityKeysRequestV0; -use dapi_grpc::platform::v0::get_identity_keys_response::get_identity_keys_response_v0; +use dapi_grpc::platform::v0::get_identity_keys_response::{get_identity_keys_response_v0, Version}; use dapi_grpc::platform::v0::key_request_type::Request; use dpp::identifier::Identifier; -use dpp::identity::{IdentityPublicKey}; +use dpp::identity::{Identity, IdentityPublicKey}; use dpp::serialization::PlatformDeserializable; -use rs_dapi_client::{DapiRequestExecutor, RequestSettings}; +use rs_dapi_client::{AddressListError, DapiClientError, DapiRequestExecutor, RequestSettings}; +use rs_dapi_client::transport::TransportError; +use tonic::Code; +use crate::errors::dapi_response_error::DapiResponseError; +use crate::errors::Error; +use crate::errors::identity_not_found_error::IdentityNotFoundError; use crate::grpc::{PlatformGRPCClient}; impl PlatformGRPCClient { - pub async fn get_identity_keys(&self, identifier: Identifier) -> Vec { + pub async fn get_identity_keys(&self, identifier: Identifier) -> Result, Error> { let request = GetIdentityKeysRequest { version: Some(get_identity_keys_request::Version::V0(GetIdentityKeysRequestV0 { identity_id: identifier.to_vec(), @@ -20,34 +25,62 @@ impl PlatformGRPCClient { })) }; - let response = self.dapi_client.execute(request, RequestSettings::default()).await.unwrap(); + let execution_result = self.dapi_client.execute(request, RequestSettings::default()).await; - let data = response.version.unwrap(); + let result = execution_result + .map(|execution_response| { + let get_identity_keys_response = execution_response.inner; - let identity_public_keys: Vec = match data { - get_identity_keys_response::Version::V0(v0) => { - let result = v0.result.unwrap(); + match get_identity_keys_response.version.unwrap() { + Version::V0(get_identity_keys_response_v0) => { + let result = get_identity_keys_response_v0.result.unwrap(); - match result { - get_identity_keys_response_v0::Result::Keys(keys) => { - let tas = keys.keys_bytes - .into_iter() - .map(|key| { - IdentityPublicKey::deserialize_from_bytes(key.as_slice()).unwrap() - }) - .collect::>() - .try_into() - .unwrap(); + match result { + get_identity_keys_response_v0::Result::Keys(keys) => { + return keys.keys_bytes + .into_iter() + .map(|key| { + IdentityPublicKey::deserialize_from_bytes(key.as_slice()).unwrap() + }) + .collect::>() + .try_into() + .unwrap() + } + get_identity_keys_response_v0::Result::Proof(_) => { + panic!("We don't expect proofs") + } + } + } + }; + }) + .map_err(|execution_error| { + match execution_error.inner { + DapiClientError::Transport(transport_error) => { match transport_error { + TransportError::Grpc(status) => { + if status.code() == Code::NotFound { + return Error::IdentityNotFoundError(IdentityNotFoundError::from(identifier)); + } - tas + return Error::DapiResponseError(DapiResponseError::from(format!("Unknown DAPI Response, status code: {}, message: {}", status.code(), status.message()).as_str())); + } + } + } + DapiClientError::NoAvailableAddresses => { + return Error::DapiResponseError(DapiResponseError::from("No available addresses")); } - get_identity_keys_response_v0::Result::Proof(_) => { - panic!("We don't expect proofs") + DapiClientError::AddressList(addresses) => { + return match addresses { + AddressListError::InvalidAddressUri(url) => { + Error::DapiResponseError(DapiResponseError::from(format!("Invalid DAPI endpoint address {}", url.to_string()).as_str())) + } + }; + } + DapiClientError::Mock(_) => { + return Error::DapiResponseError(DapiResponseError::from("Mock dapi client response is not supported")); } } - } - }; + }); - identity_public_keys + result } } \ No newline at end of file diff --git a/src/grpc/get_identity_nonce.rs b/src/grpc/get_identity_nonce.rs index 41ec7fa..9937dc0 100644 --- a/src/grpc/get_identity_nonce.rs +++ b/src/grpc/get_identity_nonce.rs @@ -1,13 +1,19 @@ use dapi_grpc::platform::v0::{get_identity_nonce_request, get_identity_nonce_response, GetIdentityNonceRequest}; +use dapi_grpc::platform::v0::get_identity_contract_nonce_response::get_identity_contract_nonce_response_v0; use dapi_grpc::platform::v0::get_identity_nonce_request::GetIdentityNonceRequestV0; -use dapi_grpc::platform::v0::get_identity_nonce_response::get_identity_nonce_response_v0; +use dapi_grpc::platform::v0::get_identity_nonce_response::{get_identity_nonce_response_v0, Version}; use dpp::identifier::Identifier; use dpp::prelude::IdentityNonce; -use rs_dapi_client::{DapiRequestExecutor, RequestSettings}; +use rs_dapi_client::{AddressListError, DapiClientError, DapiRequestExecutor, RequestSettings}; +use rs_dapi_client::transport::TransportError; +use tonic::Code; +use crate::errors::dapi_response_error::DapiResponseError; +use crate::errors::Error; +use crate::errors::identity_not_found_error::IdentityNotFoundError; use crate::grpc::{PlatformGRPCClient}; impl PlatformGRPCClient { - pub async fn get_identity_nonce(&self, identifier: Identifier) -> IdentityNonce { + pub async fn get_identity_nonce(&self, identifier: Identifier) -> Result { let request = GetIdentityNonceRequest { version: Some(get_identity_nonce_request::Version::V0(GetIdentityNonceRequestV0 { identity_id: identifier.to_vec(), @@ -15,25 +21,55 @@ impl PlatformGRPCClient { })) }; - let response = self.dapi_client.execute(request, RequestSettings::default()).await.unwrap(); + let execution_result = self.dapi_client.execute(request, RequestSettings::default()).await; - let data = response.version.unwrap(); + let result = execution_result + .map(|execution_response| { + let get_identity_nonce_response = execution_response.inner; - let identity_nonce: IdentityNonce = match data { - get_identity_nonce_response::Version::V0(v0) => { - let result = v0.result.unwrap(); + match get_identity_nonce_response.version.unwrap() { + Version::V0(get_identity_nonce_response_v0) => { + let result = get_identity_nonce_response_v0.result.unwrap(); - match result { - get_identity_nonce_response_v0::Result::IdentityNonce(nonce) => { - IdentityNonce::from(nonce) + match result { + get_identity_nonce_response_v0::Result::IdentityNonce(nonce) => { + return IdentityNonce::from(nonce) + } + get_identity_nonce_response_v0::Result::Proof(_) => { + panic!("We don't expect proofs") + } + } } - get_identity_nonce_response_v0::Result::Proof(_) => { - panic!("We don't expect proofs") + }; + }) + .map_err(|execution_error| { + match execution_error.inner { + DapiClientError::Transport(transport_error) => { match transport_error { + TransportError::Grpc(status) => { + if status.code() == Code::NotFound { + return Error::IdentityNotFoundError(IdentityNotFoundError::from(identifier)); + } + + return Error::DapiResponseError(DapiResponseError::from(format!("Unknown DAPI Response, status code: {}, message: {}", status.code(), status.message()).as_str())); + } + } + } + DapiClientError::NoAvailableAddresses => { + return Error::DapiResponseError(DapiResponseError::from("No available addresses")); + } + DapiClientError::AddressList(addresses) => { + return match addresses { + AddressListError::InvalidAddressUri(url) => { + Error::DapiResponseError(DapiResponseError::from(format!("Invalid DAPI endpoint address {}", url.to_string()).as_str())) + } + }; + } + DapiClientError::Mock(_) => { + return Error::DapiResponseError(DapiResponseError::from("Mock dapi client response is not supported")); } } - } - }; + }); - identity_nonce + result } } \ No newline at end of file diff --git a/src/grpc/get_transaction.rs b/src/grpc/get_transaction.rs new file mode 100644 index 0000000..e6586f1 --- /dev/null +++ b/src/grpc/get_transaction.rs @@ -0,0 +1,36 @@ +use dapi_grpc::core::v0::GetTransactionRequest; +use dapi_grpc::platform::v0::{get_identity_contract_nonce_request, GetIdentityContractNonceRequest, get_identity_contract_nonce_response}; +use dapi_grpc::platform::v0::get_identity_contract_nonce_request::GetIdentityContractNonceRequestV0; +use dapi_grpc::platform::v0::get_identity_contract_nonce_response::get_identity_contract_nonce_response_v0; +use dpp::dashcore::Txid; +use dpp::identifier::Identifier; +use dpp::prelude::IdentityNonce; +use rs_dapi_client::{DapiRequestExecutor, RequestSettings}; +use crate::grpc::{PlatformGRPCClient}; + +impl PlatformGRPCClient { + pub async fn get_transaction(&self, txid: Txid) -> IdentityNonce { + todo!() + // let request = GetTransactionRequest { + // id: txid.to_hex() + // }; + // + // + // let identity_nonce: IdentityNonce = match data { + // get_identity_contract_nonce_response::Version::V0(v0) => { + // let result = v0.result.unwrap(); + // + // match result { + // get_identity_contract_nonce_response_v0::Result::IdentityContractNonce(nonce) => { + // IdentityNonce::from(nonce) + // } + // get_identity_contract_nonce_response_v0::Result::Proof(_) => { + // panic!("We don't expect proofs") + // } + // } + // } + // }; + // + // identity_nonce + } +} \ No newline at end of file diff --git a/src/grpc/mod.rs b/src/grpc/mod.rs index d069640..2157b1a 100644 --- a/src/grpc/mod.rs +++ b/src/grpc/mod.rs @@ -1,3 +1,4 @@ +use std::str::FromStr; use rs_dapi_client::{AddressList, DapiClient, RequestSettings}; mod get_identity_by_public_key_hash; @@ -6,6 +7,8 @@ mod get_identity_nonce; mod get_identity_contract_nonce; mod broadcast_state_transition; mod get_identity_identifier; +mod broadcast_core_transaction; +mod get_transaction; pub struct PlatformGRPCClient { dapi_client: DapiClient, @@ -15,7 +18,7 @@ impl PlatformGRPCClient { pub fn new(dapi_url: &str) -> PlatformGRPCClient { return PlatformGRPCClient { dapi_client: DapiClient::new( - AddressList::from(dapi_url), + AddressList::from_str(dapi_url).unwrap(), RequestSettings::default(), ), }; diff --git a/src/main.rs b/src/main.rs index 39eb308..d40b31c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,6 +6,7 @@ pub(crate) mod utils; mod errors; mod logger; mod constants; +mod api; use clap::{Parser, Subcommand}; use dpp::{BlsModule, ProtocolError, PublicKeyValidationError}; @@ -13,6 +14,7 @@ use crate::commands::masternode_vote_dpns_name::MasternodeVoteDPNSNameCommand; use crate::commands::register_dpns_name::RegisterDPNSNameCommand; use crate::commands::withdraw::WithdrawCommand; use log::{info, LevelFilter}; +use crate::commands::register_identity::RegisterIdentityCommand; use crate::logger::Logger; pub struct MockBLS {} @@ -45,6 +47,7 @@ struct Args { #[derive(Subcommand)] enum MyCommand { Withdraw(WithdrawCommand), + RegisterIdentity(RegisterIdentityCommand), RegisterDPNSName(RegisterDPNSNameCommand), MasternodeVoteDPNSName(MasternodeVoteDPNSNameCommand) } @@ -82,6 +85,10 @@ async fn main() { set_logging_level(x.verbose).await; x.run().await }, + MyCommand::RegisterIdentity(x) => { + set_logging_level(x.verbose).await; + x.run().await + } }; match result { diff --git a/src/utils.rs b/src/utils.rs index fb15172..0b220ea 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,9 +1,18 @@ +use std::thread; +use std::time::Duration; use anyhow::Context; use base64::Engine; use base64::engine::general_purpose; -use dpp::dashcore::{Network, PrivateKey}; +use dashcore_rpc::{Client, RpcApi}; +use dashcore_rpc::dashcore::{Address, OutPoint, Script, ScriptBuf, Txid}; +use dashcore_rpc::dashcore::consensus::Decodable; +use dpp::dashcore::{InstantLock, Network, PrivateKey, Transaction, TxIn}; +use dpp::identity::state_transition::asset_lock_proof::chain::ChainAssetLockProof; +use dpp::identity::state_transition::asset_lock_proof::InstantAssetLockProof; +use dpp::prelude::AssetLockProof; use dpp::util::entropy_generator::EntropyGenerator; use getrandom::getrandom; +use crate::api::digitalcash::DigitalCashAPI; use crate::errors::cli_argument_invalid_input::CommandLineArgumentInvalidInput; use crate::errors::Error; @@ -39,10 +48,117 @@ impl Utils { } else if base64.len() > 0 { PrivateKey::from_slice(base64.as_slice(), network).expect("Unexpected error, could not construct private key from base64 after validation") } else { - return Err(Error::CommandLineArgumentInvalidInput(CommandLineArgumentInvalidInput::from("Could not decode private key type from file (should be in WIF or hex)"))) + return Err(Error::CommandLineArgumentInvalidInput(CommandLineArgumentInvalidInput::from("Could not decode private key type from file (should be in WIF or hex)"))); } }; Ok(private_key) } + pub fn coin_select(inputs: Vec<(TxIn, u64)>, needed_amount: u64, fee: u64) -> (u64, u64) { + return inputs.into_iter().fold((0, 0), |(output_amount, change_amount), (_, satoshis)| { + if output_amount + satoshis + fee >= needed_amount { + let change_amount = (output_amount + satoshis) - needed_amount - fee; + + return (needed_amount, change_amount); + } + + return (output_amount + satoshis, 0); + }); + } + pub async fn wait_for_balance(rpc: &DigitalCashAPI, address: Address, amount: u64) -> Result, Error> { + loop { + let resp = rpc.get_address_utxos(address.clone()).await?; + + let inputs = resp.into_iter() + .filter(|utxo| { + let script_buf = ScriptBuf::from_hex(&utxo.script).unwrap(); + script_buf.is_p2pkh() + }) + .map(|utxo| { + let tx_in = TxIn { + previous_output: OutPoint { + txid: Txid::from_hex(&utxo.txid).unwrap(), + vout: utxo.output_index, + }, + script_sig: ScriptBuf::from_hex(&utxo.script).unwrap(), + sequence: 0xFFFFFFFF, + witness: Default::default(), + }; + + return (tx_in, utxo.satoshis); + }) + .collect::>(); + + let balance = inputs.iter().fold(0, |acc, (_, satoshis)| { + return acc + satoshis; + }); + + if balance > amount { + println!("Got the balance"); + return Ok(inputs); + } + + thread::sleep(Duration::from_millis(15000)); + } + } + pub fn wait_for_tx_mined(inputs: Vec<(TxIn, u64)>, needed_amount: u64, fee: u64) -> (u64, u64) { + return inputs.into_iter().fold((0, 0), |(output_amount, change_amount), (_, satoshis)| { + if output_amount + satoshis + fee >= needed_amount { + let change_amount = (output_amount + satoshis) - needed_amount - fee; + + return (needed_amount, change_amount); + } + + return (output_amount + satoshis, 0); + }); + } + pub async fn wait_for_chain_lock(rpc: &DigitalCashAPI, txid: Txid) -> Result { + loop { + let chainlock = rpc.get_tx_chain_locks(txid).await?; + + if chainlock.chainlock { + return Ok(chainlock.height as u32); + } + + thread::sleep(Duration::from_millis(15000)); + } + } + pub async fn wait_for_asset_lock_proof(rpc: &DigitalCashAPI, core_client: &Client, transaction: Transaction, vout: u32) -> Result { + loop { + // check instantsend + let raw_instant_locks = core_client.get_raw_instant_locks(vec![&transaction.txid()]).unwrap(); + let raw_instant_locks_value = raw_instant_locks.into_iter().nth(0).unwrap(); + + let raw_instant_lock: Option = if raw_instant_locks_value == "None" { None } else { Some(raw_instant_locks_value) }; + + if raw_instant_lock.is_some() { + let instant_lock_bytes = hex::decode(raw_instant_lock.unwrap()).unwrap(); + let instant_lock = InstantLock::consensus_decode(&mut instant_lock_bytes.as_slice()).unwrap(); + + let asset_lock_proof = AssetLockProof::Instant(InstantAssetLockProof{ + instant_lock, + transaction: transaction.clone(), + output_index: vout, + }); + + return Ok(asset_lock_proof); + } + + // check chainlock + let chainlock = rpc.get_tx_chain_locks(transaction.txid()).await?; + + if chainlock.chainlock { + let core_chain_locked_height = chainlock.height as u32; + + let out_point = OutPoint { + txid: transaction.txid(), + vout, + }; + + return Ok(AssetLockProof::Chain(ChainAssetLockProof{ core_chain_locked_height, out_point })) + } + + thread::sleep(Duration::from_millis(5000)); + } + } } \ No newline at end of file