diff --git a/.gitignore b/.gitignore index 500c70f..d5589cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ /target -**/target \ No newline at end of file +**/target + +config.json \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 1171eab..9daa43c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,77 +12,15 @@ dependencies = [ "regex", ] -[[package]] -name = "actix" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de7fa236829ba0841304542f7614c42b80fca007455315c45c785ccfa873a85b" -dependencies = [ - "actix-macros", - "actix-rt", - "actix_derive", - "bitflags 2.6.0", - "bytes", - "crossbeam-channel", - "futures-core", - "futures-sink", - "futures-task", - "futures-util", - "log", - "once_cell", - "parking_lot 0.12.3", - "pin-project-lite", - "smallvec", - "tokio", - "tokio-util", -] - -[[package]] -name = "actix-macros" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" -dependencies = [ - "quote", - "syn 2.0.77", -] - -[[package]] -name = "actix-rt" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208" -dependencies = [ - "futures-core", - "tokio", -] - -[[package]] -name = "actix_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c7db3d5a9718568e4cf4a537cfd7070e6e6ff7481510d0237fb529ac850f6d3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", -] - [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ - "gimli 0.28.1", + "gimli 0.31.0", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -100,17 +38,6 @@ dependencies = [ "cpufeatures", ] -[[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" @@ -153,60 +80,11 @@ 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.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "arbitrary" @@ -223,37 +101,15 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" -[[package]] -name = "async-stream" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", -] - [[package]] name = "async-trait" -version = "0.1.82" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -264,70 +120,47 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] -name = "axum" -version = "0.6.20" +name = "backtrace" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ - "async-trait", - "axum-core", - "bitflags 1.3.2", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper 0.1.2", - "tower", - "tower-layer", - "tower-service", + "addr2line", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] -name = "axum-core" -version = "0.3.4" +name = "base16ct" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "mime", - "rustversion", - "tower-layer", - "tower-service", -] +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] -name = "backtrace" -version = "0.3.71" +name = "base58ck" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "2c8d66485a3a2ea485c1913c4572ce0256067a5377ac8c75c4960e1cda98605f" dependencies = [ - "addr2line", - "cc", - "cfg-if 1.0.0", - "libc", - "miniz_oxide 0.7.4", - "object", - "rustc-demangle", + "bitcoin-internals", + "bitcoin_hashes", ] +[[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" @@ -346,6 +179,12 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bech32" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" + [[package]] name = "binary-install" version = "0.2.0" @@ -365,16 +204,103 @@ dependencies = [ ] [[package]] -name = "bip39" -version = "2.0.0" +name = "bitcoin" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +checksum = "0032b0e8ead7074cda7fc4f034409607e3f03a6f71d66ade8a307f79b4d99e73" dependencies = [ + "base58ck", + "bech32", + "bitcoin-internals", + "bitcoin-io", + "bitcoin-units", "bitcoin_hashes", - "rand", - "rand_core", + "hex-conservative", + "hex_lit", + "secp256k1 0.29.1", "serde", - "unicode-normalization", +] + +[[package]] +name = "bitcoin-internals" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30bdbe14aa07b06e6cfeffc529a1f099e5fbe249524f8125358604df99a4bed2" +dependencies = [ + "serde", +] + +[[package]] +name = "bitcoin-io" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "340e09e8399c7bd8912f495af6aa58bea0c9214773417ffaa8f6460f93aaee56" + +[[package]] +name = "bitcoin-signing-segwit" +version = "0.0.1" +dependencies = [ + "bitcoin", + "bs58 0.5.1", + "hex", + "k256", + "near-crypto 0.25.0", + "near-jsonrpc-client 0.12.0 (git+https://github.com/omni-rs/near-jsonrpc-client-rs?tag=v0.12.1)", + "near-jsonrpc-primitives 0.25.0", + "near-primitives 0.25.0", + "near-sdk", + "near-workspaces 0.14.0", + "omni-testing-utilities", + "omni-transaction", + "ripemd", + "serde_json", + "sha3", + "tokio", +] + +[[package]] +name = "bitcoin-signing-segwit-multiple-utxos" +version = "0.0.1" +dependencies = [ + "bitcoin", + "bs58 0.5.1", + "futures", + "hex", + "k256", + "near-crypto 0.25.0", + "near-jsonrpc-client 0.12.0 (git+https://github.com/omni-rs/near-jsonrpc-client-rs?tag=v0.12.1)", + "near-jsonrpc-primitives 0.25.0", + "near-primitives 0.25.0", + "near-sdk", + "near-workspaces 0.14.0", + "omni-testing-utilities", + "omni-transaction", + "ripemd", + "serde_json", + "sha3", + "tokio", +] + +[[package]] +name = "bitcoin-signing-with-propagation-legacy" +version = "0.0.1" +dependencies = [ + "bitcoin", + "bs58 0.5.1", + "hex", + "k256", + "near-crypto 0.25.0", + "near-jsonrpc-client 0.12.0 (git+https://github.com/omni-rs/near-jsonrpc-client-rs?tag=v0.12.1)", + "near-jsonrpc-primitives 0.25.0", + "near-primitives 0.25.0", + "near-sdk", + "near-workspaces 0.14.0", + "omni-testing-utilities", + "omni-transaction", + "ripemd", + "serde_json", + "sha3", + "tokio", ] [[package]] @@ -382,17 +308,77 @@ name = "bitcoin-simple-encoding" version = "0.0.1" dependencies = [ "near-sdk", - "near-workspaces", + "near-workspaces 0.14.0", "omni-transaction", "serde_json", "tokio", ] +[[package]] +name = "bitcoin-units" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5285c8bcaa25876d07f37e3d30c303f2609179716e11d688f51e8f1fe70063e2" +dependencies = [ + "bitcoin-internals", + "serde", +] + [[package]] name = "bitcoin_hashes" -version = "0.11.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative", + "serde", +] + +[[package]] +name = "bitcoind-json-rpc-client" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "496c919b6afc9f620c01858bb54799edcada994bbe4ff9e7dcca12da8271d832" +dependencies = [ + "bitcoin", + "bitcoind-json-rpc-types", + "jsonrpc", + "log", + "serde", + "serde_json", +] + +[[package]] +name = "bitcoind-json-rpc-regtest" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "543e0c6ea81b14f0db0b11124c373d66794df4b7ec2ea0370aa35b4cb05dbcd9" +dependencies = [ + "anyhow", + "bitcoin_hashes", + "bitcoind-json-rpc-client", + "flate2", + "log", + "minreq", + "serde_json", + "tar", + "tempfile", + "which", + "zip 0.6.6", +] + +[[package]] +name = "bitcoind-json-rpc-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80270bb74df085641b0acab8ee00c42eb531cb7ed869bfb0d9ed37f7fb23c230" +dependencies = [ + "bitcoin", + "bitcoin-internals", + "serde", + "serde_json", +] [[package]] name = "bitflags" @@ -424,16 +410,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", + "digest", ] [[package]] @@ -477,7 +454,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "syn_derive", ] @@ -505,44 +482,12 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "bstr" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" -dependencies = [ - "memchr", - "serde", -] - [[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 = "byteorder" version = "1.5.0" @@ -551,9 +496,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "bytesize" @@ -595,47 +540,26 @@ dependencies = [ ] [[package]] -name = "cargo-near" -version = "0.8.2" +name = "cargo-near-build" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b7d99422c06c754d57a42c301f0d3d8a1c8e8d6d62799107bccf83f32e6571" +checksum = "cd00f13698319e43d9af5b1afc7045131342f3097dd78320a09bb6303bbf2d06" dependencies = [ "bs58 0.5.1", "camino", "cargo_metadata", - "clap", - "color-eyre", "colored", - "derive_more", "dunce", - "env_logger", - "git2", + "eyre", "hex", - "home", - "inquire", - "interactive-clap", - "interactive-clap-derive", "libloading", - "linked-hash-map", - "log", - "names", "near-abi", - "near-cli-rs", - "nix", - "pathdiff", "rustc_version", "schemars", - "serde", "serde_json", - "sha2 0.10.8", - "shell-words", - "strum 0.24.1", - "strum_macros 0.24.3", + "sha2", "symbolic-debuginfo", - "tempfile", - "tmp_env", - "unix_path", - "url", + "tracing", "zstd 0.13.2", ] @@ -648,29 +572,6 @@ dependencies = [ "serde", ] -[[package]] -name = "cargo-util" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc680c90073156fb5280c0c0127b779eef1f6292e41f7d6621acba3041e81c7d" -dependencies = [ - "anyhow", - "core-foundation", - "filetime", - "hex", - "ignore", - "jobserver", - "libc", - "miow", - "same-file", - "sha2 0.10.8", - "shell-escape", - "tempfile", - "tracing", - "walkdir", - "windows-sys 0.52.0", -] - [[package]] name = "cargo_metadata" version = "0.18.1" @@ -687,9 +588,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.16" +version = "1.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9d013ecb737093c0e86b151a7b837993cf9ec6c502946cfb44bedc392421e0b" +checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938" dependencies = [ "jobserver", "libc", @@ -739,79 +640,6 @@ dependencies = [ "inout", ] -[[package]] -name = "clap" -version = "4.5.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "syn 2.0.77", -] - -[[package]] -name = "clap_lex" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" - -[[package]] -name = "color-eyre" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" -dependencies = [ - "backtrace", - "color-spantrace", - "eyre", - "indenter", - "once_cell", - "owo-colors", - "tracing-error", -] - -[[package]] -name = "color-spantrace" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2" -dependencies = [ - "once_cell", - "owo-colors", - "tracing-core", - "tracing-error", -] - -[[package]] -name = "colorchoice" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" - [[package]] name = "colored" version = "2.1.0" @@ -823,17 +651,10 @@ dependencies = [ ] [[package]] -name = "console" -version = "0.15.8" +name = "const-oid" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" -dependencies = [ - "encode_unicode 0.3.6", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.52.0", -] +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "constant_time_eq" @@ -871,9 +692,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -887,65 +708,12 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" -[[package]] -name = "crossterm" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" -dependencies = [ - "bitflags 1.3.2", - "crossterm_winapi", - "libc", - "mio 0.8.11", - "parking_lot 0.12.3", - "signal-hook", - "signal-hook-mio", - "winapi", -] - -[[package]] -name = "crossterm_winapi" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" -dependencies = [ - "winapi", -] - [[package]] name = "crunchy" version = "0.2.2" @@ -953,44 +721,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "crypto-mac" -version = "0.9.1" +name = "crypto-bigint" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bcd97a54c7ca5ce2f6eb16f6bede5b0ab5f0055fedc17d2f0b4466e21671ca" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", + "rand_core", "subtle", + "zeroize", ] [[package]] -name = "csv" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" -dependencies = [ - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.11" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "memchr", + "generic-array", + "typenum", ] [[package]] @@ -1002,9 +751,8 @@ dependencies = [ "cfg-if 1.0.0", "cpufeatures", "curve25519-dalek-derive", - "digest 0.10.7", + "digest", "fiat-crypto", - "rand_core", "rustc_version", "subtle", "zeroize", @@ -1018,7 +766,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1042,7 +790,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1053,41 +801,26 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] -name = "dbus" -version = "0.9.7" +name = "debugid" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b" +checksum = "d6ee87af31d84ef885378aebca32be3d682b0e0dc119d5b4860a2c5bb5046730" dependencies = [ - "libc", - "libdbus-sys", - "winapi", + "uuid", ] [[package]] -name = "dbus-secret-service" -version = "4.0.2" +name = "der" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1caa0c241c01ad8d99a78d553567d38f873dd3ac16eca33a5370d650ab25584e" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ - "dbus", - "futures-util", - "num", - "once_cell", - "openssl", - "rand", -] - -[[package]] -name = "debugid" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ee87af31d84ef885378aebca32be3d682b0e0dc119d5b4860a2c5bb5046730" -dependencies = [ - "uuid 0.8.2", + "const-oid", + "zeroize", ] [[package]] @@ -1108,7 +841,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1121,16 +854,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.77", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", + "syn 2.0.79", ] [[package]] @@ -1139,20 +863,12 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", + "const-oid", "crypto-common", "subtle", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -1163,18 +879,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -1211,10 +915,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53aff6fdc1b181225acdcb5b14c47106726fd8e486707315b1b138baed68ee31" [[package]] -name = "easy-ext" -version = "1.0.2" +name = "ecdsa" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5d6d6a8504f8caedd7de14576464383900cd3840b7033a7a3dce5ac00121ca" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "serdect", + "signature", + "spki", +] [[package]] name = "ed25519" @@ -1234,7 +947,7 @@ dependencies = [ "curve25519-dalek", "ed25519", "rand_core", - "sha2 0.10.8", + "sha2", "subtle", ] @@ -1255,16 +968,24 @@ dependencies = [ ] [[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[package]] -name = "encode_unicode" -version = "1.0.0" +name = "elliptic-curve" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "serdect", + "subtle", + "zeroize", +] [[package]] name = "encoding_rs" @@ -1292,30 +1013,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", -] - -[[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.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "humantime", - "log", + "syn 2.0.79", ] [[package]] @@ -1339,7 +1037,7 @@ name = "evm-simple-encoding" version = "0.0.1" dependencies = [ "near-sdk", - "near-workspaces", + "near-workspaces 0.14.0", "omni-transaction", "serde_json", "tokio", @@ -1350,7 +1048,7 @@ name = "evm-simple-encoding-passing-args" version = "0.0.1" dependencies = [ "near-sdk", - "near-workspaces", + "near-workspaces 0.14.0", "omni-transaction", "serde_json", "tokio", @@ -1362,7 +1060,7 @@ version = "0.0.1" dependencies = [ "hex", "near-sdk", - "near-workspaces", + "near-workspaces 0.14.0", "omni-transaction", "serde_json", "tokio", @@ -1390,6 +1088,16 @@ 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 = [ + "rand_core", + "subtle", +] + [[package]] name = "fiat-crypto" version = "0.2.9" @@ -1419,12 +1127,12 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.33" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -1526,9 +1234,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" @@ -1538,7 +1246,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1571,24 +1279,6 @@ dependencies = [ "slab", ] -[[package]] -name = "fuzzy-matcher" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" -dependencies = [ - "thread_local", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -1597,6 +1287,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -1622,24 +1313,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "git2" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" -dependencies = [ - "bitflags 2.6.0", - "libc", - "libgit2-sys", - "log", - "openssl-probe", - "openssl-sys", - "url", -] +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "glob" @@ -1647,19 +1323,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "globset" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" -dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", -] - [[package]] name = "goblin" version = "0.5.4" @@ -1672,22 +1335,14 @@ dependencies = [ ] [[package]] -name = "h2" -version = "0.3.26" +name = "group" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.5.0", - "slab", - "tokio", - "tokio-util", - "tracing", + "ff", + "rand_core", + "subtle", ] [[package]] @@ -1701,8 +1356,8 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.1.0", - "indexmap 2.5.0", + "http", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -1714,9 +1369,6 @@ 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" @@ -1724,11 +1376,16 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.11", + "ahash", "allocator-api2", - "serde", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "heck" version = "0.4.1" @@ -1747,12 +1404,6 @@ 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" @@ -1763,22 +1414,27 @@ dependencies = [ ] [[package]] -name = "hmac" -version = "0.9.0" +name = "hex-conservative" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deae6d9dbb35ec2c502d62b8f7b1c000a0822c3b0794ba36b3149c0a1c840dff" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" dependencies = [ - "crypto-mac", - "digest 0.9.0", + "arrayvec", ] +[[package]] +name = "hex_lit" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" + [[package]] name = "hmac" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -1790,17 +1446,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.1.0" @@ -1812,17 +1457,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -1830,7 +1464,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.1.0", + "http", ] [[package]] @@ -1841,52 +1475,16 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" - -[[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 = "0.14.30" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "hyper" @@ -1897,9 +1495,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.6", - "http 1.1.0", - "http-body 1.0.1", + "h2", + "http", + "http-body", "httparse", "itoa", "pin-project-lite", @@ -1915,28 +1513,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", - "http 1.1.0", - "hyper 1.4.1", + "http", + "hyper", "hyper-util", - "rustls", + "rustls 0.23.13", "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", ] -[[package]] -name = "hyper-timeout" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" -dependencies = [ - "hyper 0.14.30", - "pin-project-lite", - "tokio", - "tokio-io-timeout", -] - [[package]] name = "hyper-tls" version = "0.6.0" @@ -1945,7 +1531,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.4.1", + "hyper", "hyper-util", "native-tls", "tokio", @@ -1955,29 +1541,28 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "hyper 1.4.1", + "http", + "http-body", + "hyper", "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2012,22 +1597,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "ignore" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" -dependencies = [ - "crossbeam-deque", - "globset", - "log", - "memchr", - "regex-automata 0.4.7", - "same-file", - "walkdir", - "winapi-util", -] - [[package]] name = "indent_write" version = "2.2.0" @@ -2053,29 +1622,15 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "serde", ] -[[package]] -name = "indicatif" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" -dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "unicode-width", - "vt100", -] - [[package]] name = "inout" version = "0.1.3" @@ -2085,90 +1640,11 @@ dependencies = [ "generic-array", ] -[[package]] -name = "inquire" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fddf93031af70e75410a2511ec04d49e758ed2f26dad3404a934e0fb45cc12a" -dependencies = [ - "bitflags 2.6.0", - "crossterm", - "dyn-clone", - "fuzzy-matcher", - "fxhash", - "newline-converter", - "once_cell", - "unicode-segmentation", - "unicode-width", -] - -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "interactive-clap" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b1e6acfe2ceaaa893a54c57d445a820d3b0fa4c6187b67b3f69fd07473c726e" -dependencies = [ - "interactive-clap-derive", - "strum 0.24.1", - "strum_macros 0.24.3", -] - -[[package]] -name = "interactive-clap-derive" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab1ce8e6ef82771b125341b0a6bd5eb45888b01235aa61125ecc72cc22be4738" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "is-docker" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" -dependencies = [ - "once_cell", -] - -[[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-wsl" -version = "0.4.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" -dependencies = [ - "is-docker", - "once_cell", -] +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "is_executable" @@ -2179,12 +1655,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "is_terminal_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" - [[package]] name = "itertools" version = "0.10.5" @@ -2194,15 +1664,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.11" @@ -2263,25 +1724,39 @@ dependencies = [ ] [[package]] -name = "keccak" -version = "0.1.5" +name = "jsonrpc" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +checksum = "3662a38d341d77efecb73caf01420cfa5aa63c0253fd7bc05289ef9f6616e1bf" dependencies = [ - "cpufeatures", + "base64 0.13.1", + "minreq", + "serde", + "serde_json", ] [[package]] -name = "keyring" -version = "3.2.1" +name = "k256" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030a9b84bb2a2f3673d4c8b8236091ed5d8f6b66a56d8085471d8abd5f3c6a80" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ - "byteorder", - "dbus-secret-service", - "openssl", - "security-framework", - "windows-sys 0.59.0", + "cfg-if 1.0.0", + "ecdsa", + "elliptic-curve", + "once_cell", + "serdect", + "sha2", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", ] [[package]] @@ -2301,33 +1776,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.158" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" - -[[package]] -name = "libdbus-sys" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06085512b750d640299b79be4bad3d2fa90a9c00b1fd9e1b46364f66f0485c72" -dependencies = [ - "cc", - "pkg-config", -] - -[[package]] -name = "libgit2-sys" -version = "0.17.0+1.8.1" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" -dependencies = [ - "cc", - "libc", - "libssh2-sys", - "libz-sys", - "openssl-sys", - "pkg-config", -] +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libloading" @@ -2339,12 +1790,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - [[package]] name = "libredox" version = "0.1.3" @@ -2353,42 +1798,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", - "redox_syscall 0.5.3", -] - -[[package]] -name = "libssh2-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" -dependencies = [ - "cc", - "libc", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "libz-sys" -version = "1.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" -dependencies = [ - "serde", + "redox_syscall", ] [[package]] @@ -2413,15 +1823,6 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" -[[package]] -name = "lru" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" -dependencies = [ - "hashbrown 0.12.3", -] - [[package]] name = "lru" version = "0.12.4" @@ -2431,21 +1832,6 @@ dependencies = [ "hashbrown 0.14.5", ] -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[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" @@ -2479,15 +1865,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -2498,15 +1875,18 @@ dependencies = [ ] [[package]] -name = "mio" -version = "0.8.11" +name = "minreq" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "763d142cdff44aaadd9268bebddb156ef6c65a0e13486bb81673cf2d8739f9b0" dependencies = [ - "libc", "log", - "wasi", - "windows-sys 0.48.0", + "once_cell", + "rustls 0.21.12", + "rustls-webpki 0.101.7", + "serde", + "serde_json", + "webpki-roots 0.25.4", ] [[package]] @@ -2515,30 +1895,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", "wasi", "windows-sys 0.52.0", ] -[[package]] -name = "miow" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "359f76430b20a79f9e20e115b3428614e654f04fab314482fc0fda0ebd3c6044" -dependencies = [ - "windows-sys 0.48.0", -] - -[[package]] -name = "names" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" -dependencies = [ - "rand", -] - [[package]] name = "native-tls" version = "0.2.12" @@ -2615,129 +1977,65 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35cbb989542587b47205e608324ddd391f0cee1c22b4b64ae49f458334b95907" dependencies = [ "borsh", + "schemars", "serde", ] [[package]] -name = "near-async" -version = "0.24.1" +name = "near-chain-configs" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e11b7dc58cb8371377925ed7df76a384063a228ecba2a4b29e54214ff9416d" +checksum = "deaf11eb7af2624547867ee6daad28568e57404ec01a526d0e36b089f6ae3617" dependencies = [ - "actix", + "anyhow", + "bytesize", + "chrono", "derive_more", - "futures", - "near-async-derive", - "near-o11y", - "near-performance-metrics", - "near-time 0.24.1", + "near-config-utils 0.25.0", + "near-crypto 0.25.0", + "near-parameters 0.25.0", + "near-primitives 0.25.0", + "near-time 0.25.0", + "num-rational", "once_cell", "serde", "serde_json", + "sha2", + "smart-default", "time", - "tokio", "tracing", ] -[[package]] -name = "near-async-derive" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ba6b56963ed6f85d3fa2ad9baf083cbbf1bc9cabcf4818e775f959c29fe948" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", -] - [[package]] name = "near-chain-configs" -version = "0.24.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ebf8d7673891f3197daa31ede9e83afed95fe1f7024e4b21527efd73f3c66cf" +checksum = "0784e55d9dee91ca830c6199d15ad18fc628f930a5d0946bb0949956026dd64f" dependencies = [ "anyhow", "bytesize", "chrono", "derive_more", - "near-async", - "near-config-utils 0.24.1", - "near-crypto 0.24.1", - "near-parameters 0.24.1", - "near-primitives 0.24.1", - "num-rational 0.3.2", + "near-config-utils 0.26.0", + "near-crypto 0.26.0", + "near-parameters 0.26.0", + "near-primitives 0.26.0", + "near-time 0.26.0", + "num-rational", "once_cell", "serde", "serde_json", - "sha2 0.10.8", - "smart-default 0.6.0", + "sha2", + "smart-default", "time", "tracing", ] -[[package]] -name = "near-cli-rs" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7598f2f9b7267848989195a895b590bbc031facfac3286e0d59ac0a14ca3ede0" -dependencies = [ - "bip39", - "bs58 0.5.1", - "bytesize", - "cargo-util", - "clap", - "color-eyre", - "derive_more", - "dirs", - "easy-ext 1.0.2", - "ed25519-dalek", - "futures", - "hex", - "indenter", - "indicatif", - "inquire", - "interactive-clap", - "interactive-clap-derive", - "keyring", - "linked-hash-map", - "near-abi", - "near-crypto 0.24.1", - "near-gas", - "near-jsonrpc-client", - "near-jsonrpc-primitives", - "near-primitives 0.24.1", - "near-socialdb-client", - "near-token", - "open", - "openssl", - "prettytable", - "reqwest", - "rust_decimal", - "serde", - "serde_json", - "shell-words", - "shellexpand", - "slipped10", - "smart-default 0.7.1", - "strum 0.24.1", - "strum_macros 0.24.3", - "textwrap", - "thiserror", - "tokio", - "toml", - "tracing", - "tracing-indicatif", - "tracing-subscriber", - "url", - "wasmparser 0.211.1", - "zstd 0.13.2", -] - [[package]] name = "near-config-utils" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "270955a98d49ff56e4e1286ab5a2e78aa131585eba92bd3c56a8c39f7f1f58e3" +checksum = "ae8f85d03abe7dbb0778a56ba0f03a74ce2c8bbd3151e75256c9fba03d6a0f8b" dependencies = [ "anyhow", "json_comments", @@ -2747,9 +2045,9 @@ dependencies = [ [[package]] name = "near-config-utils" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8f85d03abe7dbb0778a56ba0f03a74ce2c8bbd3151e75256c9fba03d6a0f8b" +checksum = "d96c1682d13e9a8a62ea696395bf17afc4ed4b60535223251168217098c27a50" dependencies = [ "anyhow", "json_comments", @@ -2759,9 +2057,9 @@ dependencies = [ [[package]] name = "near-crypto" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969d525d0e1b255f9cfbff071a66406aba2f3a89f413ac6e78e755e171e27dd1" +checksum = "fee0fc88667a502f7a0b58765a14e7f31e99c4b95006e8d7fb1259a0d6cbbd82" dependencies = [ "blake2", "borsh", @@ -2771,11 +2069,12 @@ dependencies = [ "ed25519-dalek", "hex", "near-account-id", - "near-config-utils 0.24.1", - "near-stdx 0.24.1", + "near-config-utils 0.25.0", + "near-stdx 0.25.0", "once_cell", "primitive-types", - "secp256k1", + "rand", + "secp256k1 0.27.0", "serde", "serde_json", "subtle", @@ -2784,9 +2083,9 @@ dependencies = [ [[package]] name = "near-crypto" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee0fc88667a502f7a0b58765a14e7f31e99c4b95006e8d7fb1259a0d6cbbd82" +checksum = "907fdcefa3a42976cd6a8bf626fe2a87eb0d3b3ff144adc67cf32d53c9494b32" dependencies = [ "blake2", "borsh", @@ -2796,12 +2095,12 @@ dependencies = [ "ed25519-dalek", "hex", "near-account-id", - "near-config-utils 0.25.0", - "near-stdx 0.25.0", + "near-config-utils 0.26.0", + "near-stdx 0.26.0", "once_cell", "primitive-types", "rand", - "secp256k1", + "secp256k1 0.27.0", "serde", "serde_json", "subtle", @@ -2810,20 +2109,20 @@ dependencies = [ [[package]] name = "near-fmt" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "015244b8faaeb1affb40b26018266bb5dd189a27d6c98998466895023fb9af32" +checksum = "06dca548e1323551b6ff4203725ac0cf1566fa6de8e93b8eba5baceb3fbdc06b" dependencies = [ - "near-primitives-core 0.24.1", + "near-primitives-core 0.25.0", ] [[package]] name = "near-fmt" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06dca548e1323551b6ff4203725ac0cf1566fa6de8e93b8eba5baceb3fbdc06b" +checksum = "7a36518bfcf2177096d4298d9158ba698ffd6944cb035ecc0938b098337b933c" dependencies = [ - "near-primitives-core 0.25.0", + "near-primitives-core 0.26.0", ] [[package]] @@ -2833,24 +2132,60 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180edcc7dc2fac41f93570d0c7b759c1b6d492f6ad093d749d644a40b4310a97" dependencies = [ "borsh", - "interactive-clap", "schemars", "serde", ] [[package]] name = "near-jsonrpc-client" -version = "0.11.0" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66a17771cabf1ecc162c1d6770e5fd2a6b50d74171cb0755306bf06e553ba3d" +dependencies = [ + "borsh", + "lazy_static", + "log", + "near-chain-configs 0.25.0", + "near-crypto 0.25.0", + "near-jsonrpc-primitives 0.25.0", + "near-primitives 0.25.0", + "reqwest", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "near-jsonrpc-client" +version = "0.12.0" +source = "git+https://github.com/omni-rs/near-jsonrpc-client-rs?tag=v0.12.1#bbb519ef1869c66655f334eaa57fa284770bc33a" +dependencies = [ + "borsh", + "lazy_static", + "log", + "near-chain-configs 0.25.0", + "near-crypto 0.25.0", + "near-jsonrpc-primitives 0.25.0", + "near-primitives 0.25.0", + "reqwest", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "near-jsonrpc-client" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e60cee17ae276bfa0d463032231902d866b58ff93f9ff4ff6cd0fdd9efcb9c4" +checksum = "161fdc8f73fd9e19a97e05acb10e985ba89bd06e88543cdfd0c8dad0dac266c5" dependencies = [ "borsh", "lazy_static", "log", - "near-chain-configs", - "near-crypto 0.24.1", - "near-jsonrpc-primitives", - "near-primitives 0.24.1", + "near-chain-configs 0.26.0", + "near-crypto 0.26.0", + "near-jsonrpc-primitives 0.26.0", + "near-primitives 0.26.0", "reqwest", "serde", "serde_json", @@ -2859,15 +2194,15 @@ dependencies = [ [[package]] name = "near-jsonrpc-primitives" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2164dcfa3a28b833109242d2e7d57979d983414076ca745014669f5a8171de2e" +checksum = "a5478af3f1ef47ff3d2a5c58c1fab1e334ff0d2074db1744bcf4d5afef8d3470" dependencies = [ "arbitrary", - "near-chain-configs", - "near-crypto 0.24.1", - "near-primitives 0.24.1", - "near-rpc-error-macro 0.24.1", + "near-chain-configs 0.25.0", + "near-crypto 0.25.0", + "near-primitives 0.25.0", + "near-rpc-error-macro 0.25.0", "serde", "serde_json", "thiserror", @@ -2875,43 +2210,33 @@ dependencies = [ ] [[package]] -name = "near-o11y" -version = "0.24.1" +name = "near-jsonrpc-primitives" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cb83e6d4cbdef654bc62e1ca27647419deba7787f62f33f34119ab52f347edf" +checksum = "2b24bfd0fedef42e07daa79e463a7908e9abee4f6de3532e0e1dde45f6951657" dependencies = [ - "actix", - "base64 0.21.7", - "clap", - "near-crypto 0.24.1", - "near-primitives-core 0.24.1", - "once_cell", - "opentelemetry", - "opentelemetry-otlp", - "opentelemetry-semantic-conventions", - "opentelemetry_sdk", - "prometheus", + "arbitrary", + "near-chain-configs 0.26.0", + "near-crypto 0.26.0", + "near-primitives 0.26.0", + "near-rpc-error-macro 0.26.0", "serde", "serde_json", "thiserror", - "tokio", - "tracing", - "tracing-appender", - "tracing-opentelemetry", - "tracing-subscriber", + "time", ] [[package]] name = "near-parameters" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57794a59e931eeace65eda1560453e4fe1ff1583b62fa906d0cb11731bc3a1d2" +checksum = "2fe415e1632a3fd6fe5d221e8ed16f92d0d1cc9a5716e6f9ff25844b242bad1b" dependencies = [ "borsh", "enum-map", "near-account-id", - "near-primitives-core 0.24.1", - "num-rational 0.3.2", + "near-primitives-core 0.25.0", + "num-rational", "serde", "serde_repr", "serde_yaml", @@ -2921,15 +2246,15 @@ dependencies = [ [[package]] name = "near-parameters" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fe415e1632a3fd6fe5d221e8ed16f92d0d1cc9a5716e6f9ff25844b242bad1b" +checksum = "e41afea5c5e84763586bafc5f5e1b63d90ef4e5454e18406cab8df120178db8d" dependencies = [ "borsh", "enum-map", "near-account-id", - "near-primitives-core 0.25.0", - "num-rational 0.3.2", + "near-primitives-core 0.26.0", + "num-rational", "serde", "serde_repr", "serde_yaml", @@ -2937,28 +2262,11 @@ dependencies = [ "thiserror", ] -[[package]] -name = "near-performance-metrics" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f62b33bc0d59782d3cd1af9a7d023393b094f03afb3e83b8d02eee412b8014" -dependencies = [ - "actix", - "bitflags 1.3.2", - "bytes", - "futures", - "libc", - "once_cell", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "near-primitives" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97175c346de2dcad949c4a5351b65377d54e6edfc435373bf09d39da9f8fce40" +checksum = "5e4ec81b11520c89c04ff13b79a73d62bd407a8a6a9002502e557cfbc53c3961" dependencies = [ "arbitrary", "base64 0.21.7", @@ -2968,29 +2276,29 @@ dependencies = [ "cfg-if 1.0.0", "chrono", "derive_more", - "easy-ext 0.2.9", + "easy-ext", "enum-map", "hex", - "itertools 0.10.5", - "near-crypto 0.24.1", - "near-fmt 0.24.1", - "near-parameters 0.24.1", - "near-primitives-core 0.24.1", - "near-rpc-error-macro 0.24.1", - "near-stdx 0.24.1", - "near-time 0.24.1", - "num-rational 0.3.2", + "itertools", + "near-crypto 0.25.0", + "near-fmt 0.25.0", + "near-parameters 0.25.0", + "near-primitives-core 0.25.0", + "near-rpc-error-macro 0.25.0", + "near-stdx 0.25.0", + "near-structs-checker-lib 0.25.0", + "near-time 0.25.0", + "num-rational", "once_cell", "ordered-float", "primitive-types", "rand", "rand_chacha", - "reed-solomon-erasure", "serde", "serde_json", "serde_with", "sha3", - "smart-default 0.6.0", + "smart-default", "strum 0.24.1", "thiserror", "tracing", @@ -2999,9 +2307,9 @@ dependencies = [ [[package]] name = "near-primitives" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4ec81b11520c89c04ff13b79a73d62bd407a8a6a9002502e557cfbc53c3961" +checksum = "165c2dc0fc20d839cfd7948d930ef5e8a4ed2b095abe83e0076ef5d4a5df58ed" dependencies = [ "arbitrary", "base64 0.21.7", @@ -3011,19 +2319,19 @@ dependencies = [ "cfg-if 1.0.0", "chrono", "derive_more", - "easy-ext 0.2.9", + "easy-ext", "enum-map", "hex", - "itertools 0.10.5", - "near-crypto 0.25.0", - "near-fmt 0.25.0", - "near-parameters 0.25.0", - "near-primitives-core 0.25.0", - "near-rpc-error-macro 0.25.0", - "near-stdx 0.25.0", - "near-structs-checker-lib", - "near-time 0.25.0", - "num-rational 0.3.2", + "itertools", + "near-crypto 0.26.0", + "near-fmt 0.26.0", + "near-parameters 0.26.0", + "near-primitives-core 0.26.0", + "near-rpc-error-macro 0.26.0", + "near-stdx 0.26.0", + "near-structs-checker-lib 0.26.0", + "near-time 0.26.0", + "num-rational", "once_cell", "ordered-float", "primitive-types", @@ -3033,7 +2341,7 @@ dependencies = [ "serde_json", "serde_with", "sha3", - "smart-default 0.6.0", + "smart-default", "strum 0.24.1", "thiserror", "tracing", @@ -3042,9 +2350,9 @@ dependencies = [ [[package]] name = "near-primitives-core" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4333e0cb2e98c89b434d700bac701a02b1df91a3b29fa1ab6d879727b22cd82" +checksum = "05f6e4b981eb5f1a08c85ec4d4de4672da584cdb9aadff26609a7eb59db707dc" dependencies = [ "arbitrary", "base64 0.21.7", @@ -3053,18 +2361,19 @@ dependencies = [ "derive_more", "enum-map", "near-account-id", - "num-rational 0.3.2", + "near-structs-checker-lib 0.25.0", + "num-rational", "serde", "serde_repr", - "sha2 0.10.8", + "sha2", "thiserror", ] [[package]] name = "near-primitives-core" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f6e4b981eb5f1a08c85ec4d4de4672da584cdb9aadff26609a7eb59db707dc" +checksum = "51fd53f992168589c52022dd220c84a7f2ede92251631a06a3817e4b22af5836" dependencies = [ "arbitrary", "base64 0.21.7", @@ -3073,56 +2382,56 @@ dependencies = [ "derive_more", "enum-map", "near-account-id", - "near-structs-checker-lib", - "num-rational 0.3.2", + "near-structs-checker-lib 0.26.0", + "num-rational", "serde", "serde_repr", - "sha2 0.10.8", + "sha2", "thiserror", ] [[package]] name = "near-rpc-error-core" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "072735e35cccb9cde9827793bf08bd9192c23167cf840c287bf65afc968c31e8" +checksum = "72469e7c06bf99bb7e9d5a66438c008d3b85c8c5d8f36d8c31b35968f6f599d4" dependencies = [ "quote", "serde", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "near-rpc-error-core" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72469e7c06bf99bb7e9d5a66438c008d3b85c8c5d8f36d8c31b35968f6f599d4" +checksum = "df598b0785a3e36d7e4fb73afcdf20536988b13d07cead71dfa777db4783e552" dependencies = [ "quote", "serde", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "near-rpc-error-macro" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa5a967de9f1480140de15620926b4f5292384e8a3672683e73478594107fa0" +checksum = "bb0bd52b705619ceb5d5ea9171ecf44f00513101c903928474eca957d07f3fdb" dependencies = [ - "near-rpc-error-core 0.24.1", + "near-rpc-error-core 0.25.0", "serde", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "near-rpc-error-macro" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0bd52b705619ceb5d5ea9171ecf44f00513101c903928474eca957d07f3fdb" +checksum = "647ef261df99ad877c08c97af2f10368c8b8cde0968250d3482a5a249e9f3926" dependencies = [ - "near-rpc-error-core 0.25.0", + "near-rpc-error-core 0.26.0", "serde", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3140,24 +2449,26 @@ dependencies = [ [[package]] name = "near-sdk" -version = "5.4.0" +version = "5.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3d8d80b1e3f6b1403a18704c5a2fc60176943e32ed9896d238805cd4c65390" +checksum = "4e296b02c85539c16659e171242d6c6bbea87eec7c9ef860d8dfd3fb3168a18a" dependencies = [ "base64 0.22.1", "borsh", "bs58 0.5.1", + "near-abi", "near-account-id", - "near-crypto 0.25.0", + "near-crypto 0.26.0", "near-gas", - "near-parameters 0.25.0", - "near-primitives 0.25.0", - "near-primitives-core 0.25.0", + "near-parameters 0.26.0", + "near-primitives 0.26.0", + "near-primitives-core 0.26.0", "near-sdk-macros", "near-sys", "near-token", "near-vm-runner", "once_cell", + "schemars", "serde", "serde_json", "wee_alloc", @@ -3165,9 +2476,9 @@ dependencies = [ [[package]] name = "near-sdk-macros" -version = "5.4.0" +version = "5.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e359ccd96ddcc1dad8402ee80c5f4900b8fa5895b4f0bf84c182066a0aa6ed3f" +checksum = "0adc79466aa556f56a995c0db34a933b32597ab92bbb0e526597118899c8bcaf" dependencies = [ "Inflector", "darling", @@ -3177,7 +2488,7 @@ dependencies = [ "serde_json", "strum 0.26.3", "strum_macros 0.26.4", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3185,7 +2496,7 @@ name = "near-simple-encoding" version = "0.0.1" dependencies = [ "near-sdk", - "near-workspaces", + "near-workspaces 0.14.0", "omni-transaction", "serde_json", "tokio", @@ -3197,55 +2508,54 @@ version = "0.0.1" dependencies = [ "bs58 0.5.1", "near-sdk", - "near-workspaces", + "near-workspaces 0.14.0", "omni-transaction", "serde_json", "tokio", ] [[package]] -name = "near-socialdb-client" -version = "0.5.0" +name = "near-stdx" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb11a7c0fdd8b22ec806cf1703a0aa65550a7d0dc2237125b7e8436a5e9fcd2" -dependencies = [ - "color-eyre", - "near-crypto 0.24.1", - "near-jsonrpc-client", - "near-jsonrpc-primitives", - "near-primitives 0.24.1", - "near-token", - "serde", - "serde_json", - "url", -] +checksum = "999173ea1e88ca421ff10969273cc1ad42b291af3f5a25827be1ad080e24dd89" [[package]] name = "near-stdx" -version = "0.24.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1c4937647390c254e530ba8d3e296c192e67ea0364e3d7d4aef64563ffcf6a" +checksum = "6d5c43f6181873287ddaa25edcc2943d0f2d5da9588231516f2ed0549db1fbac" [[package]] -name = "near-stdx" +name = "near-structs-checker-core" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "999173ea1e88ca421ff10969273cc1ad42b291af3f5a25827be1ad080e24dd89" +checksum = "0c9486fba198ad9369042fceacd05a6590c2e9f4d03101898e8c27738d0a50e3" [[package]] name = "near-structs-checker-core" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e53379bee876286de4ad31dc7f9fde8db12527c39d401d94f4d42cd021b8fce" + +[[package]] +name = "near-structs-checker-lib" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9486fba198ad9369042fceacd05a6590c2e9f4d03101898e8c27738d0a50e3" +checksum = "e6a89246f95d81d1a80e443b0f367c55e3e8e4177a9ddee5385906d10b57e534" +dependencies = [ + "near-structs-checker-core 0.25.0", + "near-structs-checker-macro 0.25.0", +] [[package]] name = "near-structs-checker-lib" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a89246f95d81d1a80e443b0f367c55e3e8e4177a9ddee5385906d10b57e534" +checksum = "8f984805f225c9b19681a124af7783078459e87ea63dde751b62e7cb404b1d6a" dependencies = [ - "near-structs-checker-core", - "near-structs-checker-macro", + "near-structs-checker-core 0.26.0", + "near-structs-checker-macro 0.26.0", ] [[package]] @@ -3254,6 +2564,12 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "084c673f50291300dc6c2d31b0e075289076fe18c3f0b62dc5202102f2bc463a" +[[package]] +name = "near-structs-checker-macro" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66319954983ae164fd0b714ae9d8b09edc26c74d9b3a1f51e564bb14720adb8e" + [[package]] name = "near-sys" version = "0.2.2" @@ -3262,9 +2578,9 @@ checksum = "dbf4ca5c805cb78700e10e43484902d8da05f25788db277999d209568aaf4c8e" [[package]] name = "near-time" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66de5e1e2b748aae827bb5dd80c715037ba7cf074f68ad5241b55bf2aaea793" +checksum = "c3b49356eacf06348b96063567f218732f56bc51968035ee38b8e656b4492cb4" dependencies = [ "once_cell", "serde", @@ -3274,9 +2590,9 @@ dependencies = [ [[package]] name = "near-time" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3b49356eacf06348b96063567f218732f56bc51968035ee38b8e656b4492cb4" +checksum = "f1d37b864f04d9aebbc3b88ac63ba989d94f221de694bcc8af639cc284a89f64" dependencies = [ "once_cell", "serde", @@ -3291,33 +2607,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd3e60aa26a74dc514b1b6408fdd06cefe2eb0ff029020956c1c6517594048fd" dependencies = [ "borsh", - "interactive-clap", + "schemars", "serde", ] [[package]] name = "near-vm-runner" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4d2501d0bc7385de3f6407d8a8159346f443f8cef7af24d028df7abb830738b" +checksum = "b5a2fecdbec69a1748bd80aa0d73e4de0064d2d8097f429677d3e37a6bde3b2d" dependencies = [ "blst", "borsh", "bytesize", "ed25519-dalek", "enum-map", - "lru 0.12.4", - "near-crypto 0.25.0", - "near-parameters 0.25.0", - "near-primitives-core 0.25.0", - "near-stdx 0.25.0", - "num-rational 0.3.2", + "lru", + "near-crypto 0.26.0", + "near-parameters 0.26.0", + "near-primitives-core 0.26.0", + "near-stdx 0.26.0", + "num-rational", "once_cell", "ripemd", "rustix", "serde", "serde_repr", - "sha2 0.10.8", + "sha2", "sha3", "strum 0.24.1", "tempfile", @@ -3328,14 +2644,52 @@ dependencies = [ [[package]] name = "near-workspaces" -version = "0.12.0" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5640094eac57d5b0c4303c7a64b1e43925ee7e836882ce48a3a8e0deff0a3712" +dependencies = [ + "async-trait", + "base64 0.22.1", + "bs58 0.5.1", + "cargo-near-build", + "cargo_metadata", + "chrono", + "fs2", + "json-patch", + "libc", + "near-abi-client", + "near-account-id", + "near-chain-configs 0.25.0", + "near-crypto 0.25.0", + "near-gas", + "near-jsonrpc-client 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "near-jsonrpc-primitives 0.25.0", + "near-primitives 0.25.0", + "near-sandbox-utils", + "near-token", + "rand", + "reqwest", + "serde", + "serde_json", + "sha2", + "tempfile", + "thiserror", + "tokio", + "tokio-retry", + "tracing", + "url", +] + +[[package]] +name = "near-workspaces" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b375600c271c3a2e4908bc646bcdb58409f1648dcb345a5d9cb1c69ea1c5eb" +checksum = "f59e15efadb1d2e4c21d4d1a8d5a8f8a732eb8f16cfb54a1a56628ab5bf5a125" dependencies = [ "async-trait", "base64 0.22.1", "bs58 0.5.1", - "cargo-near", + "cargo-near-build", "cargo_metadata", "chrono", "fs2", @@ -3343,19 +2697,19 @@ dependencies = [ "libc", "near-abi-client", "near-account-id", - "near-chain-configs", - "near-crypto 0.24.1", + "near-chain-configs 0.26.0", + "near-crypto 0.26.0", "near-gas", - "near-jsonrpc-client", - "near-jsonrpc-primitives", - "near-primitives 0.24.1", + "near-jsonrpc-client 0.13.0", + "near-jsonrpc-primitives 0.26.0", + "near-primitives 0.26.0", "near-sandbox-utils", "near-token", "rand", "reqwest", "serde", "serde_json", - "sha2 0.10.8", + "sha2", "tempfile", "thiserror", "tokio", @@ -3397,27 +2751,6 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" -[[package]] -name = "newline-converter" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b6b097ecb1cbfed438542d16e84fd7ad9b0c76c8a65b7f9039212a3d14dc7f" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "nix" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" -dependencies = [ - "bitflags 2.6.0", - "cfg-if 1.0.0", - "cfg_aliases", - "libc", -] - [[package]] name = "nom" version = "7.1.3" @@ -3441,30 +2774,6 @@ dependencies = [ "nom", ] -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint 0.4.6", - "num-complex", - "num-integer", - "num-iter", - "num-rational 0.4.2", - "num-traits", -] - [[package]] name = "num-bigint" version = "0.3.3" @@ -3476,25 +2785,6 @@ dependencies = [ "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", -] - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", -] - [[package]] name = "num-conv" version = "0.1.0" @@ -3510,17 +2800,6 @@ 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.3.2" @@ -3528,23 +2807,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" dependencies = [ "autocfg", - "num-bigint 0.3.3", + "num-bigint", "num-integer", "num-traits", "serde", ] -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint 0.4.6", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -3560,61 +2828,67 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", ] -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - [[package]] name = "object" -version = "0.32.2" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] +[[package]] +name = "omni-testing-utilities" +version = "0.1.0" +source = "git+https://github.com/omni-rs/omni-testing-utilities?branch=main#ddb7e82dfd500a50d986be2ce7ee28e1b4165194" +dependencies = [ + "bitcoin", + "bitcoind-json-rpc-regtest", + "bs58 0.5.1", + "hex", + "k256", + "near-crypto 0.25.0", + "near-jsonrpc-client 0.12.0 (git+https://github.com/omni-rs/near-jsonrpc-client-rs?tag=v0.12.1)", + "near-jsonrpc-primitives 0.25.0", + "near-primitives 0.25.0", + "near-sdk", + "near-workspaces 0.13.0", + "ripemd", + "serde", + "serde_json", + "sha3", + "tempfile", +] + [[package]] name = "omni-transaction" version = "0.1.0" -source = "git+https://github.com/edsonalcala/omni-transaction-rs.git?branch=adding-bitcoin-support#de7483e627cc54be628295e57939fdf74cc781e4" +source = "git+https://github.com/EdsonAlcala/omni-transaction-rs?branch=master#eb62431f7a3a6907740287d499b3bcc72432bde0" dependencies = [ "borsh", "bs58 0.5.1", "hex", + "near-account-id", "near-sdk", "rlp", + "schemars", "serde", "serde-big-array", - "sha2 0.10.8", + "serde_json", + "sha2", ] [[package]] name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - -[[package]] -name = "open" -version = "5.3.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" +checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" dependencies = [ - "is-wsl", - "libc", - "pathdiff", + "portable-atomic", ] [[package]] @@ -3640,7 +2914,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3649,15 +2923,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-src" -version = "300.3.2+3.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" -dependencies = [ - "cc", -] - [[package]] name = "openssl-sys" version = "0.9.103" @@ -3666,96 +2931,15 @@ checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", - "openssl-src", "pkg-config", "vcpkg", ] -[[package]] -name = "opentelemetry" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900d57987be3f2aeb70d385fff9b27fb74c5723cc9a52d904d4f9c807a0667bf" -dependencies = [ - "futures-core", - "futures-sink", - "js-sys", - "once_cell", - "pin-project-lite", - "thiserror", - "urlencoding", -] - -[[package]] -name = "opentelemetry-otlp" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a016b8d9495c639af2145ac22387dcb88e44118e45320d9238fbf4e7889abcb" -dependencies = [ - "async-trait", - "futures-core", - "http 0.2.12", - "opentelemetry", - "opentelemetry-proto", - "opentelemetry-semantic-conventions", - "opentelemetry_sdk", - "prost", - "thiserror", - "tokio", - "tonic", -] - -[[package]] -name = "opentelemetry-proto" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8fddc9b68f5b80dae9d6f510b88e02396f006ad48cac349411fbecc80caae4" -dependencies = [ - "opentelemetry", - "opentelemetry_sdk", - "prost", - "tonic", -] - -[[package]] -name = "opentelemetry-semantic-conventions" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9ab5bd6c42fb9349dcf28af2ba9a0667f697f9bdcca045d39f2cec5543e2910" - -[[package]] -name = "opentelemetry_sdk" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e90c7113be649e31e9a0f8b5ee24ed7a16923b322c3c5ab6367469c049d6b7e" -dependencies = [ - "async-trait", - "crossbeam-channel", - "futures-channel", - "futures-executor", - "futures-util", - "glob", - "once_cell", - "opentelemetry", - "ordered-float", - "percent-encoding", - "rand", - "thiserror", - "tokio", - "tokio-stream", -] - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "ordered-float" -version = "4.2.2" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" +checksum = "44d501f1a72f71d3c063a6bbc8f7271fa73aa09fe5d6283b6571e2ed176a2537" dependencies = [ "borsh", "num-traits", @@ -3763,29 +2947,6 @@ dependencies = [ "serde", ] -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "owo-colors" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.3" @@ -3793,21 +2954,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core 0.9.10", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -3818,7 +2965,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.5.3", + "redox_syscall", "smallvec", "windows-targets 0.52.6", ] @@ -3834,25 +2981,16 @@ dependencies = [ "subtle", ] -[[package]] -name = "pathdiff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" -dependencies = [ - "camino", -] - [[package]] name = "pbkdf2" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "digest 0.10.7", - "hmac 0.12.1", + "digest", + "hmac", "password-hash", - "sha2 0.10.8", + "sha2", ] [[package]] @@ -3863,7 +3001,7 @@ checksum = "13f4d162ecaaa1467de5afbe62d597757b674b51da8bb4e587430c5fdb2af7aa" dependencies = [ "fallible-iterator", "scroll 0.10.2", - "uuid 0.8.2", + "uuid", ] [[package]] @@ -3898,7 +3036,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3913,11 +3051,21 @@ 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 = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plain" @@ -3927,9 +3075,9 @@ checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "powerfmt" @@ -3954,26 +3102,12 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "prettyplease" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" -dependencies = [ - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "prettytable" -version = "0.10.0" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46480520d1b77c9a3482d39939fcf96831537a250ec62d4fd8fbdf8e0302e781" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ - "csv", - "encode_unicode 1.0.0", - "is-terminal", - "lazy_static", - "term", - "unicode-width", + "proc-macro2", + "syn 1.0.109", ] [[package]] @@ -4004,7 +3138,6 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", "version_check", ] @@ -4028,70 +3161,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prometheus" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" -dependencies = [ - "cfg-if 1.0.0", - "fnv", - "lazy_static", - "memchr", - "parking_lot 0.12.3", - "protobuf", - "thiserror", -] - -[[package]] -name = "prost" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-derive" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" -dependencies = [ - "anyhow", - "itertools 0.12.1", - "proc-macro2", - "quote", - "syn 2.0.77", -] - -[[package]] -name = "protobuf" -version = "2.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" - -[[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" @@ -4141,18 +3210,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] @@ -4168,89 +3228,51 @@ dependencies = [ "thiserror", ] -[[package]] -name = "reed-solomon-erasure" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7263373d500d4d4f505d43a2a662d475a894aa94503a1ee28e9188b5f3960d4f" -dependencies = [ - "libm", - "lru 0.7.8", - "parking_lot 0.11.2", - "smallvec", - "spin", -] - [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" - -[[package]] -name = "rend" -version = "0.4.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" -dependencies = [ - "bytecheck", -] +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.7" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" dependencies = [ "base64 0.22.1", "bytes", "encoding_rs", - "futures-channel", "futures-core", "futures-util", - "h2 0.4.6", - "http 1.1.0", - "http-body 1.0.1", + "h2", + "http", + "http-body", "http-body-util", - "hyper 1.4.1", + "hyper", "hyper-rustls", "hyper-tls", "hyper-util", @@ -4266,7 +3288,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", @@ -4278,6 +3300,16 @@ dependencies = [ "windows-registry", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + [[package]] name = "ring" version = "0.17.8" @@ -4299,36 +3331,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ - "digest 0.10.7", -] - -[[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 1.10.0", -] - -[[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", + "digest", ] [[package]] @@ -4341,22 +3344,6 @@ dependencies = [ "rustc-hex", ] -[[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 = "rustc-demangle" version = "0.1.24" @@ -4380,9 +3367,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.36" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -4393,40 +3380,61 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.12" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring", + "rustls-webpki 0.101.7", + "sct", +] + +[[package]] +name = "rustls" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" dependencies = [ "log", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" + +[[package]] +name = "rustls-webpki" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] [[package]] name = "rustls-webpki" -version = "0.102.7" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -4445,22 +3453,13 @@ 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.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4484,7 +3483,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -4516,14 +3515,33 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", ] [[package]] -name = "seahash" -version = "4.1.0" +name = "sec1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "serdect", + "subtle", + "zeroize", +] [[package]] name = "secp256k1" @@ -4532,7 +3550,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" dependencies = [ "rand", - "secp256k1-sys", + "secp256k1-sys 0.8.1", +] + +[[package]] +name = "secp256k1" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" +dependencies = [ + "bitcoin_hashes", + "rand", + "secp256k1-sys 0.10.1", + "serde", ] [[package]] @@ -4544,6 +3574,15 @@ dependencies = [ "cc", ] +[[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" @@ -4559,9 +3598,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -4578,9 +3617,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -4596,13 +3635,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -4613,7 +3652,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -4636,16 +3675,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", -] - -[[package]] -name = "serde_spanned" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" -dependencies = [ - "serde", + "syn 2.0.79", ] [[package]] @@ -4662,15 +3692,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.9.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" +checksum = "9720086b3357bcb44fce40117d769a4d068c70ecfa190850a980a71755f66fcc" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.5.0", + "indexmap 2.6.0", "serde", "serde_derive", "serde_json", @@ -4680,14 +3710,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.9.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" +checksum = "5f1abbfe725f27678f4663bcacb75a83e829fd464c25d78dd038a3a29e307cec" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -4696,7 +3726,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "itoa", "ryu", "serde", @@ -4704,27 +3734,24 @@ dependencies = [ ] [[package]] -name = "sha1" -version = "0.10.6" +name = "serdect" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.10.7", + "base16ct", + "serde", ] [[package]] -name = "sha2" -version = "0.9.9" +name = "sha1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "block-buffer 0.9.0", "cfg-if 1.0.0", "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "digest", ] [[package]] @@ -4735,7 +3762,7 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -4744,67 +3771,16 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.7", + "digest", "keccak", ] -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shell-escape" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f" - -[[package]] -name = "shell-words" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" - -[[package]] -name = "shellexpand" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" -dependencies = [ - "dirs", -] - [[package]] name = "shlex" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "signal-hook" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -dependencies = [ - "libc", - "signal-hook-registry", -] - -[[package]] -name = "signal-hook-mio" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" -dependencies = [ - "libc", - "mio 0.8.11", - "signal-hook", -] - [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -4819,12 +3795,10 @@ name = "signature" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" - -[[package]] -name = "simdutf8" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +dependencies = [ + "digest", + "rand_core", +] [[package]] name = "siphasher" @@ -4841,17 +3815,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "slipped10" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a45443e66aa5d96db5e02d17db056e1ca970232a4fe73e1f9bc1816d68f4e98" -dependencies = [ - "ed25519-dalek", - "hmac 0.9.0", - "sha2 0.9.9", -] - [[package]] name = "smallvec" version = "1.13.2" @@ -4869,23 +3832,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "smart-default" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", -] - -[[package]] -name = "smawk" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" - [[package]] name = "socket2" version = "0.5.7" @@ -4902,6 +3848,16 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[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" @@ -4922,7 +3878,7 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot 0.12.3", + "parking_lot", "phf_shared", "precomputed-hash", "serde", @@ -4972,7 +3928,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -4990,7 +3946,7 @@ dependencies = [ "debugid", "memmap2", "stable_deref_trait", - "uuid 0.8.2", + "uuid", ] [[package]] @@ -5010,7 +3966,7 @@ dependencies = [ "lazycell", "nom", "nom-supreme", - "parking_lot 0.12.3", + "parking_lot", "pdb", "regex", "scroll 0.11.0", @@ -5019,7 +3975,7 @@ dependencies = [ "smallvec", "symbolic-common", "thiserror", - "wasmparser 0.83.0", + "wasmparser", "zip 0.5.13", ] @@ -5036,9 +3992,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -5054,15 +4010,9 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.77", + "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" @@ -5101,9 +4051,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" dependencies = [ "filetime", "libc", @@ -5112,9 +4062,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if 1.0.0", "fastrand", @@ -5123,56 +4073,24 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi", -] - -[[package]] -name = "textwrap" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" -dependencies = [ - "smawk", - "unicode-linebreak", - "unicode-width", -] - [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", + "syn 2.0.79", ] [[package]] @@ -5230,15 +4148,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" -[[package]] -name = "tmp_env" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56eb9e5a28c3c4f0a6aa8ea70a8ad2d6c53e4bf364571ce78f57945b6766843" -dependencies = [ - "rand", -] - [[package]] name = "tokio" version = "1.40.0" @@ -5248,8 +4157,8 @@ dependencies = [ "backtrace", "bytes", "libc", - "mio 1.0.2", - "parking_lot 0.12.3", + "mio", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", @@ -5257,16 +4166,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.4.0" @@ -5275,7 +4174,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -5305,22 +4204,11 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls", + "rustls 0.23.13", "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" @@ -5334,93 +4222,23 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - [[package]] name = "toml_datetime" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -dependencies = [ - "serde", -] [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.5.0", - "serde", - "serde_spanned", + "indexmap 2.6.0", "toml_datetime", "winnow", ] -[[package]] -name = "tonic" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" -dependencies = [ - "async-stream", - "async-trait", - "axum", - "base64 0.21.7", - "bytes", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", - "hyper-timeout", - "percent-encoding", - "pin-project", - "prost", - "tokio", - "tokio-stream", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[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-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" @@ -5438,18 +4256,6 @@ dependencies = [ "tracing-core", ] -[[package]] -name = "tracing-appender" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" -dependencies = [ - "crossbeam-channel", - "thiserror", - "time", - "tracing-subscriber", -] - [[package]] name = "tracing-attributes" version = "0.1.27" @@ -5458,7 +4264,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -5468,76 +4274,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", - "valuable", -] - -[[package]] -name = "tracing-error" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" -dependencies = [ - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "tracing-indicatif" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069580424efe11d97c3fef4197fa98c004fa26672cc71ad8770d224e23b1951d" -dependencies = [ - "indicatif", - "tracing", - "tracing-core", - "tracing-subscriber", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-opentelemetry" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9be14ba1bbe4ab79e9229f7f89fab8d120b865859f10527f31c033e599d2284" -dependencies = [ - "js-sys", - "once_cell", - "opentelemetry", - "opentelemetry_sdk", - "smallvec", - "tracing", - "tracing-core", - "tracing-log", - "tracing-subscriber", - "web-time", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", ] [[package]] @@ -5566,58 +4302,25 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-linebreak" -version = "0.1.5" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" - -[[package]] -name = "unicode-width" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" - -[[package]] -name = "unix_path" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af8e291873ae77c4c8d9c9b34d0bee68a35b048fb39c263a5155e0e353783eaf" -dependencies = [ - "unix_str", -] - -[[package]] -name = "unix_str" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ace0b4755d0a2959962769239d56267f8a024fef2d9b32666b3dcd0946b0906" - [[package]] name = "unsafe-libyaml" version = "0.2.11" @@ -5640,10 +4343,10 @@ dependencies = [ "flate2", "log", "once_cell", - "rustls", + "rustls 0.23.13", "rustls-pki-types", "url", - "webpki-roots", + "webpki-roots 0.26.6", ] [[package]] @@ -5668,36 +4371,12 @@ dependencies = [ "serde", ] -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - [[package]] name = "uuid" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -[[package]] -name = "uuid" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - [[package]] name = "vcpkg" version = "0.2.15" @@ -5710,49 +4389,6 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" -[[package]] -name = "vt100" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84cd863bf0db7e392ba3bd04994be3473491b31e66340672af5d11943c6274de" -dependencies = [ - "itoa", - "log", - "unicode-width", - "vte", -] - -[[package]] -name = "vte" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5022b5fbf9407086c180e9557be968742d839e68346af7792b8592489732197" -dependencies = [ - "arrayvec", - "utf8parse", - "vte_generate_state_changes", -] - -[[package]] -name = "vte_generate_state_changes" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e369bee1b05d510a7b4ed645f5faa90619e05437111783ea5848f28d97d3c2e" -dependencies = [ - "proc-macro2", - "quote", -] - -[[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" @@ -5790,7 +4426,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "wasm-bindgen-shared", ] @@ -5824,7 +4460,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5841,20 +4477,6 @@ version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" -[[package]] -name = "wasmparser" -version = "0.211.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3189cc8a91f547390e2f043ca3b3e3fe0892f7d581767fd4e4b7f3dc3fe8e561" -dependencies = [ - "ahash 0.8.11", - "bitflags 2.6.0", - "hashbrown 0.14.5", - "indexmap 2.5.0", - "semver", - "serde", -] - [[package]] name = "web-sys" version = "0.3.70" @@ -5866,20 +4488,16 @@ dependencies = [ ] [[package]] -name = "web-time" -version = "1.1.0" +name = "webpki-roots" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.5" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd24728e5af82c6c4ec1b66ac4844bdf8156257fccda846ec58b42cd0cdbe6a" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] @@ -5896,6 +4514,18 @@ dependencies = [ "winapi", ] +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + [[package]] name = "winapi" version = "0.3.9" @@ -5912,15 +4542,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[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 = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -6116,9 +4737,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -6145,9 +4766,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.21" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539a77ee7c0de333dcc6da69b177380a0b81e0dacfa4f7344c465a36871ee601" +checksum = "af4e2e2f7cba5a093896c1e150fbfe177d1883e7448200efb81d40b9d339ef26" [[package]] name = "zerocopy" @@ -6167,7 +4788,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -6187,7 +4808,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -6228,7 +4849,7 @@ dependencies = [ "crc32fast", "crossbeam-utils", "flate2", - "hmac 0.12.1", + "hmac", "pbkdf2", "sha1", "time", diff --git a/Cargo.toml b/Cargo.toml index ec96b9a..c228ba5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,18 +11,18 @@ license = "MIT OR Apache-2.0" homepage = "https://github.com/Omni-rs/examples" repository = "https://github.com/Omni-rs/examples" publish = false -# exclude = ["examples/"] [workspace.dependencies] -near-sdk = "5.3.0" -omni-transaction = { git = "https://github.com/edsonalcala/omni-transaction-rs.git", branch = "adding-bitcoin-support" } -near-workspaces = { version = "0.12.0", features = [ +near-sdk = "5.5.0" +omni-transaction = { git = "https://github.com/EdsonAlcala/omni-transaction-rs", branch = "master" } +near-workspaces = { version = "0.14.0", features = [ "experimental", "unstable", ] } tokio = { version = "1.12.0", features = ["full"] } serde_json = "1" hex = "0.4.3" +omni-testing-utilities = { git = "https://github.com/omni-rs/omni-testing-utilities", branch = "main" } [profile.release] codegen-units = 1 diff --git a/README.md b/README.md index 75bea1a..3e453ae 100644 --- a/README.md +++ b/README.md @@ -56,9 +56,13 @@ The recommendation is to go thought each example and read the annotated integrat - [ ] [Simple encoding with signature](#) - [ ] [Simple signing](#) -### Bitcoin +### Bitcoin - [x] [Simple encoding](./examples/bitcoin-simple-encoding) -- [ ] [Simple encoding passing args](#) -- [ ] [Simple encoding with signature](#) -- [ ] [Simple signing](#) +- [ ] [Simple encoding passing args](./examples/bitcoin-simple-encoding-passing-args) +- [ ] [Simple signing (legacy)](#) +- [x] [Simple signing (segwit)](./examples/bitcoin-signing-segwit/) +- [x] [Bitcoin signing with propagation (legacy)](./examples/bitcoin-signing-with-propagation-legacy) +- [ ] [Bitcoin signing with propagation (segwit)](#) +- [x] [Bitcoin signing (segwit) multiple UTXOs](./examples/bitcoin-signing-segwit-multiple-utxos/) +- [ ] [Bitcoin signing (segwit) multiple UTXOs with propagation](#) \ No newline at end of file diff --git a/bin/bitcoind-linux b/bin/bitcoind-linux new file mode 100755 index 0000000..6e3792d Binary files /dev/null and b/bin/bitcoind-linux differ diff --git a/examples/bitcoin-signing-segwit-multiple-utxos/Cargo.toml b/examples/bitcoin-signing-segwit-multiple-utxos/Cargo.toml new file mode 100644 index 0000000..a78cdce --- /dev/null +++ b/examples/bitcoin-signing-segwit-multiple-utxos/Cargo.toml @@ -0,0 +1,50 @@ +[package] +name = "bitcoin-signing-segwit-multiple-utxos" +publish.workspace = true +version.workspace = true +edition.workspace = true +rust-version.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true + +[lib] +crate-type = ["cdylib"] + +[lints] +workspace = true + +[dependencies] +near-sdk.workspace = true +omni-transaction.workspace = true +hex.workspace = true + +[dev-dependencies] +bitcoin = { version = "0.32.0", default-features = false, features = [ + "std", + "serde", + "rand-std", + "rand", + "secp-lowmemory", + "secp-recovery", +] } +near-primitives = "0.25.0" +near-jsonrpc-primitives = "0.25.0" +near-jsonrpc-client = { git = "https://github.com/omni-rs/near-jsonrpc-client-rs", tag = "v0.12.1" } +near-crypto = "0.25.0" +sha3 = "0.10.8" +k256 = { version = "0.13.1", features = [ + "sha256", + "ecdsa", + "serde", + "arithmetic", + "expose-field", +] } +bs58 = "0.5.1" +ripemd = "0.1.3" +futures = "0.3" +omni-testing-utilities.workspace = true +near-workspaces.workspace = true +tokio.workspace = true +serde_json.workspace = true diff --git a/examples/bitcoin-signing-segwit-multiple-utxos/README.md b/examples/bitcoin-signing-segwit-multiple-utxos/README.md new file mode 100644 index 0000000..7ef656a --- /dev/null +++ b/examples/bitcoin-signing-segwit-multiple-utxos/README.md @@ -0,0 +1,35 @@ +# Bitcoin Signing Multiple UTXOs (Segwit) + +This example demonstrates how to sign a Bitcoin transaction (segwit) with multiple UTXOs using the MPC (Multi-Party Computation) signer from a NEAR contract and verify the signatures. + +## Overview + +1. **Setup Bitcoin Network**: We use `bitcoind` to simulate a Bitcoin network. +2. **Create Users**: We create 1 user (Bob) with their respective private key. +3. **Derive Bitcoin address**: We derive the Bitcoin address from the NEAR contract account. +4. **Generate UTXOs**: We "give" UTXOs to the derived Bitcoin address that is controlled by the NEAR contract by generating blocks to the derived address. +5. **Transfer BTC**: We transfer BTC from the derived Bitcoin address to Bob, but since the derived Bitcoin address is controlled by the MPC Signer and the NEAR contract account, we need to sign the transaction using the MPC signer that will allow us to transfer BTC to Bob. + +## How to run the example + +Since this example deploys the NEAR contract to the NEAR testnet, you need to have the NEAR CLI and a `config.json` file with the following structure: + +```json +{ + "account_id": ".testnet", + "public_key": "", + "private_key": "" +} +``` + +Then run the following command to deploy the contract: + +```bash +just run bitcoin-signing-segwit-multiple-utxos --deploy +``` + +If you want to run the test without deploying the contract, run the following command: + +```bash +just run bitcoin-signing-segwit-multiple-utxos +``` diff --git a/examples/bitcoin-signing-segwit-multiple-utxos/src/lib.rs b/examples/bitcoin-signing-segwit-multiple-utxos/src/lib.rs new file mode 100644 index 0000000..b8ca606 --- /dev/null +++ b/examples/bitcoin-signing-segwit-multiple-utxos/src/lib.rs @@ -0,0 +1,69 @@ +use near_sdk::serde::Serialize; +use near_sdk::{ext_contract, Promise}; +use near_sdk::{near, Gas, NearToken}; + +use omni_transaction::bitcoin::bitcoin_transaction::BitcoinTransaction; +use omni_transaction::bitcoin::types::EcdsaSighashType; +use omni_transaction::bitcoin::types::ScriptBuf; + +const MPC_CONTRACT_ACCOUNT_ID: &str = "v1.signer-prod.testnet"; +const GAS: Gas = Gas::from_tgas(50); +const PATH: &str = "bitcoin-1"; +const KEY_VERSION: u32 = 0; + +#[derive(Debug, Serialize)] +#[serde(crate = "near_sdk::serde")] +pub struct SignRequest { + pub payload: [u8; 32], + pub path: String, + pub key_version: u32, +} + +#[allow(dead_code)] +#[ext_contract(mpc_contract)] +trait MPCContract { + fn sign(&self, request: SignRequest); + fn experimental_signature_deposit(&self) -> NearToken; +} + +#[near(contract_state)] +#[derive(Default)] +pub struct Contract {} + +#[near] +impl Contract { + pub fn generate_sighash_p2wpkh( + &self, + bitcoin_tx: BitcoinTransaction, + input_index: usize, + script_code: &ScriptBuf, + value: u64, + ) -> Vec { + bitcoin_tx.build_for_signing_segwit(EcdsaSighashType::All, input_index, script_code, value) + } + + pub fn sign_sighash_p2wpkh( + &self, + sighash_p2wpkh: String, + attached_deposit: NearToken, + ) -> Promise { + // Decode the hex string back to bytes + let payload_vec = hex::decode(sighash_p2wpkh).expect("Invalid hex string"); + + // Ensure the payload is exactly 32 bytes + let payload: [u8; 32] = payload_vec + .try_into() + .expect("Payload must be 32 bytes long"); + + let request: SignRequest = SignRequest { + payload, + path: PATH.to_string(), + key_version: KEY_VERSION, + }; + + mpc_contract::ext(MPC_CONTRACT_ACCOUNT_ID.parse().unwrap()) + .with_static_gas(GAS) + .with_attached_deposit(attached_deposit) + .sign(request) + } +} diff --git a/examples/bitcoin-signing-segwit-multiple-utxos/tests/test_contract.rs b/examples/bitcoin-signing-segwit-multiple-utxos/tests/test_contract.rs new file mode 100644 index 0000000..b2f1d22 --- /dev/null +++ b/examples/bitcoin-signing-segwit-multiple-utxos/tests/test_contract.rs @@ -0,0 +1,308 @@ +// Rust Bitcoin Dependencies +use bitcoin::hashes::{sha256d, Hash}; +use bitcoin::secp256k1::{Message, PublicKey as BitcoinSecp256k1PublicKey, Secp256k1}; +use bitcoin::{ScriptBuf as BitcoinScriptBuf, WPubkeyHash}; +// NEAR Dependencies +use near_crypto::InMemorySigner; +use near_jsonrpc_client::methods; +use near_jsonrpc_primitives::types::query::QueryResponseKind; +use near_primitives::action::{Action, FunctionCallAction}; +use near_primitives::transaction::{Transaction, TransactionV0}; +use near_primitives::types::{BlockReference, Finality, FunctionArgs}; +use near_primitives::views::{QueryRequest, TxExecutionStatus}; + +use omni_testing_utilities::address::get_public_key_as_bytes; +use omni_testing_utilities::signature::{create_signature, extract_multiple_signatures}; +// Omni Transaction Dependencies +use omni_transaction::bitcoin::bitcoin_transaction::BitcoinTransaction; +use omni_transaction::bitcoin::types::{ + Amount, Hash as OmniHash, LockTime, OutPoint, ScriptBuf, Sequence, TxIn, TxOut, Txid, Version, + Witness, +}; +use omni_transaction::transaction_builder::{TransactionBuilder, TxBuilder}; +use omni_transaction::types::BITCOIN; +// Omni Testing Utilities +use omni_testing_utilities::bitcoind::AddressType; +use omni_testing_utilities::{ + address::{get_derived_address_for_segwit, get_public_key_hash}, + bitcoin::{get_bitcoin_instance, BTCTestContext}, + environment::get_user_account_info_from_file, + near::{ + compile_and_deploy_contract, get_near_rpc_client, get_nonce_and_block_hash, + send_transaction, + }, +}; +// Other Dependencies +use futures::future::join_all; +use serde_json::json; + +const OMNI_SPEND_AMOUNT: Amount = Amount::from_sat(500_000); +const PATH: &str = "bitcoin-1"; +const MPC_CONTRACT_ACCOUNT: &str = "v1.signer-prod.testnet"; + +#[tokio::test] +async fn test_sighash_p2wpkh_btc_multiple_signing_remote() -> Result<(), Box> +{ + let should_deploy = std::env::var("DEPLOY").is_ok(); + + // Start Bitcoin node + let bitcoind = get_bitcoin_instance().unwrap(); + let btc_client = &bitcoind.client; + + // Read the config + let user_account = get_user_account_info_from_file(None).unwrap(); + + // Create near signer + let signer: InMemorySigner = InMemorySigner::from_secret_key( + user_account.account_id.clone(), + user_account.private_key.clone(), + ); + + // Create near json rpc client + let near_json_rpc_client = get_near_rpc_client(); + + if should_deploy { + compile_and_deploy_contract(&user_account, &signer, &near_json_rpc_client).await?; + } + + // Prepare the BTC Test Context + let btc_test_context = BTCTestContext::new(btc_client).unwrap(); + + // Setup Bob (the receiver) + let bob = btc_test_context.setup_account(AddressType::Bech32).unwrap(); + + // Get the derived address of the NEAR contract + let derived_address = get_derived_address_for_segwit(&user_account.account_id, PATH); + let public_key_hash = get_public_key_hash(&derived_address); + + btc_test_context.generate_to_derived_address(&derived_address)?; + btc_test_context.generate_to_derived_address(&derived_address)?; + + // Now we need to get the UTXO of the NEAR contract, we use scantxoutset to get the first UTXO + let unspent_utxos = btc_test_context + .scan_utxo_for_address_with_count(&derived_address, 2) + .unwrap(); + + // Generate more blocks to avoid issues with confirmations + btc_test_context.generate_to_derived_address(&derived_address)?; + + let mut inputs = Vec::new(); + let mut total_utxo_amount = 0; + + for unspent in &unspent_utxos { + // Build the transaction where the sender is the derived address + let near_contract_spending_txid_str = unspent["txid"].as_str().unwrap(); + let near_contract_spending_hash = + OmniHash::from_hex(near_contract_spending_txid_str).unwrap(); + let near_contract_spending_txid = Txid(near_contract_spending_hash); + let near_contract_spending_vout = unspent["vout"].as_u64().unwrap() as usize; + + // Create inputs using Omni library + let txin: TxIn = TxIn { + previous_output: OutPoint::new( + near_contract_spending_txid, + near_contract_spending_vout as u32, + ), + script_sig: ScriptBuf::default(), // For a p2wpkh script_sig is empty. + sequence: Sequence::ENABLE_RBF_NO_LOCKTIME, + witness: Witness::default(), // Filled in after signing. + }; + + inputs.push(txin); + + let utxo_amount = + Amount::from_sat((unspent["amount"].as_f64().unwrap() * 100_000_000.0) as u64); + + total_utxo_amount += utxo_amount.to_sat(); + } + + let change_amount: Amount = + Amount::from_sat(total_utxo_amount) - OMNI_SPEND_AMOUNT - Amount::from_sat(1000); // 1000 satoshis for fee + + let near_p2wpkh = WPubkeyHash::from_slice(&public_key_hash).unwrap(); + + // The change output is locked to a key controlled by us. + let change_txout = TxOut { + value: change_amount, + script_pubkey: ScriptBuf(BitcoinScriptBuf::new_p2wpkh(&near_p2wpkh).into_bytes()), + }; + + // The spend output is locked to a key controlled by the receiver. In this case to Alice. + let spend_txout = TxOut { + value: OMNI_SPEND_AMOUNT, + script_pubkey: ScriptBuf(bob.address.script_pubkey().into_bytes()), + }; + + let near_contract_spending_tx: BitcoinTransaction = TransactionBuilder::new::() + .version(Version::Two) + .lock_time(LockTime::from_height(0).unwrap()) + .inputs(inputs) + .outputs(vec![spend_txout, change_txout]) + .build(); + + let futures = unspent_utxos.iter().enumerate().map(|(i, unspent)| { + let _utxo_amount = + Amount::from_sat((unspent["amount"].as_f64().unwrap() * 100_000_000.0) as u64); + + let script_pub_key = BitcoinScriptBuf::new_p2wpkh(&near_p2wpkh); + let script_pubkey_near = script_pub_key.p2wpkh_script_code().unwrap(); + let script_code = ScriptBuf(script_pubkey_near.into_bytes()); + + // Call the NEAR contract to generate the sighash + let method_name = "generate_sighash_p2wpkh"; + + let args = json!({ + "bitcoin_tx": near_contract_spending_tx, + "input_index": i, + "script_code":script_code, + "value": OMNI_SPEND_AMOUNT.to_sat() + }); + + methods::query::RpcQueryRequest { + block_reference: BlockReference::Finality(Finality::Final), + request: QueryRequest::CallFunction { + account_id: user_account.account_id.clone(), + method_name: method_name.to_string(), + args: FunctionArgs::from(args.to_string().into_bytes()), + }, + } + }); + + let responses = join_all(futures.map(|request| near_json_rpc_client.call(request))).await; + let mut actions = Vec::new(); + let mut sighhashes_messages = Vec::new(); + + for response in responses { + match response { + Ok(response) => { + if let QueryResponseKind::CallResult(call_result) = response.kind { + if let Ok(result_str) = String::from_utf8(call_result.result.clone()) { + // Parse the result + let result_bytes: Vec = result_str + .trim_matches(|c| c == '[' || c == ']') // Remove brackets + .split(',') // Split by comma + .map(|s| s.trim().parse::().unwrap()) // Parse each byte + .collect(); + + // Calculate the sighash + let sighash_omni = sha256d::Hash::hash(&result_bytes); + let msg_omni = + Message::from_digest_slice(sighash_omni.as_byte_array()).unwrap(); + + sighhashes_messages.push(msg_omni); + + // Get the deposit amount for the mpc signer + let request = methods::query::RpcQueryRequest { + block_reference: Finality::Final.into(), + request: QueryRequest::CallFunction { + account_id: MPC_CONTRACT_ACCOUNT.parse().unwrap(), + method_name: "experimental_signature_deposit".to_string(), + args: FunctionArgs::from(vec![]), + }, + }; + + let response = near_json_rpc_client.call(request).await?; + + let mut attached_deposit: u128 = 0; + + if let QueryResponseKind::CallResult(result) = response.kind { + // Decode the byte array to a string + let result_str = String::from_utf8(result.result).unwrap(); + attached_deposit = + result_str.trim_matches('"').parse::().unwrap(); + } else { + println!("Error getting the attached deposit"); + } + + // Create the args for the sign_sighash_p2pkh method + let args = json!({ + "sighash_p2wpkh": hex::encode(msg_omni.as_ref()), + "attached_deposit": attached_deposit.to_string() + }); + + // Create the action + let signing_action = Action::FunctionCall(Box::new(FunctionCallAction { + method_name: "sign_sighash_p2wpkh".to_string(), + args: args.to_string().into_bytes(), // Convert directly to Vec + gas: 100_000_000_000_000, + deposit: 1000000000000000000000000, + })); + + actions.push(signing_action); + } + } + } + Err(e) => { + eprintln!("Error: {:?}", e); + } + } + } + + // Send the transaction using the actions created + + let result = get_nonce_and_block_hash( + &near_json_rpc_client, + user_account.account_id.clone(), + signer.public_key(), + ) + .await; + + let (nonce, block_hash) = result.unwrap(); + + let nonce = nonce + 1; + + // Create the transaction + let near_tx: Transaction = Transaction::V0(TransactionV0 { + signer_id: user_account.account_id.clone(), + public_key: signer.public_key(), + nonce, + receiver_id: user_account.account_id.clone(), + block_hash, + actions, + }); + + // Sign the transaction + let signer = &signer.into(); + let signed_transaction = near_tx.sign(signer); + + // Send the transaction + let request: methods::send_tx::RpcSendTransactionRequest = + methods::send_tx::RpcSendTransactionRequest { + signed_transaction, + wait_until: TxExecutionStatus::Final, + }; + + let signer_response: methods::tx::RpcTransactionResponse = + send_transaction(&near_json_rpc_client, request).await?; + + let signatures = extract_multiple_signatures(&signer_response).unwrap(); + + for (index, (big_r, s)) in signatures.iter().enumerate() { + println!("Verifying signature {}", index); + + // Build the signature + let signature_built = create_signature(big_r, s); + + // Verify signature + let secp = Secp256k1::new(); + + let public_key_as_bytes = get_public_key_as_bytes(&derived_address); + + let bitcoin_secp256k1_public_key = + BitcoinSecp256k1PublicKey::from_slice(&public_key_as_bytes).unwrap(); + + // Verify signature + let is_valid = secp + .verify_ecdsa( + &sighhashes_messages[index], + &signature_built.unwrap(), + &bitcoin_secp256k1_public_key, + ) + .is_ok(); + + assert!(is_valid, "The signature should be valid"); + + println!("Signature verified"); + } + Ok(()) +} diff --git a/examples/bitcoin-signing-segwit/Cargo.toml b/examples/bitcoin-signing-segwit/Cargo.toml new file mode 100644 index 0000000..45b4eef --- /dev/null +++ b/examples/bitcoin-signing-segwit/Cargo.toml @@ -0,0 +1,49 @@ +[package] +name = "bitcoin-signing-segwit" +publish.workspace = true +version.workspace = true +edition.workspace = true +rust-version.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true + +[lib] +crate-type = ["cdylib"] + +[lints] +workspace = true + +[dependencies] +near-sdk.workspace = true +omni-transaction.workspace = true +hex.workspace = true + +[dev-dependencies] +bitcoin = { version = "0.32.0", default-features = false, features = [ + "std", + "serde", + "rand-std", + "rand", + "secp-lowmemory", + "secp-recovery", +] } +near-primitives = "0.25.0" +near-jsonrpc-primitives = "0.25.0" +near-jsonrpc-client = { git = "https://github.com/omni-rs/near-jsonrpc-client-rs", tag = "v0.12.1" } +near-crypto = "0.25.0" +sha3 = "0.10.8" +k256 = { version = "0.13.1", features = [ + "sha256", + "ecdsa", + "serde", + "arithmetic", + "expose-field", +] } +bs58 = "0.5.1" +ripemd = "0.1.3" +omni-testing-utilities.workspace = true +near-workspaces.workspace = true +tokio.workspace = true +serde_json.workspace = true diff --git a/examples/bitcoin-signing-segwit/README.md b/examples/bitcoin-signing-segwit/README.md new file mode 100644 index 0000000..71c0b5e --- /dev/null +++ b/examples/bitcoin-signing-segwit/README.md @@ -0,0 +1,35 @@ +# Bitcoin Signing (Segwit) + +This example demonstrates how to sign a Bitcoin transaction (segwit) using the MPC (Multi-Party Computation) signer from a NEAR contract and verify the signature. + +## Overview + +1. **Setup Bitcoin Network**: We use `bitcoind` to simulate a Bitcoin network. +2. **Create Users**: We create 1 user (Bob) with their respective private key. +3. **Derive Bitcoin address**: We derive the Bitcoin address from the NEAR contract account. +4. **Generate UTXOs**: We "give" UTXOs to the derived Bitcoin address that is controlled by the NEAR contract by generating blocks to the derived address. +5. **Transfer BTC**: We transfer BTC from the derived Bitcoin address to Bob, but since the derived Bitcoin address is controlled by the MPC Signer and the NEAR contract account, we need to sign the transaction using the MPC signer that will allow us to transfer BTC to Bob. + +## How to run the example + +Since this example deploys the NEAR contract to the NEAR testnet, you need to have the NEAR CLI and a `config.json` file with the following structure: + +```json +{ + "account_id": ".testnet", + "public_key": "", + "private_key": "" +} +``` + +Then run the following command to deploy the contract: + +```bash +just run bitcoin-signing-segwit --deploy +``` + +If you want to run the test without deploying the contract, run the following command: + +```bash +just run bitcoin-signing-segwit +``` diff --git a/examples/bitcoin-signing-segwit/src/lib.rs b/examples/bitcoin-signing-segwit/src/lib.rs new file mode 100644 index 0000000..b8ca606 --- /dev/null +++ b/examples/bitcoin-signing-segwit/src/lib.rs @@ -0,0 +1,69 @@ +use near_sdk::serde::Serialize; +use near_sdk::{ext_contract, Promise}; +use near_sdk::{near, Gas, NearToken}; + +use omni_transaction::bitcoin::bitcoin_transaction::BitcoinTransaction; +use omni_transaction::bitcoin::types::EcdsaSighashType; +use omni_transaction::bitcoin::types::ScriptBuf; + +const MPC_CONTRACT_ACCOUNT_ID: &str = "v1.signer-prod.testnet"; +const GAS: Gas = Gas::from_tgas(50); +const PATH: &str = "bitcoin-1"; +const KEY_VERSION: u32 = 0; + +#[derive(Debug, Serialize)] +#[serde(crate = "near_sdk::serde")] +pub struct SignRequest { + pub payload: [u8; 32], + pub path: String, + pub key_version: u32, +} + +#[allow(dead_code)] +#[ext_contract(mpc_contract)] +trait MPCContract { + fn sign(&self, request: SignRequest); + fn experimental_signature_deposit(&self) -> NearToken; +} + +#[near(contract_state)] +#[derive(Default)] +pub struct Contract {} + +#[near] +impl Contract { + pub fn generate_sighash_p2wpkh( + &self, + bitcoin_tx: BitcoinTransaction, + input_index: usize, + script_code: &ScriptBuf, + value: u64, + ) -> Vec { + bitcoin_tx.build_for_signing_segwit(EcdsaSighashType::All, input_index, script_code, value) + } + + pub fn sign_sighash_p2wpkh( + &self, + sighash_p2wpkh: String, + attached_deposit: NearToken, + ) -> Promise { + // Decode the hex string back to bytes + let payload_vec = hex::decode(sighash_p2wpkh).expect("Invalid hex string"); + + // Ensure the payload is exactly 32 bytes + let payload: [u8; 32] = payload_vec + .try_into() + .expect("Payload must be 32 bytes long"); + + let request: SignRequest = SignRequest { + payload, + path: PATH.to_string(), + key_version: KEY_VERSION, + }; + + mpc_contract::ext(MPC_CONTRACT_ACCOUNT_ID.parse().unwrap()) + .with_static_gas(GAS) + .with_attached_deposit(attached_deposit) + .sign(request) + } +} diff --git a/examples/bitcoin-signing-segwit/tests/test_contract.rs b/examples/bitcoin-signing-segwit/tests/test_contract.rs new file mode 100644 index 0000000..a445291 --- /dev/null +++ b/examples/bitcoin-signing-segwit/tests/test_contract.rs @@ -0,0 +1,272 @@ +// Rust Bitcoin Dependencies +use bitcoin::hashes::{sha256d, Hash}; +use bitcoin::secp256k1::{Message, PublicKey as BitcoinSecp256k1PublicKey, Secp256k1}; +use bitcoin::{ScriptBuf as BitcoinScriptBuf, WPubkeyHash}; +// NEAR Dependencies +use near_crypto::InMemorySigner; +use near_jsonrpc_client::methods; +use near_jsonrpc_primitives::types::query::QueryResponseKind; +use near_primitives::action::{Action, FunctionCallAction}; +use near_primitives::transaction::{Transaction, TransactionV0}; +use near_primitives::types::{BlockReference, Finality, FunctionArgs}; +use near_primitives::views::{QueryRequest, TxExecutionStatus}; +use omni_testing_utilities::address::get_public_key_as_bytes; +use omni_testing_utilities::signature::{create_signature, extract_big_r_and_s}; +// Omni Transaction Dependencies +use omni_transaction::bitcoin::bitcoin_transaction::BitcoinTransaction; +use omni_transaction::bitcoin::types::{ + Amount, Hash as OmniHash, LockTime, OutPoint, ScriptBuf, Sequence, TxIn, TxOut, Txid, Version, + Witness, +}; +use omni_transaction::transaction_builder::{TransactionBuilder, TxBuilder}; +use omni_transaction::types::BITCOIN; +// Omni Testing Utilities +use omni_testing_utilities::bitcoind::AddressType; +use omni_testing_utilities::{ + address::{get_derived_address_for_segwit, get_public_key_hash}, + bitcoin::{get_bitcoin_instance, BTCTestContext}, + environment::get_user_account_info_from_file, + near::{ + compile_and_deploy_contract, get_near_rpc_client, get_nonce_and_block_hash, + send_transaction, + }, +}; +// Other Dependencies +use serde_json::json; + +const OMNI_SPEND_AMOUNT: Amount = Amount::from_sat(500_000); +const PATH: &str = "bitcoin-1"; +const MPC_CONTRACT_ACCOUNT: &str = "v1.signer-prod.testnet"; + +#[tokio::test] +async fn test_sighash_p2wpkh_btc_signing_remote_with_propagation( +) -> Result<(), Box> { + let should_deploy = std::env::var("DEPLOY").is_ok(); + + // Start Bitcoin node + let bitcoind = get_bitcoin_instance().unwrap(); + let btc_client = &bitcoind.client; + + // Read the config + let user_account = get_user_account_info_from_file(None).unwrap(); + + // Create near signer + let signer: InMemorySigner = InMemorySigner::from_secret_key( + user_account.account_id.clone(), + user_account.private_key.clone(), + ); + + // Create near json rpc client + let near_json_rpc_client = get_near_rpc_client(); + + if should_deploy { + compile_and_deploy_contract(&user_account, &signer, &near_json_rpc_client).await?; + } + + // Prepare the BTC Test Context + let btc_test_context = BTCTestContext::new(btc_client).unwrap(); + + // Setup Bob (the receiver) + let bob = btc_test_context.setup_account(AddressType::Bech32).unwrap(); + + // Get the derived address of the NEAR contract + let derived_address = get_derived_address_for_segwit(&user_account.account_id, PATH); + let public_key_hash = get_public_key_hash(&derived_address); + + btc_test_context.generate_to_derived_address(&derived_address)?; + + // Now we need to get the UTXO of the NEAR contract, we use scantxoutset to get the first UTXO + let binding = btc_test_context + .scan_utxo_for_address_with_count(&derived_address, 1) + .unwrap(); + + let first_unspent_near_contract = binding.first().unwrap(); + + // Generate more blocks to avoid issues with confirmations + btc_test_context.generate_to_derived_address(&derived_address)?; + + // Build the transaction where the sender is the derived address + let near_contract_spending_txid_str = first_unspent_near_contract["txid"].as_str().unwrap(); + let near_contract_spending_hash = OmniHash::from_hex(near_contract_spending_txid_str).unwrap(); + let near_contract_spending_txid = Txid(near_contract_spending_hash); + let near_contract_spending_vout = + first_unspent_near_contract["vout"].as_u64().unwrap() as usize; + + // Create the transaction input + let near_contract_spending_txin: TxIn = TxIn { + previous_output: OutPoint::new( + near_contract_spending_txid, + near_contract_spending_vout as u32, + ), + script_sig: ScriptBuf::default(), // For a p2wpkh script_sig is empty. + sequence: Sequence::ENABLE_LOCKTIME_NO_RBF, + witness: Witness::default(), // Filled in after signing. + }; + + let utxo_amount = Amount::from_sat( + (first_unspent_near_contract["amount"].as_f64().unwrap() * 100_000_000.0) as u64, + ); + + let change_amount: Amount = utxo_amount - OMNI_SPEND_AMOUNT - Amount::from_sat(1000); // 1000 satoshis for fee + + // Create the transaction output + let near_contract_spending_txout = TxOut { + value: OMNI_SPEND_AMOUNT, + script_pubkey: ScriptBuf(bob.address.script_pubkey().into_bytes()), + }; + + let near_p2wpkh = WPubkeyHash::from_slice(&public_key_hash).unwrap(); + + // Create the change output + let near_contract_spending_change_txout = TxOut { + value: change_amount, + script_pubkey: ScriptBuf(BitcoinScriptBuf::new_p2wpkh(&near_p2wpkh).into_bytes()), + }; + + let near_contract_spending_tx: BitcoinTransaction = TransactionBuilder::new::() + .version(Version::Two) + .lock_time(LockTime::from_height(0).unwrap()) + .inputs(vec![near_contract_spending_txin]) + .outputs(vec![ + near_contract_spending_txout, + near_contract_spending_change_txout, + ]) + .build(); + + let script_pubkey_near_contract = BitcoinScriptBuf::new_p2wpkh(&near_p2wpkh) + .p2wpkh_script_code() + .unwrap(); + + let near_script_code = ScriptBuf(script_pubkey_near_contract.into_bytes()); + + // Call the NEAR contract to generate the sighash + let method_name = "generate_sighash_p2wpkh"; + let args = json!({ + "bitcoin_tx": near_contract_spending_tx, + "input_index": 0, + "script_code":near_script_code, + "value": OMNI_SPEND_AMOUNT.to_sat() + }); + + let request = methods::query::RpcQueryRequest { + block_reference: BlockReference::Finality(Finality::Final), + request: QueryRequest::CallFunction { + account_id: user_account.account_id.clone(), + method_name: method_name.to_string(), + args: FunctionArgs::from(args.to_string().into_bytes()), + }, + }; + + let response = near_json_rpc_client.call(request).await?; + + // Parse result + if let QueryResponseKind::CallResult(call_result) = response.kind { + if let Ok(result_str) = String::from_utf8(call_result.result.clone()) { + // Parse the result + let result_bytes: Vec = result_str + .trim_matches(|c| c == '[' || c == ']') // Remove brackets + .split(',') // Split by comma + .map(|s| s.trim().parse::().unwrap()) // Parse each byte + .collect(); + + // Calculate the sighash + let sighash_omni = sha256d::Hash::hash(&result_bytes); + let msg_omni = Message::from_digest_slice(sighash_omni.as_byte_array()).unwrap(); + + // Get the deposit amount for the mpc signer + let request = methods::query::RpcQueryRequest { + block_reference: Finality::Final.into(), + request: QueryRequest::CallFunction { + account_id: MPC_CONTRACT_ACCOUNT.parse().unwrap(), + method_name: "experimental_signature_deposit".to_string(), + args: FunctionArgs::from(vec![]), + }, + }; + + let response = near_json_rpc_client.call(request).await?; + + let mut attached_deposit: u128 = 0; + + if let QueryResponseKind::CallResult(result) = response.kind { + // Decode the byte array to a string + let result_str = String::from_utf8(result.result).unwrap(); + attached_deposit = result_str.trim_matches('"').parse::().unwrap(); + } else { + println!("Error getting the attached deposit"); + } + + // Create the args for the sign_sighash_p2pkh method + let args = json!({ + "sighash_p2wpkh": hex::encode(msg_omni.as_ref()), + "attached_deposit": attached_deposit.to_string() + }); + + // Create the action + let signing_action = Action::FunctionCall(Box::new(FunctionCallAction { + method_name: "sign_sighash_p2wpkh".to_string(), + args: args.to_string().into_bytes(), // Convert directly to Vec + gas: 100_000_000_000_000, + deposit: 1000000000000000000000000, + })); + + let result = get_nonce_and_block_hash( + &near_json_rpc_client, + user_account.account_id.clone(), + signer.public_key(), + ) + .await; + + let (nonce, block_hash) = result.unwrap(); + + let nonce = nonce + 1; + + // Create the transaction + let near_tx: Transaction = Transaction::V0(TransactionV0 { + signer_id: user_account.account_id.clone(), + public_key: signer.public_key(), + nonce, + receiver_id: user_account.account_id.clone(), + block_hash, + actions: vec![signing_action.clone()], + }); + + // Sign the transaction + let signer = &signer.into(); + let signed_transaction = near_tx.sign(signer); + + // Send the transaction + let request: methods::send_tx::RpcSendTransactionRequest = + methods::send_tx::RpcSendTransactionRequest { + signed_transaction, + wait_until: TxExecutionStatus::Final, + }; + + let signer_response = send_transaction(&near_json_rpc_client, request).await?; + let (big_r, s) = extract_big_r_and_s(&signer_response).unwrap(); + let signature_built = create_signature(&big_r, &s); + + // Verify signature + let secp = Secp256k1::new(); + + let public_key_as_bytes = get_public_key_as_bytes(&derived_address); + + let bitcoin_secp256k1_public_key = + BitcoinSecp256k1PublicKey::from_slice(&public_key_as_bytes).unwrap(); + + // Verify signature + let is_valid = secp + .verify_ecdsa( + &msg_omni, + &signature_built.unwrap(), + &bitcoin_secp256k1_public_key, + ) + .is_ok(); + + assert!(is_valid, "The signature should be valid"); + + println!("Signature verified"); + } + } + + Ok(()) +} diff --git a/examples/bitcoin-signing-with-propagation-legacy/Cargo.toml b/examples/bitcoin-signing-with-propagation-legacy/Cargo.toml new file mode 100644 index 0000000..d85417c --- /dev/null +++ b/examples/bitcoin-signing-with-propagation-legacy/Cargo.toml @@ -0,0 +1,49 @@ +[package] +name = "bitcoin-signing-with-propagation-legacy" +publish.workspace = true +version.workspace = true +edition.workspace = true +rust-version.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true + +[lib] +crate-type = ["cdylib"] + +[lints] +workspace = true + +[dependencies] +near-sdk.workspace = true +omni-transaction.workspace = true +hex.workspace = true + +[dev-dependencies] +bitcoin = { version = "0.32.0", default-features = false, features = [ + "std", + "serde", + "rand-std", + "rand", + "secp-lowmemory", + "secp-recovery", +] } +near-primitives = "0.25.0" +near-jsonrpc-primitives = "0.25.0" +near-jsonrpc-client = { git = "https://github.com/omni-rs/near-jsonrpc-client-rs", tag = "v0.12.1" } +near-crypto = "0.25.0" +sha3 = "0.10.8" +k256 = { version = "0.13.1", features = [ + "sha256", + "ecdsa", + "serde", + "arithmetic", + "expose-field", +] } +bs58 = "0.5.1" +ripemd = "0.1.3" +omni-testing-utilities.workspace = true +near-workspaces.workspace = true +tokio.workspace = true +serde_json.workspace = true diff --git a/examples/bitcoin-signing-with-propagation-legacy/README.md b/examples/bitcoin-signing-with-propagation-legacy/README.md new file mode 100644 index 0000000..28b43fb --- /dev/null +++ b/examples/bitcoin-signing-with-propagation-legacy/README.md @@ -0,0 +1,36 @@ +# Bitcoin Signing with Propagation (Legacy) + +This example demonstrates how to sign a Bitcoin transaction (legacy) using the MPC (Multi-Party Computation) signer from a NEAR contract and propagate the transaction to the Bitcoin network (RegTest mode). + +## Overview + +1. **Setup Bitcoin Network**: We use `bitcoind` to simulate a Bitcoin network. +2. **Create Users**: We create 1 user (Bob) with their respective private key. +3. **Derive Bitcoin address**: We derive the Bitcoin address from the NEAR contract account. +4. **Generate UTXOs**: We "give" UTXOs to the derived Bitcoin address that is controlled by the NEAR contract by generating blocks to the derived address. +5. **Transfer BTC**: We transfer BTC from the derived Bitcoin address to Bob, but since the derived Bitcoin address is controlled by the MPC Signer and the NEAR contract account, we need to sign the transaction using the MPC signer that will allow us to transfer BTC to Bob. +6. **Transaction Propagation**: Using the transaction payload signed, we submit this to the Bitcoin core node running in RegTest mode. + +## How to run the example + +Since this example deploys the NEAR contract to the NEAR testnet, you need to have the NEAR CLI and a `config.json` file with the following structure: + +```json +{ + "account_id": ".testnet", + "public_key": "", + "private_key": "" +} +``` + +Then run the following command to deploy the contract: + +```bash +just run bitcoin-signing-with-propagation-legacy --deploy +``` + +If you want to run the test without deploying the contract, run the following command: + +```bash +just run bitcoin-signing-with-propagation-legacy +``` diff --git a/examples/bitcoin-signing-with-propagation-legacy/src/lib.rs b/examples/bitcoin-signing-with-propagation-legacy/src/lib.rs new file mode 100644 index 0000000..ea1232d --- /dev/null +++ b/examples/bitcoin-signing-with-propagation-legacy/src/lib.rs @@ -0,0 +1,62 @@ +use near_sdk::serde::Serialize; +use near_sdk::{ext_contract, Promise}; +use near_sdk::{near, Gas, NearToken}; + +use omni_transaction::bitcoin::bitcoin_transaction::BitcoinTransaction; +use omni_transaction::bitcoin::types::EcdsaSighashType; + +const MPC_CONTRACT_ACCOUNT_ID: &str = "v1.signer-prod.testnet"; +const GAS: Gas = Gas::from_tgas(50); +const PATH: &str = "bitcoin-1"; +const KEY_VERSION: u32 = 0; + +#[derive(Debug, Serialize)] +#[serde(crate = "near_sdk::serde")] +pub struct SignRequest { + pub payload: [u8; 32], + pub path: String, + pub key_version: u32, +} + +#[allow(dead_code)] +#[ext_contract(mpc_contract)] +trait MPCContract { + fn sign(&self, request: SignRequest); + fn experimental_signature_deposit(&self) -> NearToken; +} + +#[near(contract_state)] +#[derive(Default)] +pub struct Contract {} + +#[near] +impl Contract { + pub fn generate_sighash_p2pkh(&self, bitcoin_tx: BitcoinTransaction) -> Vec { + bitcoin_tx.build_for_signing_legacy(EcdsaSighashType::All) + } + + pub fn sign_sighash_p2pkh( + &self, + sighash_p2pkh: String, + attached_deposit: NearToken, + ) -> Promise { + // Decode the hex string back to bytes + let payload_vec = hex::decode(sighash_p2pkh).expect("Invalid hex string"); + + // Ensure the payload is exactly 32 bytes + let payload: [u8; 32] = payload_vec + .try_into() + .expect("Payload must be 32 bytes long"); + + let request: SignRequest = SignRequest { + payload, + path: PATH.to_string(), + key_version: KEY_VERSION, + }; + + mpc_contract::ext(MPC_CONTRACT_ACCOUNT_ID.parse().unwrap()) + .with_static_gas(GAS) + .with_attached_deposit(attached_deposit) + .sign(request) + } +} diff --git a/examples/bitcoin-signing-with-propagation-legacy/tests/test_contract.rs b/examples/bitcoin-signing-with-propagation-legacy/tests/test_contract.rs new file mode 100644 index 0000000..5340f4a --- /dev/null +++ b/examples/bitcoin-signing-with-propagation-legacy/tests/test_contract.rs @@ -0,0 +1,278 @@ +// Rust Bitcoin Dependencies +use bitcoin::hashes::{sha256d, Hash}; +use bitcoin::secp256k1::Message; +use omni_testing_utilities::address::get_script_pub_key; +use omni_testing_utilities::bitcoind::AddressType; +// NEAR Dependencies +use near_crypto::InMemorySigner; +use near_jsonrpc_client::methods; +use near_jsonrpc_primitives::types::query::QueryResponseKind; +use near_primitives::action::{Action, FunctionCallAction}; +use near_primitives::transaction::{Transaction, TransactionV0}; +use near_primitives::types::{BlockReference, Finality, FunctionArgs}; +use near_primitives::views::{QueryRequest, TxExecutionStatus}; +// Omni Transaction Dependencies +use omni_transaction::bitcoin::bitcoin_transaction::BitcoinTransaction; +use omni_transaction::bitcoin::types::{ + Amount, Hash as OmniHash, LockTime, OutPoint, ScriptBuf, Sequence, TransactionType, TxIn, + TxOut, Txid, Version, Witness, +}; +use omni_transaction::transaction_builder::{TransactionBuilder, TxBuilder}; +use omni_transaction::types::BITCOIN; +// Omni Testing Utilities +use omni_testing_utilities::{ + address::get_derived_address, + bitcoin::{get_bitcoin_instance, BTCTestContext}, + environment::get_user_account_info_from_file, + near::{ + compile_and_deploy_contract, get_near_rpc_client, get_nonce_and_block_hash, + send_transaction, + }, + signature::{create_signature, extract_big_r_and_s}, +}; +// Other Dependencies +use serde_json::json; + +const OMNI_SPEND_AMOUNT: Amount = Amount::from_sat(500_000); +const PATH: &str = "bitcoin-1"; + +#[tokio::test] +async fn test_sighash_p2pkh_btc_signing_remote_with_propagation( +) -> Result<(), Box> { + let should_deploy = std::env::var("DEPLOY").is_ok(); + + // Start Bitcoin node + let bitcoind = get_bitcoin_instance().unwrap(); + let btc_client = &bitcoind.client; + + // Read the config + let user_account = get_user_account_info_from_file(None).unwrap(); + + // Create near signer + let signer: InMemorySigner = InMemorySigner::from_secret_key( + user_account.account_id.clone(), + user_account.private_key.clone(), + ); + + // Create near json rpc client + let near_json_rpc_client = get_near_rpc_client(); + + if should_deploy { + compile_and_deploy_contract(&user_account, &signer, &near_json_rpc_client).await?; + } + + // Prepare the BTC Test Context + let btc_test_context = BTCTestContext::new(btc_client).unwrap(); + + // Setup Bob (the receiver) + let bob = btc_test_context.setup_account(AddressType::Legacy).unwrap(); + + // Get the derived address of the NEAR contract + let derived_address = get_derived_address(&user_account.account_id, PATH); + let near_contract_script_pubkey = get_script_pub_key(&derived_address); + + btc_test_context.generate_to_derived_address(&derived_address)?; + + // Now we need to get the UTXO of the NEAR contract, we use scantxoutset to get the first UTXO + let binding = btc_test_context + .scan_utxo_for_address_with_count(&derived_address, 1) + .unwrap(); + + let first_unspent_near_contract = binding.first().unwrap(); + + // Generate more blocks to avoid issues with confirmations + btc_test_context.generate_to_derived_address(&derived_address)?; + + // Build the transaction where the sender is the derived address + let near_contract_spending_txid_str = first_unspent_near_contract["txid"].as_str().unwrap(); + let near_contract_spending_hash = OmniHash::from_hex(near_contract_spending_txid_str).unwrap(); + let near_contract_spending_txid = Txid(near_contract_spending_hash); + let near_contract_spending_vout = + first_unspent_near_contract["vout"].as_u64().unwrap() as usize; + + // Create the transaction input + let near_contract_spending_txin: TxIn = TxIn { + previous_output: OutPoint::new( + near_contract_spending_txid, + near_contract_spending_vout as u32, + ), + script_sig: ScriptBuf::default(), + sequence: Sequence::MAX, + witness: Witness::default(), + }; + + // Create the transaction output + let near_contract_spending_txout = TxOut { + value: OMNI_SPEND_AMOUNT, + script_pubkey: ScriptBuf(bob.script_pubkey.as_bytes().to_vec()), + }; + + let utxo_amount = Amount::from_sat( + (first_unspent_near_contract["amount"].as_f64().unwrap() * 100_000_000.0) as u64, + ); + + let change_amount: Amount = utxo_amount - OMNI_SPEND_AMOUNT - Amount::from_sat(1000); // 1000 satoshis for fee + + let near_contract_spending_change_txout = TxOut { + value: change_amount, + script_pubkey: ScriptBuf(near_contract_script_pubkey.clone()), + }; + + let mut near_contract_spending_tx: BitcoinTransaction = TransactionBuilder::new::() + .version(Version::One) + .lock_time(LockTime::from_height(0).unwrap()) + .inputs(vec![near_contract_spending_txin]) + .outputs(vec![ + near_contract_spending_txout, + near_contract_spending_change_txout, + ]) + .build(); + + // We add the script_pubkey of the NEAR contract as the script_sig + near_contract_spending_tx.input[0].script_sig = ScriptBuf(near_contract_script_pubkey); + + // Call the NEAR contract to generate the sighash + let method_name = "generate_sighash_p2pkh"; + let args = json!({ + "bitcoin_tx": near_contract_spending_tx + }); + + let request = methods::query::RpcQueryRequest { + block_reference: BlockReference::Finality(Finality::Final), + request: QueryRequest::CallFunction { + account_id: user_account.account_id.clone(), + method_name: method_name.to_string(), + args: FunctionArgs::from(args.to_string().into_bytes()), + }, + }; + + let response = near_json_rpc_client.call(request).await?; + + // Parse result + if let QueryResponseKind::CallResult(call_result) = response.kind { + if let Ok(result_str) = String::from_utf8(call_result.result.clone()) { + // Parse the result + let result_bytes: Vec = result_str + .trim_matches(|c| c == '[' || c == ']') // Eliminar corchetes + .split(',') // Dividir por comas + .map(|s| s.trim().parse::().unwrap()) // Convertir cada parte a u8 + .collect(); + + // Calculate the sighash + let sighash_omni = sha256d::Hash::hash(&result_bytes); + let msg_omni = Message::from_digest_slice(sighash_omni.as_byte_array()).unwrap(); + + // Get the deposit amount for the mpc signer + let mpc_contract_account_id: &str = "v1.signer-prod.testnet"; + + let request = methods::query::RpcQueryRequest { + block_reference: Finality::Final.into(), + request: QueryRequest::CallFunction { + account_id: mpc_contract_account_id.parse().unwrap(), + method_name: "experimental_signature_deposit".to_string(), + args: FunctionArgs::from(vec![]), + }, + }; + + let response = near_json_rpc_client.call(request).await?; + + let mut attached_deposit: u128 = 0; + + if let QueryResponseKind::CallResult(result) = response.kind { + // Decode the byte array to a string + let result_str = String::from_utf8(result.result).unwrap(); + attached_deposit = result_str.trim_matches('"').parse::().unwrap(); + } else { + println!("Error getting the attached deposit"); + } + + // Create the args for the sign_sighash_p2pkh method + let args = json!({ + "sighash_p2pkh": hex::encode(msg_omni.as_ref()), + "attached_deposit": attached_deposit.to_string() + }); + + // Create the action + let signing_action = Action::FunctionCall(Box::new(FunctionCallAction { + method_name: "sign_sighash_p2pkh".to_string(), + args: args.to_string().into_bytes(), // Convert directly to Vec + gas: 100_000_000_000_000, + deposit: 1000000000000000000000000, + })); + + let result = get_nonce_and_block_hash( + &near_json_rpc_client, + user_account.account_id.clone(), + signer.public_key(), + ) + .await; + + let (nonce, block_hash) = result.unwrap(); + + let nonce = nonce + 1; + + // Create the transaction + let near_tx: Transaction = Transaction::V0(TransactionV0 { + signer_id: user_account.account_id.clone(), + public_key: signer.public_key(), + nonce, + receiver_id: user_account.account_id.clone(), + block_hash, + actions: vec![signing_action], + }); + + // Sign the transaction + let signer = &signer.into(); + let signed_transaction = near_tx.sign(signer); + + // Send the transaction + let request = methods::send_tx::RpcSendTransactionRequest { + signed_transaction, + wait_until: TxExecutionStatus::Final, + }; + + let signer_response = send_transaction(&near_json_rpc_client, request).await?; + let (big_r, s) = extract_big_r_and_s(&signer_response).unwrap(); + let signature_built = create_signature(&big_r, &s); + + // Encode the signature + let signature = bitcoin::ecdsa::Signature { + signature: signature_built.unwrap(), + sighash_type: bitcoin::EcdsaSighashType::All, + }; + + // Build the script sig + let script_sig_new = omni_testing_utilities::address::build_script_sig_as_bytes( + derived_address, + signature, + ); + + // Assign script_sig to txin + let omni_script_sig = ScriptBuf(script_sig_new); + + // Encode the transaction with the script sig + let encoded_omni_tx = near_contract_spending_tx.build_with_script_sig( + 0, + omni_script_sig, + TransactionType::P2PKH, + ); + + // Convert the transaction to a hexadecimal string + let hex_omni_tx = hex::encode(encoded_omni_tx); + let maxfeerate = 0.10; + let maxburnamount = 10.00; + + // We now deploy to the bitcoin network (regtest mode) + let raw_tx_result: serde_json::Value = btc_client + .call( + "sendrawtransaction", + &[json!(hex_omni_tx), json!(maxfeerate), json!(maxburnamount)], + ) + .unwrap(); + + println!("raw_tx_result: {:?}", raw_tx_result); + } + } + + Ok(()) +} diff --git a/examples/bitcoin-simple-encoding/Cargo.toml b/examples/bitcoin-simple-encoding/Cargo.toml index 3673025..39bbd87 100644 --- a/examples/bitcoin-simple-encoding/Cargo.toml +++ b/examples/bitcoin-simple-encoding/Cargo.toml @@ -20,7 +20,7 @@ near-sdk.workspace = true omni-transaction.workspace = true [dev-dependencies] -near-sdk = { version = "5.3.0", features = ["unit-testing"] } +near-sdk = { version = "5.5.0", features = ["unit-testing"] } near-workspaces.workspace = true tokio.workspace = true serde_json.workspace = true diff --git a/examples/bitcoin-simple-encoding/src/lib.rs b/examples/bitcoin-simple-encoding/src/lib.rs index e0ca85a..06e0745 100644 --- a/examples/bitcoin-simple-encoding/src/lib.rs +++ b/examples/bitcoin-simple-encoding/src/lib.rs @@ -93,14 +93,13 @@ impl Contract { // Prepare the transaction for signing let sighash_type = EcdsaSighashType::All; let input_index = 0; - let encoded_data = bitcoin_tx.build_for_signing_segwit( + + bitcoin_tx.build_for_signing_segwit( sighash_type, input_index, &receiver_script_pubkey, Amount::from_sat(500_000_000).to_sat(), - ); - - encoded_data + ) } } diff --git a/examples/evm-simple-encoding-passing-args/Cargo.toml b/examples/evm-simple-encoding-passing-args/Cargo.toml index 33e19bb..d60cb79 100644 --- a/examples/evm-simple-encoding-passing-args/Cargo.toml +++ b/examples/evm-simple-encoding-passing-args/Cargo.toml @@ -20,7 +20,7 @@ near-sdk.workspace = true omni-transaction.workspace = true [dev-dependencies] -near-sdk = { version = "5.3.0", features = ["unit-testing"] } +near-sdk = { version = "5.5.0", features = ["unit-testing"] } near-workspaces.workspace = true tokio.workspace = true serde_json.workspace = true diff --git a/examples/evm-simple-encoding-with-signature/Cargo.toml b/examples/evm-simple-encoding-with-signature/Cargo.toml index 359d1de..de68f89 100644 --- a/examples/evm-simple-encoding-with-signature/Cargo.toml +++ b/examples/evm-simple-encoding-with-signature/Cargo.toml @@ -20,7 +20,7 @@ near-sdk.workspace = true omni-transaction.workspace = true [dev-dependencies] -near-sdk = { version = "5.3.0", features = ["unit-testing"] } +near-sdk = { version = "5.5.0", features = ["unit-testing"] } near-workspaces.workspace = true tokio.workspace = true serde_json.workspace = true diff --git a/examples/evm-simple-encoding/Cargo.toml b/examples/evm-simple-encoding/Cargo.toml index f14980f..4583742 100644 --- a/examples/evm-simple-encoding/Cargo.toml +++ b/examples/evm-simple-encoding/Cargo.toml @@ -20,7 +20,7 @@ near-sdk.workspace = true omni-transaction.workspace = true [dev-dependencies] -near-sdk = { version = "5.3.0", features = ["unit-testing"] } +near-sdk = { version = "5.5.0", features = ["unit-testing"] } near-workspaces.workspace = true tokio.workspace = true serde_json.workspace = true diff --git a/examples/near-simple-encoding-passing-args/Cargo.toml b/examples/near-simple-encoding-passing-args/Cargo.toml index 08fa901..8adb0b6 100644 --- a/examples/near-simple-encoding-passing-args/Cargo.toml +++ b/examples/near-simple-encoding-passing-args/Cargo.toml @@ -20,7 +20,7 @@ near-sdk.workspace = true omni-transaction.workspace = true [dev-dependencies] -near-sdk = { version = "5.1.0", features = ["unit-testing"] } +near-sdk = { version = "5.5.0", features = ["unit-testing"] } bs58 = "0.5.1" near-workspaces.workspace = true tokio.workspace = true diff --git a/examples/near-simple-encoding/Cargo.toml b/examples/near-simple-encoding/Cargo.toml index 0f90f14..ba51804 100644 --- a/examples/near-simple-encoding/Cargo.toml +++ b/examples/near-simple-encoding/Cargo.toml @@ -20,7 +20,7 @@ near-sdk.workspace = true omni-transaction.workspace = true [dev-dependencies] -near-sdk = { version = "5.1.0", features = ["unit-testing"] } +near-sdk = { version = "5.5.0", features = ["unit-testing"] } near-workspaces.workspace = true tokio.workspace = true serde_json.workspace = true diff --git a/justfile b/justfile index df5a531..cfa17f0 100644 --- a/justfile +++ b/justfile @@ -1,3 +1,5 @@ +set positional-arguments + # Run linting lint: cargo clippy --all-targets -- -D clippy::all -D clippy::nursery @@ -15,8 +17,13 @@ check-wasm: cargo check --target wasm32-unknown-unknown # Run example -run PROJECT: - cargo test -p {{PROJECT}} -- --nocapture +run PROJECT *FLAGS: + if [[ " {{FLAGS}} " == *" --deploy "* ]]; then \ + DEPLOY=true cargo test -p {{PROJECT}} -- --nocapture; \ + else \ + cargo test -p {{PROJECT}} -- --nocapture; \ + fi +# Run all tests test-all: - cargo test --workspace -- --nocapture \ No newline at end of file + cargo test --workspace --exclude bitcoin-signing-segwit --exclude bitcoin-signing-segwit-multiple-utxos --exclude bitcoin-signing-with-propagation-legacy -- --nocapture \ No newline at end of file