diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13af1e5b..cf096ed1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,6 @@ name: CI on: pull_request - -env: - rust: 1.66.1 jobs: ci: @@ -39,18 +36,11 @@ jobs: ~/.cargo/git target ${{ env.VCPKG_ROOT }} - key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ env.rust }}-ci-1 + key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/rust-toolchain.toml') }}-ci-1 - name: Install dependencies run: ${{ matrix.build_deps }} - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ env.rust }} - override: true - components: rustfmt, clippy - - name: ${{ matrix.task.name }} run: ${{ matrix.task.command }} diff --git a/Cargo.lock b/Cargo.lock index 0a1188ca..5889b751 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -97,7 +97,7 @@ dependencies = [ "humansize", "mime", "mime_guess", - "nom 7.1.1", + "nom", "num-traits", "percent-encoding", "proc-macro2", @@ -107,6 +107,51 @@ dependencies = [ "toml", ] +[[package]] +name = "asn1-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time 0.3.21", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.107", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.107", +] + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + [[package]] name = "async-trait" version = "0.1.68" @@ -115,7 +160,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.39", ] [[package]] @@ -124,7 +169,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -146,12 +191,6 @@ dependencies = [ "rand", ] -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - [[package]] name = "base16ct" version = "0.2.0" @@ -166,15 +205,9 @@ checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" [[package]] name = "base64" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" - -[[package]] -name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" @@ -234,15 +267,15 @@ dependencies = [ [[package]] name = "bip32" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30ed1d6f8437a487a266c8293aeb95b61a23261273e3e02912cdb8b68bf798b" +checksum = "7e141fb0f8be1c7b45887af94c88b182472b57c96b56773250ae00cd6a14a164" dependencies = [ - "bs58", + "bs58 0.5.0", "hmac", - "k256 0.11.6", + "k256", "once_cell", - "pbkdf2", + "pbkdf2 0.12.1", "rand_core 0.6.4", "ripemd", "sha2 0.10.6", @@ -272,16 +305,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "bitvec" -version = "0.19.6" +name = "bitflags" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55f93d0ef3363c364d5976646a38f04cf67cfe1d4c8d160cdea02cab2c116b33" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "block-buffer" @@ -320,8 +347,14 @@ name = "bs58" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" dependencies = [ - "sha2 0.9.9", + "sha2 0.10.6", ] [[package]] @@ -353,7 +386,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebfef0dcb94d65cc2cd98ce285de89ed40c9a1d2bb10175f548867d0e26cda0" dependencies = [ "anyhow", - "base64 0.13.0", + "base64 0.13.1", "bincode", "build-info-common", "cargo_metadata", @@ -385,7 +418,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0965fa7159aa2cee4c5428ccec2d09dabb6ac5db2fe80d81cb8a158f5c47b335" dependencies = [ "anyhow", - "base64 0.13.0", + "base64 0.13.1", "bincode", "build-info-common", "chrono", @@ -430,9 +463,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cached" @@ -464,23 +497,54 @@ dependencies = [ "anyhow", "binread", "byteorder", - "candid_derive", + "candid_derive 0.5.0", + "codespan-reporting", + "crc32fast", + "data-encoding", + "hex", + "lalrpop 0.19.12", + "lalrpop-util 0.19.12", + "leb128", + "logos 0.12.0", + "num-bigint 0.4.3", + "num-traits", + "num_enum 0.5.7", + "paste", + "pretty 0.10.0", + "serde", + "serde_bytes", + "sha2 0.10.6", + "thiserror", +] + +[[package]] +name = "candid" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465c1ce01d8089ee5b49ba20d3a9da15a28bba64c35cdff2aa256d37e319625d" +dependencies = [ + "anyhow", + "binread", + "byteorder", + "candid_derive 0.6.4", "codespan-reporting", + "convert_case 0.6.0", "crc32fast", "data-encoding", "hex", - "lalrpop", - "lalrpop-util", + "lalrpop 0.20.0", + "lalrpop-util 0.20.0", "leb128", - "logos", + "logos 0.13.0", "num-bigint 0.4.3", "num-traits", - "num_enum", + "num_enum 0.6.1", "paste", - "pretty", + "pretty 0.12.3", "serde", "serde_bytes", "sha2 0.10.6", + "stacker", "thiserror", ] @@ -496,6 +560,18 @@ dependencies = [ "syn 1.0.107", ] +[[package]] +name = "candid_derive" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "201ea498d901add0822653ac94cb0f8a92f9b1758a5273f4dafbb6673c9a5020" +dependencies = [ + "lazy_static", + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "cargo-platform" version = "0.1.2" @@ -550,54 +626,30 @@ dependencies = [ "winapi", ] -[[package]] -name = "ciborium" -version = "0.2.0" -source = "git+https://github.com/enarx/ciborium?rev=e719537c99b564c3674a56defe53713c702c6f46#e719537c99b564c3674a56defe53713c702c6f46" -dependencies = [ - "ciborium-io 0.2.0", - "ciborium-ll 0.2.0", - "serde", -] - [[package]] name = "ciborium" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" dependencies = [ - "ciborium-io 0.2.1", - "ciborium-ll 0.2.1", + "ciborium-io", + "ciborium-ll", "serde", ] -[[package]] -name = "ciborium-io" -version = "0.2.0" -source = "git+https://github.com/enarx/ciborium?rev=e719537c99b564c3674a56defe53713c702c6f46#e719537c99b564c3674a56defe53713c702c6f46" - [[package]] name = "ciborium-io" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" -[[package]] -name = "ciborium-ll" -version = "0.2.0" -source = "git+https://github.com/enarx/ciborium?rev=e719537c99b564c3674a56defe53713c702c6f46#e719537c99b564c3674a56defe53713c702c6f46" -dependencies = [ - "ciborium-io 0.2.0", - "half", -] - [[package]] name = "ciborium-ll" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" dependencies = [ - "ciborium-io 0.2.1", + "ciborium-io", "half", ] @@ -608,7 +660,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ "atty", - "bitflags", + "bitflags 1.3.2", "clap_derive", "clap_lex", "indexmap", @@ -624,7 +676,7 @@ version = "3.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" dependencies = [ - "heck 0.4.0", + "heck", "proc-macro-error", "proc-macro2", "quote", @@ -668,7 +720,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bc12149fd88e532dcab80fde98258ea960e8d9c3ea25b6f3ba30d204077d2b5" dependencies = [ - "convert_case", + "convert_case 0.4.0", "proc-macro2", "quote", "syn 1.0.107", @@ -680,7 +732,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9334ba02eae005887d2d0670371a1f2ab90409aa641e6b884baac1ae445664ec" dependencies = [ - "convert_case", + "convert_case 0.4.0", "proc-macro2", "quote", "syn 1.0.107", @@ -711,6 +763,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "cpufeatures" version = "0.2.5" @@ -735,18 +796,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -[[package]] -name = "crypto-bigint" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122" -dependencies = [ - "generic-array", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - [[package]] name = "crypto-bigint" version = "0.5.2" @@ -839,13 +888,13 @@ dependencies = [ [[package]] name = "cycles-minting-canister" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "async-trait", - "base64 0.13.0", + "base64 0.13.1", "build-info", "build-info-build", - "candid", + "candid 0.9.11", "dfn_candid", "dfn_core", "dfn_http_metrics", @@ -858,6 +907,7 @@ dependencies = [ "ic-ledger-core", "ic-metrics-encoder", "ic-nervous-system-common-build-metadata", + "ic-nervous-system-governance", "ic-nns-common", "ic-nns-constants", "ic-protobuf", @@ -923,20 +973,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" - -[[package]] -name = "der" -version = "0.6.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" -dependencies = [ - "const-oid", - "pem-rfc7468 0.6.0", - "zeroize", -] +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] name = "der" @@ -945,57 +984,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17" dependencies = [ "const-oid", - "pem-rfc7468 0.7.0", + "pem-rfc7468", "zeroize", ] -[[package]] -name = "der-oid-macro" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4cccf60bb98c0fca115a581f894aed0e43fa55bf289fdac5599bec440bb4fd6" -dependencies = [ - "nom 6.1.2", - "num-bigint 0.4.3", - "num-traits", - "syn 1.0.107", -] - -[[package]] -name = "der-oid-macro" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73af209b6a5dc8ca7cbaba720732304792cddc933cfea3d74509c2b1ef2f436" -dependencies = [ - "num-bigint 0.4.3", - "num-traits", - "syn 1.0.107", -] - -[[package]] -name = "der-parser" -version = "5.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7ededb7525bb4114bc209685ce7894edc2965f4914312a1ea578a645a237f0" -dependencies = [ - "der-oid-macro 0.4.0", - "nom 6.1.2", - "num-bigint 0.4.3", - "num-traits", - "rusticata-macros 3.2.0", -] - [[package]] name = "der-parser" -version = "6.0.1" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cddf120f700b411b2b02ebeb7f04dc0b7c8835909a6c2f52bf72ed0dd3433b2" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "der-oid-macro 0.5.0", - "nom 7.1.1", + "asn1-rs", + "displaydoc", + "nom", "num-bigint 0.4.3", "num-traits", - "rusticata-macros 4.1.0", + "rusticata-macros", ] [[package]] @@ -1014,7 +1018,7 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "convert_case", + "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version", @@ -1024,9 +1028,9 @@ dependencies = [ [[package]] name = "dfn_candid" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", + "candid 0.9.11", "dfn_core", "ic-base-types", "on_wire", @@ -1036,7 +1040,7 @@ dependencies = [ [[package]] name = "dfn_core" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "ic-base-types", "on_wire", @@ -1045,9 +1049,9 @@ dependencies = [ [[package]] name = "dfn_http" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", + "candid 0.9.11", "dfn_candid", "dfn_core", "serde", @@ -1057,7 +1061,7 @@ dependencies = [ [[package]] name = "dfn_http_metrics" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "dfn_candid", "dfn_core", @@ -1069,7 +1073,7 @@ dependencies = [ [[package]] name = "dfn_protobuf" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "dfn_core", "ic-base-types", @@ -1083,6 +1087,12 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499" +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + [[package]] name = "digest" version = "0.9.0" @@ -1125,6 +1135,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "doc-comment" version = "0.3.3" @@ -1132,28 +1153,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] -name = "ecdsa" -version = "0.14.8" +name = "downcast" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" -dependencies = [ - "der 0.6.0", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", -] +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] -name = "ecdsa" -version = "0.15.1" +name = "dyn-clone" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12844141594ad74185a926d030f3b605f6a903b4e3fec351f3ea338ac5b7637e" -dependencies = [ - "der 0.6.0", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 2.0.0", -] +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ecdsa" @@ -1161,12 +1170,12 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" dependencies = [ - "der 0.7.6", + "der", "digest 0.10.6", - "elliptic-curve 0.13.5", - "rfc6979 0.4.0", - "signature 2.0.0", - "spki 0.7.2", + "elliptic-curve", + "rfc6979", + "signature", + "spki", ] [[package]] @@ -1190,43 +1199,22 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" -[[package]] -name = "elliptic-curve" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" -dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.8", - "der 0.6.0", - "digest 0.10.6", - "ff 0.12.0", - "generic-array", - "group 0.12.0", - "pem-rfc7468 0.6.0", - "pkcs8 0.9.0", - "rand_core 0.6.4", - "sec1 0.3.0", - "subtle", - "zeroize", -] - [[package]] name = "elliptic-curve" version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.2", + "base16ct", + "crypto-bigint", "digest 0.10.6", "ff 0.13.0", "generic-array", "group 0.13.0", - "pem-rfc7468 0.7.0", - "pkcs8 0.10.2", + "pem-rfc7468", + "pkcs8", "rand_core 0.6.4", - "sec1 0.7.2", + "sec1", "subtle", "zeroize", ] @@ -1275,6 +1263,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "errno" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "errno-dragonfly" version = "0.1.2" @@ -1297,7 +1295,7 @@ dependencies = [ [[package]] name = "fe-derive" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "hex", "num-bigint-dig", @@ -1307,15 +1305,6 @@ dependencies = [ "syn 1.0.107", ] -[[package]] -name = "features" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83072b3c84e55f9d0c0ff36a4575d0fd2e543ae4a56e04e7f5a9222188d574e3" -dependencies = [ - "bitflags", -] - [[package]] name = "ff" version = "0.12.0" @@ -1398,10 +1387,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7aea5a5909a74969507051a3b17adc84737e31a5f910559892aedce026f4d53" [[package]] -name = "funty" -version = "1.1.0" +name = "fragile" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "futures" @@ -1459,7 +1448,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.39", ] [[package]] @@ -1585,15 +1574,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "heck" version = "0.4.0" @@ -1609,6 +1589,12 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + [[package]] name = "hex" version = "0.4.3" @@ -1620,9 +1606,9 @@ dependencies = [ [[package]] name = "hex-literal" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "hidapi" @@ -1724,26 +1710,27 @@ dependencies = [ [[package]] name = "ic-agent" -version = "0.24.1" -source = "git+https://github.com/dfinity/agent-rs?rev=b9c57f8bab23cc9936dca4560293ffe485471c6d#b9c57f8bab23cc9936dca4560293ffe485471c6d" +version = "0.29.0" +source = "git+https://github.com/dfinity/agent-rs?rev=65b270817510b0d74638f0b54d9e5bcfbfe31cee#65b270817510b0d74638f0b54d9e5bcfbfe31cee" dependencies = [ "backoff", - "candid", + "candid 0.9.11", "futures-util", "hex", "http", "http-body", "ic-certification", + "ic-transport-types", "ic-verify-bls-signature", - "k256 0.13.1", + "k256", "leb128", "pem 2.0.1", - "pkcs8 0.10.2", + "pkcs8", "rand", "reqwest", "ring", - "rustls", - "sec1 0.7.2", + "rustls-webpki", + "sec1", "serde", "serde_bytes", "serde_cbor", @@ -1751,6 +1738,7 @@ dependencies = [ "sha2 0.10.6", "simple_asn1", "thiserror", + "time 0.3.21", "tokio", "url", ] @@ -1758,30 +1746,30 @@ dependencies = [ [[package]] name = "ic-base-types" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "base32", "byte-unit", "bytes", - "candid", + "candid 0.9.11", "comparable", "crc32fast", - "ic-crypto-sha", + "ic-crypto-sha2", "ic-protobuf", "ic-stable-structures", "phantom_newtype", "prost", "serde", - "strum 0.23.0", - "strum_macros 0.23.1", + "strum", + "strum_macros", ] [[package]] name = "ic-btc-interface" version = "0.1.0" -source = "git+https://github.com/dfinity/bitcoin-canister?rev=e4e89f2caedffbe0cfdec6f9d4a77f66dcb9119e#e4e89f2caedffbe0cfdec6f9d4a77f66dcb9119e" +source = "git+https://github.com/dfinity/bitcoin-canister?rev=be0143a014ad4bccbc2eec5e2bcbe30317c5a84c#be0143a014ad4bccbc2eec5e2bcbe30317c5a84c" dependencies = [ - "candid", + "candid 0.9.11", "serde", "serde_bytes", ] @@ -1789,10 +1777,11 @@ dependencies = [ [[package]] name = "ic-btc-types-internal" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", + "candid 0.9.11", "ic-btc-interface", + "ic-error-types", "ic-protobuf", "serde", "serde_bytes", @@ -1801,14 +1790,14 @@ dependencies = [ [[package]] name = "ic-canister-client-sender" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "ed25519-consensus", "ic-base-types", "ic-crypto-ecdsa-secp256k1", "ic-crypto-internal-types", "ic-crypto-secrets-containers", - "ic-crypto-sha", + "ic-crypto-sha2", "ic-crypto-utils-basic-sig", "ic-types", "rand", @@ -1818,13 +1807,16 @@ dependencies = [ [[package]] name = "ic-canister-log" -version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +version = "0.2.0" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" +dependencies = [ + "serde", +] [[package]] name = "ic-canister-profiler" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "ic-metrics-encoder", "ic0", @@ -1833,31 +1825,20 @@ dependencies = [ [[package]] name = "ic-canisters-http-types" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", + "candid 0.9.11", "serde", "serde_bytes", ] [[package]] name = "ic-cdk" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c9fa78e0f867e55fc149197a9b816d506314c705ea56240f72ae22da1bfdfd6" -dependencies = [ - "candid", - "cfg-if 1.0.0", - "serde", -] - -[[package]] -name = "ic-cdk" -version = "0.7.4" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9beb0bf1dcd0639c313630e34aa547a2b19450ddf1969c176e13225ef3b29048" +checksum = "08d4c0b932bf454d5d60e61e13c3c944972fcfd74dc82b9ed5c8b0a75979cf50" dependencies = [ - "candid", + "candid 0.9.11", "ic-cdk-macros", "ic0", "serde", @@ -1866,11 +1847,11 @@ dependencies = [ [[package]] name = "ic-cdk-macros" -version = "0.6.8" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb423dab7c5bf19d4abccabd2ffe35e09b9dde611d478ea3afe0347b50fa727f" +checksum = "411c0dd4c149132b68e679274d397053332ee29996c6a541075895881916333b" dependencies = [ - "candid", + "candid 0.9.11", "proc-macro2", "quote", "serde", @@ -1880,12 +1861,12 @@ dependencies = [ [[package]] name = "ic-cdk-timers" -version = "0.1.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c739e7c592cb66df4f15c6b6c4859b1195782f63923e2fb1b29553d9c0819bd4" +checksum = "198e55e4d9e069903fbea1dceae6fd28f7e0b38d5a4e1026ed2c772e1d55f5e0" dependencies = [ "futures", - "ic-cdk 0.7.4", + "ic-cdk", "ic0", "serde", "serde_bytes", @@ -1894,8 +1875,9 @@ dependencies = [ [[package]] name = "ic-certification" -version = "0.24.1" -source = "git+https://github.com/dfinity/agent-rs?rev=b9c57f8bab23cc9936dca4560293ffe485471c6d#b9c57f8bab23cc9936dca4560293ffe485471c6d" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a59dc342d11b2067e19d0f146bdec3674de921303ffc762f114d201ebbe0e68a" dependencies = [ "hex", "serde", @@ -1917,14 +1899,14 @@ dependencies = [ [[package]] name = "ic-ckbtc-kyt" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "askama", - "candid", - "ciborium 0.2.0", + "candid 0.9.11", + "ciborium", "hex", "ic-canisters-http-types", - "ic-cdk 0.7.4", + "ic-cdk", "ic-cdk-macros", "ic-metrics-encoder", "ic-stable-structures", @@ -1937,52 +1919,57 @@ dependencies = [ [[package]] name = "ic-ckbtc-minter" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "async-trait", "bech32", - "bs58", - "candid", - "ciborium 0.2.0", + "bs58 0.4.0", + "candid 0.9.11", + "ciborium", "hex", "ic-base-types", "ic-btc-interface", "ic-canister-log", "ic-canisters-http-types", - "ic-cdk 0.7.4", + "ic-cdk", "ic-cdk-macros", "ic-ckbtc-kyt", "ic-crypto-extended-bip32", "ic-crypto-getrandom-for-wasm", - "ic-crypto-sha", + "ic-crypto-sha2", "ic-ic00-types", "ic-icrc1", - "ic-icrc1-client-cdk", "ic-ledger-core", "ic-metrics-encoder", "ic-stable-structures", + "ic-utils-ensure", "ic0", + "icrc-ledger-client-cdk", "icrc-ledger-types", "lazy_static", + "minicbor", + "minicbor-derive", "num-traits", "ripemd", "scopeguard", "serde", "serde_bytes", + "serde_json", ] [[package]] name = "ic-constants" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" [[package]] name = "ic-crypto-ecdsa-secp256k1" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "k256 0.12.0", + "k256", "lazy_static", + "num-bigint 0.4.3", "pem 1.1.1", "rand", "simple_asn1", @@ -1992,7 +1979,7 @@ dependencies = [ [[package]] name = "ic-crypto-extended-bip32" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "ic-crypto-internal-threshold-sig-ecdsa", ] @@ -2000,7 +1987,7 @@ dependencies = [ [[package]] name = "ic-crypto-getrandom-for-wasm" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "getrandom 0.2.6", ] @@ -2008,7 +1995,7 @@ dependencies = [ [[package]] name = "ic-crypto-internal-basic-sig-der-utils" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "hex", "ic-types", @@ -2019,9 +2006,9 @@ dependencies = [ [[package]] name = "ic-crypto-internal-basic-sig-ed25519" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "base64 0.11.0", + "base64 0.13.1", "curve25519-dalek", "ed25519-consensus", "hex", @@ -2041,7 +2028,7 @@ dependencies = [ [[package]] name = "ic-crypto-internal-bls12-381-type" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "hex", "ic-crypto-getrandom-for-wasm", @@ -2060,7 +2047,7 @@ dependencies = [ [[package]] name = "ic-crypto-internal-hmac" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "ic-crypto-internal-sha2", ] @@ -2068,14 +2055,14 @@ dependencies = [ [[package]] name = "ic-crypto-internal-multi-sig-bls12381" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "base64 0.11.0", + "base64 0.13.1", "hex", "ic-crypto-internal-bls12-381-type", "ic-crypto-internal-types", "ic-crypto-secrets-containers", - "ic-crypto-sha", + "ic-crypto-sha2", "ic-protobuf", "ic-types", "rand", @@ -2087,10 +2074,10 @@ dependencies = [ [[package]] name = "ic-crypto-internal-seed" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "hex", - "ic-crypto-sha", + "ic-crypto-sha2", "ic-types", "rand", "rand_chacha", @@ -2101,18 +2088,17 @@ dependencies = [ [[package]] name = "ic-crypto-internal-sha2" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "openssl", - "sha2 0.9.9", + "sha2 0.10.6", ] [[package]] name = "ic-crypto-internal-threshold-sig-bls12381" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "base64 0.11.0", + "base64 0.13.1", "cached", "hex", "ic-crypto-internal-bls12-381-type", @@ -2120,7 +2106,7 @@ dependencies = [ "ic-crypto-internal-threshold-sig-bls12381-der", "ic-crypto-internal-types", "ic-crypto-secrets-containers", - "ic-crypto-sha", + "ic-crypto-sha2", "ic-types", "lazy_static", "parking_lot", @@ -2129,7 +2115,7 @@ dependencies = [ "serde", "serde_bytes", "serde_cbor", - "strum_macros 0.23.1", + "strum_macros", "subtle", "zeroize", ] @@ -2137,7 +2123,7 @@ dependencies = [ [[package]] name = "ic-crypto-internal-threshold-sig-bls12381-der" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "simple_asn1", ] @@ -2145,7 +2131,7 @@ dependencies = [ [[package]] name = "ic-crypto-internal-threshold-sig-ecdsa" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "fe-derive", "hex", @@ -2154,9 +2140,9 @@ dependencies = [ "ic-crypto-internal-seed", "ic-crypto-internal-types", "ic-crypto-secrets-containers", - "ic-crypto-sha", + "ic-crypto-sha2", "ic-types", - "k256 0.12.0", + "k256", "lazy_static", "p256", "paste", @@ -2165,6 +2151,8 @@ dependencies = [ "serde", "serde_bytes", "serde_cbor", + "strum", + "strum_macros", "subtle", "zeroize", ] @@ -2172,17 +2160,16 @@ dependencies = [ [[package]] name = "ic-crypto-internal-types" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "arrayvec 0.5.2", - "base64 0.11.0", "hex", "ic-protobuf", "phantom_newtype", "serde", "serde_cbor", - "strum 0.23.0", - "strum_macros 0.23.1", + "strum", + "strum_macros", "thiserror", "zeroize", ] @@ -2190,7 +2177,7 @@ dependencies = [ [[package]] name = "ic-crypto-node-key-validation" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "hex", "ic-base-types", @@ -2203,22 +2190,21 @@ dependencies = [ "ic-protobuf", "ic-types", "serde", - "x509-parser 0.12.0", ] [[package]] name = "ic-crypto-secrets-containers" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "serde", "zeroize", ] [[package]] -name = "ic-crypto-sha" +name = "ic-crypto-sha2" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "ic-crypto-internal-sha2", ] @@ -2226,10 +2212,8 @@ dependencies = [ [[package]] name = "ic-crypto-tls-cert-validation" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "chrono", - "dfn_core", "hex", "ic-base-types", "ic-crypto-internal-basic-sig-ed25519", @@ -2237,27 +2221,29 @@ dependencies = [ "ic-protobuf", "ic-types", "serde", - "x509-parser 0.9.2", + "x509-parser", ] [[package]] name = "ic-crypto-tree-hash" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ + "assert_matches", "ic-crypto-internal-types", - "ic-crypto-sha", + "ic-crypto-sha2", "ic-protobuf", "serde", "serde_bytes", + "thiserror", ] [[package]] name = "ic-crypto-utils-basic-sig" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "base64 0.11.0", + "base64 0.13.1", "ed25519-consensus", "ic-base-types", "ic-crypto-internal-basic-sig-der-utils", @@ -2270,20 +2256,20 @@ dependencies = [ [[package]] name = "ic-error-types" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ + "ic-utils", "serde", - "strum 0.23.0", - "strum_macros 0.23.1", + "strum", + "strum_macros", ] [[package]] name = "ic-ic00-types" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", - "float-cmp", + "candid 0.9.11", "ic-base-types", "ic-btc-interface", "ic-btc-types-internal", @@ -2293,70 +2279,50 @@ dependencies = [ "serde", "serde_bytes", "serde_cbor", - "strum 0.23.0", - "strum_macros 0.23.1", + "strum", + "strum_macros", ] [[package]] name = "ic-icrc1" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", - "ciborium 0.2.1", + "candid 0.9.11", + "ciborium", "hex", "ic-base-types", - "ic-crypto-sha", + "ic-crypto-sha2", "ic-ledger-canister-core", "ic-ledger-core", + "ic-ledger-hash-of", "icrc-ledger-types", + "num-bigint 0.4.3", "num-traits", "serde", "serde_bytes", "tempfile", -] - -[[package]] -name = "ic-icrc1-client" -version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" -dependencies = [ - "async-trait", - "candid", - "ic-base-types", - "ic-icrc1", - "ic-ledger-core", - "icrc-ledger-types", - "num-traits", - "serde", -] - -[[package]] -name = "ic-icrc1-client-cdk" -version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" -dependencies = [ - "async-trait", - "ic-cdk 0.6.0", - "ic-icrc1-client", + "thiserror", ] [[package]] name = "ic-icrc1-index" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "async-trait", - "candid", - "ciborium 0.2.1", + "candid 0.9.11", + "ciborium", "ic-base-types", "ic-canister-profiler", "ic-canisters-http-types", - "ic-cdk 0.6.0", + "ic-cdk", "ic-cdk-macros", "ic-cdk-timers", "ic-icrc1", "ic-icrc1-ledger", + "ic-icrc1-tokens-u64", + "ic-ledger-hash-of", "ic-metrics-encoder", "icrc-ledger-types", "num-traits", @@ -2367,33 +2333,47 @@ dependencies = [ [[package]] name = "ic-icrc1-ledger" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "async-trait", - "candid", - "ciborium 0.2.1", + "candid 0.9.11", + "ciborium", "hex", "ic-base-types", "ic-canister-log", "ic-canisters-http-types", - "ic-cdk 0.6.0", + "ic-cdk", "ic-cdk-macros", "ic-crypto-tree-hash", "ic-icrc1", - "ic-icrc1-client", + "ic-icrc1-tokens-u64", "ic-ledger-canister-core", "ic-ledger-core", + "ic-ledger-hash-of", "ic-metrics-encoder", + "icrc-ledger-client", "icrc-ledger-types", "num-traits", "serde", "serde_bytes", ] +[[package]] +name = "ic-icrc1-tokens-u64" +version = "0.1.0" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" +dependencies = [ + "candid 0.9.11", + "ic-ledger-core", + "ic-stable-structures", + "num-traits", + "serde", +] + [[package]] name = "ic-identity-hsm" -version = "0.24.1" -source = "git+https://github.com/dfinity/agent-rs?rev=b9c57f8bab23cc9936dca4560293ffe485471c6d#b9c57f8bab23cc9936dca4560293ffe485471c6d" +version = "0.29.0" +source = "git+https://github.com/dfinity/agent-rs?rev=65b270817510b0d74638f0b54d9e5bcfbfe31cee#65b270817510b0d74638f0b54d9e5bcfbfe31cee" dependencies = [ "hex", "ic-agent", @@ -2406,49 +2386,71 @@ dependencies = [ [[package]] name = "ic-ledger-canister-core" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "async-trait", - "candid", + "candid 0.9.11", "ic-base-types", "ic-canister-log", "ic-constants", "ic-ic00-types", "ic-ledger-core", + "ic-ledger-hash-of", "ic-utils", + "num-traits", "serde", ] [[package]] name = "ic-ledger-core" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "async-trait", - "candid", - "ciborium 0.2.1", - "hex", - "ic-base-types", - "ic-constants", - "ic-crypto-sha", - "ic-ic00-types", - "ic-utils", - "icrc-ledger-types", + "candid 0.9.11", + "ic-ledger-hash-of", "num-traits", "serde", "serde_bytes", ] +[[package]] +name = "ic-ledger-hash-of" +version = "0.1.0" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" +dependencies = [ + "candid 0.9.11", + "hex", + "serde", +] + [[package]] name = "ic-metrics-encoder" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cb321e571828d64d62319deeaaec4c8e68cdf93144dd6fe248e7a51ab2d3b5d" +checksum = "8b5c7628eac357aecda461130f8074468be5aa4d258a002032d82d817f79f1f8" + +[[package]] +name = "ic-nervous-system-clients" +version = "0.0.1" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" +dependencies = [ + "async-trait", + "candid 0.9.11", + "dfn_candid", + "dfn_core", + "ic-base-types", + "ic-ic00-types", + "ic-nervous-system-proxied-canister-calls-tracker", + "ic-nervous-system-runtime", + "num-traits", + "serde", + "serde_bytes", +] [[package]] name = "ic-nervous-system-common" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "anyhow", "async-trait", @@ -2456,24 +2458,28 @@ dependencies = [ "build-info-build", "by_address", "bytes", - "candid", + "candid 0.9.11", "dfn_candid", "dfn_core", "dfn_protobuf", "ic-base-types", "ic-canister-log", "ic-canisters-http-types", - "ic-crypto-sha", + "ic-crypto-sha2", "ic-ic00-types", "ic-icrc1", "ic-ledger-core", "ic-metrics-encoder", + "ic-nervous-system-runtime", "ic-nns-constants", + "ic-stable-structures", "icp-ledger", "icrc-ledger-types", "json5", "maplit", + "mockall", "priority-queue", + "prost", "rust_decimal", "serde", "serde_json", @@ -2482,12 +2488,12 @@ dependencies = [ [[package]] name = "ic-nervous-system-common-build-metadata" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" [[package]] name = "ic-nervous-system-common-test-keys" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "ic-base-types", "ic-canister-client-sender", @@ -2498,32 +2504,54 @@ dependencies = [ "url", ] +[[package]] +name = "ic-nervous-system-governance" +version = "0.0.1" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" +dependencies = [ + "ic-base-types", + "ic-stable-structures", + "maplit", + "num-traits", +] + [[package]] name = "ic-nervous-system-proto" version = "0.0.1" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", + "candid 0.9.11", "comparable", "ic-base-types", "prost", "serde", ] +[[package]] +name = "ic-nervous-system-proxied-canister-calls-tracker" +version = "0.0.1" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" +dependencies = [ + "ic-base-types", +] + [[package]] name = "ic-nervous-system-root" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "async-trait", - "candid", + "candid 0.9.11", "dfn_candid", "dfn_core", "ic-base-types", - "ic-cdk 0.6.0", - "ic-crypto-sha", + "ic-cdk", + "ic-crypto-sha2", "ic-ic00-types", + "ic-nervous-system-clients", "ic-nervous-system-common", + "ic-nervous-system-proxied-canister-calls-tracker", + "ic-nervous-system-runtime", "ic-nns-constants", "lazy_static", "num-traits", @@ -2531,23 +2559,38 @@ dependencies = [ "serde_bytes", ] +[[package]] +name = "ic-nervous-system-runtime" +version = "0.0.1" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" +dependencies = [ + "async-trait", + "candid 0.9.11", + "dfn_candid", + "dfn_core", + "ic-base-types", + "ic-cdk", +] + [[package]] name = "ic-nns-common" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", + "candid 0.9.11", "comparable", "dfn_core", "ic-base-types", - "ic-crypto-sha", + "ic-crypto-sha2", "ic-nervous-system-common", "ic-nns-constants", "ic-protobuf", "ic-registry-keys", "ic-registry-transport", + "ic-stable-structures", "ic-types", "lazy_static", + "num-traits", "on_wire", "prost", "serde", @@ -2557,21 +2600,21 @@ dependencies = [ [[package]] name = "ic-nns-constants" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "ic-base-types", - "lazy_static", ] [[package]] name = "ic-nns-governance" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "async-trait", "build-info", "build-info-build", - "candid", + "bytes", + "candid 0.9.11", "comparable", "csv", "cycles-minting-canister", @@ -2579,15 +2622,20 @@ dependencies = [ "dfn_core", "dfn_http_metrics", "dfn_protobuf", + "dyn-clone", "ic-base-types", "ic-crypto-getrandom-for-wasm", - "ic-crypto-sha", + "ic-crypto-sha2", + "ic-ledger-core", "ic-metrics-encoder", + "ic-nervous-system-clients", "ic-nervous-system-common", "ic-nervous-system-common-build-metadata", "ic-nervous-system-common-test-keys", + "ic-nervous-system-governance", "ic-nervous-system-proto", "ic-nervous-system-root", + "ic-nervous-system-runtime", "ic-nns-common", "ic-nns-constants", "ic-protobuf", @@ -2595,27 +2643,48 @@ dependencies = [ "ic-sns-root", "ic-sns-swap", "ic-sns-wasm", + "ic-stable-structures", + "ic-types", "icp-ledger", "itertools", "lazy_static", "maplit", + "mockall", "on_wire", "prost", "rand", "rand_chacha", "registry-canister", + "rust_decimal", + "rust_decimal_macros", + "serde", + "serde_json", + "strum", + "strum_macros", +] + +[[package]] +name = "ic-nns-handler-root-interface" +version = "0.1.0" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" +dependencies = [ + "async-trait", + "candid 0.9.11", + "dfn_candid", + "dfn_core", + "ic-base-types", + "ic-nervous-system-clients", + "ic-nns-constants", "serde", - "strum 0.23.0", - "strum_macros 0.23.1", ] [[package]] name = "ic-protobuf" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "bincode", - "candid", + "candid 0.9.11", "erased-serde", "maplit", "prost", @@ -2627,9 +2696,9 @@ dependencies = [ [[package]] name = "ic-registry-keys" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", + "candid 0.9.11", "ic-base-types", "ic-ic00-types", "ic-types", @@ -2639,9 +2708,9 @@ dependencies = [ [[package]] name = "ic-registry-routing-table" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", + "candid 0.9.11", "ic-base-types", "ic-protobuf", "serde", @@ -2650,9 +2719,9 @@ dependencies = [ [[package]] name = "ic-registry-subnet-features" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", + "candid 0.9.11", "ic-ic00-types", "ic-protobuf", "serde", @@ -2661,22 +2730,22 @@ dependencies = [ [[package]] name = "ic-registry-subnet-type" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", + "candid 0.9.11", "ic-protobuf", "serde", - "strum 0.23.0", - "strum_macros 0.23.1", + "strum", + "strum_macros", ] [[package]] name = "ic-registry-transport" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "bytes", - "candid", + "candid 0.9.11", "ic-base-types", "ic-protobuf", "prost", @@ -2686,67 +2755,60 @@ dependencies = [ [[package]] name = "ic-sns-governance" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "async-trait", - "base64 0.13.0", + "base64 0.13.1", "build-info", "build-info-build", - "bytes", - "candid", + "candid 0.9.11", "clap", "comparable", - "csv", "dfn_candid", "dfn_core", - "dfn_http_metrics", - "dfn_protobuf", "hex", "ic-base-types", "ic-canister-log", "ic-canister-profiler", "ic-canisters-http-types", - "ic-crypto-sha", + "ic-crypto-sha2", "ic-ic00-types", - "ic-icrc1", - "ic-icrc1-client", "ic-ledger-core", "ic-metrics-encoder", + "ic-nervous-system-clients", "ic-nervous-system-common", "ic-nervous-system-common-build-metadata", + "ic-nervous-system-governance", + "ic-nervous-system-proto", "ic-nervous-system-root", + "ic-nervous-system-runtime", "ic-nns-constants", "ic-protobuf", "icp-ledger", + "icrc-ledger-client", "icrc-ledger-types", "lazy_static", "maplit", - "on_wire", + "num-traits", "prost", "prost-build", "rand", "rand_chacha", - "registry-canister", "rust_decimal", "rust_decimal_macros", "serde", - "strum 0.18.0", - "strum_macros 0.18.0", + "strum", + "strum_macros", ] [[package]] name = "ic-sns-init" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "anyhow", - "base64 0.13.0", - "candid", - "dfn_candid", - "dfn_core", + "base64 0.13.1", + "candid 0.9.11", "ic-base-types", - "ic-crypto-sha", - "ic-icrc1", "ic-icrc1-index", "ic-icrc1-ledger", "ic-ledger-canister-core", @@ -2761,39 +2823,36 @@ dependencies = [ "isocountry", "lazy_static", "maplit", - "num", "prost", - "regex", "serde", - "serde_json", "serde_yaml", ] [[package]] name = "ic-sns-root" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "async-trait", "build-info", "build-info-build", - "candid", + "candid 0.9.11", "comparable", - "dfn_candid", - "dfn_core", "futures", "ic-base-types", "ic-canister-log", "ic-canisters-http-types", + "ic-cdk", + "ic-cdk-macros", "ic-ic00-types", - "ic-icrc1", "ic-metrics-encoder", + "ic-nervous-system-clients", "ic-nervous-system-common", "ic-nervous-system-common-build-metadata", "ic-nervous-system-root", + "ic-nervous-system-runtime", "ic-sns-swap", "icrc-ledger-types", - "num-traits", "prost", "serde", ] @@ -2801,31 +2860,25 @@ dependencies = [ [[package]] name = "ic-sns-swap" version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "async-trait", "build-info", "build-info-build", - "bytes", - "candid", + "candid 0.9.11", "comparable", "dfn_candid", "dfn_core", - "dfn_http_metrics", - "dfn_protobuf", "hex", "ic-base-types", "ic-canister-log", "ic-canisters-http-types", - "ic-crypto-sha", - "ic-ic00-types", - "ic-icrc1", "ic-ledger-core", "ic-metrics-encoder", + "ic-nervous-system-clients", "ic-nervous-system-common", "ic-nervous-system-proto", - "ic-nervous-system-root", - "ic-protobuf", + "ic-nervous-system-runtime", "ic-sns-governance", "ic-stable-structures", "icp-ledger", @@ -2833,38 +2886,34 @@ dependencies = [ "itertools", "lazy_static", "maplit", - "on_wire", "prost", - "prost-build", - "registry-canister", "rust_decimal", "serde", - "strum 0.18.0", - "strum_macros 0.18.0", ] [[package]] name = "ic-sns-wasm" version = "1.0.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "async-trait", - "build-info", - "candid", + "candid 0.9.11", "dfn_candid", "dfn_core", "dfn_http_metrics", "futures", "hex", "ic-base-types", - "ic-cdk 0.6.0", - "ic-crypto-sha", + "ic-cdk", + "ic-crypto-sha2", "ic-ic00-types", "ic-metrics-encoder", + "ic-nervous-system-clients", "ic-nervous-system-common", "ic-nervous-system-proto", - "ic-nervous-system-root", + "ic-nervous-system-runtime", "ic-nns-constants", + "ic-nns-handler-root-interface", "ic-sns-governance", "ic-sns-init", "ic-sns-root", @@ -2878,17 +2927,17 @@ dependencies = [ [[package]] name = "ic-stable-structures" -version = "0.5.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ead0e23ad5be0cad9f062a0a4e6777cd6f4d9bafa77a2cd06168f216943d67a1" +checksum = "95dce29e3ceb0e6da3e78b305d95365530f2efd2146ca18590c0ef3aa6038568" [[package]] name = "ic-sys" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "hex", - "ic-crypto-sha", + "ic-crypto-sha2", "lazy_static", "libc", "nix", @@ -2896,31 +2945,44 @@ dependencies = [ "wsl", ] +[[package]] +name = "ic-transport-types" +version = "0.29.0" +source = "git+https://github.com/dfinity/agent-rs?rev=65b270817510b0d74638f0b54d9e5bcfbfe31cee#65b270817510b0d74638f0b54d9e5bcfbfe31cee" +dependencies = [ + "candid 0.9.11", + "hex", + "ic-certification", + "leb128", + "serde", + "serde_bytes", + "serde_repr", + "sha2 0.10.6", + "thiserror", +] + [[package]] name = "ic-types" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "base32", - "base64 0.11.0", + "base64 0.13.1", "bincode", - "candid", + "candid 0.9.11", "chrono", "derive_more 0.99.8-alpha.0", "hex", - "http", "ic-base-types", "ic-btc-types-internal", "ic-constants", "ic-crypto-internal-types", - "ic-crypto-sha", + "ic-crypto-sha2", "ic-crypto-tree-hash", "ic-error-types", "ic-ic00-types", "ic-protobuf", "ic-utils", "maplit", - "num-traits", "once_cell", "phantom_newtype", "prost", @@ -2929,21 +2991,18 @@ dependencies = [ "serde_cbor", "serde_json", "serde_with", - "strum 0.23.0", - "strum_macros 0.23.1", + "strum", + "strum_macros", "thiserror", "thousands", - "url", ] [[package]] name = "ic-utils" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "bitflags", "cvt", - "features", "hex", "ic-sys", "libc", @@ -2955,6 +3014,11 @@ dependencies = [ "thiserror", ] +[[package]] +name = "ic-utils-ensure" +version = "0.8.0" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" + [[package]] name = "ic-verify-bls-signature" version = "0.1.0" @@ -2973,21 +3037,21 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90a417f89cb892632ba2b19928d926f0d5bf3b0610c7c9e2b7f7db0446ae89f4" dependencies = [ - "candid", + "candid 0.8.4", "serde", ] [[package]] name = "ic0" -version = "0.18.9" +version = "0.18.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978b91fc78de9d2eb0144db717839cde3b35470199ea51aca362cb6310e93dfd" +checksum = "576c539151d4769fb4d1a0c25c4108dd18facd04c5695b02cf2d226ab4e43aa5" [[package]] name = "ic_bls12_381" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a180f02c79a71fcbc10b194406dbffd6a883c916f96be4f17ae3aeb96348c5" +checksum = "c682cb199cd8fcb582a6023325d571a6464edda26c8063fe04b6f6082a1a363c" dependencies = [ "digest 0.9.0", "ff 0.12.0", @@ -3001,43 +3065,65 @@ dependencies = [ [[package]] name = "icp-ledger" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", + "candid 0.9.11", "comparable", "crc32fast", "dfn_candid", "dfn_core", - "dfn_http", - "dfn_http_metrics", "dfn_protobuf", "hex", "ic-base-types", - "ic-canisters-http-types", - "ic-crypto-sha", - "ic-icrc1", + "ic-crypto-sha2", "ic-ledger-canister-core", "ic-ledger-core", + "ic-ledger-hash-of", "icrc-ledger-types", "lazy_static", + "num-traits", "on_wire", "prost", "prost-derive", "serde", "serde_bytes", "serde_cbor", - "strum 0.24.1", - "strum_macros 0.24.3", + "strum", + "strum_macros", +] + +[[package]] +name = "icrc-ledger-client" +version = "0.1.2" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" +dependencies = [ + "async-trait", + "candid 0.9.11", + "icrc-ledger-types", + "serde", +] + +[[package]] +name = "icrc-ledger-client-cdk" +version = "0.1.2" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" +dependencies = [ + "async-trait", + "candid 0.9.11", + "ic-cdk", + "icrc-ledger-client", ] [[package]] name = "icrc-ledger-types" -version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +version = "0.1.3" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", - "ciborium 0.2.1", + "base32", + "candid 0.9.11", + "crc32fast", "hex", + "num-bigint 0.4.3", "num-traits", "serde", "serde_bytes", @@ -3116,6 +3202,17 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi 0.3.3", + "rustix 0.38.21", + "windows-sys 0.48.0", +] + [[package]] name = "isocountry" version = "0.3.2" @@ -3167,33 +3264,6 @@ dependencies = [ "serde", ] -[[package]] -name = "k256" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" -dependencies = [ - "cfg-if 1.0.0", - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.6", - "sha3", -] - -[[package]] -name = "k256" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92a55e0ff3b72c262bcf041d9e97f1b84492b68f1c1a384de2323d3dc9403397" -dependencies = [ - "cfg-if 1.0.0", - "ecdsa 0.15.1", - "elliptic-curve 0.12.3", - "once_cell", - "sha2 0.10.6", - "signature 2.0.0", -] - [[package]] name = "k256" version = "0.13.1" @@ -3201,11 +3271,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if 1.0.0", - "ecdsa 0.16.7", - "elliptic-curve 0.13.5", + "ecdsa", + "elliptic-curve", "once_cell", "sha2 0.10.6", - "signature 2.0.0", + "signature", ] [[package]] @@ -3216,21 +3286,43 @@ checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" [[package]] name = "lalrpop" -version = "0.19.8" +version = "0.19.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30455341b0e18f276fa64540aff54deafb54c589de6aca68659c63dd2d5d823" +checksum = "0a1cbf952127589f2851ab2046af368fd20645491bb4b376f04b7f94d7a9837b" +dependencies = [ + "ascii-canvas", + "bit-set", + "diff", + "ena", + "is-terminal", + "itertools", + "lalrpop-util 0.19.12", + "petgraph", + "regex", + "regex-syntax 0.6.26", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "lalrpop" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" dependencies = [ "ascii-canvas", - "atty", "bit-set", "diff", "ena", + "is-terminal", "itertools", - "lalrpop-util", + "lalrpop-util 0.20.0", "petgraph", "pico-args", "regex", - "regex-syntax", + "regex-syntax 0.7.5", "string_cache", "term", "tiny-keccak", @@ -3239,9 +3331,18 @@ dependencies = [ [[package]] name = "lalrpop-util" -version = "0.19.8" +version = "0.19.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf796c978e9b4d983414f4caedc9273aa33ee214c5b887bd55fde84c85d2dc4" +checksum = "d3c48237b9604c5a4702de6b824e02006c3214327564636aef27c1028a8fa0ed" +dependencies = [ + "regex", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" dependencies = [ "regex", ] @@ -3275,22 +3376,22 @@ dependencies = [ [[package]] name = "ledger-canister" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "async-trait", - "candid", - "ciborium 0.2.1", + "candid 0.9.11", + "ciborium", "dfn_candid", "dfn_core", "dfn_http_metrics", "dfn_protobuf", "ic-base-types", "ic-canister-log", - "ic-cdk 0.6.0", "ic-constants", "ic-icrc1", "ic-ledger-canister-core", "ic-ledger-core", + "ic-ledger-hash-of", "ic-metrics-encoder", "icp-ledger", "icrc-ledger-types", @@ -3329,24 +3430,11 @@ dependencies = [ "thiserror", ] -[[package]] -name = "lexical-core" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" -dependencies = [ - "arrayvec 0.5.2", - "bitflags", - "cfg-if 1.0.0", - "ryu", - "static_assertions", -] - [[package]] name = "libc" -version = "0.2.139" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libloading" @@ -3376,6 +3464,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "linux-raw-sys" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" + [[package]] name = "lock_api" version = "0.4.7" @@ -3401,7 +3495,30 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "427e2abca5be13136da9afdbf874e6b34ad9001dd70f2b103b083a85daa7b345" dependencies = [ - "logos-derive", + "logos-derive 0.12.0", +] + +[[package]] +name = "logos" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c000ca4d908ff18ac99b93a062cb8958d331c3220719c52e77cb19cc6ac5d2c1" +dependencies = [ + "logos-derive 0.13.0", +] + +[[package]] +name = "logos-codegen" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc487311295e0002e452025d6b580b77bb17286de87b57138f3b5db711cded68" +dependencies = [ + "beef", + "fnv", + "proc-macro2", + "quote", + "regex-syntax 0.6.26", + "syn 2.0.39", ] [[package]] @@ -3414,11 +3531,20 @@ dependencies = [ "fnv", "proc-macro2", "quote", - "regex-syntax", + "regex-syntax 0.6.26", "syn 1.0.107", "utf8-ranges", ] +[[package]] +name = "logos-derive" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbfc0d229f1f42d790440136d941afd806bc9e949e2bcb8faa813b0f00d1267e" +dependencies = [ + "logos-codegen", +] + [[package]] name = "lzma-sys" version = "0.1.19" @@ -3467,6 +3593,26 @@ dependencies = [ "unicase", ] +[[package]] +name = "minicbor" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7005aaf257a59ff4de471a9d5538ec868a21586534fff7f85dd97d4043a6139" +dependencies = [ + "minicbor-derive", +] + +[[package]] +name = "minicbor-derive" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1154809406efdb7982841adb6311b3d095b46f78342dd646736122fe6b19e267" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.107", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -3494,6 +3640,33 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "mockall" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" +dependencies = [ + "cfg-if 1.0.0", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" +dependencies = [ + "cfg-if 1.0.0", + "proc-macro2", + "quote", + "syn 1.0.107", +] + [[package]] name = "multimap" version = "0.8.3" @@ -3508,12 +3681,11 @@ checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" [[package]] name = "nix" -version = "0.23.1" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "bitflags", - "cc", + "bitflags 1.3.2", "cfg-if 1.0.0", "libc", "memoffset", @@ -3525,19 +3697,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" -[[package]] -name = "nom" -version = "6.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7413f999671bd4745a7b624bd370a569fb6bc574b23c83a3c5ed2e453f3d5e2" -dependencies = [ - "bitvec", - "funty", - "lexical-core", - "memchr", - "version_check", -] - [[package]] name = "nom" version = "7.1.1" @@ -3549,18 +3708,10 @@ dependencies = [ ] [[package]] -name = "num" -version = "0.4.0" +name = "normalize-line-endings" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" -dependencies = [ - "num-bigint 0.4.3", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "num-bigint" @@ -3602,15 +3753,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "num-complex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" -dependencies = [ - "num-traits", -] - [[package]] name = "num-integer" version = "0.1.45" @@ -3632,18 +3774,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-bigint 0.4.3", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.15" @@ -3659,7 +3789,7 @@ version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", ] @@ -3669,19 +3799,40 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.5.7", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.107", ] [[package]] name = "num_enum_derive" -version = "0.5.7" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.39", ] [[package]] @@ -3692,26 +3843,17 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "oid-registry" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6aae73e474f83beacd8ae2179e328e03d63d9223949d97e1b7c108059a34715" -dependencies = [ - "der-parser 5.1.2", -] - -[[package]] -name = "oid-registry" -version = "0.2.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe554cb2393bc784fd678c82c84cc0599c31ceadc7f03a594911f822cb8d1815" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" dependencies = [ - "der-parser 6.0.1", + "asn1-rs", ] [[package]] name = "on_wire" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" [[package]] name = "once_cell" @@ -3731,7 +3873,7 @@ version = "0.10.55" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "foreign-types", "libc", @@ -3790,12 +3932,14 @@ dependencies = [ [[package]] name = "p256" -version = "0.12.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49c124b3cbce43bcbac68c58ec181d98ed6cc7e6d0aa7c3ba97b2563410b0e55" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" dependencies = [ - "elliptic-curve 0.12.3", + "ecdsa", + "elliptic-curve", "primeorder", + "sha2 0.10.6", ] [[package]] @@ -3845,13 +3989,23 @@ dependencies = [ "digest 0.10.6", ] +[[package]] +name = "pbkdf2" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0ca0b5a68607598bf3bad68f32227a8164f6254833f84eafaac409cd6746c31" +dependencies = [ + "digest 0.10.6", + "hmac", +] + [[package]] name = "pem" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" dependencies = [ - "base64 0.13.0", + "base64 0.13.1", ] [[package]] @@ -3864,15 +4018,6 @@ dependencies = [ "serde", ] -[[package]] -name = "pem-rfc7468" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" -dependencies = [ - "base64ct", -] - [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -3945,9 +4090,9 @@ dependencies = [ [[package]] name = "phantom_newtype" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ - "candid", + "candid 0.9.11", "serde", "slog", ] @@ -3963,9 +4108,9 @@ dependencies = [ [[package]] name = "pico-args" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8bcd96cb740d03149cbad5518db9fd87126a10ab519c011893b1754134c468" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project-lite" @@ -3989,24 +4134,14 @@ dependencies = [ "num-bigint 0.2.6", ] -[[package]] -name = "pkcs8" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" -dependencies = [ - "der 0.6.0", - "spki 0.6.0", -] - [[package]] name = "pkcs8" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.6", - "spki 0.7.2", + "der", + "spki", ] [[package]] @@ -4042,6 +4177,36 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "predicates" +version = "2.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" +dependencies = [ + "difflib", + "float-cmp", + "itertools", + "normalize-line-endings", + "predicates-core", + "regex", +] + +[[package]] +name = "predicates-core" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" + +[[package]] +name = "predicates-tree" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +dependencies = [ + "predicates-core", + "termtree", +] + [[package]] name = "pretty" version = "0.10.0" @@ -4052,6 +4217,17 @@ dependencies = [ "typed-arena", ] +[[package]] +name = "pretty" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55c4d17d994b637e2f4daf6e5dc5d660d209d5642377d675d7a1c3ab69fa579" +dependencies = [ + "arrayvec 0.5.2", + "typed-arena", + "unicode-width", +] + [[package]] name = "pretty_assertions" version = "1.2.1" @@ -4076,11 +4252,11 @@ dependencies = [ [[package]] name = "primeorder" -version = "0.12.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b54f7131b3dba65a2f414cf5bd25b66d4682e4608610668eae785750ba4c5b2" +checksum = "c7dbe9ed3b56368bd99483eb32fe9c17fdd3730aebadc906918ce78d54c7eeb4" dependencies = [ - "elliptic-curve 0.12.3", + "elliptic-curve", ] [[package]] @@ -4135,18 +4311,18 @@ checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" [[package]] name = "proc-macro2" -version = "1.0.57" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4ec6d5fe0b140acb27c9a0444118cf55bfbb4e0b259739429abb4521dd67c16" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] [[package]] name = "prost" -version = "0.11.6" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21dc42e00223fc37204bd4aa177e69420c604ca4a183209a8f9de30c6d934698" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", "prost-derive", @@ -4154,12 +4330,12 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.11.6" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f8ad728fb08fe212df3c05169e940fbb6d9d16a877ddde14644a983ba2012e" +checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", - "heck 0.4.0", + "heck", "itertools", "lazy_static", "log", @@ -4176,9 +4352,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.11.6" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda8c0881ea9f722eb9629376db3d0b903b462477c1aafcb0566610ac28ac5d" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", "itertools", @@ -4189,28 +4365,27 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.11.6" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e0526209433e96d83d750dd81a99118edbc55739e7e61a46764fd2ad537788" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "bytes", "prost", ] [[package]] -name = "qrcodegen" -version = "1.8.0" +name = "psm" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4339fc7a1021c9c1621d87f5e3505f2805c8c105420ba2f2a4df86814590c142" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +dependencies = [ + "cc", +] [[package]] -name = "quickcheck" -version = "1.0.3" +name = "qrcodegen" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" -dependencies = [ - "rand", -] +checksum = "4339fc7a1021c9c1621d87f5e3505f2805c8c105420ba2f2a4df86814590c142" [[package]] name = "quill" @@ -4218,9 +4393,9 @@ version = "0.4.2" dependencies = [ "anyhow", "atty", - "base64 0.13.0", + "base64 0.13.1", "bip32", - "candid", + "candid 0.9.11", "clap", "crc32fast", "data-encoding", @@ -4243,7 +4418,7 @@ dependencies = [ "icrc-ledger-types", "indicatif", "itertools", - "k256 0.11.6", + "k256", "ledger-apdu", "ledger-canister", "ledger-transport-hid", @@ -4271,19 +4446,13 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.27" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" - [[package]] name = "rand" version = "0.8.5" @@ -4329,7 +4498,7 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -4351,7 +4520,7 @@ checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.6.26", ] [[package]] @@ -4366,23 +4535,30 @@ version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" +[[package]] +name = "regex-syntax" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" + [[package]] name = "registry-canister" version = "0.8.0" -source = "git+https://github.com/dfinity/ic?rev=5e56d9e6f7da97bbad0ef0269a198e189c6d7120#5e56d9e6f7da97bbad0ef0269a198e189c6d7120" +source = "git+https://github.com/dfinity/ic?rev=80a6745673a28ee53d257b3fe19dcd6b7efa93d1#80a6745673a28ee53d257b3fe19dcd6b7efa93d1" dependencies = [ "build-info", "build-info-build", - "candid", + "candid 0.9.11", "cycles-minting-canister", "dfn_candid", "dfn_core", "dfn_http_metrics", "futures", "ic-base-types", + "ic-cdk", "ic-certified-map", "ic-crypto-node-key-validation", - "ic-crypto-sha", + "ic-crypto-sha2", "ic-crypto-utils-basic-sig", "ic-ic00-types", "ic-metrics-encoder", @@ -4398,6 +4574,7 @@ dependencies = [ "ic-registry-transport", "ic-types", "ipnet", + "lazy_static", "leb128", "on_wire", "prost", @@ -4412,7 +4589,7 @@ version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" dependencies = [ - "base64 0.13.0", + "base64 0.13.1", "bytes", "encoding_rs", "futures-core", @@ -4445,17 +4622,6 @@ dependencies = [ "winreg", ] -[[package]] -name = "rfc6979" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" -dependencies = [ - "crypto-bigint 0.4.8", - "hmac", - "zeroize", -] - [[package]] name = "rfc6979" version = "0.4.0" @@ -4538,22 +4704,13 @@ dependencies = [ "semver", ] -[[package]] -name = "rusticata-macros" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbbee512c633ecabd4481c40111b6ded03ddd9ab10ba6caa5a74e14c889921ad" -dependencies = [ - "nom 6.1.2", -] - [[package]] name = "rusticata-macros" version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" dependencies = [ - "nom 7.1.1", + "nom", ] [[package]] @@ -4562,14 +4719,27 @@ version = "0.36.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" dependencies = [ - "bitflags", - "errno", + "bitflags 1.3.2", + "errno 0.2.8", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.1.4", "windows-sys 0.45.0", ] +[[package]] +name = "rustix" +version = "0.38.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +dependencies = [ + "bitflags 2.4.1", + "errno 0.3.5", + "libc", + "linux-raw-sys 0.4.10", + "windows-sys 0.48.0", +] + [[package]] name = "rustls" version = "0.20.6" @@ -4588,7 +4758,17 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360" dependencies = [ - "base64 0.13.0", + "base64 0.13.1", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" +dependencies = [ + "ring", + "untrusted", ] [[package]] @@ -4625,30 +4805,16 @@ dependencies = [ "untrusted", ] -[[package]] -name = "sec1" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" -dependencies = [ - "base16ct 0.1.1", - "der 0.6.0", - "generic-array", - "pkcs8 0.9.0", - "subtle", - "zeroize", -] - [[package]] name = "sec1" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" dependencies = [ - "base16ct 0.2.0", - "der 0.7.6", + "base16ct", + "der", "generic-array", - "pkcs8 0.10.2", + "pkcs8", "subtle", "zeroize", ] @@ -4664,9 +4830,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.163" +version = "1.0.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "a834c4821019838224821468552240d4d95d14e751986442c816572d39a080c9" dependencies = [ "serde_derive", ] @@ -4692,20 +4858,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "46fa52d5646bce91b680189fe5b1c049d2ea38dabb4e2e7c8d00ca12cfbfbcfd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.39", ] [[package]] name = "serde_json" -version = "1.0.91" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa 1.0.2", "ryu", @@ -4720,7 +4886,7 @@ checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.39", ] [[package]] @@ -4802,7 +4968,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.39", ] [[package]] @@ -4869,16 +5035,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -dependencies = [ - "digest 0.10.6", - "rand_core 0.6.4", -] - [[package]] name = "signature" version = "2.0.0" @@ -4891,9 +5047,9 @@ dependencies = [ [[package]] name = "simple_asn1" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a762b1c38b9b990c694b9c2f8abe3372ce6a9ceaae6bca39cfc46e054f45745" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ "num-bigint 0.4.3", "num-traits", @@ -4953,7 +5109,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "475b3bbe5245c26f2d8a6f62d67c1f30eb9fffeccee721c45d162c3ebbdf81b2" dependencies = [ - "heck 0.4.0", + "heck", "proc-macro2", "quote", "syn 1.0.107", @@ -4975,16 +5131,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[package]] -name = "spki" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" -dependencies = [ - "base64ct", - "der 0.6.0", -] - [[package]] name = "spki" version = "0.7.2" @@ -4992,14 +5138,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.6", + "der", ] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "stacker" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +dependencies = [ + "cc", + "cfg-if 1.0.0", + "libc", + "psm", + "winapi", +] [[package]] name = "string_cache" @@ -5020,47 +5173,13 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "strum" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" - -[[package]] -name = "strum" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" - [[package]] name = "strum" version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" - -[[package]] -name = "strum_macros" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" -dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", - "syn 1.0.107", -] - -[[package]] -name = "strum_macros" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb0dc7ee9c15cea6199cde9a127fa16a4c5819af85395457ad72d68edc85a38" dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.107", + "strum_macros", ] [[package]] @@ -5069,7 +5188,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "heck 0.4.0", + "heck", "proc-macro2", "quote", "rustversion", @@ -5101,9 +5220,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -5122,12 +5241,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "tempfile" version = "3.4.0" @@ -5137,7 +5250,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "redox_syscall", - "rustix", + "rustix 0.36.8", "windows-sys 0.42.0", ] @@ -5161,6 +5274,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "termtree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" + [[package]] name = "textwrap" version = "0.16.0" @@ -5184,7 +5303,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.39", ] [[package]] @@ -5210,7 +5329,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" dependencies = [ "itoa 1.0.2", - "quickcheck", "serde", "time-core", "time-macros", @@ -5240,7 +5358,7 @@ dependencies = [ "anyhow", "hmac", "once_cell", - "pbkdf2", + "pbkdf2 0.11.0", "rand", "rustc-hash", "sha2 0.10.6", @@ -5466,7 +5584,6 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", - "serde", ] [[package]] @@ -5677,12 +5794,12 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.1", "windows_aarch64_msvc 0.42.1", "windows_i686_gnu 0.42.1", "windows_i686_msvc 0.42.1", "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.1", "windows_x86_64_msvc 0.42.1", ] @@ -5692,7 +5809,16 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.1", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", ] [[package]] @@ -5701,21 +5827,42 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.1", "windows_aarch64_msvc 0.42.1", "windows_i686_gnu 0.42.1", "windows_i686_msvc 0.42.1", "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.1", "windows_x86_64_msvc 0.42.1", ] +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" @@ -5728,6 +5875,12 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_i686_gnu" version = "0.36.1" @@ -5740,6 +5893,12 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_msvc" version = "0.36.1" @@ -5752,6 +5911,12 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" @@ -5764,12 +5929,24 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -5782,6 +5959,12 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "winreg" version = "0.10.1" @@ -5797,45 +5980,22 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dab7ac864710bdea6594becbea5b5050333cf34fefb0dc319567eb347950d4" -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "x509-parser" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64abca276c58f8341ddc13fd4bd6ae75993cc669043f5b34813c90f7dff04771" -dependencies = [ - "base64 0.13.0", - "chrono", - "data-encoding", - "der-parser 5.1.2", - "lazy_static", - "nom 6.1.2", - "oid-registry 0.1.5", - "rusticata-macros 3.2.0", - "rustversion", - "thiserror", -] - -[[package]] -name = "x509-parser" -version = "0.12.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc90836a84cb72e6934137b1504d0cae304ef5d83904beb0c8d773bbfe256ed" +checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" dependencies = [ - "base64 0.13.0", - "chrono", + "asn1-rs", + "base64 0.13.1", "data-encoding", - "der-parser 6.0.1", + "der-parser", "lazy_static", - "nom 7.1.1", - "oid-registry 0.2.0", - "rusticata-macros 4.1.0", + "nom", + "oid-registry", + "rusticata-macros", "thiserror", + "time 0.3.21", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 18cd83c6..1a5c9940 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "quill" version = "0.4.2" authors = ["DFINITY Team"] edition = "2021" -rust-version = "1.66.1" +rust-version = "1.71.1" description = "Minimalistic ledger and governance toolkit for cold wallets." repository = "https://github.com/dfinity/quill" license = "Apache-2.0" @@ -13,28 +13,28 @@ name = "quill" path = "src/main.rs" [dependencies] -ic-base-types = { git = "https://github.com/dfinity/ic", rev = "5e56d9e6f7da97bbad0ef0269a198e189c6d7120" } -ic-ckbtc-minter = { git = "https://github.com/dfinity/ic", rev = "5e56d9e6f7da97bbad0ef0269a198e189c6d7120" } -ic-nervous-system-common = { git = "https://github.com/dfinity/ic", rev = "5e56d9e6f7da97bbad0ef0269a198e189c6d7120" } -ic-nns-common = { git = "https://github.com/dfinity/ic", rev = "5e56d9e6f7da97bbad0ef0269a198e189c6d7120" } -ic-nns-constants = { git = "https://github.com/dfinity/ic", rev = "5e56d9e6f7da97bbad0ef0269a198e189c6d7120" } -ic-nns-governance = { git = "https://github.com/dfinity/ic", rev = "5e56d9e6f7da97bbad0ef0269a198e189c6d7120" } -ic-sns-governance = { git = "https://github.com/dfinity/ic", rev = "5e56d9e6f7da97bbad0ef0269a198e189c6d7120" } -ic-sns-root = { git = "https://github.com/dfinity/ic", rev = "5e56d9e6f7da97bbad0ef0269a198e189c6d7120" } -ic-sns-swap = { git = "https://github.com/dfinity/ic", rev = "5e56d9e6f7da97bbad0ef0269a198e189c6d7120" } -ic-sns-wasm = { git = "https://github.com/dfinity/ic", rev = "5e56d9e6f7da97bbad0ef0269a198e189c6d7120" } -icp-ledger = { git = "https://github.com/dfinity/ic", rev = "5e56d9e6f7da97bbad0ef0269a198e189c6d7120" } -icrc-ledger-types = { git = "https://github.com/dfinity/ic", rev = "5e56d9e6f7da97bbad0ef0269a198e189c6d7120" } -ledger-canister = { git = "https://github.com/dfinity/ic", rev = "5e56d9e6f7da97bbad0ef0269a198e189c6d7120" } +ic-base-types = { git = "https://github.com/dfinity/ic", rev = "80a6745673a28ee53d257b3fe19dcd6b7efa93d1" } +ic-ckbtc-minter = { git = "https://github.com/dfinity/ic", rev = "80a6745673a28ee53d257b3fe19dcd6b7efa93d1" } +ic-nervous-system-common = { git = "https://github.com/dfinity/ic", rev = "80a6745673a28ee53d257b3fe19dcd6b7efa93d1" } +ic-nns-common = { git = "https://github.com/dfinity/ic", rev = "80a6745673a28ee53d257b3fe19dcd6b7efa93d1" } +ic-nns-constants = { git = "https://github.com/dfinity/ic", rev = "80a6745673a28ee53d257b3fe19dcd6b7efa93d1" } +ic-nns-governance = { git = "https://github.com/dfinity/ic", rev = "80a6745673a28ee53d257b3fe19dcd6b7efa93d1" } +ic-sns-governance = { git = "https://github.com/dfinity/ic", rev = "80a6745673a28ee53d257b3fe19dcd6b7efa93d1" } +ic-sns-root = { git = "https://github.com/dfinity/ic", rev = "80a6745673a28ee53d257b3fe19dcd6b7efa93d1" } +ic-sns-swap = { git = "https://github.com/dfinity/ic", rev = "80a6745673a28ee53d257b3fe19dcd6b7efa93d1" } +ic-sns-wasm = { git = "https://github.com/dfinity/ic", rev = "80a6745673a28ee53d257b3fe19dcd6b7efa93d1" } +icp-ledger = { git = "https://github.com/dfinity/ic", rev = "80a6745673a28ee53d257b3fe19dcd6b7efa93d1" } +icrc-ledger-types = { git = "https://github.com/dfinity/ic", rev = "80a6745673a28ee53d257b3fe19dcd6b7efa93d1" } +ledger-canister = { git = "https://github.com/dfinity/ic", rev = "80a6745673a28ee53d257b3fe19dcd6b7efa93d1" } -candid = "0.8.2" -ic-agent = { git = "https://github.com/dfinity/agent-rs", rev = "b9c57f8bab23cc9936dca4560293ffe485471c6d" } -ic-identity-hsm = { git = "https://github.com/dfinity/agent-rs", rev = "b9c57f8bab23cc9936dca4560293ffe485471c6d", optional = true } +candid = { version = "0.9.11", features = ["parser"] } +ic-agent = { git = "https://github.com/dfinity/agent-rs", rev = "65b270817510b0d74638f0b54d9e5bcfbfe31cee" } +ic-identity-hsm = { git = "https://github.com/dfinity/agent-rs", rev = "65b270817510b0d74638f0b54d9e5bcfbfe31cee", optional = true } anyhow = "1.0.34" atty = "0.2.14" base64 = "0.13.0" -bip32 = "0.4.0" +bip32 = "0.5.0" clap = { version = "3.1.18", features = ["derive", "cargo"] } crc32fast = "1.3.2" data-encoding = "2.3.3" @@ -43,7 +43,7 @@ hex = { version = "0.4.2", features = ["serde"] } hidapi = { version = "1.4", default-features = false, optional = true } indicatif = "0.17" itertools = "0.10.5" -k256 = { version = "0.11.4", features = ["pem"] } +k256 = { version = "0.13.1", features = ["pem"] } ledger-apdu = { version = "0.10", optional = true } ledger-transport-hid = { version = "0.10", optional = true } num-bigint = "0.4.3" diff --git a/candid/ckbtc_minter.did b/candid/ckbtc_minter.did index aadcaf5b..e1c5d1c8 100644 --- a/candid/ckbtc_minter.did +++ b/candid/ckbtc_minter.did @@ -1,17 +1,40 @@ // Represents an account on the ckBTC ledger. type Account = record { owner : principal; subaccount : opt blob }; +type CanisterStatusResponse = record { + status : CanisterStatusType; + memory_size : nat; + cycles : nat; + settings : DefiniteCanisterSettings; + idle_cycles_burned_per_day : nat; + module_hash : opt vec nat8; +}; + +type CanisterStatusType = variant { stopped; stopping; running }; + +type DefiniteCanisterSettings = record { + freezing_threshold : nat; + controllers : vec principal; + memory_allocation : nat; + compute_allocation : nat; +}; + type RetrieveBtcArgs = record { // The address to which the ckBTC minter should deposit BTC. - // Currently, the minter understands only the following types of addresses: - // * P2WPKH addresses (they start with the "bc1q" prefix on the Bitcoin mainnet). - // * P2PKH addresses (they start with the "1" prefix on the Bitcoin mainnet). - // * P2SH addresses (they start with the "3" prefix on the Bitcoin mainnet). address : text; // The amount of BTC in Satoshis that the client wants to withdraw. amount : nat64; }; +type RetrieveBtcWithApprovalArgs = record { + // The address to which the ckBTC minter should deposit BTC. + address : text; + // The amount of BTC in Satoshis that the client wants to withdraw. + amount : nat64; + // The subaccount to burn ckBTC from. + from_subaccount : opt blob; +}; + type RetrieveBtcError = variant { // The minter failed to parse the destination address. MalformedAddress : text; @@ -30,6 +53,26 @@ type RetrieveBtcError = variant { GenericError : record { error_message : text; error_code : nat64 }; }; +type RetrieveBtcWithApprovalError = variant { + // The minter failed to parse the destination address. + MalformedAddress : text; + // The minter is already processing another retrieval request for the same + // principal. + AlreadyProcessing; + // The withdrawal amount is too low. + // The payload contains the minimal withdrawal amount. + AmountTooLow : nat64; + // The ckBTC balance of the withdrawal account is too low. + InsufficientFunds : record { balance : nat64 }; + // The allowance given to the minter is too low. + InsufficientAllowance : record { allowance : nat64 }; + // The minter is overloaded, retry the request. + // The payload contains a human-readable message explaining what caused the unavailability. + TemporarilyUnavailable : text; + // A generic error reserved for future extensions. + GenericError : record { error_message : text; error_code : nat64 }; +}; + type RetrieveBtcOk = record { // Returns the burn transaction index corresponding to the withdrawal. // You can use this index to query the withdrawal status. @@ -42,7 +85,7 @@ type UtxoStatus = variant { // the KYT fees. This state is final, retrying [update_balance] call will // have no effect on this UTXO. ValueTooSmall : Utxo; - // The KYT provider considered this UTXO to be tained. This UTXO state is + // The KYT provider considered this UTXO to be tainted. This UTXO state is // final, retrying [update_balance] call will have no effect on this UTXO. Tainted : Utxo; // The UTXO passed the KYT check, but the minter failed to mint ckBTC @@ -120,7 +163,7 @@ type InitArgs = record { /// The minter's operation mode. mode : Mode; - /// The fee paid per check by the KYT cansiter. + /// The fee paid per check by the KYT canister. kyt_fee : opt nat64; /// The canister id of the KYT canister. @@ -143,7 +186,7 @@ type UpgradeArgs = record { /// If set, overrides the current minter's operation mode. mode : opt Mode; - /// The fee per check by the KYT cansiter. + /// The fee per check by the KYT canister. kyt_fee : opt nat64; /// The principal of the KYT canister. @@ -189,6 +232,8 @@ type Utxo = record { type BitcoinAddress = variant { p2wpkh_v0 : blob; + p2wsh_v0 : blob; + p2tr_v1 : blob; p2pkh : blob; p2sh : blob; }; @@ -199,10 +244,18 @@ type MinterInfo = record { kyt_fee : nat64; }; +type ReimbursementReason = variant { + CallFailed; + TaintedDestination : record { + kyt_fee : nat64; + kyt_provider: principal; + }; +}; + type Event = variant { init : InitArgs; upgrade : UpgradeArgs; - received_utxos : record { to_account : Account; utxos : vec Utxo }; + received_utxos : record { to_account : Account; mint_txid : opt nat64; utxos : vec Utxo }; accepted_retrieve_btc_request : record { amount : nat64; address : BitcoinAddress; @@ -222,6 +275,14 @@ type Event = variant { utxos : vec Utxo; change_output : opt record { vout : nat32; value : nat64 }; submitted_at : nat64; + fee: opt nat64; + }; + replaced_transaction : record { + new_txid : blob; + old_txid : blob; + change_output : record { vout : nat32; value : nat64 }; + submitted_at : nat64; + fee: nat64; }; confirmed_transaction : record { txid : blob }; checked_utxo : record { @@ -234,10 +295,18 @@ type Event = variant { retrieve_btc_kyt_failed : record { address : text; amount : nat64; + owner : principal; kyt_provider : principal; uuid : text; block_index : nat64; }; + schedule_deposit_reimbursement : record { + account : Account; + burn_block_index : nat64; + amount : nat64; + reason : ReimbursementReason; + }; + reimbursed_failed_deposit : record { burn_block_index : nat64; mint_block_index : nat64 }; }; type MinterArg = variant { @@ -296,6 +365,21 @@ service : (minter_arg : MinterArg) -> { // that the [get_withdrawal_account] endpoint returns. retrieve_btc : (RetrieveBtcArgs) -> (variant { Ok : RetrieveBtcOk; Err : RetrieveBtcError }); + // Submits a request to convert ckBTC to BTC. + // + // # Note + // + // The BTC retrieval process is slow. Instead of + // synchronously waiting for a BTC transaction to settle, this + // method returns a request ([block_index]) that the caller can use + // to query the request status. + // + // # Preconditions + // + // * The caller allowed the minter's principal to spend its funds + // using [icrc2_approve] on the ckBTC ledger. + retrieve_btc_with_approval : (RetrieveBtcWithApprovalArgs) -> (variant { Ok : RetrieveBtcOk; Err : RetrieveBtcWithApprovalError }); + /// Returns the status of a [retrieve_btc] request. retrieve_btc_status : (record { block_index : nat64 }) -> (RetrieveBtcStatus) query; @@ -304,6 +388,8 @@ service : (minter_arg : MinterArg) -> { // Section "Minter Information" {{{ // Returns internal minter parameters. get_minter_info : () -> (MinterInfo) query; + + get_canister_status : () -> (CanisterStatusResponse); // }}} // Section "Event log" {{{ diff --git a/candid/governance.did b/candid/governance.did index d605dfa3..9fa54199 100644 --- a/candid/governance.did +++ b/candid/governance.did @@ -39,7 +39,11 @@ type CanisterSummary = record { status : opt CanisterStatusResultV2; canister_id : opt principal; }; -type CfNeuron = record { nns_neuron_id : nat64; amount_icp_e8s : nat64 }; +type CfNeuron = record { + has_created_neuron_recipes : opt bool; + nns_neuron_id : nat64; + amount_icp_e8s : nat64; +}; type CfParticipant = record { hotkey_principal : text; cf_neurons : vec CfNeuron; @@ -77,7 +81,7 @@ type Command_1 = variant { ClaimOrRefresh : ClaimOrRefreshResponse; Configure : record {}; RegisterVote : record {}; - Merge : record {}; + Merge : MergeResponse; DisburseToNeuron : SpawnResponse; MakeProposal : MakeProposalResponse; StakeMaturity : StakeMaturityResponse; @@ -95,8 +99,18 @@ type Command_2 = variant { MergeMaturity : MergeMaturity; Disburse : Disburse; }; -type Committed = record { sns_governance_canister_id : opt principal }; +type Committed = record { + total_direct_contribution_icp_e8s : opt nat64; + total_neurons_fund_contribution_icp_e8s : opt nat64; + sns_governance_canister_id : opt principal; +}; +type Committed_1 = record { + total_direct_participation_icp_e8s : opt nat64; + total_neurons_fund_participation_icp_e8s : opt nat64; + sns_governance_canister_id : opt principal; +}; type Configure = record { operation : opt Operation }; +type Countries = record { iso_codes : vec text }; type CreateServiceNervousSystem = record { url : opt text; governance_parameters : opt GovernanceParameters; @@ -135,12 +149,17 @@ type Duration = record { seconds : opt nat64 }; type ExecuteNnsFunction = record { nns_function : int32; payload : vec nat8 }; type Follow = record { topic : int32; followees : vec NeuronId }; type Followees = record { followees : vec NeuronId }; +type Followers = record { followers : vec NeuronId }; +type FollowersMap = record { followers_map : vec record { nat64; Followers } }; +type GlobalTimeOfDay = record { seconds_after_utc_midnight : opt nat64 }; type Governance = record { default_followees : vec record { int32; Followees }; + making_sns_proposal : opt MakingSnsProposal; most_recent_monthly_node_provider_rewards : opt MostRecentMonthlyNodeProviderRewards; maturity_modulation_last_updated_at_timestamp_seconds : opt nat64; wait_for_quiet_threshold_seconds : nat64; metrics : opt GovernanceCachedMetrics; + neuron_management_voting_period_seconds : opt nat64; node_providers : vec NodeProvider; cached_daily_maturity_modulation_basis_points : opt int32; economics : opt NetworkEconomics; @@ -148,14 +167,22 @@ type Governance = record { latest_reward_event : opt RewardEvent; to_claim_transfers : vec NeuronStakeTransfer; short_voting_period_seconds : nat64; + topic_followee_index : vec record { int32; FollowersMap }; + migrations : opt Migrations; proposals : vec record { nat64; ProposalData }; in_flight_commands : vec record { nat64; NeuronInFlightCommand }; neurons : vec record { nat64; Neuron }; genesis_timestamp_seconds : nat64; }; type GovernanceCachedMetrics = record { + total_maturity_e8s_equivalent : nat64; not_dissolving_neurons_e8s_buckets : vec record { nat64; float64 }; + dissolving_neurons_staked_maturity_e8s_equivalent_sum : nat64; garbage_collectable_neurons_count : nat64; + dissolving_neurons_staked_maturity_e8s_equivalent_buckets : vec record { + nat64; + float64; + }; neurons_with_invalid_stake_count : nat64; not_dissolving_neurons_count_buckets : vec record { nat64; nat64 }; total_supply_icp : nat64; @@ -165,8 +192,15 @@ type GovernanceCachedMetrics = record { total_staked_e8s : nat64; not_dissolving_neurons_count : nat64; total_locked_e8s : nat64; + neurons_fund_total_active_neurons : nat64; + total_staked_maturity_e8s_equivalent : nat64; + not_dissolving_neurons_staked_maturity_e8s_equivalent_sum : nat64; dissolved_neurons_e8s : nat64; neurons_with_less_than_6_months_dissolve_delay_e8s : nat64; + not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets : vec record { + nat64; + float64; + }; dissolving_neurons_count_buckets : vec record { nat64; nat64 }; dissolving_neurons_count : nat64; dissolving_neurons_e8s_buckets : vec record { nat64; float64 }; @@ -186,6 +220,9 @@ type GovernanceParameters = record { proposal_rejection_fee : opt Tokens; voting_reward_parameters : opt VotingRewardParameters; }; +type IdealMatchedParticipationFunction = record { + serialized_representation : opt text; +}; type Image = record { base64_encoding : opt text }; type IncreaseDissolveDelay = record { additional_dissolve_delay_seconds : nat32; @@ -218,13 +255,20 @@ type ListNeuronsResponse = record { type ListNodeProvidersResponse = record { node_providers : vec NodeProvider }; type ListProposalInfo = record { include_reward_status : vec int32; + omit_large_fields : opt bool; before_proposal : opt NeuronId; limit : nat32; exclude_topic : vec int32; + include_all_manage_neuron_proposals : opt bool; include_status : vec int32; }; type ListProposalInfoResponse = record { proposal_info : vec ProposalInfo }; type MakeProposalResponse = record { proposal_id : opt NeuronId }; +type MakingSnsProposal = record { + proposal : opt Proposal; + caller : opt principal; + proposer_id : opt NeuronId; +}; type ManageNeuron = record { id : opt NeuronId; command : opt Command; @@ -237,6 +281,21 @@ type MergeMaturityResponse = record { merged_maturity_e8s : nat64; new_stake_e8s : nat64; }; +type MergeResponse = record { + target_neuron : opt Neuron; + source_neuron : opt Neuron; + target_neuron_info : opt NeuronInfo; + source_neuron_info : opt NeuronInfo; +}; +type Migration = record { + status : opt int32; + failure_reason : opt text; + progress : opt Progress; +}; +type Migrations = record { + neuron_indexes_migration : opt Migration; + copy_inactive_neurons_to_stable_memory_migration : opt Migration; +}; type MostRecentMonthlyNodeProviderRewards = record { timestamp : nat64; rewards : vec RewardNodeProvider; @@ -319,10 +378,41 @@ type NeuronStakeTransfer = record { transfer_timestamp : nat64; block_height : nat64; }; +type NeuronsFundData = record { + final_neurons_fund_participation : opt NeuronsFundParticipation; + initial_neurons_fund_participation : opt NeuronsFundParticipation; + neurons_fund_refunds : opt NeuronsFundSnapshot; +}; +type NeuronsFundNeuron = record { + hotkey_principal : opt text; + is_capped : opt bool; + nns_neuron_id : opt nat64; + amount_icp_e8s : opt nat64; +}; +type NeuronsFundNeuronPortion = record { + hotkey_principal : opt principal; + is_capped : opt bool; + maturity_equivalent_icp_e8s : opt nat64; + nns_neuron_id : opt NeuronId; + amount_icp_e8s : opt nat64; +}; +type NeuronsFundParticipation = record { + total_maturity_equivalent_icp_e8s : opt nat64; + intended_neurons_fund_participation_icp_e8s : opt nat64; + direct_participation_icp_e8s : opt nat64; + swap_participation_limits : opt SwapParticipationLimits; + max_neurons_fund_swap_participation_icp_e8s : opt nat64; + neurons_fund_reserves : opt NeuronsFundSnapshot; + ideal_matched_participation_function : opt IdealMatchedParticipationFunction; +}; +type NeuronsFundSnapshot = record { + neurons_fund_neuron_portions : vec NeuronsFundNeuronPortion; +}; type NodeProvider = record { id : opt principal; reward_account : opt AccountIdentifier; }; +type Ok = record { neurons_fund_neuron_portions : vec NeuronsFundNeuron }; type OpenSnsTokenSwap = record { community_fund_investment_e8s : opt nat64; target_swap_canister_id : opt principal; @@ -348,9 +438,12 @@ type Params = record { sns_token_e8s : nat64; sale_delay_seconds : opt nat64; max_participant_icp_e8s : nat64; + min_direct_participation_icp_e8s : opt nat64; min_icp_e8s : nat64; + max_direct_participation_icp_e8s : opt nat64; }; type Percentage = record { basis_points : opt nat64 }; +type Progress = variant { LastNeuronId : NeuronId }; type Proposal = record { url : text; title : opt text; @@ -365,6 +458,7 @@ type ProposalData = record { proposal_timestamp_seconds : nat64; reward_event_round : nat64; failed_timestamp_seconds : nat64; + neurons_fund_data : opt NeuronsFundData; reject_cost_e8s : nat64; derived_proposal_information : opt DerivedProposalInformation; latest_tally : opt Tally; @@ -405,6 +499,8 @@ type Result_4 = variant { Ok : RewardNodeProviders; Err : GovernanceError }; type Result_5 = variant { Ok : NeuronInfo; Err : GovernanceError }; type Result_6 = variant { Ok : NodeProvider; Err : GovernanceError }; type Result_7 = variant { Committed : Committed; Aborted : record {} }; +type Result_8 = variant { Committed : Committed_1; Aborted : record {} }; +type Result_9 = variant { Ok : Ok; Err : GovernanceError }; type RewardEvent = record { rounds_since_last_distribution : opt nat64; day_after_genesis : nat64; @@ -442,6 +538,11 @@ type SettleCommunityFundParticipation = record { result : opt Result_7; open_sns_token_swap_proposal_id : opt nat64; }; +type SettleNeuronsFundParticipationRequest = record { + result : opt Result_8; + nns_proposal_id : opt nat64; +}; +type SettleNeuronsFundParticipationResponse = record { result : opt Result_9 }; type Spawn = record { percentage_to_spawn : opt nat32; new_controller : opt principal; @@ -467,11 +568,25 @@ type SwapBackgroundInformation = record { type SwapDistribution = record { total : opt Tokens }; type SwapParameters = record { minimum_participants : opt nat64; + neurons_fund_participation : opt bool; + duration : opt Duration; neuron_basket_construction_parameters : opt NeuronBasketConstructionParameters; + confirmation_text : opt text; maximum_participant_icp : opt Tokens; minimum_icp : opt Tokens; + minimum_direct_participation_icp : opt Tokens; minimum_participant_icp : opt Tokens; + start_time : opt GlobalTimeOfDay; + maximum_direct_participation_icp : opt Tokens; maximum_icp : opt Tokens; + neurons_fund_investment_icp : opt Tokens; + restricted_countries : opt Countries; +}; +type SwapParticipationLimits = record { + min_participant_icp_e8s : opt nat64; + max_participant_icp_e8s : opt nat64; + min_direct_participation_icp_e8s : opt nat64; + max_direct_participation_icp_e8s : opt nat64; }; type Tally = record { no : nat64; @@ -524,6 +639,10 @@ service : (Governance) -> { settle_community_fund_participation : (SettleCommunityFundParticipation) -> ( Result, ); + settle_neurons_fund_participation : ( + SettleNeuronsFundParticipationRequest, + ) -> (SettleNeuronsFundParticipationResponse); + simulate_manage_neuron : (ManageNeuron) -> (ManageNeuronResponse); transfer_gtc_neuron : (NeuronId, NeuronId) -> (Result); update_node_provider : (UpdateNodeProvider) -> (Result); } diff --git a/candid/ledger.did b/candid/ledger.did index bef3a0fe..155e6f30 100644 --- a/candid/ledger.did +++ b/candid/ledger.did @@ -104,6 +104,7 @@ type Operation = variant { }; Burn : record { from : AccountIdentifier; + spender : opt AccountIdentifier; amount : Tokens; }; Transfer : record { @@ -111,20 +112,17 @@ type Operation = variant { to : AccountIdentifier; amount : Tokens; fee : Tokens; + spender : opt vec nat8; }; Approve : record { from : AccountIdentifier; spender : AccountIdentifier; + // This field is deprecated and should not be used. allowance_e8s : int; + allowance: Tokens; fee : Tokens; expires_at : opt TimeStamp; - }; - TransferFrom : record { - from : AccountIdentifier; - to : AccountIdentifier; - spender : AccountIdentifier; - amount : Tokens; - fee : Tokens; + expected_allowance : opt Tokens; }; }; @@ -215,18 +213,36 @@ type QueryBlocksResponse = record { // // For each entry `e` in [archived_blocks], `[e.from, e.from + len)` is a sub-range // of the originally requested block range. - archived_blocks : vec record { - // The index of the first archived block that can be fetched using the callback. - start : BlockIndex; + archived_blocks : vec ArchivedBlocksRange; +}; - // The number of blocks that can be fetch using the callback. - length : nat64; +type ArchivedBlocksRange = record { + // The index of the first archived block that can be fetched using the callback. + start : BlockIndex; - // The function that should be called to fetch the archived blocks. - // The range of the blocks accessible using this function is given by [from] - // and [len] fields above. - callback : QueryArchiveFn; - }; + // The number of blocks that can be fetch using the callback. + length : nat64; + + // The function that should be called to fetch the archived blocks. + // The range of the blocks accessible using this function is given by [from] + // and [len] fields above. + callback : QueryArchiveFn; +}; + +type ArchivedEncodedBlocksRange = record { + callback : func (GetBlocksArgs) -> ( + variant { Ok : vec blob; Err : QueryArchiveError }, + ) query; + start : nat64; + length : nat64; +}; + +type QueryEncodedBlocksResponse = record { + certificate : opt blob; + blocks : vec blob; + chain_length : nat64; + first_block_index : nat64; + archived_blocks : vec ArchivedEncodedBlocksRange; }; type Archive = record { @@ -245,10 +261,11 @@ type Duration = record { type ArchiveOptions = record { trigger_threshold : nat64; num_blocks_to_archive : nat64; - node_max_memory_size_bytes: opt nat64; - max_message_size_bytes: opt nat64; - controller_id: principal; - cycles_for_archive_creation: opt nat64; + node_max_memory_size_bytes : opt nat64; + max_message_size_bytes : opt nat64; + controller_id : principal; + cycles_for_archive_creation : opt nat64; + max_transactions_per_response : opt nat64; }; // Account identifier encoded as a 64-byte ASCII hex string. @@ -268,8 +285,13 @@ type AccountBalanceArgsDfx = record { account: TextAccountIdentifier; }; -type LedgerCanisterInitPayload = record { +type FeatureFlags = record { + icrc2 : bool; +}; + +type InitArgs = record { minting_account: TextAccountIdentifier; + icrc1_minting_account: opt Account; initial_values: vec record {TextAccountIdentifier; Tokens}; max_message_size_bytes: opt nat64; transaction_window: opt Duration; @@ -278,6 +300,9 @@ type LedgerCanisterInitPayload = record { transfer_fee: opt Tokens; token_symbol: opt text; token_name: opt text; + feature_flags : opt FeatureFlags; + maximum_number_of_accounts : opt nat64; + accounts_overflow_trim_quantity: opt nat64; }; type Icrc1BlockIndex = nat; @@ -323,7 +348,83 @@ type Value = variant { Blob : blob; }; -service: (LedgerCanisterInitPayload) -> { +type UpgradeArgs = record { + maximum_number_of_accounts : opt nat64; + icrc1_minting_account : opt Account; + feature_flags : opt FeatureFlags; +}; + +type LedgerCanisterPayload = variant { + Init: InitArgs; + Upgrade: opt UpgradeArgs; +}; + +type ApproveArgs = record { + from_subaccount : opt SubAccount; + spender : Account; + amount : Icrc1Tokens; + expected_allowance : opt Icrc1Tokens; + expires_at : opt Icrc1Timestamp; + fee : opt Icrc1Tokens; + memo : opt blob; + created_at_time: opt Icrc1Timestamp; +}; + +type ApproveError = variant { + BadFee : record { expected_fee : Icrc1Tokens }; + InsufficientFunds : record { balance : Icrc1Tokens }; + AllowanceChanged : record { current_allowance : Icrc1Tokens }; + Expired : record { ledger_time : nat64 }; + TooOld; + CreatedInFuture : record { ledger_time : nat64 }; + Duplicate : record { duplicate_of : Icrc1BlockIndex }; + TemporarilyUnavailable; + GenericError : record { error_code : nat; message : text }; +}; + +type ApproveResult = variant { + Ok : Icrc1BlockIndex; + Err : ApproveError; +}; + +type AllowanceArgs = record { + account : Account; + spender : Account; +}; + +type Allowance = record { + allowance : Icrc1Tokens; + expires_at : opt Icrc1Timestamp; +}; + +type TransferFromArgs = record { + spender_subaccount : opt SubAccount; + from : Account; + to : Account; + amount : Icrc1Tokens; + fee : opt Icrc1Tokens; + memo : opt blob; + created_at_time: opt Icrc1Timestamp; +}; + +type TransferFromResult = variant { + Ok : Icrc1BlockIndex; + Err : TransferFromError; +}; + +type TransferFromError = variant { + BadFee : record { expected_fee : Icrc1Tokens }; + BadBurn : record { min_burn_amount : Icrc1Tokens }; + InsufficientFunds : record { balance : Icrc1Tokens }; + InsufficientAllowance : record { allowance : Icrc1Tokens }; + TooOld; + CreatedInFuture : record { ledger_time : Icrc1Timestamp }; + Duplicate : record { duplicate_of : Icrc1BlockIndex }; + TemporarilyUnavailable; + GenericError : record { error_code : nat; message : text }; +}; + +service: (LedgerCanisterPayload) -> { // Transfers tokens from a subaccount of the caller to the destination address. // The source address is computed from the principal of the caller and the specified subaccount. // When successful, returns the index of the block containing the transaction. @@ -332,12 +433,18 @@ service: (LedgerCanisterInitPayload) -> { // Returns the amount of Tokens on the specified account. account_balance : (AccountBalanceArgs) -> (Tokens) query; + // Returns the account identifier for the given Principal and subaccount. + account_identifier : (Account) -> (AccountIdentifier) query; + // Returns the current transfer_fee. transfer_fee : (TransferFeeArg) -> (TransferFee) query; // Queries blocks in the specified range. query_blocks : (GetBlocksArgs) -> (QueryBlocksResponse) query; + // Queries encoded blocks in the specified range + query_encoded_blocks : (GetBlocksArgs) -> (QueryEncodedBlocksResponse) query; + // Returns token symbol. symbol : () -> (record { symbol: text }) query; @@ -364,5 +471,8 @@ service: (LedgerCanisterInitPayload) -> { icrc1_minting_account : () -> (opt Account) query; icrc1_balance_of : (Account) -> (Icrc1Tokens) query; icrc1_transfer : (TransferArg) -> (Icrc1TransferResult); - icrc1_supported_standards : () -> (vec record { name : text; url : text }) query; + icrc1_supported_standards : () -> (vec record { name : text; url : text }) query; + icrc2_approve : (ApproveArgs) -> (ApproveResult); + icrc2_allowance : (AllowanceArgs) -> (Allowance) query; + icrc2_transfer_from : (TransferFromArgs) -> (TransferFromResult); } diff --git a/candid/registry.did b/candid/registry.did index 0d5aa827..de22b485 100644 --- a/candid/registry.did +++ b/candid/registry.did @@ -1,14 +1,14 @@ +type AddApiBoundaryNodePayload = record { + node_id : principal; + domain : text; + version : text; +}; type AddFirewallRulesPayload = record { expected_hash : text; scope : FirewallRulesScope; positions : vec int32; rules : vec FirewallRule; }; -type AddHostOsVersionPayload = record { - release_package_urls : vec text; - hostos_version_id : text; - release_package_sha256_hex : text; -}; type AddNodeOperatorPayload = record { ipv6 : opt text; node_operator_principal_id : opt principal; @@ -131,6 +131,8 @@ type FirewallRulesScope = variant { Subnet : principal; Global; }; +type GetSubnetForCanisterRequest = record { "principal" : opt principal }; +type GetSubnetForCanisterResponse = record { subnet_id : opt principal }; type Gps = record { latitude : float32; longitude : float32 }; type NodeOperatorRecord = record { ipv6 : opt text; @@ -162,6 +164,7 @@ type RecoverSubnetPayload = record { state_hash : vec nat8; time_ns : nat64; }; +type RemoveApiBoundaryNodesPayload = record { node_ids : vec principal }; type RemoveFirewallRulesPayload = record { expected_hash : text; scope : FirewallRulesScope; @@ -184,6 +187,7 @@ type Result_2 = variant { Err : text; }; type Result_3 = variant { Ok : NodeProvidersMonthlyXdrRewards; Err : text }; +type Result_4 = variant { Ok : GetSubnetForCanisterResponse; Err : text }; type RetireReplicaVersionPayload = record { replica_version_ids : vec text }; type SetFirewallConfigPayload = record { ipv4_prefixes : vec text; @@ -201,9 +205,22 @@ type SubnetFeatures = record { canister_sandboxing : bool; sev_status : opt SevFeatureStatus; http_requests : bool; - onchain_observability : opt bool; }; type SubnetType = variant { application; verified_application; system }; +type UpdateApiBoundaryNodeDomainPayload = record { + node_id : principal; + domain : text; +}; +type UpdateApiBoundaryNodesVersionPayload = record { + version : text; + node_ids : vec principal; +}; +type UpdateElectedHostosVersionsPayload = record { + release_package_urls : vec text; + hostos_version_to_elect : opt text; + hostos_versions_to_unelect : vec text; + release_package_sha256_hex : opt text; +}; type UpdateElectedReplicaVersionsPayload = record { release_package_urls : vec text; replica_versions_to_unelect : vec text; @@ -230,7 +247,7 @@ type UpdateNodeOperatorConfigPayload = record { type UpdateNodeRewardsTableProposalPayload = record { new_entries : vec record { text; NodeRewardRates }; }; -type UpdateNodesHostOsVersionPayload = record { +type UpdateNodesHostosVersionPayload = record { hostos_version_id : opt text; node_ids : vec principal; }; @@ -241,6 +258,7 @@ type UpdateSubnetPayload = record { features : opt SubnetFeatures; set_gossip_config_to_default : bool; max_instructions_per_message : opt nat64; + halt_at_cup_height : opt bool; pfn_evaluation_period_ms : opt nat32; subnet_id : principal; max_ingress_bytes_per_message : opt nat64; @@ -275,8 +293,8 @@ type UpdateUnassignedNodesConfigPayload = record { ssh_readonly_access : opt vec text; }; service : { + add_api_boundary_node : (AddApiBoundaryNodePayload) -> (); add_firewall_rules : (AddFirewallRulesPayload) -> (); - add_hostos_version : (AddHostOsVersionPayload) -> (); add_node : (AddNodePayload) -> (Result); add_node_operator : (AddNodeOperatorPayload) -> (); add_nodes_to_subnet : (AddNodesToSubnetPayload) -> (); @@ -292,8 +310,10 @@ service : { get_build_metadata : () -> (text) query; get_node_operators_and_dcs_of_node_provider : (principal) -> (Result_2) query; get_node_providers_monthly_xdr_rewards : () -> (Result_3) query; + get_subnet_for_canister : (GetSubnetForCanisterRequest) -> (Result_4) query; prepare_canister_migration : (PrepareCanisterMigrationPayload) -> (Result_1); recover_subnet : (RecoverSubnetPayload) -> (); + remove_api_boundary_nodes : (RemoveApiBoundaryNodesPayload) -> (); remove_firewall_rules : (RemoveFirewallRulesPayload) -> (); remove_node_directly : (RemoveNodeDirectlyPayload) -> (); remove_node_operators : (RemoveNodeOperatorsPayload) -> (); @@ -302,6 +322,11 @@ service : { reroute_canister_ranges : (RerouteCanisterRangesPayload) -> (Result_1); retire_replica_version : (RetireReplicaVersionPayload) -> (); set_firewall_config : (SetFirewallConfigPayload) -> (); + update_api_boundary_node_domain : (UpdateApiBoundaryNodeDomainPayload) -> (); + update_api_boundary_nodes_version : ( + UpdateApiBoundaryNodesVersionPayload, + ) -> (); + update_elected_hostos_versions : (UpdateElectedHostosVersionsPayload) -> (); update_elected_replica_versions : (UpdateElectedReplicaVersionsPayload) -> (); update_firewall_rules : (AddFirewallRulesPayload) -> (); update_node_directly : (UpdateNodeDirectlyPayload) -> (Result_1); @@ -310,7 +335,7 @@ service : { UpdateNodeOperatorConfigDirectlyPayload, ) -> (); update_node_rewards_table : (UpdateNodeRewardsTableProposalPayload) -> (); - update_nodes_hostos_version : (UpdateNodesHostOsVersionPayload) -> (); + update_nodes_hostos_version : (UpdateNodesHostosVersionPayload) -> (); update_subnet : (UpdateSubnetPayload) -> (); update_subnet_replica_version : (UpdateSubnetReplicaVersionPayload) -> (); update_unassigned_nodes_config : (UpdateUnassignedNodesConfigPayload) -> (); diff --git a/candid/sns-governance.did b/candid/sns-governance.did index e3d19a4d..c652d9dc 100644 --- a/candid/sns-governance.did +++ b/candid/sns-governance.did @@ -28,10 +28,7 @@ type By = variant { NeuronId : record {}; }; type CanisterStatusResultV2 = record { - controller : principal; status : CanisterStatusType; - freezing_threshold : nat; - balance : vec record { vec nat8; nat }; memory_size : nat; cycles : nat; settings : DefiniteCanisterSettingsArgs; @@ -99,7 +96,6 @@ type Command_2 = variant { type Configure = record { operation : opt Operation }; type DefaultFollowees = record { followees : vec record { nat64; Followees } }; type DefiniteCanisterSettingsArgs = record { - controller : principal; freezing_threshold : nat; controllers : vec principal; memory_allocation : nat; @@ -119,7 +115,10 @@ type DisburseMaturityInProgress = record { amount_e8s : nat64; account_to_disburse_to : opt Account; }; -type DisburseMaturityResponse = record { amount_disbursed_e8s : nat64 }; +type DisburseMaturityResponse = record { + amount_disbursed_e8s : nat64; + amount_deducted_e8s : opt nat64; +}; type DisburseResponse = record { transfer_block_height : nat64 }; type DissolveState = variant { DissolveDelaySeconds : nat64; @@ -315,6 +314,7 @@ type Operation = variant { IncreaseDissolveDelay : IncreaseDissolveDelay; SetDissolveTimestamp : SetDissolveTimestamp; }; +type Percentage = record { basis_points : opt nat64 }; type Proposal = record { url : text; title : text; @@ -327,6 +327,7 @@ type ProposalData = record { action : nat64; failure_reason : opt GovernanceError; ballots : vec record { text; Ballot }; + minimum_yes_proportion_of_total : opt Percentage; reward_event_round : nat64; failed_timestamp_seconds : nat64; reward_event_end_timestamp_seconds : opt nat64; diff --git a/candid/sns-root.did b/candid/sns-root.did index 3c6eb677..94a611fc 100644 --- a/candid/sns-root.did +++ b/candid/sns-root.did @@ -1,9 +1,14 @@ +type AuthzChangeOp = variant { + Authorize : record { add_self : bool }; + Deauthorize; +}; type CanisterCallError = record { code : opt int32; description : text }; type CanisterIdRecord = record { canister_id : principal }; +type CanisterInstallMode = variant { reinstall; upgrade; install }; type CanisterStatusResult = record { - controller : principal; status : CanisterStatusType; memory_size : nat; + cycles : nat; settings : DefiniteCanisterSettings; module_hash : opt vec nat8; }; @@ -20,6 +25,17 @@ type CanisterSummary = record { status : opt CanisterStatusResultV2; canister_id : opt principal; }; +type ChangeCanisterProposal = record { + arg : vec nat8; + wasm_module : vec nat8; + stop_before_installing : bool; + mode : CanisterInstallMode; + canister_id : principal; + query_allocation : opt nat; + authz_changes : vec MethodAuthzChange; + memory_allocation : opt nat; + compute_allocation : opt nat; +}; type DefiniteCanisterSettings = record { controllers : vec principal }; type DefiniteCanisterSettingsArgs = record { freezing_threshold : nat; @@ -50,6 +66,12 @@ type ListSnsCanistersResponse = record { dapps : vec principal; archives : vec principal; }; +type MethodAuthzChange = record { + "principal" : opt principal; + method_name : text; + canister : principal; + operation : AuthzChangeOp; +}; type RegisterDappCanisterRequest = record { canister_id : opt principal }; type RegisterDappCanistersRequest = record { canister_ids : vec principal }; type SetDappControllersRequest = record { @@ -69,6 +91,7 @@ type SnsRootCanister = record { }; service : (SnsRootCanister) -> { canister_status : (CanisterIdRecord) -> (CanisterStatusResult); + change_canister : (ChangeCanisterProposal) -> (); get_build_metadata : () -> (text) query; get_sns_canisters_summary : (GetSnsCanistersSummaryRequest) -> ( GetSnsCanistersSummaryResponse, diff --git a/candid/sns-swap.did b/candid/sns-swap.did index 52a0fa12..cd43ad61 100644 --- a/candid/sns-swap.did +++ b/candid/sns-swap.did @@ -1,10 +1,10 @@ -type BuyerState = record { icp : opt TransferableAmount }; +type BuyerState = record { + icp : opt TransferableAmount; + has_created_neuron_recipes : opt bool; +}; type CanisterCallError = record { code : opt int32; description : text }; type CanisterStatusResultV2 = record { - controller : principal; status : CanisterStatusType; - freezing_threshold : nat; - balance : vec record { vec nat8; nat }; memory_size : nat; cycles : nat; settings : DefiniteCanisterSettingsArgs; @@ -13,14 +13,17 @@ type CanisterStatusResultV2 = record { }; type CanisterStatusType = variant { stopped; stopping; running }; type CfInvestment = record { hotkey_principal : text; nns_neuron_id : nat64 }; -type CfNeuron = record { nns_neuron_id : nat64; amount_icp_e8s : nat64 }; +type CfNeuron = record { + has_created_neuron_recipes : opt bool; + nns_neuron_id : nat64; + amount_icp_e8s : nat64; +}; type CfParticipant = record { hotkey_principal : text; cf_neurons : vec CfNeuron; }; type Countries = record { iso_codes : vec text }; type DefiniteCanisterSettingsArgs = record { - controller : principal; freezing_threshold : nat; controllers : vec principal; memory_allocation : nat; @@ -30,6 +33,8 @@ type DerivedState = record { sns_tokens_per_icp : float32; buyer_total_icp_e8s : nat64; cf_participant_count : opt nat64; + neurons_fund_participation_icp_e8s : opt nat64; + direct_participation_icp_e8s : opt nat64; direct_participant_count : opt nat64; cf_neuron_count : opt nat64; }; @@ -49,6 +54,7 @@ type FailedUpdate = record { }; type FinalizeSwapResponse = record { set_dapp_controllers_call_result : opt SetDappControllersCallResult; + create_sns_neuron_recipes_result : opt SweepResult; settle_community_fund_participation_result : opt SettleCommunityFundParticipationResult; error_message : opt text; set_mode_call_result : opt SetModeCallResult; @@ -56,6 +62,11 @@ type FinalizeSwapResponse = record { claim_neuron_result : opt SweepResult; sweep_sns_result : opt SweepResult; }; +type GetAutoFinalizationStatusResponse = record { + auto_finalize_swap_response : opt FinalizeSwapResponse; + has_auto_finalize_been_attempted : opt bool; + is_auto_finalize_enabled : opt bool; +}; type GetBuyerStateRequest = record { principal_id : opt principal }; type GetBuyerStateResponse = record { buyer_state : opt BuyerState }; type GetBuyersTotalResponse = record { buyers_total : nat64 }; @@ -63,6 +74,8 @@ type GetDerivedStateResponse = record { sns_tokens_per_icp : opt float64; buyer_total_icp_e8s : opt nat64; cf_participant_count : opt nat64; + neurons_fund_participation_icp_e8s : opt nat64; + direct_participation_icp_e8s : opt nat64; direct_participant_count : opt nat64; cf_neuron_count : opt nat64; }; @@ -77,16 +90,32 @@ type GetStateResponse = record { swap : opt Swap; derived : opt DerivedState }; type GovernanceError = record { error_message : text; error_type : int32 }; type Icrc1Account = record { owner : opt principal; subaccount : opt vec nat8 }; type Init = record { + nns_proposal_id : opt nat64; sns_root_canister_id : text; + neurons_fund_participation : opt bool; + min_participant_icp_e8s : opt nat64; + neuron_basket_construction_parameters : opt NeuronBasketConstructionParameters; fallback_controller_principal_ids : vec text; + max_icp_e8s : opt nat64; neuron_minimum_stake_e8s : opt nat64; confirmation_text : opt text; + swap_start_timestamp_seconds : opt nat64; + swap_due_timestamp_seconds : opt nat64; + min_participants : opt nat32; + sns_token_e8s : opt nat64; nns_governance_canister_id : text; transaction_fee_e8s : opt nat64; icp_ledger_canister_id : text; sns_ledger_canister_id : text; + neurons_fund_participation_constraints : opt NeuronsFundParticipationConstraints; + neurons_fund_participants : opt NeuronsFundParticipants; + should_auto_finalize : opt bool; + max_participant_icp_e8s : opt nat64; sns_governance_canister_id : text; + min_direct_participation_icp_e8s : opt nat64; restricted_countries : opt Countries; + min_icp_e8s : opt nat64; + max_direct_participation_icp_e8s : opt nat64; }; type InvalidUserAmount = record { min_amount_icp_e8s_included : nat64; @@ -96,13 +125,17 @@ type Investor = variant { CommunityFund : CfInvestment; Direct : DirectInvestment; }; +type LinearScalingCoefficient = record { + slope_numerator : opt nat64; + intercept_icp_e8s : opt nat64; + from_direct_participation_icp_e8s : opt nat64; + slope_denominator : opt nat64; + to_direct_participation_icp_e8s : opt nat64; +}; type ListCommunityFundParticipantsRequest = record { offset : opt nat64; limit : opt nat32; }; -type ListCommunityFundParticipantsResponse = record { - cf_participants : vec CfParticipant; -}; type ListDirectParticipantsRequest = record { offset : opt nat32; limit : opt nat32; @@ -125,6 +158,12 @@ type NeuronBasketConstructionParameters = record { count : nat64; }; type NeuronId = record { id : vec nat8 }; +type NeuronsFundParticipants = record { cf_participants : vec CfParticipant }; +type NeuronsFundParticipationConstraints = record { + coefficient_intervals : vec LinearScalingCoefficient; + max_neurons_fund_participation_icp_e8s : opt nat64; + min_direct_participation_threshold_icp_e8s : opt nat64; +}; type NewSaleTicketRequest = record { subaccount : opt vec nat8; amount_icp_e8s : nat64; @@ -146,7 +185,9 @@ type Params = record { sns_token_e8s : nat64; sale_delay_seconds : opt nat64; max_participant_icp_e8s : nat64; + min_direct_participation_icp_e8s : opt nat64; min_icp_e8s : nat64; + max_direct_participation_icp_e8s : opt nat64; }; type Participant = record { participation : opt BuyerState; @@ -183,13 +224,17 @@ type SnsNeuronRecipe = record { investor : opt Investor; }; type Swap = record { + auto_finalize_swap_response : opt FinalizeSwapResponse; neuron_recipes : vec SnsNeuronRecipe; next_ticket_id : opt nat64; decentralization_sale_open_timestamp_seconds : opt nat64; finalize_swap_in_progress : opt bool; cf_participants : vec CfParticipant; init : opt Init; + already_tried_to_auto_finalize : opt bool; + neurons_fund_participation_icp_e8s : opt nat64; purge_old_tickets_last_completion_timestamp_nanoseconds : opt nat64; + direct_participation_icp_e8s : opt nat64; lifecycle : int32; purge_old_tickets_next_principal : opt vec nat8; buyers : vec record { text; BuyerState }; @@ -219,6 +264,9 @@ type TransferableAmount = record { service : (Init) -> { error_refund_icp : (ErrorRefundIcpRequest) -> (ErrorRefundIcpResponse); finalize_swap : (record {}) -> (FinalizeSwapResponse); + get_auto_finalization_status : (record {}) -> ( + GetAutoFinalizationStatusResponse, + ) query; get_buyer_state : (GetBuyerStateRequest) -> (GetBuyerStateResponse) query; get_buyers_total : (record {}) -> (GetBuyersTotalResponse); get_canister_status : (record {}) -> (CanisterStatusResultV2); @@ -229,7 +277,7 @@ service : (Init) -> { get_sale_parameters : (record {}) -> (GetSaleParametersResponse) query; get_state : (record {}) -> (GetStateResponse) query; list_community_fund_participants : (ListCommunityFundParticipantsRequest) -> ( - ListCommunityFundParticipantsResponse, + NeuronsFundParticipants, ) query; list_direct_participants : (ListDirectParticipantsRequest) -> ( ListDirectParticipantsResponse, diff --git a/candid/snsw.did b/candid/snsw.did index f79431c8..18382835 100644 --- a/candid/snsw.did +++ b/candid/snsw.did @@ -1,9 +1,26 @@ type AddWasmRequest = record { hash : vec nat8; wasm : opt SnsWasm }; type AddWasmResponse = record { result : opt Result }; type AirdropDistribution = record { airdrop_neurons : vec NeuronDistribution }; +type Canister = record { id : opt principal }; +type CfNeuron = record { + has_created_neuron_recipes : opt bool; + nns_neuron_id : nat64; + amount_icp_e8s : nat64; +}; +type CfParticipant = record { + hotkey_principal : text; + cf_neurons : vec CfNeuron; +}; type Countries = record { iso_codes : vec text }; +type DappCanisters = record { canisters : vec Canister }; +type DappCanistersTransferResult = record { + restored_dapp_canisters : vec Canister; + nns_controlled_dapp_canisters : vec Canister; + sns_controlled_dapp_canisters : vec Canister; +}; type DeployNewSnsRequest = record { sns_init_payload : opt SnsInitPayload }; type DeployNewSnsResponse = record { + dapp_canisters_transfer_result : opt DappCanistersTransferResult; subnet_id : opt principal; error : opt SnsWasmError; canisters : opt SnsCanisterIds; @@ -43,6 +60,13 @@ type InsertUpgradePathEntriesRequest = record { sns_governance_canister_id : opt principal; }; type InsertUpgradePathEntriesResponse = record { error : opt SnsWasmError }; +type LinearScalingCoefficient = record { + slope_numerator : opt nat64; + intercept_icp_e8s : opt nat64; + from_direct_participation_icp_e8s : opt nat64; + slope_denominator : opt nat64; + to_direct_participation_icp_e8s : opt nat64; +}; type ListDeployedSnsesResponse = record { instances : vec DeployedSns }; type ListUpgradeStep = record { pretty_version : opt PrettySnsVersion; @@ -54,6 +78,10 @@ type ListUpgradeStepsRequest = record { sns_governance_canister_id : opt principal; }; type ListUpgradeStepsResponse = record { steps : vec ListUpgradeStep }; +type NeuronBasketConstructionParameters = record { + dissolve_delay_interval_seconds : nat64; + count : nat64; +}; type NeuronDistribution = record { controller : opt principal; dissolve_delay_seconds : nat64; @@ -61,6 +89,12 @@ type NeuronDistribution = record { stake_e8s : nat64; vesting_period_seconds : opt nat64; }; +type NeuronsFundParticipants = record { participants : vec CfParticipant }; +type NeuronsFundParticipationConstraints = record { + coefficient_intervals : vec LinearScalingCoefficient; + max_neurons_fund_participation_icp_e8s : opt nat64; + min_direct_participation_threshold_icp_e8s : opt nat64; +}; type PrettySnsVersion = record { archive_wasm_hash : text; root_wasm_hash : text; @@ -81,26 +115,42 @@ type SnsInitPayload = record { url : opt text; max_dissolve_delay_seconds : opt nat64; max_dissolve_delay_bonus_percentage : opt nat64; + nns_proposal_id : opt nat64; + neurons_fund_participation : opt bool; + min_participant_icp_e8s : opt nat64; + neuron_basket_construction_parameters : opt NeuronBasketConstructionParameters; fallback_controller_principal_ids : vec text; token_symbol : opt text; final_reward_rate_basis_points : opt nat64; + max_icp_e8s : opt nat64; neuron_minimum_stake_e8s : opt nat64; confirmation_text : opt text; logo : opt text; name : opt text; + swap_start_timestamp_seconds : opt nat64; + swap_due_timestamp_seconds : opt nat64; initial_voting_period_seconds : opt nat64; neuron_minimum_dissolve_delay_to_vote_seconds : opt nat64; description : opt text; max_neuron_age_seconds_for_age_bonus : opt nat64; + min_participants : opt nat64; initial_reward_rate_basis_points : opt nat64; wait_for_quiet_deadline_increase_seconds : opt nat64; transaction_fee_e8s : opt nat64; + dapp_canisters : opt DappCanisters; + neurons_fund_participation_constraints : opt NeuronsFundParticipationConstraints; + neurons_fund_participants : opt NeuronsFundParticipants; max_age_bonus_percentage : opt nat64; initial_token_distribution : opt InitialTokenDistribution; reward_rate_transition_duration_seconds : opt nat64; + token_logo : opt text; token_name : opt text; + max_participant_icp_e8s : opt nat64; + min_direct_participation_icp_e8s : opt nat64; proposal_reject_cost_e8s : opt nat64; restricted_countries : opt Countries; + min_icp_e8s : opt nat64; + max_direct_participation_icp_e8s : opt nat64; }; type SnsUpgrade = record { next_version : opt SnsVersion; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 91874cd9..7f9aa4db 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.66.1" +channel = "1.71.1" components = ["rustfmt", "clippy"] diff --git a/src/commands/claim_neurons.rs b/src/commands/claim_neurons.rs index 9828e73b..1524f6b5 100644 --- a/src/commands/claim_neurons.rs +++ b/src/commands/claim_neurons.rs @@ -39,7 +39,7 @@ pub fn exec(auth: &AuthInfo) -> AnyhowResult> { #[cfg(feature = "ledger")] if let AuthInfo::Ledger = auth { let (_, pk) = LedgerIdentity::new()?.public_key()?; - let sig = Encode!(&hex::encode(pk))?; + let sig = Encode!(&hex::encode(&pk[23..]))?; Ok(vec![sign_ingress_with_request_status_query( auth, genesis_token_canister_id(), diff --git a/src/commands/list_proposals.rs b/src/commands/list_proposals.rs index 4d3318b6..eccdae17 100644 --- a/src/commands/list_proposals.rs +++ b/src/commands/list_proposals.rs @@ -31,6 +31,8 @@ pub async fn exec(opts: ListProposalsOpts, fetch_root_key: bool) -> AnyhowResult exclude_topic: vec![2 /*TOPIC_EXCHANGE_RATE*/, 9 /*TOPIC_KYC*/], include_reward_status: Vec::new(), include_status: Vec::new(), + omit_large_fields: Some(true), + include_all_manage_neuron_proposals: Some(false), })?; submit_unsigned_ingress( governance_canister_id(), diff --git a/src/commands/neuron_manage.rs b/src/commands/neuron_manage.rs index f96a5660..82eadc43 100644 --- a/src/commands/neuron_manage.rs +++ b/src/commands/neuron_manage.rs @@ -4,7 +4,7 @@ use crate::lib::{ signing::{sign_ingress_with_request_status_query, IngressWithRequestId}, AnyhowResult, AuthInfo, ParsedNnsAccount, ROLE_NNS_GOVERNANCE, }; -use anyhow::{anyhow, bail, ensure, Context}; +use anyhow::{anyhow, bail, Context}; use candid::{CandidType, Encode, Principal}; use clap::{ArgEnum, Parser}; use ic_base_types::PrincipalId; @@ -124,22 +124,9 @@ pub struct ManageOpts { /// Set whether new maturity should be automatically staked. #[clap(long, arg_enum)] auto_stake_maturity: Option, - - #[clap(from_global)] - ledger: bool, } pub fn exec(auth: &AuthInfo, opts: ManageOpts) -> AnyhowResult> { - if opts.ledger { - ensure!( - opts.add_hot_key.is_none() && opts.remove_hot_key.is_none() && !opts.disburse && opts.disburse_amount.is_none() && opts.disburse_to.is_none() - && !opts.clear_manage_neuron_followees && !opts.join_community_fund && !opts.leave_community_fund - && opts.follow_topic.is_none() && opts.follow_neurons.is_none() && opts.register_vote.is_none() && !opts.reject, - "\ -Cannot use --ledger with these flags. This version of quill only supports the following neuron-manage operations with a Ledger device: ---additional-dissolve-delay-seconds, --start-dissolving, --stop-dissolving, --split, --merge-from-neuron, --spawn, --stake-maturity, --auto-stake-maturity" - ) - } let mut msgs = Vec::new(); let id = Some(NeuronId { @@ -147,7 +134,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo }); if opts.add_hot_key.is_some() { let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::Configure(Configure { operation: Some(Operation::AddHotKey(AddHotKey { new_hot_key: opts.add_hot_key.map(PrincipalId) @@ -160,7 +147,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if opts.remove_hot_key.is_some() { let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::Configure(Configure { operation: Some(Operation::RemoveHotKey(RemoveHotKey { hot_key_to_remove: opts.remove_hot_key.map(PrincipalId) @@ -173,7 +160,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if opts.stop_dissolving { let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::Configure(Configure { operation: Some(Operation::StopDissolving(StopDissolving {})) })), @@ -184,7 +171,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if opts.start_dissolving { let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::Configure(Configure { operation: Some(Operation::StartDissolving(StartDissolving {})) })), @@ -195,7 +182,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if let Some(additional_dissolve_delay_seconds) = opts.additional_dissolve_delay_seconds { let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::Configure(Configure { operation: Some(Operation::IncreaseDissolveDelay(IncreaseDissolveDelay { additional_dissolve_delay_seconds: match additional_dissolve_delay_seconds @@ -242,7 +229,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if opts.disburse || opts.disburse_amount.is_some() || opts.disburse_to.is_some() { let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::Disburse(Disburse { to_account: opts.disburse_to.map(|to| to.into_identifier().into()), amount: opts.disburse_amount.map(|amount| Amount { @@ -256,7 +243,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if opts.spawn { let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::Spawn(Default::default())), neuron_id_or_subaccount: None, })?; @@ -265,7 +252,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if let Some(amount) = opts.split { let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::Split(Split { amount_e8s: amount * 100_000_000 })), @@ -276,7 +263,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if opts.clear_manage_neuron_followees { let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::Follow(Follow { topic: 1, // Topic::NeuronManagement as i32, followees: Vec::new() @@ -288,7 +275,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if let Some(neuron_id) = opts.merge_from_neuron { let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::Merge(Merge { source_neuron_id: Some(NeuronId { id: parse_neuron_id(neuron_id)? @@ -308,7 +295,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo bail!("Percentage to merge must be a number from 1 to 100"); } let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::StakeMaturity(StakeMaturity { percentage_to_stake: Some(percentage), })), @@ -319,7 +306,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if opts.join_community_fund { let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::Configure(Configure { operation: Some(Operation::JoinCommunityFund(JoinCommunityFund {})) })), @@ -330,7 +317,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if opts.leave_community_fund { let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::Configure(Configure { operation: Some(Operation::LeaveCommunityFund(LeaveCommunityFund {})) })), @@ -342,7 +329,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if let Some(proposals) = opts.register_vote { for proposal in proposals { let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::RegisterVote(RegisterVote { vote: if opts.reject { 2 } else { 1 }, proposal: Some(ProposalId { id: proposal }), @@ -356,7 +343,7 @@ Cannot use --ledger with these flags. This version of quill only supports the fo if let (Some(topic), Some(neuron_ids)) = (opts.follow_topic, opts.follow_neurons) { let followees = neuron_ids.into_iter().map(|x| NeuronId { id: x }).collect(); let args = Encode!(&ManageNeuron { - id: id.clone(), + id, command: Some(Command::Follow(Follow { topic, // Topic::NeuronManagement as i32, followees, diff --git a/src/commands/neuron_stake.rs b/src/commands/neuron_stake.rs index f3f6c461..47c26f97 100644 --- a/src/commands/neuron_stake.rs +++ b/src/commands/neuron_stake.rs @@ -1,25 +1,23 @@ use crate::{ - commands::{ - send::Memo, - transfer::{self, parse_tokens}, - }, + commands::transfer::{self, parse_tokens}, lib::{ governance_canister_id, signing::{sign_ingress_with_request_status_query, IngressWithRequestId}, AnyhowResult, AuthInfo, ParsedNnsAccount, ParsedSubaccount, ROLE_NNS_GOVERNANCE, }, }; -use anyhow::{anyhow, ensure}; -use candid::{CandidType, Encode, Principal}; +use anyhow::anyhow; +use candid::{Encode, Principal}; use clap::Parser; -use ic_nns_constants::GOVERNANCE_CANISTER_ID; -use icp_ledger::{AccountIdentifier, Subaccount, Tokens}; - -#[derive(CandidType)] -pub struct ClaimOrRefreshNeuronFromAccount { - pub memo: Memo, - pub controller: Option, -} +use ic_nns_governance::pb::v1::{ + manage_neuron::{ + claim_or_refresh::{By, MemoAndController}, + ClaimOrRefresh, Command, NeuronIdOrSubaccount, + }, + ManageNeuron, +}; +use icp_ledger::Tokens; +use icrc_ledger_types::icrc1::account::{Account, Subaccount}; /// Signs topping up of a neuron (new or existing). #[derive(Parser)] @@ -52,16 +50,9 @@ pub struct StakeOpts { /// The subaccount to transfer from. #[clap(long)] from_subaccount: Option, - - #[clap(from_global)] - ledger: bool, } pub fn exec(auth: &AuthInfo, opts: StakeOpts) -> AnyhowResult> { - ensure!( - !opts.ledger, - "Cannot use `--ledger` with this command. This version of Quill does not support staking new neurons with a Ledger device" - ); let controller = crate::lib::get_principal(auth)?; let nonce = match (&opts.nonce, &opts.name) { (Some(nonce), _) => *nonce, @@ -69,12 +60,15 @@ pub fn exec(auth: &AuthInfo, opts: StakeOpts) -> AnyhowResult return Err(anyhow!("Either a nonce or a name should be specified")), }; let gov_subaccount = get_neuron_subaccount(&controller, nonce); - let account = AccountIdentifier::new(GOVERNANCE_CANISTER_ID.get(), Some(gov_subaccount)); + let account = Account { + owner: governance_canister_id(), + subaccount: Some(gov_subaccount), + }; let mut messages = if !opts.already_transferred { transfer::exec( auth, transfer::TransferOpts { - to: ParsedNnsAccount::Original(account), + to: ParsedNnsAccount::Icrc1(account), amount: opts.amount.unwrap(), fee: opts.fee, memo: Some(nonce), @@ -84,16 +78,22 @@ pub fn exec(auth: &AuthInfo, opts: StakeOpts) -> AnyhowResult Subaccount { data.update(b"neuron-stake"); data.update(controller.as_slice()); data.update(&nonce.to_be_bytes()); - Subaccount(data.finish()) + data.finish() } fn convert_name_to_nonce(name: &str) -> u64 { diff --git a/src/commands/request_status.rs b/src/commands/request_status.rs index a2ab9c53..ee90616b 100644 --- a/src/commands/request_status.rs +++ b/src/commands/request_status.rs @@ -2,7 +2,7 @@ use crate::lib::get_ic_url; use crate::lib::{get_agent, get_idl_string, signing::RequestStatus, AnyhowResult, AuthInfo}; use anyhow::{anyhow, Context}; use candid::Principal; -use ic_agent::agent::{Replied, RequestStatusResponse, Transport}; +use ic_agent::agent::{ReplyResponse, RequestStatusResponse, Transport}; use ic_agent::AgentError::MessageError; use ic_agent::{AgentError, RequestId}; use std::future::Future; @@ -31,10 +31,10 @@ pub async fn submit( .context("Failed to create an agent")?, ), }); - let Replied::CallReplied(blob) = async { + let blob = async { loop { match agent.request_status_raw(&request_id, canister_id).await? { - RequestStatusResponse::Replied { reply } => return Ok(reply), + RequestStatusResponse::Replied(ReplyResponse { arg }) => return Ok(arg), RequestStatusResponse::Rejected(response) => { return Err(anyhow!(AgentError::ReplicaError(response))) } @@ -50,7 +50,7 @@ pub async fn submit( } }; - std::thread::sleep(std::time::Duration::from_millis(500)); + tokio::time::sleep(std::time::Duration::from_millis(500)).await; } } .await?; @@ -115,4 +115,12 @@ impl Transport for ProxySignTransport { ) -> Pin, AgentError>> + Send + 'a>> { unimplemented!() } + + fn read_subnet_state<'a>( + &'a self, + _subnet_id: Principal, + _envelope: Vec, + ) -> Pin, AgentError>> + Send + 'a>> { + unimplemented!() + } } diff --git a/src/commands/sns.rs b/src/commands/sns.rs index dfdfbd9e..90b24710 100644 --- a/src/commands/sns.rs +++ b/src/commands/sns.rs @@ -90,6 +90,7 @@ pub fn dispatch(auth: &AuthInfo, opts: SnsOpts, qr: bool, fetch_root_key: bool) opts.subcommand, SnsCommand::Balance(_) | SnsCommand::Transfer(_) | SnsCommand::NeuronPermission(_) | SnsCommand::Disburse(_) | SnsCommand::ConfigureDissolveDelay(_) | SnsCommand::StakeMaturity(_) | SnsCommand::NeuronId(_) + | SnsCommand::StakeNeuron(_) ), "Cannot use --ledger with this command. This version of Quill only supports transfers and certain neuron management operations with a Ledger device"); } let canister_ids = opts.canister_ids_file diff --git a/src/commands/sns/stake_neuron.rs b/src/commands/sns/stake_neuron.rs index dda06b5b..e1aec9f5 100644 --- a/src/commands/sns/stake_neuron.rs +++ b/src/commands/sns/stake_neuron.rs @@ -88,7 +88,7 @@ pub fn exec( }, }; - let msg = sign_ingress_with_request_status_query( + let msg = sign_staking_ingress_with_request_status_query( auth, sns_canister_ids.ledger_canister_id, ROLE_ICRC1_LEDGER, @@ -109,8 +109,8 @@ pub fn exec( })) })?; - messages.push(sign_staking_ingress_with_request_status_query( - auth, + messages.push(sign_ingress_with_request_status_query( + &AuthInfo::NoAuth, governance_canister_id, ROLE_SNS_GOVERNANCE, "manage_neuron", diff --git a/src/commands/transfer.rs b/src/commands/transfer.rs index bfd74114..5f70d27a 100644 --- a/src/commands/transfer.rs +++ b/src/commands/transfer.rs @@ -1,12 +1,14 @@ use crate::commands::send::{Memo, SendArgs, TimeStamp}; +use crate::lib::signing::sign_staking_ingress_with_request_status_query; +use crate::lib::{ + governance_canister_id, now_nanos, ParsedNnsAccount, ParsedSubaccount, ROLE_ICRC1_LEDGER, + ROLE_NNS_LEDGER, +}; use crate::lib::{ ledger_canister_id, signing::{sign_ingress_with_request_status_query, IngressWithRequestId}, AnyhowResult, AuthInfo, }; -use crate::lib::{ - now_nanos, ParsedNnsAccount, ParsedSubaccount, ROLE_ICRC1_LEDGER, ROLE_NNS_LEDGER, -}; use anyhow::{anyhow, bail, Context}; use candid::Encode; use clap::Parser; @@ -72,7 +74,12 @@ pub fn exec(auth: &AuthInfo, opts: TransferOpts) -> AnyhowResult Option> { + let transport = self.inner.transport.lock().unwrap(); + get_identity(&transport, &derivation_path()) + .ok() + .map(|x| x.1) + } } fn serialize_path(path: &DerivationPath) -> Vec { @@ -189,7 +198,9 @@ fn get_identity( let principal = Principal::try_from_slice(&response[PRINCIPAL_OFFSET..PRINCIPAL_OFFSET + PRINCIPAL_LEN]) .map_err(|e| format!("Error interpreting principal from Ledger: {e}"))?; - Ok((principal, pk)) + let pk = PublicKey::from(VerifyingKey::try_from(&pk[..]).unwrap()); + let pk_der_bytes = pk.to_public_key_der().unwrap().into_vec(); + Ok((principal, pk_der_bytes)) } fn interpret_response<'a>( diff --git a/src/lib/mod.rs b/src/lib/mod.rs index dc93bbdd..78268a2f 100644 --- a/src/lib/mod.rs +++ b/src/lib/mod.rs @@ -4,8 +4,8 @@ use anyhow::{anyhow, bail, ensure, Context}; use bip32::DerivationPath; use bip39::{Mnemonic, Seed}; use candid::{ - parser::typing::{check_prog, TypeEnv}, - types::Function, + parser::typing::check_prog, + types::{type_env::TypeEnv, Function}, IDLProg, Principal, }; use crc32fast::Hasher; @@ -416,7 +416,7 @@ pub fn mnemonic_to_pem(mnemonic: &Mnemonic) -> AnyhowResult { let public_key = secret_key.public_key(); let der = der_encode_secret_key( public_key.to_encoded_point(false).to_bytes().into(), - secret_key.to_be_bytes().to_vec(), + secret_key.to_bytes().to_vec(), )?; let pem = Pem { tag: String::from("EC PRIVATE KEY"), diff --git a/src/lib/signing.rs b/src/lib/signing.rs index ae63617a..c4e1d2e3 100644 --- a/src/lib/signing.rs +++ b/src/lib/signing.rs @@ -112,7 +112,7 @@ pub fn sign( method_name: &str, args: Vec, role: &str, - #[allow(unused)] is_staking: bool, + is_staking: bool, ) -> AnyhowResult { let ingress_expiry = Duration::from_secs(5 * 60); let agent = get_agent(auth)?; diff --git a/tests/output/default/ledger_incompatible/by_command.txt b/tests/output/default/ledger_incompatible/by_command.txt index 95684fb3..9fa3d60d 100644 --- a/tests/output/default/ledger_incompatible/by_command.txt +++ b/tests/output/default/ledger_incompatible/by_command.txt @@ -1 +1 @@ -Error: Cannot use `--ledger` with this command. This version of Quill does not support staking new neurons with a Ledger device +Error: Cannot use --ledger with this command. This version of Quill only supports transfers and certain neuron management operations with a Ledger device diff --git a/tests/output/default/ledger_incompatible/by_flag.txt b/tests/output/default/ledger_incompatible/by_flag.txt deleted file mode 100644 index 792c63aa..00000000 --- a/tests/output/default/ledger_incompatible/by_flag.txt +++ /dev/null @@ -1,2 +0,0 @@ -Error: Cannot use --ledger with these flags. This version of quill only supports the following neuron-manage operations with a Ledger device: ---additional-dissolve-delay-seconds, --start-dissolving, --stop-dissolving, --split, --merge-from-neuron, --spawn, --stake-maturity, --auto-stake-maturity diff --git a/tests/output/default/neuron_stake/stake_only.txt b/tests/output/default/neuron_stake/stake_only.txt index 77ed1870..dfc67a41 100644 --- a/tests/output/default/neuron_stake/stake_only.txt +++ b/tests/output/default/neuron_stake/stake_only.txt @@ -1,12 +1,24 @@ Sending message with Call type: update - Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae + Sender: 2vxsx-fae Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai - Method name: claim_or_refresh_neuron_from_account + Method name: manage_neuron Arguments: ( record { - controller = opt principal "fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae"; - memo = 7_888_422_419_985_231_726 : nat64; + id = null; + command = opt variant { + ClaimOrRefresh = record { + by = opt variant { + MemoAndController = record { + controller = opt principal "fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae"; + memo = 7_888_422_419_985_231_726 : nat64; + } + }; + } + }; + neuron_id_or_subaccount = opt variant { + Subaccount = blob "\e1\ba\ec\1a\91u\f3\ec\fb\c1\87\e5J\eb|\96\01)0S\b9\95\98\0e\ad\b2\ee\19\c3\96\88\bf" + }; }, ) diff --git a/tests/output/default/neuron_stake/with_name.txt b/tests/output/default/neuron_stake/with_name.txt index eac5c4af..ba0665d1 100644 --- a/tests/output/default/neuron_stake/with_name.txt +++ b/tests/output/default/neuron_stake/with_name.txt @@ -3,28 +3,41 @@ Sending message with Call type: update Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: send_dfx + Method name: icrc1_transfer Arguments: ( record { - to = "9bc4e24ff90c6898938d5fb339e779cea4edad4de592e591b22429289851b563"; - fee = record { e8s = 10_000 : nat64 }; - memo = 7_888_422_419_985_231_726 : nat64; - from_subaccount = null; - created_at_time = opt record { - timestamp_nanos = 1_669_073_904_187_044_208 : nat64; + to = record { + owner = principal "rrkah-fqaaa-aaaaa-aaaaq-cai"; + subaccount = opt blob "\e1\ba\ec\1a\91u\f3\ec\fb\c1\87\e5J\eb|\96\01)0S\b9\95\98\0e\ad\b2\ee\19\c3\96\88\bf"; }; - amount = record { e8s = 1_200_000_000 : nat64 }; + fee = opt (10_000 : nat); + memo = opt blob "myNeuron"; + from_subaccount = null; + created_at_time = opt (1_669_073_904_187_044_208 : nat64); + amount = 1_200_000_000 : nat; }, ) Sending message with Call type: update - Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae + Sender: 2vxsx-fae Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai - Method name: claim_or_refresh_neuron_from_account + Method name: manage_neuron Arguments: ( record { - controller = opt principal "fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae"; - memo = 7_888_422_419_985_231_726 : nat64; + id = null; + command = opt variant { + ClaimOrRefresh = record { + by = opt variant { + MemoAndController = record { + controller = opt principal "fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae"; + memo = 7_888_422_419_985_231_726 : nat64; + } + }; + } + }; + neuron_id_or_subaccount = opt variant { + Subaccount = blob "\e1\ba\ec\1a\91u\f3\ec\fb\c1\87\e5J\eb|\96\01)0S\b9\95\98\0e\ad\b2\ee\19\c3\96\88\bf" + }; }, ) diff --git a/tests/output/default/neuron_stake/with_nonce.txt b/tests/output/default/neuron_stake/with_nonce.txt index 4abc5649..d2b5ca93 100644 --- a/tests/output/default/neuron_stake/with_nonce.txt +++ b/tests/output/default/neuron_stake/with_nonce.txt @@ -3,28 +3,41 @@ Sending message with Call type: update Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai - Method name: send_dfx + Method name: icrc1_transfer Arguments: ( record { - to = "a0ea9002c2bc3d442050f4431f3732c91dbec13eff79f414b15255d60c4a324c"; - fee = record { e8s = 10_000 : nat64 }; - memo = 777 : nat64; - from_subaccount = opt blob "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01"; - created_at_time = opt record { - timestamp_nanos = 1_669_073_904_187_044_208 : nat64; + to = record { + owner = principal "rrkah-fqaaa-aaaaa-aaaaq-cai"; + subaccount = opt blob "r\8a\c1;\10I\a3\ac\af\fe\13\f1;\c7\1e\fd\9b4\97e\80\d4\0d\f2y\b2s n\f14$"; }; - amount = record { e8s = 1_200_000_000 : nat64 }; + fee = opt (10_000 : nat); + memo = opt blob "\00\00\00\00\00\00\03\09"; + from_subaccount = opt blob "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01"; + created_at_time = opt (1_669_073_904_187_044_208 : nat64); + amount = 1_200_000_000 : nat; }, ) Sending message with Call type: update - Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae + Sender: 2vxsx-fae Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai - Method name: claim_or_refresh_neuron_from_account + Method name: manage_neuron Arguments: ( record { - controller = opt principal "fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae"; - memo = 777 : nat64; + id = null; + command = opt variant { + ClaimOrRefresh = record { + by = opt variant { + MemoAndController = record { + controller = opt principal "fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae"; + memo = 777 : nat64; + } + }; + } + }; + neuron_id_or_subaccount = opt variant { + Subaccount = blob "r\8a\c1;\10I\a3\ac\af\fe\13\f1;\c7\1e\fd\9b4\97e\80\d4\0d\f2y\b2s n\f14$" + }; }, ) diff --git a/tests/output/default/sns/stake_neuron/memo.txt b/tests/output/default/sns/stake_neuron/memo.txt index 448f18ef..d5436b90 100644 --- a/tests/output/default/sns/stake_neuron/memo.txt +++ b/tests/output/default/sns/stake_neuron/memo.txt @@ -20,7 +20,7 @@ Sending message with Sending message with Call type: update - Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae + Sender: 2vxsx-fae Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai Method name: manage_neuron Arguments: ( diff --git a/tests/output/default/sns/stake_neuron/no_amount.txt b/tests/output/default/sns/stake_neuron/no_amount.txt index 09ee2fe6..3dd07d57 100644 --- a/tests/output/default/sns/stake_neuron/no_amount.txt +++ b/tests/output/default/sns/stake_neuron/no_amount.txt @@ -1,7 +1,7 @@ Sending message with Call type: update - Sender: fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae + Sender: 2vxsx-fae Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai Method name: manage_neuron Arguments: ( diff --git a/tests/output/ledger/neuron_manage/add_hot_key.txt b/tests/output/ledger/neuron_manage/add_hot_key.txt new file mode 100644 index 00000000..c6c71831 --- /dev/null +++ b/tests/output/ledger/neuron_manage/add_hot_key.txt @@ -0,0 +1,21 @@ +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + command = opt variant { + Configure = record { + operation = opt variant { + AddHotKey = record { + new_hot_key = opt principal "5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe"; + } + }; + } + }; + neuron_id_or_subaccount = null; + }, +) diff --git a/tests/output/ledger/neuron_manage/clear.txt b/tests/output/ledger/neuron_manage/clear.txt new file mode 100644 index 00000000..7d5e3d16 --- /dev/null +++ b/tests/output/ledger/neuron_manage/clear.txt @@ -0,0 +1,15 @@ +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + command = opt variant { + Follow = record { topic = 1 : int32; followees = vec {} } + }; + neuron_id_or_subaccount = null; + }, +) diff --git a/tests/output/ledger/neuron_manage/disburse_somewhat_to_someone.txt b/tests/output/ledger/neuron_manage/disburse_somewhat_to_someone.txt new file mode 100644 index 00000000..c9172eb5 --- /dev/null +++ b/tests/output/ledger/neuron_manage/disburse_somewhat_to_someone.txt @@ -0,0 +1,20 @@ +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + command = opt variant { + Disburse = record { + to_account = opt record { + hash = blob "\c6H\b8\14\e8\1dyF\e8\ba\ce\a9\92\80\e0|_Q\a0K\a7\a3\80\09\d8\ad\8e\89"; + }; + amount = opt record { e8s = 5_731_000_000 : nat64 }; + } + }; + neuron_id_or_subaccount = null; + }, +) diff --git a/tests/output/ledger/neuron_manage/disburse_stop_dissolving.txt b/tests/output/ledger/neuron_manage/disburse_stop_dissolving.txt new file mode 100644 index 00000000..6336d39c --- /dev/null +++ b/tests/output/ledger/neuron_manage/disburse_stop_dissolving.txt @@ -0,0 +1,32 @@ +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + command = opt variant { + Configure = record { + operation = opt variant { StopDissolving = record {} }; + } + }; + neuron_id_or_subaccount = null; + }, +) +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + command = opt variant { + Disburse = record { to_account = null; amount = null } + }; + neuron_id_or_subaccount = null; + }, +) diff --git a/tests/output/ledger/neuron_manage/follow.txt b/tests/output/ledger/neuron_manage/follow.txt new file mode 100644 index 00000000..76db0fb3 --- /dev/null +++ b/tests/output/ledger/neuron_manage/follow.txt @@ -0,0 +1,21 @@ +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + command = opt variant { + Follow = record { + topic = 0 : int32; + followees = vec { + record { id = 380_519_530_470_538 : nat64 }; + record { id = 380_519_530_470_539 : nat64 }; + }; + } + }; + neuron_id_or_subaccount = null; + }, +) diff --git a/tests/output/ledger/neuron_manage/join_community_fund.txt b/tests/output/ledger/neuron_manage/join_community_fund.txt new file mode 100644 index 00000000..77060cce --- /dev/null +++ b/tests/output/ledger/neuron_manage/join_community_fund.txt @@ -0,0 +1,17 @@ +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + command = opt variant { + Configure = record { + operation = opt variant { JoinCommunityFund = record {} }; + } + }; + neuron_id_or_subaccount = null; + }, +) diff --git a/tests/output/ledger/neuron_manage/leave_community_fund.txt b/tests/output/ledger/neuron_manage/leave_community_fund.txt new file mode 100644 index 00000000..6fc5f38f --- /dev/null +++ b/tests/output/ledger/neuron_manage/leave_community_fund.txt @@ -0,0 +1,17 @@ +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + command = opt variant { + Configure = record { + operation = opt variant { LeaveCommunityFund = record {} }; + } + }; + neuron_id_or_subaccount = null; + }, +) diff --git a/tests/output/ledger/neuron_manage/remove_hot_key_and_dissolve.txt b/tests/output/ledger/neuron_manage/remove_hot_key_and_dissolve.txt new file mode 100644 index 00000000..052f71c9 --- /dev/null +++ b/tests/output/ledger/neuron_manage/remove_hot_key_and_dissolve.txt @@ -0,0 +1,59 @@ +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + command = opt variant { + Configure = record { + operation = opt variant { + RemoveHotKey = record { + hot_key_to_remove = opt principal "5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe"; + } + }; + } + }; + neuron_id_or_subaccount = null; + }, +) +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + command = opt variant { + Configure = record { + operation = opt variant { StartDissolving = record {} }; + } + }; + neuron_id_or_subaccount = null; + }, +) +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + command = opt variant { + Configure = record { + operation = opt variant { + IncreaseDissolveDelay = record { + additional_dissolve_delay_seconds = 7_200 : nat32; + } + }; + } + }; + neuron_id_or_subaccount = null; + }, +) diff --git a/tests/output/ledger/neuron_manage/vote.txt b/tests/output/ledger/neuron_manage/vote.txt new file mode 100644 index 00000000..3daa8f73 --- /dev/null +++ b/tests/output/ledger/neuron_manage/vote.txt @@ -0,0 +1,36 @@ +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + command = opt variant { + RegisterVote = record { + vote = 1 : int32; + proposal = opt record { id = 123 : nat64 }; + } + }; + neuron_id_or_subaccount = null; + }, +) +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = opt record { id = 2_313_380_519_530_470_538 : nat64 }; + command = opt variant { + RegisterVote = record { + vote = 1 : int32; + proposal = opt record { id = 456 : nat64 }; + } + }; + neuron_id_or_subaccount = null; + }, +) diff --git a/tests/output/ledger/neuron_stake/stake_only.txt b/tests/output/ledger/neuron_stake/stake_only.txt new file mode 100644 index 00000000..845890b7 --- /dev/null +++ b/tests/output/ledger/neuron_stake/stake_only.txt @@ -0,0 +1,24 @@ +Sending message with + + Call type: update + Sender: 2vxsx-fae + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = null; + command = opt variant { + ClaimOrRefresh = record { + by = opt variant { + MemoAndController = record { + controller = opt principal "5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe"; + memo = 7_888_422_419_985_231_726 : nat64; + } + }; + } + }; + neuron_id_or_subaccount = opt variant { + Subaccount = blob "\a6c\80\a5V+\d7\8e\83\22F\e6\bd\1c\e8D~ b\de\bfK?eE\b0\b3,\0f\b2\e1*" + }; + }, +) diff --git a/tests/output/ledger/neuron_stake/with_name.txt b/tests/output/ledger/neuron_stake/with_name.txt new file mode 100644 index 00000000..cc278665 --- /dev/null +++ b/tests/output/ledger/neuron_stake/with_name.txt @@ -0,0 +1,43 @@ +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai + Method name: icrc1_transfer + Arguments: ( + record { + to = record { + owner = principal "rrkah-fqaaa-aaaaa-aaaaq-cai"; + subaccount = opt blob "\a6c\80\a5V+\d7\8e\83\22F\e6\bd\1c\e8D~ b\de\bfK?eE\b0\b3,\0f\b2\e1*"; + }; + fee = opt (10_000 : nat); + memo = opt blob "myNeuron"; + from_subaccount = null; + created_at_time = opt (1_669_073_904_187_044_208 : nat64); + amount = 1_200_000_000 : nat; + }, +) +Sending message with + + Call type: update + Sender: 2vxsx-fae + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = null; + command = opt variant { + ClaimOrRefresh = record { + by = opt variant { + MemoAndController = record { + controller = opt principal "5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe"; + memo = 7_888_422_419_985_231_726 : nat64; + } + }; + } + }; + neuron_id_or_subaccount = opt variant { + Subaccount = blob "\a6c\80\a5V+\d7\8e\83\22F\e6\bd\1c\e8D~ b\de\bfK?eE\b0\b3,\0f\b2\e1*" + }; + }, +) diff --git a/tests/output/ledger/neuron_stake/with_nonce.txt b/tests/output/ledger/neuron_stake/with_nonce.txt new file mode 100644 index 00000000..3f4fca43 --- /dev/null +++ b/tests/output/ledger/neuron_stake/with_nonce.txt @@ -0,0 +1,43 @@ +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai + Method name: icrc1_transfer + Arguments: ( + record { + to = record { + owner = principal "rrkah-fqaaa-aaaaa-aaaaq-cai"; + subaccount = opt blob "f.\d9\1c\ad\0b\1d\22u\ac\80\f3a\220\01@\ac\03\f4\8bL\0c\dc\bes\e2\03\95\9f\94\b4"; + }; + fee = opt (10_000 : nat); + memo = opt blob "\00\00\00\00\00\00\03\09"; + from_subaccount = opt blob "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01"; + created_at_time = opt (1_669_073_904_187_044_208 : nat64); + amount = 1_200_000_000 : nat; + }, +) +Sending message with + + Call type: update + Sender: 2vxsx-fae + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + id = null; + command = opt variant { + ClaimOrRefresh = record { + by = opt variant { + MemoAndController = record { + controller = opt principal "5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe"; + memo = 777 : nat64; + } + }; + } + }; + neuron_id_or_subaccount = opt variant { + Subaccount = blob "f.\d9\1c\ad\0b\1d\22u\ac\80\f3a\220\01@\ac\03\f4\8bL\0c\dc\bes\e2\03\95\9f\94\b4" + }; + }, +) diff --git a/tests/output/ledger/sns/stake_neuron/memo.txt b/tests/output/ledger/sns/stake_neuron/memo.txt new file mode 100644 index 00000000..036a1e08 --- /dev/null +++ b/tests/output/ledger/sns/stake_neuron/memo.txt @@ -0,0 +1,40 @@ +Sending message with + + Call type: update + Sender: 5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe + Canister id: ryjl3-tyaaa-aaaaa-aaaba-cai + Method name: icrc1_transfer + Arguments: ( + record { + to = record { + owner = principal "rrkah-fqaaa-aaaaa-aaaaq-cai"; + subaccount = opt blob "f.\d9\1c\ad\0b\1d\22u\ac\80\f3a\220\01@\ac\03\f4\8bL\0c\dc\bes\e2\03\95\9f\94\b4"; + }; + fee = null; + memo = opt blob "\00\00\00\00\00\00\03\09"; + from_subaccount = null; + created_at_time = opt (1_669_073_904_187_044_208 : nat64); + amount = 1_200_000_000 : nat; + }, +) +Sending message with + + Call type: update + Sender: 2vxsx-fae + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + subaccount = blob "f.\d9\1c\ad\0b\1d\22u\ac\80\f3a\220\01@\ac\03\f4\8bL\0c\dc\bes\e2\03\95\9f\94\b4"; + command = opt variant { + ClaimOrRefresh = record { + by = opt variant { + MemoAndController = record { + controller = opt principal "5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe"; + memo = 777 : nat64; + } + }; + } + }; + }, +) diff --git a/tests/output/ledger/sns/stake_neuron/no_amount.txt b/tests/output/ledger/sns/stake_neuron/no_amount.txt new file mode 100644 index 00000000..11f699cc --- /dev/null +++ b/tests/output/ledger/sns/stake_neuron/no_amount.txt @@ -0,0 +1,21 @@ +Sending message with + + Call type: update + Sender: 2vxsx-fae + Canister id: rrkah-fqaaa-aaaaa-aaaaq-cai + Method name: manage_neuron + Arguments: ( + record { + subaccount = blob "f.\d9\1c\ad\0b\1d\22u\ac\80\f3a\220\01@\ac\03\f4\8bL\0c\dc\bes\e2\03\95\9f\94\b4"; + command = opt variant { + ClaimOrRefresh = record { + by = opt variant { + MemoAndController = record { + controller = opt principal "5upke-tazvi-6ufqc-i3v6r-j4gpu-dpwti-obhal-yb5xj-ue32x-ktkql-rqe"; + memo = 777 : nat64; + } + }; + } + }; + }, +) diff --git a/tests/output/main.rs b/tests/output/main.rs index 6f296576..c15759c9 100644 --- a/tests/output/main.rs +++ b/tests/output/main.rs @@ -54,6 +54,11 @@ fn quill_query(cmd: &str) -> Output { quill_inner(cmd, ["--dry-run".into()]) } +#[must_use] +fn quill_sns(cmd: &str) -> Output { + quill_inner(cmd, sns_args()) +} + #[must_use] fn quill_sns_query(cmd: &str) -> Output { quill_inner(cmd, ["--dry-run".into()].into_iter().chain(sns_args())) diff --git a/tests/output/neuron_manage.rs b/tests/output/neuron_manage.rs index 4eca2620..ca82a412 100644 --- a/tests/output/neuron_manage.rs +++ b/tests/output/neuron_manage.rs @@ -2,18 +2,17 @@ use crate::{ledger_compatible, quill_send, OutputExt, ALICE, PRINCIPAL}; const NEURON_ID: &str = "2313380519530470538"; -// uncomment tests on next ledger app update ledger_compatible![ - // hot_key, + hot_key, additional_dissolve_delay_seconds, - // disburse, + disburse, dissolve, - // follow, - // community_fund, + follow, + community_fund, maturity, merge, split, - // vote + vote ]; #[test] diff --git a/tests/output/root.rs b/tests/output/root.rs index 44f59b11..10e7c552 100644 --- a/tests/output/root.rs +++ b/tests/output/root.rs @@ -4,7 +4,7 @@ use tempfile::NamedTempFile; use crate::{ escape_p, ledger_compatible, quill, quill_authed, quill_query, quill_query_authed, quill_send, - OutputExt, + quill_sns, OutputExt, }; // Uncomment tests on next ledger app update @@ -12,7 +12,7 @@ ledger_compatible![ account_balance, claim_neurons, list_neurons, - // neuron_stake, + neuron_stake, public_ids, transfer_icrc1, ]; @@ -144,8 +144,6 @@ fn ledger_fail_early() { quill("replace-node-provider-id --ledger --node-operator-id fdsgv-62ihb-nbiqv-xgic5-iefsv-3cscz-tmbzv-63qd5-vh43v-dqfrt-pae \ --node-provider-id pnf55-r7gzn-s3oqn-ah2v7-r6b63-a2ma2-wyzhb-dzbwb-sghid-lzcxh-4ae") .diff_err("ledger_incompatible/by_function.txt"); - quill("neuron-stake --ledger --amount 12 --name myNeuron") + quill_sns("sns new-sale-ticket --ledger --amount-icp-e8s 500") .diff_err("ledger_incompatible/by_command.txt"); - quill("neuron-manage 1 --ledger --join-community-fund") - .diff_err("ledger_incompatible/by_flag.txt"); } diff --git a/tests/output/sns.rs b/tests/output/sns.rs index 233de83d..fe8e360b 100644 --- a/tests/output/sns.rs +++ b/tests/output/sns.rs @@ -13,9 +13,10 @@ ledger_compatible![ neuron_id, neuron_permission, dissolve, + // dissolve_delay, disburse, // make_proposal, - // stake_neuron, + stake_neuron, stake_maturity, // vote, ];