diff --git a/Cargo.lock b/Cargo.lock index ba10c93..627053e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,16 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "addr2line" version = "0.24.2" @@ -109,16 +119,39 @@ version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", +] + [[package]] name = "ark-bls12-381" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3df4dcc01ff89867cd86b0da835f23c3f02738353aaee7dde7495af71363b8d5" dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", ] [[package]] @@ -127,9 +160,26 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d934c527bc397a2591e85dfabd3a705eaa5eed71be763c7e4b802d62ec41ae3" dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-std 0.5.0", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff 0.4.2", + "ark-poly 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", ] [[package]] @@ -139,10 +189,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" dependencies = [ "ahash", - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", "educe", "fnv", "hashbrown 0.15.0", @@ -153,16 +203,36 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + [[package]] name = "ark-ff" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.5.0", + "ark-ff-macros 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", "arrayvec 0.7.6", "digest 0.10.7", "educe", @@ -173,6 +243,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-asm" version = "0.5.0" @@ -180,7 +260,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.82", + "syn 2.0.89", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -193,7 +286,20 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", ] [[package]] @@ -203,27 +309,50 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" dependencies = [ "ahash", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", "educe", "fnv", "hashbrown 0.15.0", ] +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive 0.4.2", + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + [[package]] name = "ark-serialize" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" dependencies = [ - "ark-serialize-derive", - "ark-std", + "ark-serialize-derive 0.5.0", + "ark-std 0.5.0", "arrayvec 0.7.6", "digest 0.10.7", "num-bigint", ] +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-serialize-derive" version = "0.5.0" @@ -232,7 +361,17 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", ] [[package]] @@ -245,6 +384,12 @@ dependencies = [ "rand", ] +[[package]] +name = "array-bytes" +version = "6.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5dde061bd34119e902bbb2d9b90c5692635cf59fb91d582c2b68043f1b8293" + [[package]] name = "arrayref" version = "0.3.9" @@ -411,7 +556,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -428,7 +573,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -518,6 +663,12 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base58" version = "0.2.0" @@ -542,6 +693,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "beef" version = "0.5.2" @@ -709,6 +866,18 @@ dependencies = [ "piper", ] +[[package]] +name = "bounded-collections" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d077619e9c237a5d1875166f5e8033e8f6bff0c96f8caf81e1c2d7738c431bf" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "serde", +] + [[package]] name = "bs58" version = "0.5.1" @@ -747,7 +916,7 @@ checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -851,7 +1020,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -904,6 +1073,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -916,6 +1091,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" +[[package]] +name = "constcat" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08" + [[package]] name = "convert_case" version = "0.4.0" @@ -974,6 +1155,18 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -1021,7 +1214,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -1069,7 +1262,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -1091,7 +1284,37 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.82", + "syn 2.0.89", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -1102,7 +1325,7 @@ checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -1115,7 +1338,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -1135,7 +1358,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -1154,6 +1377,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle", ] @@ -1170,12 +1394,55 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "dyn-clonable" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" +dependencies = [ + "dyn-clonable-impl", + "dyn-clone", +] + +[[package]] +name = "dyn-clonable-impl" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "serdect", + "signature", + "spki", +] + [[package]] name = "ed25519" version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ + "pkcs8", "signature", ] @@ -1203,7 +1470,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -1212,6 +1479,26 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "serdect", + "subtle", + "zeroize", +] + [[package]] name = "embedded-io" version = "0.4.0" @@ -1265,7 +1552,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -1277,7 +1564,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -1303,6 +1590,12 @@ dependencies = [ "log", ] +[[package]] +name = "environmental" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" + [[package]] name = "equivalent" version = "1.0.1" @@ -1350,18 +1643,53 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "expander" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2c470c71d91ecbd179935b24170459e926382eaaa86b590b78814e180d8a8e2" +dependencies = [ + "blake2", + "file-guard", + "fs-err", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "fastrand" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + [[package]] name = "fiat-crypto" version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +[[package]] +name = "file-guard" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21ef72acf95ec3d7dbf61275be556299490a245f017cf084bd23b4f68cf9407c" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "finito" version = "0.1.0" @@ -1462,6 +1790,15 @@ dependencies = [ "serde", ] +[[package]] +name = "fs-err" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] + [[package]] name = "funty" version = "2.0.0" @@ -1508,6 +1845,7 @@ dependencies = [ "futures-core", "futures-task", "futures-util", + "num_cpus", ] [[package]] @@ -1537,7 +1875,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -1588,6 +1926,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -1609,6 +1948,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ + "rand", "rand_core", ] @@ -1664,6 +2004,17 @@ dependencies = [ "web-sys", ] +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + [[package]] name = "h2" version = "0.3.26" @@ -1702,6 +2053,21 @@ dependencies = [ "tracing", ] +[[package]] +name = "hash-db" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" + +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +dependencies = [ + "crunchy", +] + [[package]] name = "hash32" version = "0.2.1" @@ -1717,6 +2083,15 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + [[package]] name = "hashbrown" version = "0.14.5" @@ -2143,16 +2518,34 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" -version = "0.12.1" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itertools" -version = "0.13.0" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ @@ -2383,6 +2776,21 @@ dependencies = [ "url", ] +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "serdect", + "sha2 0.10.8", + "signature", +] + [[package]] name = "keccak" version = "0.1.5" @@ -2406,7 +2814,7 @@ dependencies = [ "petgraph", "pico-args", "regex", - "regex-syntax", + "regex-syntax 0.8.5", "sha3", "string_cache", "term", @@ -2420,7 +2828,7 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "feee752d43abd0f4807a921958ab4131f692a44d4d599733d4419c5d586176ce" dependencies = [ - "regex-automata", + "regex-automata 0.4.8", "rustversion", ] @@ -2521,6 +2929,15 @@ dependencies = [ "hashbrown 0.15.0", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "matchit" version = "0.7.3" @@ -2629,6 +3046,16 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-bigint" version = "0.4.6" @@ -2639,6 +3066,22 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-format" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" +dependencies = [ + "arrayvec 0.7.6", + "itoa", +] + [[package]] name = "num-integer" version = "0.1.46" @@ -2668,6 +3111,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.9", + "libc", +] + [[package]] name = "num_enum" version = "0.5.11" @@ -2739,7 +3192,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -2760,6 +3213,25 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "parity-bip39" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9" +dependencies = [ + "bitcoin_hashes", + "rand", + "rand_core", + "serde", + "unicode-normalization", +] + [[package]] name = "parity-scale-codec" version = "3.7.0" @@ -2769,6 +3241,7 @@ dependencies = [ "arrayvec 0.7.6", "bitvec", "byte-slice-cast", + "bytes", "impl-trait-for-tuples", "parity-scale-codec-derive", "rustversion", @@ -2816,6 +3289,17 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "password-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + [[package]] name = "paste" version = "1.0.15" @@ -2829,6 +3313,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest 0.10.7", + "password-hash", ] [[package]] @@ -2879,7 +3364,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -2905,12 +3390,59 @@ dependencies = [ "futures-io", ] +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +[[package]] +name = "polkavm-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d9428a5cfcc85c5d7b9fc4b6a18c4b802d0173d768182a51cc7751640f08b92" + +[[package]] +name = "polkavm-derive" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8c4bea6f3e11cd89bb18bcdddac10bd9a24015399bd1c485ad68a985a19606" +dependencies = [ + "polkavm-derive-impl-macro", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c4fdfc49717fb9a196e74a5d28e0bc764eb394a2c803eb11133a31ac996c60c" +dependencies = [ + "polkavm-common", + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" +dependencies = [ + "polkavm-derive-impl", + "syn 2.0.89", +] + [[package]] name = "polling" version = "3.7.4" @@ -2956,6 +3488,12 @@ dependencies = [ "serde", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.20" @@ -2978,7 +3516,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -3039,9 +3577,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -3053,13 +3591,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a39298390d750f603c0fb7216288b4d0b74e546706f8ed0e74f09b02f20e9c79" dependencies = [ "ahash", - "ark-bls12-381", + "ark-bls12-381 0.5.0", "ark-curve25519", - "ark-ec", - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", "bigdecimal", "bit-iter", "blake3", @@ -3132,7 +3670,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.82", + "syn 2.0.89", "tempfile", ] @@ -3146,7 +3684,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -3229,6 +3767,26 @@ dependencies = [ "bitflags 2.6.0", ] +[[package]] +name = "ref-cast" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "regex" version = "1.11.0" @@ -3237,8 +3795,17 @@ checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", ] [[package]] @@ -3249,9 +3816,15 @@ checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.5", ] +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + [[package]] name = "regex-syntax" version = "0.8.5" @@ -3301,6 +3874,16 @@ dependencies = [ "windows-registry", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle", +] + [[package]] name = "ring" version = "0.17.8" @@ -3590,7 +4173,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -3616,7 +4199,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -3638,7 +4221,7 @@ dependencies = [ "proc-macro2", "quote", "scale-info", - "syn 2.0.82", + "syn 2.0.89", "thiserror", ] @@ -3707,6 +4290,48 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.28.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" +dependencies = [ + "secp256k1-sys", +] + +[[package]] +name = "secp256k1-sys" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" +dependencies = [ + "cc", +] + +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", +] + [[package]] name = "security-framework" version = "2.11.1" @@ -3775,7 +4400,7 @@ checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -3802,6 +4427,16 @@ dependencies = [ "serde", ] +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + [[package]] name = "sha-1" version = "0.9.8" @@ -3860,6 +4495,15 @@ dependencies = [ "keccak", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "shlex" version = "1.3.0" @@ -3880,6 +4524,10 @@ name = "signature" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core", +] [[package]] name = "siphasher" @@ -4034,7 +4682,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -4077,6 +4725,53 @@ dependencies = [ "sha1", ] +[[package]] +name = "sp-core" +version = "34.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c961a5e33fb2962fa775c044ceba43df9c6f917e2c35d63bfe23738468fa76a7" +dependencies = [ + "array-bytes", + "bitflags 1.3.2", + "blake2", + "bounded-collections", + "bs58", + "dyn-clonable", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "itertools 0.11.0", + "k256", + "libsecp256k1", + "log", + "merlin", + "parity-bip39", + "parity-scale-codec", + "parking_lot", + "paste", + "primitive-types", + "rand", + "scale-info", + "schnorrkel", + "secp256k1", + "secrecy", + "serde", + "sp-crypto-hashing", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tracing", + "w3f-bls", + "zeroize", +] + [[package]] name = "sp-crypto-hashing" version = "0.1.0" @@ -4091,6 +4786,105 @@ dependencies = [ "twox-hash", ] +[[package]] +name = "sp-debug-derive" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d09fa0a5f7299fb81ee25ae3853d26200f7a348148aed6de76be905c007dbe" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "sp-externalities" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a904407d61cb94228c71b55a9d3708e9d6558991f9e83bd42bd91df37a159d30" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-storage", +] + +[[package]] +name = "sp-runtime-interface" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985eb981f40c689c6a0012c937b68ed58dabb4341d06f2dfe4dfd5ed72fa4017" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "polkavm-derive", + "primitive-types", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" +dependencies = [ + "Inflector", + "expander", + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.89", +] + +[[package]] +name = "sp-std" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" + +[[package]] +name = "sp-storage" +version = "21.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99c82989b3a4979a7e1ad848aad9f5d0b4388f1f454cc131766526601ab9e8f8" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive", +] + +[[package]] +name = "sp-tracing" +version = "17.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf641a1d17268c8fcfdb8e0fa51a79c2d4222f4cfda5f3944dbdbc384dced8d5" +dependencies = [ + "parity-scale-codec", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-wasm-interface" +version = "21.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", +] + [[package]] name = "spin" version = "0.9.8" @@ -4100,6 +4894,16 @@ dependencies = [ "lock_api", ] +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "sqlparser" version = "0.45.0" @@ -4109,6 +4913,21 @@ dependencies = [ "log", ] +[[package]] +name = "ss58-registry" +version = "1.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19409f13998e55816d1c728395af0b52ec066206341d939e22e7766df9b494b8" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde", + "serde_json", + "unicode-xid", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -4146,6 +4965,19 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "substrate-bip39" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" +dependencies = [ + "hmac 0.12.1", + "pbkdf2", + "schnorrkel", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "subtle" version = "2.6.1" @@ -4206,7 +5038,7 @@ dependencies = [ "scale-info", "scale-typegen", "subxt-metadata", - "syn 2.0.82", + "syn 2.0.89", "thiserror", "tokio", ] @@ -4277,7 +5109,7 @@ dependencies = [ "quote", "scale-typegen", "subxt-codegen", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -4302,12 +5134,15 @@ dependencies = [ "env_logger", "futures", "indexmap 2.6.0", + "itertools 0.13.0", "log", "postcard", "proof-of-sql", "proof-of-sql-parser", "reqwest", "serde_json", + "snafu", + "sp-core", "subxt", "sxt-proof-of-sql-sdk-local", "tokio", @@ -4319,10 +5154,12 @@ name = "sxt-proof-of-sql-sdk-local" version = "0.1.0" dependencies = [ "flexbuffers", + "k256", "proof-of-sql", "proof-of-sql-parser", "prost", "serde", + "sha3", "snafu", "subxt", "tonic", @@ -4333,7 +5170,7 @@ dependencies = [ name = "sxt-proof-of-sql-sdk-wasm" version = "0.1.0" dependencies = [ - "ark-serialize", + "ark-serialize 0.5.0", "gloo-utils", "hex", "lazy_static", @@ -4361,9 +5198,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.82" +version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ "proc-macro2", "quote", @@ -4452,7 +5289,48 @@ checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", ] [[package]] @@ -4513,7 +5391,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -4652,7 +5530,7 @@ dependencies = [ "proc-macro2", "prost-build", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -4707,7 +5585,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -4717,6 +5595,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "time", + "tracing", + "tracing-core", + "tracing-log", ] [[package]] @@ -4733,6 +5642,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", + "rand", "static_assertions", ] @@ -4768,9 +5678,9 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.24" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] @@ -4826,6 +5736,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "vcpkg" version = "0.2.15" @@ -4838,6 +5754,30 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "w3f-bls" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a3028804c8bbae2a97a15b71ffc0e308c4b01a520994aafa77d56e94e19024" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381 0.4.0", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-serialize-derive 0.4.2", + "arrayref", + "constcat", + "digest 0.10.7", + "rand", + "rand_chacha", + "rand_core", + "sha2 0.10.8", + "sha3", + "thiserror", + "zeroize", +] + [[package]] name = "walkdir" version = "2.5.0" @@ -4885,7 +5825,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", "wasm-bindgen-shared", ] @@ -4919,7 +5859,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5205,7 +6145,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] [[package]] @@ -5225,5 +6165,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.89", ] diff --git a/Cargo.toml b/Cargo.toml index 3228074..f5fec5f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,3 +40,7 @@ tokio = { version = "1.0", features = ["rt-multi-thread", "macros"] } tonic = { version = "0.11", default-features = false } tonic-build = { version = "0.11" } wasm-bindgen = { version = "0.2.95" } +k256 = { version = "0.13.4" } +sha3 = { version = "0.10.8" } +sp-core = "34.0.0" +itertools = "0.13.0" \ No newline at end of file diff --git a/crates/proof-of-sql-sdk-local/Cargo.toml b/crates/proof-of-sql-sdk-local/Cargo.toml index d8117e5..f451a7d 100644 --- a/crates/proof-of-sql-sdk-local/Cargo.toml +++ b/crates/proof-of-sql-sdk-local/Cargo.toml @@ -14,6 +14,8 @@ tonic = { workspace = true, features = ["codegen", "prost"] } serde = { workspace = true } snafu = { workspace = true } subxt = { workspace = true } +k256 = { workspace = true } +sha3 = { workspace = true } [build-dependencies] tonic-build = { workspace = true } diff --git a/crates/proof-of-sql-sdk-local/src/attestation.rs b/crates/proof-of-sql-sdk-local/src/attestation.rs new file mode 100644 index 0000000..09e82d6 --- /dev/null +++ b/crates/proof-of-sql-sdk-local/src/attestation.rs @@ -0,0 +1,255 @@ +use crate::sxt_chain_runtime as runtime; +use k256::ecdsa::{RecoveryId, Signature, SigningKey, VerifyingKey}; +use sha3::{digest::core_api::CoreWrapper, Digest, Keccak256, Keccak256Core}; +use snafu::{ResultExt, Snafu}; + +/// Represents an Ethereum-style ECDSA signature, broken into its components. +/// +/// Wrapper around the [`k256::ecdsa::Signature`] type. +#[derive(Clone, Copy, Eq, PartialEq)] +pub struct EthereumSignature { + /// The `r` component of the signature. + pub r: [u8; 32], + /// The `s` component of the signature. + pub s: [u8; 32], + /// The recovery ID, usually 27 or 28 for Ethereum. + pub v: u8, +} + +impl EthereumSignature { + /// Creates a new `EthereumSignature`. + /// + /// If the recovery ID (`v`) is not provided, it defaults to `28`. + pub fn new(r: [u8; 32], s: [u8; 32], v: Option) -> Self { + Self { + r, + s, + v: v.unwrap_or(28), + } + } +} + +/// Top-level error type for the attestation module. +#[derive(Debug, Snafu)] +pub enum AttestationError { + /// Error during verification. + #[snafu(display("Verification error: {:?}", source))] + VerificationError { + /// Source of the error. + source: AttestationVerificationError, + }, + /// Error related to signing or verifying signatures. + #[snafu(display("Signature error: {:?}", source))] + SignatureError { + /// Source of the error. + source: SignatureError, + }, + /// Error parsing the public key. + #[snafu(display("Public key parsing error"))] + PublicKeyError, +} + +/// Specialized `Result` type for the attestation module. +type Result = core::result::Result; + +/// Errors that can occur during verification. +#[derive(Debug, Snafu)] +pub enum AttestationVerificationError { + /// The recovery ID does not match the Ethereum specification. + #[snafu(display("Invalid recovery ID: {:?}", recovery_id))] + InvalidRecoveryIdError { + /// The recovery id that caused the error + recovery_id: u8, + }, + /// The public key could not be recovered. + #[snafu(display("Key recovery error"))] + KeyRecoveryError, + /// The public key could not be parsed. + #[snafu(display("Public key parsing error"))] + PublicKeyParsingError, + /// The signature could not be recovered. + #[snafu(display("Signature recovery error"))] + SignatureRecoveryError, + + /// Invalid public key recovered + #[snafu(display("The signature recovery resulted in an incorrect public key"))] + InvalidPublicKeyRecovered, +} + +/// Errors related to signature generation and validation. +#[derive(Debug, Snafu)] +pub enum SignatureError { + /// Error parsing the private key into the correct format. + #[snafu(display("Error creating signing key from private key"))] + CreateSigningKeyError, +} + +/// Verifies an Ethereum ECDSA signature against a given message and public key. +/// +/// This function performs the following steps: +/// 1. Parses the `EthereumSignature` into its `r`, `s`, and `v` components. +/// 2. Attempts to recover the public key from the message digest and signature. +/// 3. Compares the recovered public key with the provided public key to determine validity. +/// +/// # Arguments +/// +/// * `msg` - The message that was signed, represented as a slice of bytes. +/// * `scalars` - The Ethereum signature, containing the `r`, `s`, and `v` components. +/// * `pub_key` - The public key to verify the signature against, as a byte slice. +/// +/// # Returns +/// +/// Returns `Ok(())` if the signature is valid. Otherwise, returns an error describing the failure. +/// +/// # Errors +/// +/// * `VerificationError::SignatureRecoveryError` - If the signature could not be parsed. +/// * `VerificationError::InvalidRecoveryIdError` - If the recovery ID (`v`) is invalid. +/// * `VerificationError::KeyRecoveryError` - If the public key cannot be recovered. +/// * `VerificationError::PublicKeyParsingError` - If the provided public key is invalid. +/// * `VerificationError::InvalidPublicKeyRecovered` - If the recovered public key does not match the provided key. +/// +/// # Examples +/// +/// ```rust +/// let msg = b"Example message"; +/// let signature = EthereumSignature { r: ..., s: ..., v: ... }; +/// let pub_key = [0x04, ...]; // Compressed or uncompressed public key bytes. +/// +/// match verify_eth_signature(msg, &signature, &pub_key) { +/// Ok(_) => println!("Signature is valid."), +/// Err(e) => println!("Signature verification failed: {:?}", e), +/// } +/// ``` +pub fn verify_eth_signature(msg: &[u8], scalars: &EthereumSignature, pub_key: &[u8]) -> Result<()> { + let signature = Signature::from_scalars(scalars.r, scalars.s) + .map_err(|_| AttestationVerificationError::SignatureRecoveryError) + .context(VerificationSnafu)?; + + let recovery_id = RecoveryId::try_from(scalars.v) + .map_err(|_| AttestationVerificationError::InvalidRecoveryIdError { + recovery_id: scalars.v, + }) + .context(VerificationSnafu)?; + + let digest = hash_eth_msg(msg); + + let recovered_pub_key = VerifyingKey::recover_from_digest(digest, &signature, recovery_id) + .map_err(|_| AttestationVerificationError::KeyRecoveryError) + .context(VerificationSnafu)?; + + let expected_key = VerifyingKey::from_sec1_bytes(pub_key) + .map_err(|_| AttestationVerificationError::PublicKeyParsingError) + .context(VerificationSnafu)?; + + match recovered_pub_key == expected_key { + true => Ok(()), + false => Err(AttestationError::VerificationError { + source: AttestationVerificationError::InvalidPublicKeyRecovered, + }), + } +} + +/// Hashes a message with the Ethereum-specific prefix. +/// +/// # Arguments +/// * `message` - The message to hash. +/// +/// Returns the hashed message. +fn hash_eth_msg(message: &[u8]) -> CoreWrapper { + let prefix = format!("\x19Ethereum Signed Message:\n{}", message.len()); + let mut hasher = Keccak256::new(); + hasher.update(prefix.as_bytes()); + hasher.update(message); + hasher +} + +/// Signs a message with a private Ethereum key. +/// +/// # Arguments +/// * `private_key` - The private key as a byte slice. +/// * `message` - The message to sign. +/// +/// Returns the signature if successful. +pub fn sign_eth_message(private_key: &[u8], message: &[u8]) -> Result { + let signing_key = SigningKey::from_bytes(private_key.into()) + .map_err(|_| SignatureError::CreateSigningKeyError) + .context(SignatureSnafu)?; + + let digest = hash_eth_msg(message); + + let (signature, recovery_id) = signing_key.sign_digest_recoverable(digest).unwrap(); + + let r = slice_to_scalar(&signature.r().to_bytes()).unwrap(); + let s = slice_to_scalar(&signature.s().to_bytes()).unwrap(); + + Ok(EthereumSignature::new(r, s, Some(recovery_id.into()))) +} + +/// Converts a slice into a fixed-size array. +/// +/// Returns `None` if the slice is not of the expected length. +fn slice_to_scalar(slice: &[u8]) -> Option<[u8; 32]> { + slice.try_into().ok() +} + +/// Create a message from a state root and block number +pub fn create_attestation_message(state_root: impl AsRef<[u8]>, block_number: u32) -> Vec { + let mut msg = Vec::with_capacity(state_root.as_ref().len() + std::mem::size_of::()); + msg.extend_from_slice(state_root.as_ref()); + msg.extend_from_slice(&block_number.to_le_bytes()); + msg +} + +/// Verifies the signature of an attestation. +/// +/// This function checks whether an Ethereum-style signature is valid for the provided message +/// and public key. It is typically used to validate attestations in a blockchain context. +/// +/// # Arguments +/// +/// * `msg` - The message that was signed, as a byte slice. +/// * `signature` - The Ethereum signature to verify, containing `r`, `s`, and `v` components. +/// * `proposed_pub_key` - The public key proposed for validation, as a 33-byte array. +/// * `block_number` - The block number associated with the attestation, used for error context. +/// +/// # Returns +/// +/// Returns `Ok(())` if the signature is valid. Otherwise, returns an error indicating why the +/// validation failed. +/// +/// # Errors +/// +/// * `AttestationError::InvalidSignature` - If the signature validation fails. +/// * `AttestationError::VerificationError` - If a lower-level signature verification error occurs. +/// +/// # Examples +/// +/// ```rust +/// let msg = b"Example attestation message"; +/// let signature = EthereumSignature { r: ..., s: ..., v: ... }; +/// let proposed_pub_key = [0x02, ...]; // Compressed public key bytes. +/// let block_number = 42; +/// +/// match verify_signature(msg, &signature, &proposed_pub_key, block_number) { +/// Ok(_) => println!("Attestation signature is valid."), +/// Err(e) => println!("Attestation signature verification failed: {:?}", e), +/// } +/// ``` +pub fn verify_signature( + msg: &[u8], + signature: &runtime::api::runtime_types::sxt_core::attestation::EthereumSignature, + proposed_pub_key: &[u8; 33], +) -> Result<(), AttestationError> { + let runtime::api::runtime_types::sxt_core::attestation::EthereumSignature { r, s, v } = + signature; + let signature = EthereumSignature { + r: *r, + s: *s, + v: *v, + }; + + verify_eth_signature(msg, &signature, proposed_pub_key)?; + + Ok(()) +} diff --git a/crates/proof-of-sql-sdk-local/src/lib.rs b/crates/proof-of-sql-sdk-local/src/lib.rs index 822fe59..77a642a 100644 --- a/crates/proof-of-sql-sdk-local/src/lib.rs +++ b/crates/proof-of-sql-sdk-local/src/lib.rs @@ -16,3 +16,5 @@ pub use verify::{verify_prover_response, VerifyProverResponseError}; pub mod prover { tonic::include_proto!("sxt.core"); } + +pub mod attestation; diff --git a/crates/proof-of-sql-sdk-local/src/sxt_chain_runtime.rs b/crates/proof-of-sql-sdk-local/src/sxt_chain_runtime.rs index f1f6f88..5610cec 100644 --- a/crates/proof-of-sql-sdk-local/src/sxt_chain_runtime.rs +++ b/crates/proof-of-sql-sdk-local/src/sxt_chain_runtime.rs @@ -1,4 +1,4 @@ -#[allow(dead_code, unused_imports, non_camel_case_types, unreachable_patterns)] +#[allow(dead_code, unused_imports, non_camel_case_types)] #[allow(clippy::all)] #[allow(rustdoc::broken_intra_doc_links)] pub mod api { @@ -6,19 +6,21 @@ pub mod api { mod root_mod { pub use super::*; } - pub static PALLETS: [&str; 12usize] = [ + pub static PALLETS: [&str; 14usize] = [ "System", "Timestamp", + "Session", + "Validators", "Aura", "Grandpa", "Balances", "TransactionPayment", "Sudo", - "TemplateModule", "Permissions", "Tables", "Indexing", "Commitments", + "Attestations", ]; pub static RUNTIME_APIS: [&str; 12usize] = [ "Core", @@ -34,13 +36,13 @@ pub mod api { "TransactionPaymentCallApi", "GenesisBuilder", ]; - #[doc = r" The error type that is returned when there is a runtime issue."] + #[doc = r" The error type returned when there is a runtime issue."] pub type DispatchError = runtime_types::sp_runtime::DispatchError; #[doc = r" The outer event enum."] pub type Event = runtime_types::sxt_runtime::RuntimeEvent; #[doc = r" The outer extrinsic enum."] pub type Call = runtime_types::sxt_runtime::RuntimeCall; - #[doc = r" The outer error enum represents the DispatchError's Module variant."] + #[doc = r" The outer error enum representing the DispatchError's Module variant."] pub type Error = runtime_types::sxt_runtime::RuntimeError; pub fn constants() -> ConstantsApi { ConstantsApi @@ -182,7 +184,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -206,7 +207,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -233,7 +233,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -330,7 +329,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -355,7 +353,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -381,7 +378,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -496,7 +492,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -523,7 +518,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -547,7 +541,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -574,7 +567,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -647,7 +639,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -705,7 +696,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -779,7 +769,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -804,7 +793,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -888,7 +876,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -920,7 +907,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1071,7 +1057,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1100,7 +1085,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1131,7 +1115,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1157,7 +1140,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1211,7 +1193,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1327,7 +1308,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1358,7 +1338,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1385,7 +1364,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1411,7 +1389,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1441,10 +1418,9 @@ pub mod api { "query_call_info", types::QueryCallInfo { call, len }, [ - 31u8, 193u8, 192u8, 150u8, 123u8, 94u8, 210u8, 18u8, 148u8, 65u8, - 233u8, 133u8, 77u8, 48u8, 101u8, 212u8, 236u8, 16u8, 219u8, 42u8, - 221u8, 179u8, 217u8, 229u8, 180u8, 79u8, 133u8, 23u8, 125u8, 142u8, - 61u8, 26u8, + 144u8, 76u8, 44u8, 254u8, 64u8, 0u8, 143u8, 167u8, 153u8, 252u8, 105u8, + 165u8, 111u8, 11u8, 52u8, 178u8, 96u8, 230u8, 19u8, 47u8, 58u8, 172u8, + 110u8, 212u8, 131u8, 32u8, 26u8, 168u8, 252u8, 245u8, 20u8, 195u8, ], ) } @@ -1462,10 +1438,10 @@ pub mod api { "query_call_fee_details", types::QueryCallFeeDetails { call, len }, [ - 124u8, 177u8, 227u8, 241u8, 25u8, 191u8, 100u8, 185u8, 83u8, 214u8, - 174u8, 75u8, 35u8, 175u8, 46u8, 255u8, 81u8, 65u8, 90u8, 206u8, 100u8, - 231u8, 110u8, 210u8, 119u8, 34u8, 148u8, 218u8, 244u8, 154u8, 12u8, - 211u8, + 128u8, 58u8, 72u8, 110u8, 150u8, 138u8, 237u8, 99u8, 138u8, 167u8, + 14u8, 74u8, 238u8, 159u8, 249u8, 97u8, 99u8, 109u8, 88u8, 162u8, 123u8, + 18u8, 26u8, 183u8, 244u8, 189u8, 154u8, 158u8, 231u8, 130u8, 193u8, + 69u8, ], ) } @@ -1531,7 +1507,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1562,7 +1537,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1589,7 +1563,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1615,7 +1588,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1668,7 +1640,7 @@ pub mod api { #[doc = ""] #[doc = " Otherwise function returns a JSON representation of the built-in, named"] #[doc = " `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not"] - #[doc = " exists. Returned `Vec` contains bytes of JSON blob (patch) which comprises a list of"] + #[doc = " exist. Returned `Vec` contains bytes of JSON blob (patch) which comprises a list of"] #[doc = " (potentially nested) key-value pairs that are intended for customizing the default"] #[doc = " runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation"] #[doc = " of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can"] @@ -1737,7 +1709,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1766,7 +1737,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1793,7 +1763,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1838,6 +1807,12 @@ pub mod api { pub fn timestamp(&self) -> timestamp::storage::StorageApi { timestamp::storage::StorageApi } + pub fn session(&self) -> session::storage::StorageApi { + session::storage::StorageApi + } + pub fn validators(&self) -> validators::storage::StorageApi { + validators::storage::StorageApi + } pub fn aura(&self) -> aura::storage::StorageApi { aura::storage::StorageApi } @@ -1853,9 +1828,6 @@ pub mod api { pub fn sudo(&self) -> sudo::storage::StorageApi { sudo::storage::StorageApi } - pub fn template_module(&self) -> template_module::storage::StorageApi { - template_module::storage::StorageApi - } pub fn permissions(&self) -> permissions::storage::StorageApi { permissions::storage::StorageApi } @@ -1868,6 +1840,9 @@ pub mod api { pub fn commitments(&self) -> commitments::storage::StorageApi { commitments::storage::StorageApi } + pub fn attestations(&self) -> attestations::storage::StorageApi { + attestations::storage::StorageApi + } } pub struct TransactionApi; impl TransactionApi { @@ -1877,6 +1852,12 @@ pub mod api { pub fn timestamp(&self) -> timestamp::calls::TransactionApi { timestamp::calls::TransactionApi } + pub fn session(&self) -> session::calls::TransactionApi { + session::calls::TransactionApi + } + pub fn validators(&self) -> validators::calls::TransactionApi { + validators::calls::TransactionApi + } pub fn grandpa(&self) -> grandpa::calls::TransactionApi { grandpa::calls::TransactionApi } @@ -1886,9 +1867,6 @@ pub mod api { pub fn sudo(&self) -> sudo::calls::TransactionApi { sudo::calls::TransactionApi } - pub fn template_module(&self) -> template_module::calls::TransactionApi { - template_module::calls::TransactionApi - } pub fn permissions(&self) -> permissions::calls::TransactionApi { permissions::calls::TransactionApi } @@ -1898,6 +1876,9 @@ pub mod api { pub fn indexing(&self) -> indexing::calls::TransactionApi { indexing::calls::TransactionApi } + pub fn attestations(&self) -> attestations::calls::TransactionApi { + attestations::calls::TransactionApi + } } #[doc = r" check whether the metadata provided is aligned with this statically generated code."] pub fn is_codegen_valid_for(metadata: &::subxt::ext::subxt_core::Metadata) -> bool { @@ -1908,9 +1889,9 @@ pub mod api { .hash(); runtime_metadata_hash == [ - 107u8, 158u8, 146u8, 35u8, 208u8, 129u8, 35u8, 224u8, 13u8, 192u8, 225u8, 67u8, - 122u8, 189u8, 128u8, 58u8, 191u8, 243u8, 64u8, 57u8, 147u8, 111u8, 7u8, 172u8, - 109u8, 218u8, 91u8, 0u8, 95u8, 139u8, 152u8, 156u8, + 53u8, 129u8, 58u8, 80u8, 206u8, 16u8, 16u8, 174u8, 40u8, 220u8, 39u8, 54u8, 251u8, + 156u8, 62u8, 164u8, 173u8, 27u8, 212u8, 17u8, 101u8, 75u8, 240u8, 191u8, 8u8, + 117u8, 25u8, 64u8, 75u8, 159u8, 128u8, 50u8, ] } pub mod system { @@ -1932,7 +1913,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1962,7 +1942,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -1989,7 +1968,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -2017,7 +1995,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -2048,7 +2025,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -2078,7 +2054,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -2107,7 +2082,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -2140,7 +2114,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -2168,7 +2141,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -2198,7 +2170,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -2232,7 +2203,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -2501,7 +2471,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "An extrinsic completed successfully."] @@ -2524,7 +2493,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "An extrinsic failed."] @@ -2549,7 +2517,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "`:code` was updated."] @@ -2566,7 +2533,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "A new account was created."] @@ -2589,7 +2555,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "An account was reaped."] @@ -2612,7 +2577,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "On on-chain remark happened."] @@ -2637,7 +2601,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "An upgrade was authorized."] @@ -3067,9 +3030,9 @@ pub mod api { "Events", (), [ - 179u8, 124u8, 24u8, 183u8, 126u8, 25u8, 165u8, 146u8, 72u8, 120u8, - 71u8, 188u8, 73u8, 89u8, 23u8, 209u8, 152u8, 128u8, 21u8, 94u8, 16u8, - 108u8, 21u8, 39u8, 129u8, 2u8, 9u8, 67u8, 219u8, 244u8, 115u8, 58u8, + 12u8, 177u8, 221u8, 43u8, 135u8, 65u8, 120u8, 166u8, 136u8, 51u8, 30u8, + 179u8, 152u8, 64u8, 148u8, 248u8, 131u8, 6u8, 43u8, 95u8, 183u8, 208u8, + 232u8, 167u8, 103u8, 172u8, 55u8, 224u8, 119u8, 34u8, 0u8, 96u8, ], ) } @@ -3396,7 +3359,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -3566,107 +3528,12 @@ pub mod api { } } } - pub mod aura { - use super::{root_mod, runtime_types}; - pub mod storage { - use super::runtime_types; - pub mod types { - use super::runtime_types; - pub mod authorities { - use super::runtime_types; - pub type Authorities = - runtime_types::bounded_collections::bounded_vec::BoundedVec< - runtime_types::sp_consensus_aura::sr25519::app_sr25519::Public, - >; - } - pub mod current_slot { - use super::runtime_types; - pub type CurrentSlot = runtime_types::sp_consensus_slots::Slot; - } - } - pub struct StorageApi; - impl StorageApi { - #[doc = " The current authority set."] - pub fn authorities( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::authorities::Authorities, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Aura", - "Authorities", - (), - [ - 95u8, 52u8, 203u8, 53u8, 254u8, 107u8, 134u8, 122u8, 95u8, 253u8, 51u8, - 137u8, 142u8, 106u8, 237u8, 248u8, 159u8, 80u8, 41u8, 233u8, 137u8, - 133u8, 13u8, 217u8, 176u8, 88u8, 132u8, 199u8, 241u8, 47u8, 125u8, - 27u8, - ], - ) - } - #[doc = " The current slot of this block."] - #[doc = ""] - #[doc = " This will be set in `on_initialize`."] - pub fn current_slot( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::current_slot::CurrentSlot, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Aura", - "CurrentSlot", - (), - [ - 112u8, 199u8, 115u8, 248u8, 217u8, 242u8, 45u8, 231u8, 178u8, 53u8, - 236u8, 167u8, 219u8, 238u8, 81u8, 243u8, 39u8, 140u8, 68u8, 19u8, - 201u8, 169u8, 211u8, 133u8, 135u8, 213u8, 150u8, 105u8, 60u8, 252u8, - 43u8, 57u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The slot duration Aura should run with, expressed in milliseconds."] - #[doc = " The effective value of this type should not change while the chain is running."] - #[doc = ""] - #[doc = " For backwards compatibility either use [`MinimumPeriodTimesTwo`] or a const."] - pub fn slot_duration( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u64, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "Aura", - "SlotDuration", - [ - 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, - 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, - 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, - 246u8, - ], - ) - } - } - } - } - pub mod grandpa { + pub mod session { use super::{root_mod, runtime_types}; - #[doc = "The `Error` enum of this pallet."] - pub type Error = runtime_types::pallet_grandpa::pallet::Error; + #[doc = "Error for the session pallet."] + pub type Error = runtime_types::pallet_session::pallet::Error; #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::pallet_grandpa::pallet::Call; + pub type Call = runtime_types::pallet_session::pallet::Call; pub mod calls { use super::{root_mod, runtime_types}; type DispatchError = runtime_types::sp_runtime::DispatchError; @@ -3680,78 +3547,34 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Report voter equivocation/misbehavior. This method will verify the"] - #[doc = "equivocation proof and validate the given key ownership proof"] - #[doc = "against the extracted offender. If both are valid, the offence"] - #[doc = "will be reported."] - pub struct ReportEquivocation { - pub equivocation_proof: ::subxt::ext::subxt_core::alloc::boxed::Box< - report_equivocation::EquivocationProof, - >, - pub key_owner_proof: report_equivocation::KeyOwnerProof, - } - pub mod report_equivocation { - use super::runtime_types; - pub type EquivocationProof = - runtime_types::sp_consensus_grandpa::EquivocationProof< - ::subxt::ext::subxt_core::utils::H256, - ::core::primitive::u32, - >; - pub type KeyOwnerProof = runtime_types::sp_core::Void; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ReportEquivocation { - const PALLET: &'static str = "Grandpa"; - const CALL: &'static str = "report_equivocation"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, - :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Report voter equivocation/misbehavior. This method will verify the"] - #[doc = "equivocation proof and validate the given key ownership proof"] - #[doc = "against the extracted offender. If both are valid, the offence"] - #[doc = "will be reported."] + #[doc = "Sets the session key(s) of the function caller to `keys`."] + #[doc = "Allows an account to set its session key prior to becoming a validator."] + #[doc = "This doesn't take effect until the next session."] #[doc = ""] - #[doc = "This extrinsic must be called unsigned and it is expected that only"] - #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] - #[doc = "if the block author is defined it will be defined as the equivocation"] - #[doc = "reporter."] - pub struct ReportEquivocationUnsigned { - pub equivocation_proof: ::subxt::ext::subxt_core::alloc::boxed::Box< - report_equivocation_unsigned::EquivocationProof, - >, - pub key_owner_proof: report_equivocation_unsigned::KeyOwnerProof, + #[doc = "The dispatch origin of this function must be signed."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is"] + #[doc = " fixed."] + pub struct SetKeys { + pub keys: set_keys::Keys, + pub proof: set_keys::Proof, } - pub mod report_equivocation_unsigned { + pub mod set_keys { use super::runtime_types; - pub type EquivocationProof = - runtime_types::sp_consensus_grandpa::EquivocationProof< - ::subxt::ext::subxt_core::utils::H256, - ::core::primitive::u32, - >; - pub type KeyOwnerProof = runtime_types::sp_core::Void; + pub type Keys = runtime_types::sxt_runtime::opaque::SessionKeys; + pub type Proof = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ReportEquivocationUnsigned { - const PALLET: &'static str = "Grandpa"; - const CALL: &'static str = "report_equivocation_unsigned"; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetKeys { + const PALLET: &'static str = "Session"; + const CALL: &'static str = "set_keys"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, @@ -3761,110 +3584,948 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Note that the current authority set of the GRANDPA finality gadget has stalled."] + #[doc = "Removes any session key(s) of the function caller."] #[doc = ""] - #[doc = "This will trigger a forced authority set change at the beginning of the next session, to"] - #[doc = "be enacted `delay` blocks after that. The `delay` should be high enough to safely assume"] - #[doc = "that the block signalling the forced change will not be re-orged e.g. 1000 blocks."] - #[doc = "The block production rate (which may be slowed down because of finality lagging) should"] - #[doc = "be taken into account when choosing the `delay`. The GRANDPA voters based on the new"] - #[doc = "authority will start voting on top of `best_finalized_block_number` for new finalized"] - #[doc = "blocks. `best_finalized_block_number` should be the highest of the latest finalized"] - #[doc = "block of all validators of the new authority set."] + #[doc = "This doesn't take effect until the next session."] #[doc = ""] - #[doc = "Only callable by root."] - pub struct NoteStalled { - pub delay: note_stalled::Delay, - pub best_finalized_block_number: note_stalled::BestFinalizedBlockNumber, - } - pub mod note_stalled { - use super::runtime_types; - pub type Delay = ::core::primitive::u32; - pub type BestFinalizedBlockNumber = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for NoteStalled { - const PALLET: &'static str = "Grandpa"; - const CALL: &'static str = "note_stalled"; + #[doc = "The dispatch origin of this function must be Signed and the account must be either be"] + #[doc = "convertible to a validator ID using the chain's typical addressing system (this usually"] + #[doc = "means being a controller account) or directly convertible into a validator ID (which"] + #[doc = "usually means being a stash account)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)` in number of key types. Actual cost depends on the number of length of"] + #[doc = " `T::Keys::key_ids()` which is fixed."] + pub struct PurgeKeys; + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for PurgeKeys { + const PALLET: &'static str = "Session"; + const CALL: &'static str = "purge_keys"; } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Report voter equivocation/misbehavior. This method will verify the"] - #[doc = "equivocation proof and validate the given key ownership proof"] - #[doc = "against the extracted offender. If both are valid, the offence"] - #[doc = "will be reported."] - pub fn report_equivocation( + #[doc = "Sets the session key(s) of the function caller to `keys`."] + #[doc = "Allows an account to set its session key prior to becoming a validator."] + #[doc = "This doesn't take effect until the next session."] + #[doc = ""] + #[doc = "The dispatch origin of this function must be signed."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is"] + #[doc = " fixed."] + pub fn set_keys( &self, - equivocation_proof: types::report_equivocation::EquivocationProof, - key_owner_proof: types::report_equivocation::KeyOwnerProof, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + keys: types::set_keys::Keys, + proof: types::set_keys::Proof, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Grandpa", - "report_equivocation", - types::ReportEquivocation { - equivocation_proof: ::subxt::ext::subxt_core::alloc::boxed::Box::new( - equivocation_proof, - ), - key_owner_proof, - }, + "Session", + "set_keys", + types::SetKeys { keys, proof }, [ - 187u8, 224u8, 115u8, 5u8, 236u8, 32u8, 180u8, 155u8, 218u8, 109u8, - 238u8, 253u8, 30u8, 225u8, 4u8, 225u8, 132u8, 232u8, 243u8, 54u8, 56u8, - 158u8, 94u8, 192u8, 94u8, 206u8, 189u8, 61u8, 14u8, 49u8, 48u8, 131u8, + 48u8, 188u8, 0u8, 161u8, 245u8, 138u8, 159u8, 146u8, 33u8, 52u8, 30u8, + 20u8, 17u8, 25u8, 176u8, 221u8, 45u8, 5u8, 84u8, 75u8, 108u8, 142u8, + 120u8, 102u8, 70u8, 9u8, 199u8, 158u8, 39u8, 155u8, 125u8, 28u8, ], ) } - #[doc = "Report voter equivocation/misbehavior. This method will verify the"] - #[doc = "equivocation proof and validate the given key ownership proof"] - #[doc = "against the extracted offender. If both are valid, the offence"] - #[doc = "will be reported."] + #[doc = "Removes any session key(s) of the function caller."] #[doc = ""] - #[doc = "This extrinsic must be called unsigned and it is expected that only"] - #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] - #[doc = "if the block author is defined it will be defined as the equivocation"] - #[doc = "reporter."] - pub fn report_equivocation_unsigned( + #[doc = "This doesn't take effect until the next session."] + #[doc = ""] + #[doc = "The dispatch origin of this function must be Signed and the account must be either be"] + #[doc = "convertible to a validator ID using the chain's typical addressing system (this usually"] + #[doc = "means being a controller account) or directly convertible into a validator ID (which"] + #[doc = "usually means being a stash account)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)` in number of key types. Actual cost depends on the number of length of"] + #[doc = " `T::Keys::key_ids()` which is fixed."] + pub fn purge_keys( &self, - equivocation_proof: types::report_equivocation_unsigned::EquivocationProof, - key_owner_proof: types::report_equivocation_unsigned::KeyOwnerProof, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< - types::ReportEquivocationUnsigned, - > { + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "Grandpa", - "report_equivocation_unsigned", - types::ReportEquivocationUnsigned { - equivocation_proof: ::subxt::ext::subxt_core::alloc::boxed::Box::new( - equivocation_proof, - ), - key_owner_proof, - }, + "Session", + "purge_keys", + types::PurgeKeys {}, [ - 98u8, 103u8, 6u8, 54u8, 0u8, 200u8, 166u8, 163u8, 202u8, 45u8, 131u8, - 226u8, 114u8, 166u8, 237u8, 174u8, 207u8, 214u8, 2u8, 227u8, 32u8, - 166u8, 47u8, 83u8, 166u8, 239u8, 232u8, 72u8, 224u8, 242u8, 156u8, - 44u8, + 215u8, 204u8, 146u8, 236u8, 32u8, 78u8, 198u8, 79u8, 85u8, 214u8, 15u8, + 151u8, 158u8, 31u8, 146u8, 119u8, 119u8, 204u8, 151u8, 169u8, 226u8, + 67u8, 217u8, 39u8, 241u8, 245u8, 203u8, 240u8, 203u8, 172u8, 16u8, + 209u8, ], ) } - #[doc = "Note that the current authority set of the GRANDPA finality gadget has stalled."] - #[doc = ""] - #[doc = "This will trigger a forced authority set change at the beginning of the next session, to"] - #[doc = "be enacted `delay` blocks after that. The `delay` should be high enough to safely assume"] - #[doc = "that the block signalling the forced change will not be re-orged e.g. 1000 blocks."] - #[doc = "The block production rate (which may be slowed down because of finality lagging) should"] - #[doc = "be taken into account when choosing the `delay`. The GRANDPA voters based on the new"] - #[doc = "authority will start voting on top of `best_finalized_block_number` for new finalized"] - #[doc = "blocks. `best_finalized_block_number` should be the highest of the latest finalized"] - #[doc = "block of all validators of the new authority set."] + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_session::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "New session has happened. Note that the argument is the session index, not the"] + #[doc = "block number as the type might suggest."] + pub struct NewSession { + pub session_index: new_session::SessionIndex, + } + pub mod new_session { + use super::runtime_types; + pub type SessionIndex = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for NewSession { + const PALLET: &'static str = "Session"; + const EVENT: &'static str = "NewSession"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod validators { + use super::runtime_types; + pub type Validators = ::subxt::ext::subxt_core::alloc::vec::Vec< + ::subxt::ext::subxt_core::utils::AccountId32, + >; + } + pub mod current_index { + use super::runtime_types; + pub type CurrentIndex = ::core::primitive::u32; + } + pub mod queued_changed { + use super::runtime_types; + pub type QueuedChanged = ::core::primitive::bool; + } + pub mod queued_keys { + use super::runtime_types; + pub type QueuedKeys = ::subxt::ext::subxt_core::alloc::vec::Vec<( + ::subxt::ext::subxt_core::utils::AccountId32, + runtime_types::sxt_runtime::opaque::SessionKeys, + )>; + } + pub mod disabled_validators { + use super::runtime_types; + pub type DisabledValidators = + ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u32>; + } + pub mod next_keys { + use super::runtime_types; + pub type NextKeys = runtime_types::sxt_runtime::opaque::SessionKeys; + pub type Param0 = ::subxt::ext::subxt_core::utils::AccountId32; + } + pub mod key_owner { + use super::runtime_types; + pub type KeyOwner = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Param0 = runtime_types::sp_core::crypto::KeyTypeId; + pub type Param1 = [::core::primitive::u8]; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The current set of validators."] + pub fn validators( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::validators::Validators, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "Validators", + (), + [ + 50u8, 86u8, 154u8, 222u8, 249u8, 209u8, 156u8, 22u8, 155u8, 25u8, + 133u8, 194u8, 210u8, 50u8, 38u8, 28u8, 139u8, 201u8, 90u8, 139u8, + 115u8, 12u8, 12u8, 141u8, 4u8, 178u8, 201u8, 241u8, 223u8, 234u8, 6u8, + 86u8, + ], + ) + } + #[doc = " Current index of the session."] + pub fn current_index( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::current_index::CurrentIndex, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "CurrentIndex", + (), + [ + 167u8, 151u8, 125u8, 150u8, 159u8, 21u8, 78u8, 217u8, 237u8, 183u8, + 135u8, 65u8, 187u8, 114u8, 188u8, 206u8, 16u8, 32u8, 69u8, 208u8, + 134u8, 159u8, 232u8, 224u8, 243u8, 27u8, 31u8, 166u8, 145u8, 44u8, + 221u8, 230u8, + ], + ) + } + #[doc = " True if the underlying economic identities or weighting behind the validators"] + #[doc = " has changed in the queued validator set."] + pub fn queued_changed( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::queued_changed::QueuedChanged, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "QueuedChanged", + (), + [ + 184u8, 137u8, 224u8, 137u8, 31u8, 236u8, 95u8, 164u8, 102u8, 225u8, + 198u8, 227u8, 140u8, 37u8, 113u8, 57u8, 59u8, 4u8, 202u8, 102u8, 117u8, + 36u8, 226u8, 64u8, 113u8, 141u8, 199u8, 111u8, 99u8, 144u8, 198u8, + 153u8, + ], + ) + } + #[doc = " The queued keys for the next session. When the next session begins, these keys"] + #[doc = " will be used to determine the validator's session keys."] + pub fn queued_keys( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::queued_keys::QueuedKeys, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "QueuedKeys", + (), + [ + 162u8, 181u8, 111u8, 231u8, 243u8, 120u8, 191u8, 220u8, 10u8, 186u8, + 5u8, 41u8, 158u8, 179u8, 194u8, 79u8, 23u8, 207u8, 237u8, 149u8, 110u8, + 217u8, 252u8, 98u8, 152u8, 64u8, 200u8, 133u8, 97u8, 236u8, 143u8, + 91u8, + ], + ) + } + #[doc = " Indices of disabled validators."] + #[doc = ""] + #[doc = " The vec is always kept sorted so that we can find whether a given validator is"] + #[doc = " disabled using binary search. It gets cleared when `on_session_ending` returns"] + #[doc = " a new set of identities."] + pub fn disabled_validators( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::disabled_validators::DisabledValidators, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "DisabledValidators", + (), + [ + 213u8, 19u8, 168u8, 234u8, 187u8, 200u8, 180u8, 97u8, 234u8, 189u8, + 36u8, 233u8, 158u8, 184u8, 45u8, 35u8, 129u8, 213u8, 133u8, 8u8, 104u8, + 183u8, 46u8, 68u8, 154u8, 240u8, 132u8, 22u8, 247u8, 11u8, 54u8, 221u8, + ], + ) + } + #[doc = " The next session keys for a validator."] + pub fn next_keys_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::next_keys::NextKeys, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "NextKeys", + (), + [ + 165u8, 93u8, 209u8, 105u8, 147u8, 150u8, 218u8, 68u8, 116u8, 100u8, + 43u8, 135u8, 232u8, 100u8, 184u8, 210u8, 169u8, 240u8, 154u8, 169u8, + 28u8, 194u8, 180u8, 162u8, 148u8, 192u8, 113u8, 236u8, 62u8, 99u8, + 148u8, 187u8, + ], + ) + } + #[doc = " The next session keys for a validator."] + pub fn next_keys( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::next_keys::Param0, + >, + types::next_keys::NextKeys, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "NextKeys", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new( + _0.borrow(), + ), + [ + 165u8, 93u8, 209u8, 105u8, 147u8, 150u8, 218u8, 68u8, 116u8, 100u8, + 43u8, 135u8, 232u8, 100u8, 184u8, 210u8, 169u8, 240u8, 154u8, 169u8, + 28u8, 194u8, 180u8, 162u8, 148u8, 192u8, 113u8, 236u8, 62u8, 99u8, + 148u8, 187u8, + ], + ) + } + #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] + pub fn key_owner_iter( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::key_owner::KeyOwner, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "KeyOwner", + (), + [ + 217u8, 204u8, 21u8, 114u8, 247u8, 129u8, 32u8, 242u8, 93u8, 91u8, + 253u8, 253u8, 248u8, 90u8, 12u8, 202u8, 195u8, 25u8, 18u8, 100u8, + 253u8, 109u8, 88u8, 77u8, 217u8, 140u8, 51u8, 40u8, 118u8, 35u8, 107u8, + 206u8, + ], + ) + } + #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] + pub fn key_owner_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::key_owner::Param0, + >, + types::key_owner::KeyOwner, + (), + (), + ::subxt::ext::subxt_core::utils::Yes, + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "KeyOwner", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new( + _0.borrow(), + ), + [ + 217u8, 204u8, 21u8, 114u8, 247u8, 129u8, 32u8, 242u8, 93u8, 91u8, + 253u8, 253u8, 248u8, 90u8, 12u8, 202u8, 195u8, 25u8, 18u8, 100u8, + 253u8, 109u8, 88u8, 77u8, 217u8, 140u8, 51u8, 40u8, 118u8, 35u8, 107u8, + 206u8, + ], + ) + } + #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] + pub fn key_owner( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::key_owner::Param0, + >, + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::key_owner::Param1, + >, + ), + types::key_owner::KeyOwner, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "KeyOwner", + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new( + _0.borrow(), + ), + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new( + _1.borrow(), + ), + ), + [ + 217u8, 204u8, 21u8, 114u8, 247u8, 129u8, 32u8, 242u8, 93u8, 91u8, + 253u8, 253u8, 248u8, 90u8, 12u8, 202u8, 195u8, 25u8, 18u8, 100u8, + 253u8, 109u8, 88u8, 77u8, 217u8, 140u8, 51u8, 40u8, 118u8, 35u8, 107u8, + 206u8, + ], + ) + } + } + } + } + pub mod validators { + use super::{root_mod, runtime_types}; + #[doc = "Errors that can be returned by this pallet."] + pub type Error = runtime_types::pallet_validators::pallet::Error; + #[doc = "The pallet's dispatchable functions ([`Call`]s)."] + pub type Call = runtime_types::pallet_validators::pallet::Call; + pub mod calls { + use super::{root_mod, runtime_types}; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Add a new validator."] + pub struct AddValidator { + pub validator_id: add_validator::ValidatorId, + } + pub mod add_validator { + use super::runtime_types; + pub type ValidatorId = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for AddValidator { + const PALLET: &'static str = "Validators"; + const CALL: &'static str = "add_validator"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Remove a validator."] + pub struct RemoveValidator { + pub validator_id: remove_validator::ValidatorId, + } + pub mod remove_validator { + use super::runtime_types; + pub type ValidatorId = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemoveValidator { + const PALLET: &'static str = "Validators"; + const CALL: &'static str = "remove_validator"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Add a new validator."] + pub fn add_validator( + &self, + validator_id: types::add_validator::ValidatorId, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Validators", + "add_validator", + types::AddValidator { validator_id }, + [ + 126u8, 146u8, 187u8, 183u8, 159u8, 201u8, 223u8, 160u8, 19u8, 193u8, + 112u8, 251u8, 195u8, 206u8, 104u8, 98u8, 246u8, 104u8, 40u8, 122u8, + 86u8, 94u8, 97u8, 190u8, 47u8, 207u8, 221u8, 71u8, 119u8, 50u8, 79u8, + 68u8, + ], + ) + } + #[doc = "Remove a validator."] + pub fn remove_validator( + &self, + validator_id: types::remove_validator::ValidatorId, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Validators", + "remove_validator", + types::RemoveValidator { validator_id }, + [ + 83u8, 26u8, 215u8, 89u8, 19u8, 91u8, 208u8, 249u8, 201u8, 127u8, 230u8, + 207u8, 191u8, 215u8, 193u8, 206u8, 55u8, 139u8, 121u8, 133u8, 42u8, + 97u8, 68u8, 90u8, 210u8, 81u8, 74u8, 126u8, 60u8, 80u8, 242u8, 132u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_validators::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "New validator addition initiated. Effective in ~2 sessions."] + pub struct ValidatorAdditionInitiated(pub validator_addition_initiated::Field0); + pub mod validator_addition_initiated { + use super::runtime_types; + pub type Field0 = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for ValidatorAdditionInitiated { + const PALLET: &'static str = "Validators"; + const EVENT: &'static str = "ValidatorAdditionInitiated"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "Validator removal initiated. Effective in ~2 sessions."] + pub struct ValidatorRemovalInitiated(pub validator_removal_initiated::Field0); + pub mod validator_removal_initiated { + use super::runtime_types; + pub type Field0 = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for ValidatorRemovalInitiated { + const PALLET: &'static str = "Validators"; + const EVENT: &'static str = "ValidatorRemovalInitiated"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod something { + use super::runtime_types; + pub type Something = ::core::primitive::u32; + } + pub mod validators { + use super::runtime_types; + pub type Validators = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt::ext::subxt_core::utils::AccountId32, + >; + } + pub mod offline_validators { + use super::runtime_types; + pub type OfflineValidators = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt::ext::subxt_core::utils::AccountId32, + >; + } + } + pub struct StorageApi; + impl StorageApi { + pub fn something( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::something::Something, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Validators", + "Something", + (), + [ + 6u8, 80u8, 50u8, 15u8, 9u8, 111u8, 229u8, 130u8, 206u8, 91u8, 123u8, + 1u8, 210u8, 243u8, 237u8, 67u8, 231u8, 115u8, 161u8, 63u8, 208u8, + 123u8, 139u8, 55u8, 186u8, 125u8, 167u8, 229u8, 229u8, 107u8, 235u8, + 56u8, + ], + ) + } + pub fn validators( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::validators::Validators, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Validators", + "Validators", + (), + [ + 161u8, 172u8, 13u8, 250u8, 171u8, 85u8, 70u8, 135u8, 215u8, 32u8, + 156u8, 108u8, 145u8, 253u8, 40u8, 255u8, 190u8, 23u8, 7u8, 110u8, + 245u8, 25u8, 246u8, 18u8, 7u8, 143u8, 227u8, 73u8, 247u8, 255u8, 252u8, + 94u8, + ], + ) + } + pub fn offline_validators( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::offline_validators::OfflineValidators, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Validators", + "OfflineValidators", + (), + [ + 244u8, 152u8, 193u8, 115u8, 100u8, 174u8, 85u8, 55u8, 56u8, 97u8, 89u8, + 80u8, 105u8, 160u8, 8u8, 34u8, 145u8, 38u8, 127u8, 198u8, 24u8, 85u8, + 49u8, 59u8, 173u8, 19u8, 90u8, 80u8, 233u8, 90u8, 95u8, 252u8, + ], + ) + } + } + } + } + pub mod aura { + use super::{root_mod, runtime_types}; + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod authorities { + use super::runtime_types; + pub type Authorities = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::sp_consensus_aura::sr25519::app_sr25519::Public, + >; + } + pub mod current_slot { + use super::runtime_types; + pub type CurrentSlot = runtime_types::sp_consensus_slots::Slot; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The current authority set."] + pub fn authorities( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::authorities::Authorities, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Aura", + "Authorities", + (), + [ + 95u8, 52u8, 203u8, 53u8, 254u8, 107u8, 134u8, 122u8, 95u8, 253u8, 51u8, + 137u8, 142u8, 106u8, 237u8, 248u8, 159u8, 80u8, 41u8, 233u8, 137u8, + 133u8, 13u8, 217u8, 176u8, 88u8, 132u8, 199u8, 241u8, 47u8, 125u8, + 27u8, + ], + ) + } + #[doc = " The current slot of this block."] + #[doc = ""] + #[doc = " This will be set in `on_initialize`."] + pub fn current_slot( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::current_slot::CurrentSlot, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Aura", + "CurrentSlot", + (), + [ + 112u8, 199u8, 115u8, 248u8, 217u8, 242u8, 45u8, 231u8, 178u8, 53u8, + 236u8, 167u8, 219u8, 238u8, 81u8, 243u8, 39u8, 140u8, 68u8, 19u8, + 201u8, 169u8, 211u8, 133u8, 135u8, 213u8, 150u8, 105u8, 60u8, 252u8, + 43u8, 57u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The slot duration Aura should run with, expressed in milliseconds."] + #[doc = " The effective value of this type should not change while the chain is running."] + #[doc = ""] + #[doc = " For backwards compatibility either use [`MinimumPeriodTimesTwo`] or a const."] + pub fn slot_duration( + &self, + ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< + ::core::primitive::u64, + > { + ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + "Aura", + "SlotDuration", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + } + } + } + pub mod grandpa { + use super::{root_mod, runtime_types}; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_grandpa::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_grandpa::pallet::Call; + pub mod calls { + use super::{root_mod, runtime_types}; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Report voter equivocation/misbehavior. This method will verify the"] + #[doc = "equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence"] + #[doc = "will be reported."] + pub struct ReportEquivocation { + pub equivocation_proof: ::subxt::ext::subxt_core::alloc::boxed::Box< + report_equivocation::EquivocationProof, + >, + pub key_owner_proof: report_equivocation::KeyOwnerProof, + } + pub mod report_equivocation { + use super::runtime_types; + pub type EquivocationProof = + runtime_types::sp_consensus_grandpa::EquivocationProof< + ::subxt::ext::subxt_core::utils::H256, + ::core::primitive::u32, + >; + pub type KeyOwnerProof = runtime_types::sp_core::Void; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ReportEquivocation { + const PALLET: &'static str = "Grandpa"; + const CALL: &'static str = "report_equivocation"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Report voter equivocation/misbehavior. This method will verify the"] + #[doc = "equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence"] + #[doc = "will be reported."] + #[doc = ""] + #[doc = "This extrinsic must be called unsigned and it is expected that only"] + #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] + #[doc = "if the block author is defined it will be defined as the equivocation"] + #[doc = "reporter."] + pub struct ReportEquivocationUnsigned { + pub equivocation_proof: ::subxt::ext::subxt_core::alloc::boxed::Box< + report_equivocation_unsigned::EquivocationProof, + >, + pub key_owner_proof: report_equivocation_unsigned::KeyOwnerProof, + } + pub mod report_equivocation_unsigned { + use super::runtime_types; + pub type EquivocationProof = + runtime_types::sp_consensus_grandpa::EquivocationProof< + ::subxt::ext::subxt_core::utils::H256, + ::core::primitive::u32, + >; + pub type KeyOwnerProof = runtime_types::sp_core::Void; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for ReportEquivocationUnsigned { + const PALLET: &'static str = "Grandpa"; + const CALL: &'static str = "report_equivocation_unsigned"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Note that the current authority set of the GRANDPA finality gadget has stalled."] + #[doc = ""] + #[doc = "This will trigger a forced authority set change at the beginning of the next session, to"] + #[doc = "be enacted `delay` blocks after that. The `delay` should be high enough to safely assume"] + #[doc = "that the block signalling the forced change will not be re-orged e.g. 1000 blocks."] + #[doc = "The block production rate (which may be slowed down because of finality lagging) should"] + #[doc = "be taken into account when choosing the `delay`. The GRANDPA voters based on the new"] + #[doc = "authority will start voting on top of `best_finalized_block_number` for new finalized"] + #[doc = "blocks. `best_finalized_block_number` should be the highest of the latest finalized"] + #[doc = "block of all validators of the new authority set."] + #[doc = ""] + #[doc = "Only callable by root."] + pub struct NoteStalled { + pub delay: note_stalled::Delay, + pub best_finalized_block_number: note_stalled::BestFinalizedBlockNumber, + } + pub mod note_stalled { + use super::runtime_types; + pub type Delay = ::core::primitive::u32; + pub type BestFinalizedBlockNumber = ::core::primitive::u32; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for NoteStalled { + const PALLET: &'static str = "Grandpa"; + const CALL: &'static str = "note_stalled"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Report voter equivocation/misbehavior. This method will verify the"] + #[doc = "equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence"] + #[doc = "will be reported."] + pub fn report_equivocation( + &self, + equivocation_proof: types::report_equivocation::EquivocationProof, + key_owner_proof: types::report_equivocation::KeyOwnerProof, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Grandpa", + "report_equivocation", + types::ReportEquivocation { + equivocation_proof: ::subxt::ext::subxt_core::alloc::boxed::Box::new( + equivocation_proof, + ), + key_owner_proof, + }, + [ + 187u8, 224u8, 115u8, 5u8, 236u8, 32u8, 180u8, 155u8, 218u8, 109u8, + 238u8, 253u8, 30u8, 225u8, 4u8, 225u8, 132u8, 232u8, 243u8, 54u8, 56u8, + 158u8, 94u8, 192u8, 94u8, 206u8, 189u8, 61u8, 14u8, 49u8, 48u8, 131u8, + ], + ) + } + #[doc = "Report voter equivocation/misbehavior. This method will verify the"] + #[doc = "equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence"] + #[doc = "will be reported."] + #[doc = ""] + #[doc = "This extrinsic must be called unsigned and it is expected that only"] + #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] + #[doc = "if the block author is defined it will be defined as the equivocation"] + #[doc = "reporter."] + pub fn report_equivocation_unsigned( + &self, + equivocation_proof: types::report_equivocation_unsigned::EquivocationProof, + key_owner_proof: types::report_equivocation_unsigned::KeyOwnerProof, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< + types::ReportEquivocationUnsigned, + > { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Grandpa", + "report_equivocation_unsigned", + types::ReportEquivocationUnsigned { + equivocation_proof: ::subxt::ext::subxt_core::alloc::boxed::Box::new( + equivocation_proof, + ), + key_owner_proof, + }, + [ + 98u8, 103u8, 6u8, 54u8, 0u8, 200u8, 166u8, 163u8, 202u8, 45u8, 131u8, + 226u8, 114u8, 166u8, 237u8, 174u8, 207u8, 214u8, 2u8, 227u8, 32u8, + 166u8, 47u8, 83u8, 166u8, 239u8, 232u8, 72u8, 224u8, 242u8, 156u8, + 44u8, + ], + ) + } + #[doc = "Note that the current authority set of the GRANDPA finality gadget has stalled."] + #[doc = ""] + #[doc = "This will trigger a forced authority set change at the beginning of the next session, to"] + #[doc = "be enacted `delay` blocks after that. The `delay` should be high enough to safely assume"] + #[doc = "that the block signalling the forced change will not be re-orged e.g. 1000 blocks."] + #[doc = "The block production rate (which may be slowed down because of finality lagging) should"] + #[doc = "be taken into account when choosing the `delay`. The GRANDPA voters based on the new"] + #[doc = "authority will start voting on top of `best_finalized_block_number` for new finalized"] + #[doc = "blocks. `best_finalized_block_number` should be the highest of the latest finalized"] + #[doc = "block of all validators of the new authority set."] #[doc = ""] #[doc = "Only callable by root."] pub fn note_stalled( @@ -3901,7 +4562,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "New authority set has been applied."] @@ -3927,7 +4587,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Current authority set has been paused."] @@ -3944,7 +4603,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Current authority set has been resumed."] @@ -4275,7 +4933,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -4314,7 +4971,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -4353,7 +5009,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -4391,7 +5046,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -4437,7 +5091,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -4471,7 +5124,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -4507,7 +5159,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -4542,7 +5193,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -4576,7 +5226,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -4838,7 +5487,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "An account was created with some free balance."] @@ -4863,7 +5511,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] @@ -4889,7 +5536,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Transfer succeeded."] @@ -4916,7 +5562,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "A balance was set by root."] @@ -4941,7 +5586,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Some balance was reserved (moved from free to reserved)."] @@ -4966,7 +5610,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Some balance was unreserved (moved from reserved to free)."] @@ -4991,7 +5634,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Some balance was moved from the reserve of the first account to the second account."] @@ -5022,7 +5664,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Some amount was deposited (e.g. for transaction fees)."] @@ -5047,7 +5688,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] @@ -5072,7 +5712,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Some amount was removed from the account (e.g. for misbehavior)."] @@ -5097,7 +5736,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Some amount was minted into an account."] @@ -5122,7 +5760,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Some amount was burned from an account."] @@ -5147,7 +5784,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Some amount was suspended from an account (it can be restored later)."] @@ -5172,7 +5808,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Some amount was restored into an account."] @@ -5197,7 +5832,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "An account was upgraded."] @@ -5220,7 +5854,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Total issuance was increased by `amount`, creating a credit to be balanced."] @@ -5243,7 +5876,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Total issuance was decreased by `amount`, creating a debt to be balanced."] @@ -5266,7 +5898,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Some balance was locked."] @@ -5291,7 +5922,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Some balance was unlocked."] @@ -5316,7 +5946,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Some balance was frozen."] @@ -5341,7 +5970,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Some balance was thawed."] @@ -5366,7 +5994,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "The `TotalIssuance` was forcefully changed."] @@ -5881,7 +6508,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] @@ -6025,7 +6651,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -6052,7 +6677,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -6086,7 +6710,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -6117,7 +6740,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -6152,7 +6774,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -6183,10 +6804,9 @@ pub mod api { call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), }, [ - 121u8, 108u8, 175u8, 85u8, 201u8, 197u8, 89u8, 129u8, 221u8, 240u8, - 29u8, 162u8, 174u8, 216u8, 24u8, 247u8, 110u8, 44u8, 93u8, 238u8, 88u8, - 238u8, 214u8, 120u8, 117u8, 130u8, 241u8, 100u8, 176u8, 188u8, 9u8, - 178u8, + 116u8, 53u8, 235u8, 94u8, 68u8, 135u8, 79u8, 23u8, 148u8, 132u8, 127u8, + 50u8, 235u8, 139u8, 218u8, 45u8, 142u8, 3u8, 153u8, 162u8, 72u8, 211u8, + 16u8, 170u8, 84u8, 172u8, 40u8, 168u8, 70u8, 22u8, 188u8, 238u8, ], ) } @@ -6209,10 +6829,9 @@ pub mod api { weight, }, [ - 28u8, 103u8, 180u8, 200u8, 98u8, 83u8, 110u8, 252u8, 126u8, 67u8, - 206u8, 121u8, 157u8, 176u8, 42u8, 217u8, 49u8, 136u8, 130u8, 152u8, - 189u8, 53u8, 206u8, 128u8, 19u8, 193u8, 59u8, 136u8, 97u8, 136u8, - 117u8, 166u8, + 92u8, 64u8, 70u8, 108u8, 98u8, 219u8, 68u8, 26u8, 226u8, 11u8, 43u8, + 21u8, 135u8, 224u8, 190u8, 249u8, 20u8, 82u8, 252u8, 112u8, 89u8, 38u8, + 55u8, 201u8, 145u8, 67u8, 29u8, 177u8, 223u8, 236u8, 91u8, 96u8, ], ) } @@ -6252,10 +6871,9 @@ pub mod api { call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), }, [ - 172u8, 38u8, 215u8, 159u8, 53u8, 125u8, 226u8, 67u8, 122u8, 63u8, - 212u8, 168u8, 201u8, 233u8, 17u8, 167u8, 204u8, 229u8, 158u8, 132u8, - 234u8, 139u8, 241u8, 55u8, 23u8, 80u8, 172u8, 74u8, 131u8, 212u8, 62u8, - 81u8, + 108u8, 37u8, 145u8, 159u8, 232u8, 176u8, 12u8, 166u8, 94u8, 100u8, + 199u8, 224u8, 27u8, 77u8, 246u8, 8u8, 12u8, 114u8, 192u8, 214u8, 140u8, + 140u8, 89u8, 104u8, 92u8, 71u8, 107u8, 128u8, 114u8, 52u8, 153u8, 61u8, ], ) } @@ -6292,7 +6910,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "A sudo call just took place."] @@ -6316,7 +6933,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "The sudo key has been updated."] @@ -6326,250 +6942,29 @@ pub mod api { } pub mod key_changed { use super::runtime_types; - pub type Old = ::core::option::Option<::subxt::ext::subxt_core::utils::AccountId32>; - pub type New = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for KeyChanged { - const PALLET: &'static str = "Sudo"; - const EVENT: &'static str = "KeyChanged"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, - :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The key was permanently removed."] - pub struct KeyRemoved; - impl ::subxt::ext::subxt_core::events::StaticEvent for KeyRemoved { - const PALLET: &'static str = "Sudo"; - const EVENT: &'static str = "KeyRemoved"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, - :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A [sudo_as](Pallet::sudo_as) call just took place."] - pub struct SudoAsDone { - pub sudo_result: sudo_as_done::SudoResult, - } - pub mod sudo_as_done { - use super::runtime_types; - pub type SudoResult = - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for SudoAsDone { - const PALLET: &'static str = "Sudo"; - const EVENT: &'static str = "SudoAsDone"; - } - } - pub mod storage { - use super::runtime_types; - pub mod types { - use super::runtime_types; - pub mod key { - use super::runtime_types; - pub type Key = ::subxt::ext::subxt_core::utils::AccountId32; - } - } - pub struct StorageApi; - impl StorageApi { - #[doc = " The `AccountId` of the sudo key."] - pub fn key( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::key::Key, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Sudo", - "Key", - (), - [ - 72u8, 14u8, 225u8, 162u8, 205u8, 247u8, 227u8, 105u8, 116u8, 57u8, 4u8, - 31u8, 84u8, 137u8, 227u8, 228u8, 133u8, 245u8, 206u8, 227u8, 117u8, - 36u8, 252u8, 151u8, 107u8, 15u8, 180u8, 4u8, 4u8, 152u8, 195u8, 144u8, - ], - ) - } - } - } - } - pub mod template_module { - use super::{root_mod, runtime_types}; - #[doc = "Errors that can be returned by this pallet."] - #[doc = ""] - #[doc = "Errors tell users that something went wrong so it's important that their naming is"] - #[doc = "informative. Similar to events, error documentation is added to a node's metadata so it's"] - #[doc = "equally important that they have helpful documentation associated with them."] - #[doc = ""] - #[doc = "This type of runtime error can be up to 4 bytes in size should you want to return additional"] - #[doc = "information."] - pub type Error = runtime_types::pallet_template::pallet::Error; - #[doc = "The pallet's dispatchable functions ([`Call`]s)."] - #[doc = ""] - #[doc = "Dispatchable functions allows users to interact with the pallet and invoke state changes."] - #[doc = "These functions materialize as \"extrinsics\", which are often compared to transactions."] - #[doc = "They must always return a `DispatchResult` and be annotated with a weight and call index."] - #[doc = ""] - #[doc = "The [`call_index`] macro is used to explicitly"] - #[doc = "define an index for calls in the [`Call`] enum. This is useful for pallets that may"] - #[doc = "introduce new dispatchables over time. If the order of a dispatchable changes, its index"] - #[doc = "will also change which will break backwards compatibility."] - #[doc = ""] - #[doc = "The [`weight`] macro is used to assign a weight to each call."] - pub type Call = runtime_types::pallet_template::pallet::Call; - pub mod calls { - use super::{root_mod, runtime_types}; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, - :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "An example dispatchable that takes a single u32 value as a parameter, writes the value"] - #[doc = "to storage and emits an event."] - #[doc = ""] - #[doc = "It checks that the _origin_ for this call is _Signed_ and returns a dispatch"] - #[doc = "error if it isn't. Learn more about origins here: "] - pub struct DoSomething { - pub something: do_something::Something, - } - pub mod do_something { - use super::runtime_types; - pub type Something = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for DoSomething { - const PALLET: &'static str = "TemplateModule"; - const CALL: &'static str = "do_something"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, - :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "An example dispatchable that may throw a custom error."] - #[doc = ""] - #[doc = "It checks that the caller is a signed origin and reads the current value from the"] - #[doc = "`Something` storage item. If a current value exists, it is incremented by 1 and then"] - #[doc = "written back to storage."] - #[doc = ""] - #[doc = "## Errors"] - #[doc = ""] - #[doc = "The function will return an error under the following conditions:"] - #[doc = ""] - #[doc = "- If no value has been set ([`Error::NoneValue`])"] - #[doc = "- If incrementing the value in storage causes an arithmetic overflow"] - #[doc = " ([`Error::StorageOverflow`])"] - pub struct CauseError; - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CauseError { - const PALLET: &'static str = "TemplateModule"; - const CALL: &'static str = "cause_error"; - } + pub type Old = ::core::option::Option<::subxt::ext::subxt_core::utils::AccountId32>; + pub type New = ::subxt::ext::subxt_core::utils::AccountId32; } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "An example dispatchable that takes a single u32 value as a parameter, writes the value"] - #[doc = "to storage and emits an event."] - #[doc = ""] - #[doc = "It checks that the _origin_ for this call is _Signed_ and returns a dispatch"] - #[doc = "error if it isn't. Learn more about origins here: "] - pub fn do_something( - &self, - something: types::do_something::Something, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TemplateModule", - "do_something", - types::DoSomething { something }, - [ - 236u8, 120u8, 161u8, 55u8, 61u8, 88u8, 224u8, 28u8, 174u8, 255u8, 69u8, - 156u8, 44u8, 11u8, 255u8, 87u8, 183u8, 239u8, 120u8, 48u8, 187u8, - 157u8, 151u8, 49u8, 105u8, 193u8, 12u8, 1u8, 183u8, 58u8, 73u8, 4u8, - ], - ) - } - #[doc = "An example dispatchable that may throw a custom error."] - #[doc = ""] - #[doc = "It checks that the caller is a signed origin and reads the current value from the"] - #[doc = "`Something` storage item. If a current value exists, it is incremented by 1 and then"] - #[doc = "written back to storage."] - #[doc = ""] - #[doc = "## Errors"] - #[doc = ""] - #[doc = "The function will return an error under the following conditions:"] - #[doc = ""] - #[doc = "- If no value has been set ([`Error::NoneValue`])"] - #[doc = "- If incrementing the value in storage causes an arithmetic overflow"] - #[doc = " ([`Error::StorageOverflow`])"] - pub fn cause_error( - &self, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload - { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TemplateModule", - "cause_error", - types::CauseError {}, - [ - 29u8, 131u8, 81u8, 134u8, 218u8, 173u8, 12u8, 104u8, 19u8, 10u8, 117u8, - 192u8, 155u8, 3u8, 171u8, 11u8, 177u8, 248u8, 43u8, 252u8, 4u8, 46u8, - 244u8, 69u8, 220u8, 51u8, 188u8, 75u8, 165u8, 41u8, 16u8, 188u8, - ], - ) - } + impl ::subxt::ext::subxt_core::events::StaticEvent for KeyChanged { + const PALLET: &'static str = "Sudo"; + const EVENT: &'static str = "KeyChanged"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "The key was permanently removed."] + pub struct KeyRemoved; + impl ::subxt::ext::subxt_core::events::StaticEvent for KeyRemoved { + const PALLET: &'static str = "Sudo"; + const EVENT: &'static str = "KeyRemoved"; } - } - #[doc = "Events that functions in this pallet can emit."] - #[doc = ""] - #[doc = "Events are a simple means of indicating to the outside world (such as dApps, chain explorers"] - #[doc = "or other users) that some notable update in the runtime has occurred. In a FRAME pallet, the"] - #[doc = "documentation for each event field and its parameters is added to a node's metadata so it"] - #[doc = "can be used by external interfaces or tools."] - #[doc = ""] - #[doc = "\tThe `generate_deposit` macro generates a function on `Pallet` called `deposit_event` which"] - #[doc = "will convert the event type of your pallet into `RuntimeEvent` (declared in the pallet's"] - #[doc = "[`Config`] trait) and deposit it using [`frame_system::Pallet::deposit_event`]."] - pub type Event = runtime_types::pallet_template::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, @@ -6578,57 +6973,51 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A user has successfully set a new value."] - pub struct SomethingStored { - pub something: something_stored::Something, - pub who: something_stored::Who, + #[doc = "A [sudo_as](Pallet::sudo_as) call just took place."] + pub struct SudoAsDone { + pub sudo_result: sudo_as_done::SudoResult, } - pub mod something_stored { + pub mod sudo_as_done { use super::runtime_types; - pub type Something = ::core::primitive::u32; - pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type SudoResult = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; } - impl ::subxt::ext::subxt_core::events::StaticEvent for SomethingStored { - const PALLET: &'static str = "TemplateModule"; - const EVENT: &'static str = "SomethingStored"; + impl ::subxt::ext::subxt_core::events::StaticEvent for SudoAsDone { + const PALLET: &'static str = "Sudo"; + const EVENT: &'static str = "SudoAsDone"; } } pub mod storage { use super::runtime_types; pub mod types { use super::runtime_types; - pub mod something { + pub mod key { use super::runtime_types; - pub type Something = ::core::primitive::u32; + pub type Key = ::subxt::ext::subxt_core::utils::AccountId32; } } pub struct StorageApi; impl StorageApi { - #[doc = " A storage item for this pallet."] - #[doc = ""] - #[doc = " In this template, we are declaring a storage item called `Something` that stores a single"] - #[doc = " `u32` value. Learn more about runtime storage here: "] - pub fn something( + #[doc = " The `AccountId` of the sudo key."] + pub fn key( &self, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< (), - types::something::Something, + types::key::Key, ::subxt::ext::subxt_core::utils::Yes, (), (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TemplateModule", - "Something", + "Sudo", + "Key", (), [ - 6u8, 80u8, 50u8, 15u8, 9u8, 111u8, 229u8, 130u8, 206u8, 91u8, 123u8, - 1u8, 210u8, 243u8, 237u8, 67u8, 231u8, 115u8, 161u8, 63u8, 208u8, - 123u8, 139u8, 55u8, 186u8, 125u8, 167u8, 229u8, 229u8, 107u8, 235u8, - 56u8, + 72u8, 14u8, 225u8, 162u8, 205u8, 247u8, 227u8, 105u8, 116u8, 57u8, 4u8, + 31u8, 84u8, 137u8, 227u8, 228u8, 133u8, 245u8, 206u8, 227u8, 117u8, + 36u8, 252u8, 151u8, 107u8, 15u8, 180u8, 4u8, 4u8, 152u8, 195u8, 144u8, ], ) } @@ -6654,7 +7043,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -6687,7 +7075,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -6761,7 +7148,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "The permissions for this account id were updated"] @@ -6864,7 +7250,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -6899,7 +7284,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -6928,7 +7312,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -6949,7 +7332,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -7059,7 +7441,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "The schema for a table has been updated"] @@ -7086,7 +7467,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "Tables have been created with known commitments"] @@ -7424,7 +7804,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -7493,7 +7872,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "This event is emitted every time data is submitted by an indexer."] @@ -7521,7 +7899,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] #[doc = "This event is emitted when a quorum is reached amongst submissions and the"] @@ -7779,69 +8156,307 @@ pub mod api { _0.borrow(), ), [ - 86u8, 192u8, 207u8, 246u8, 148u8, 237u8, 137u8, 43u8, 159u8, 125u8, - 100u8, 195u8, 104u8, 180u8, 108u8, 149u8, 183u8, 44u8, 161u8, 35u8, - 56u8, 246u8, 69u8, 210u8, 199u8, 139u8, 154u8, 235u8, 92u8, 148u8, - 138u8, 42u8, + 86u8, 192u8, 207u8, 246u8, 148u8, 237u8, 137u8, 43u8, 159u8, 125u8, + 100u8, 195u8, 104u8, 180u8, 108u8, 149u8, 183u8, 44u8, 161u8, 35u8, + 56u8, 246u8, 69u8, 210u8, 199u8, 139u8, 154u8, 235u8, 92u8, 148u8, + 138u8, 42u8, + ], + ) + } + #[doc = " Mapping of tables to their current commitments, stored on chain."] + pub fn commitment_storage_map( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::commitment_storage_map::Param0, + >, + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::commitment_storage_map::Param1, + >, + ), + types::commitment_storage_map::CommitmentStorageMap, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Commitments", + "CommitmentStorageMap", + ( + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new( + _0.borrow(), + ), + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new( + _1.borrow(), + ), + ), + [ + 86u8, 192u8, 207u8, 246u8, 148u8, 237u8, 137u8, 43u8, 159u8, 125u8, + 100u8, 195u8, 104u8, 180u8, 108u8, 149u8, 183u8, 44u8, 161u8, 35u8, + 56u8, 246u8, 69u8, 210u8, 199u8, 139u8, 154u8, 235u8, 92u8, 148u8, + 138u8, 42u8, + ], + ) + } + #[doc = " Default schemes used when committing to new tables."] + pub fn default_commitment_schemes( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::default_commitment_schemes::DefaultCommitmentSchemes, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Commitments", + "DefaultCommitmentSchemes", + (), + [ + 107u8, 56u8, 234u8, 43u8, 253u8, 96u8, 181u8, 8u8, 24u8, 137u8, 246u8, + 176u8, 162u8, 174u8, 107u8, 175u8, 41u8, 35u8, 58u8, 123u8, 206u8, + 16u8, 150u8, 210u8, 218u8, 70u8, 133u8, 29u8, 111u8, 56u8, 149u8, 67u8, + ], + ) + } + } + } + } + pub mod attestations { + use super::{root_mod, runtime_types}; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_attestation::pallet::Error; + #[doc = "Pallet call implementation"] + pub type Call = runtime_types::pallet_attestation::pallet::Call; + pub mod calls { + use super::{root_mod, runtime_types}; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Register an external attestation key"] + pub struct RegisterAttestationKey { + pub who: register_attestation_key::Who, + pub registration: register_attestation_key::Registration, + } + pub mod register_attestation_key { + use super::runtime_types; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + pub type Registration = + runtime_types::sxt_core::attestation::RegisterExternalAddress; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RegisterAttestationKey { + const PALLET: &'static str = "Attestations"; + const CALL: &'static str = "register_attestation_key"; + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "TODO"] + pub struct AttestBlock { + pub block_number: attest_block::BlockNumber, + pub attestation: attest_block::Attestation, + } + pub mod attest_block { + use super::runtime_types; + pub type BlockNumber = ::core::primitive::u32; + pub type Attestation = runtime_types::sxt_core::attestation::Attestation; + } + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for AttestBlock { + const PALLET: &'static str = "Attestations"; + const CALL: &'static str = "attest_block"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Register an external attestation key"] + pub fn register_attestation_key( + &self, + who: types::register_attestation_key::Who, + registration: types::register_attestation_key::Registration, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload< + types::RegisterAttestationKey, + > { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Attestations", + "register_attestation_key", + types::RegisterAttestationKey { who, registration }, + [ + 39u8, 53u8, 72u8, 229u8, 254u8, 68u8, 8u8, 168u8, 208u8, 250u8, 231u8, + 184u8, 189u8, 56u8, 226u8, 181u8, 174u8, 240u8, 189u8, 227u8, 118u8, + 210u8, 46u8, 123u8, 247u8, 69u8, 43u8, 200u8, 149u8, 207u8, 138u8, + 81u8, + ], + ) + } + #[doc = "TODO"] + pub fn attest_block( + &self, + block_number: types::attest_block::BlockNumber, + attestation: types::attest_block::Attestation, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { + ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( + "Attestations", + "attest_block", + types::AttestBlock { + block_number, + attestation, + }, + [ + 36u8, 147u8, 142u8, 58u8, 34u8, 200u8, 174u8, 175u8, 29u8, 123u8, + 192u8, 98u8, 13u8, 59u8, 66u8, 216u8, 70u8, 203u8, 100u8, 85u8, 218u8, + 192u8, 84u8, 120u8, 200u8, 1u8, 130u8, 204u8, 126u8, 31u8, 155u8, + 208u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_attestation::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] + #[doc = "A block has been attested"] + pub struct BlockAttested { + pub block_number: block_attested::BlockNumber, + pub attestation: block_attested::Attestation, + pub who: block_attested::Who, + } + pub mod block_attested { + use super::runtime_types; + pub type BlockNumber = ::core::primitive::u32; + pub type Attestation = runtime_types::sxt_core::attestation::Attestation; + pub type Who = ::subxt::ext::subxt_core::utils::AccountId32; + } + impl ::subxt::ext::subxt_core::events::StaticEvent for BlockAttested { + const PALLET: &'static str = "Attestations"; + const EVENT: &'static str = "BlockAttested"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod attestation_keys { + use super::runtime_types; + pub type AttestationKeys = + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::subxt::ext::subxt_core::utils::AccountId32, + runtime_types::sxt_core::attestation::AttestationKey, + )>; + } + pub mod attestations { + use super::runtime_types; + pub type Attestations = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::sxt_core::attestation::Attestation, + >; + pub type Param0 = ::core::primitive::u32; + } + } + pub struct StorageApi; + impl StorageApi { + pub fn attestation_keys( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::attestation_keys::AttestationKeys, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), + > { + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( + "Attestations", + "AttestationKeys", + (), + [ + 158u8, 54u8, 76u8, 100u8, 208u8, 213u8, 181u8, 118u8, 36u8, 238u8, + 30u8, 27u8, 192u8, 194u8, 46u8, 197u8, 76u8, 173u8, 190u8, 47u8, 86u8, + 20u8, 28u8, 223u8, 133u8, 213u8, 246u8, 37u8, 177u8, 183u8, 114u8, + 30u8, ], ) } - #[doc = " Mapping of tables to their current commitments, stored on chain."] - pub fn commitment_storage_map( + pub fn attestations_iter( &self, - _0: impl ::core::borrow::Borrow, - _1: impl ::core::borrow::Borrow, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::commitment_storage_map::Param0, - >, - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::commitment_storage_map::Param1, - >, - ), - types::commitment_storage_map::CommitmentStorageMap, - ::subxt::ext::subxt_core::utils::Yes, (), + types::attestations::Attestations, (), + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Commitments", - "CommitmentStorageMap", - ( - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new( - _0.borrow(), - ), - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new( - _1.borrow(), - ), - ), + "Attestations", + "Attestations", + (), [ - 86u8, 192u8, 207u8, 246u8, 148u8, 237u8, 137u8, 43u8, 159u8, 125u8, - 100u8, 195u8, 104u8, 180u8, 108u8, 149u8, 183u8, 44u8, 161u8, 35u8, - 56u8, 246u8, 69u8, 210u8, 199u8, 139u8, 154u8, 235u8, 92u8, 148u8, - 138u8, 42u8, + 75u8, 175u8, 75u8, 5u8, 231u8, 64u8, 185u8, 122u8, 198u8, 16u8, 173u8, + 142u8, 244u8, 250u8, 3u8, 130u8, 211u8, 28u8, 214u8, 196u8, 29u8, 65u8, + 90u8, 182u8, 112u8, 116u8, 71u8, 157u8, 64u8, 87u8, 98u8, 197u8, ], ) } - #[doc = " Default schemes used when committing to new tables."] - pub fn default_commitment_schemes( + pub fn attestations( &self, + _0: impl ::core::borrow::Borrow, ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::default_commitment_schemes::DefaultCommitmentSchemes, + ::subxt::ext::subxt_core::storage::address::StaticStorageKey< + types::attestations::Param0, + >, + types::attestations::Attestations, + ::subxt::ext::subxt_core::utils::Yes, ::subxt::ext::subxt_core::utils::Yes, - (), (), > { ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "Commitments", - "DefaultCommitmentSchemes", - (), + "Attestations", + "Attestations", + ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new( + _0.borrow(), + ), [ - 107u8, 56u8, 234u8, 43u8, 253u8, 96u8, 181u8, 8u8, 24u8, 137u8, 246u8, - 176u8, 162u8, 174u8, 107u8, 175u8, 41u8, 35u8, 58u8, 123u8, 206u8, - 16u8, 150u8, 210u8, 218u8, 70u8, 133u8, 29u8, 111u8, 56u8, 149u8, 67u8, + 75u8, 175u8, 75u8, 5u8, 231u8, 64u8, 185u8, 122u8, 198u8, 16u8, 173u8, + 142u8, 244u8, 250u8, 3u8, 130u8, 211u8, 28u8, 214u8, 196u8, 29u8, 65u8, + 90u8, 182u8, 112u8, 116u8, 71u8, 157u8, 64u8, 87u8, 98u8, 197u8, ], ) } @@ -7862,7 +8477,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -7881,7 +8495,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -7901,7 +8514,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct Equivocation<_0, _1, _2> { @@ -7918,7 +8530,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct Precommit<_0, _1> { @@ -7933,7 +8544,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct Prevote<_0, _1> { @@ -7953,7 +8563,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -7976,7 +8585,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -7996,7 +8604,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8017,7 +8624,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8044,7 +8650,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8065,7 +8670,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8094,7 +8698,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8113,7 +8716,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8132,7 +8734,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8151,7 +8752,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8170,7 +8770,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8189,7 +8788,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8208,7 +8806,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8228,7 +8825,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8248,7 +8844,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8270,7 +8865,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8297,7 +8891,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8400,7 +8993,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8449,7 +9041,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8504,7 +9095,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct AccountInfo<_0, _1> { @@ -8522,7 +9112,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct CodeUpgradeAuthorization { @@ -8537,7 +9126,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct EventRecord<_0, _1> { @@ -8553,7 +9141,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct LastRuntimeUpgradeInfo { @@ -8569,7 +9156,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum Phase { @@ -8581,6 +9167,112 @@ pub mod api { Initialization, } } + pub mod pallet_attestation { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Pallet call implementation"] + pub enum Call { + #[codec(index = 0)] + #[doc = "Register an external attestation key"] + register_attestation_key { + who: ::subxt::ext::subxt_core::utils::AccountId32, + registration: runtime_types::sxt_core::attestation::RegisterExternalAddress, + }, + #[codec(index = 1)] + #[doc = "TODO"] + attest_block { + block_number: ::core::primitive::u32, + attestation: runtime_types::sxt_core::attestation::Attestation, + }, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Error validating the ownership of this external address"] + VerificationError, + #[codec(index = 1)] + #[doc = "There are already a maximum number of attestation keys and no more can be added"] + MaxAttestationKeys, + #[codec(index = 2)] + #[doc = "This public key has already been registered"] + PublicKeyAlreadyRegistered, + #[codec(index = 3)] + #[doc = "This account id has already been linked to an account"] + AccountIdAlreadyLinked, + #[codec(index = 4)] + #[doc = "This account id and attestation key combo are not registered attestors"] + InsufficientPermissions, + #[codec(index = 5)] + #[doc = "There was an error verifying the signature using the proposed public key"] + AttestationSignatureError, + #[codec(index = 6)] + #[doc = "The max attestations for this block have already been collected"] + MaxAttestationsForBlockError, + #[codec(index = 7)] + #[doc = "There is already an attestation for this public key and this block number"] + AttestationAlreadyRecordedError, + #[codec(index = 8)] + #[doc = "You cannot attest a block that has not happened yet"] + CannotAttestFutureBlock, + #[codec(index = 9)] + #[doc = "You cannot attest the current (non-finalized) block"] + CannotAttestCurrentBlock, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A block has been attested"] + BlockAttested { + block_number: ::core::primitive::u32, + attestation: runtime_types::sxt_core::attestation::Attestation, + who: ::subxt::ext::subxt_core::utils::AccountId32, + }, + } + } + } pub mod pallet_balances { use super::runtime_types; pub mod pallet { @@ -8593,7 +9285,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8741,7 +9432,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8795,7 +9485,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8947,7 +9636,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8968,7 +9656,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -8989,7 +9676,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9010,7 +9696,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9026,7 +9711,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9049,7 +9733,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9074,7 +9757,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9161,7 +9843,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9229,7 +9910,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9270,7 +9950,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9303,7 +9982,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct StoredPendingChange<_0> { @@ -9324,7 +10002,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum StoredState<_0> { @@ -9350,7 +10027,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9380,7 +10056,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9428,7 +10103,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9473,7 +10147,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9505,7 +10178,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9535,7 +10207,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9555,6 +10226,112 @@ pub mod api { } } } + pub mod pallet_session { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Sets the session key(s) of the function caller to `keys`."] + #[doc = "Allows an account to set its session key prior to becoming a validator."] + #[doc = "This doesn't take effect until the next session."] + #[doc = ""] + #[doc = "The dispatch origin of this function must be signed."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is"] + #[doc = " fixed."] + set_keys { + keys: runtime_types::sxt_runtime::opaque::SessionKeys, + proof: ::subxt::ext::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + #[doc = "Removes any session key(s) of the function caller."] + #[doc = ""] + #[doc = "This doesn't take effect until the next session."] + #[doc = ""] + #[doc = "The dispatch origin of this function must be Signed and the account must be either be"] + #[doc = "convertible to a validator ID using the chain's typical addressing system (this usually"] + #[doc = "means being a controller account) or directly convertible into a validator ID (which"] + #[doc = "usually means being a stash account)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)` in number of key types. Actual cost depends on the number of length of"] + #[doc = " `T::Keys::key_ids()` which is fixed."] + purge_keys, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Error for the session pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Invalid ownership proof."] + InvalidProof, + #[codec(index = 1)] + #[doc = "No associated validator ID for account."] + NoAssociatedValidatorId, + #[codec(index = 2)] + #[doc = "Registered duplicate key."] + DuplicatedKey, + #[codec(index = 3)] + #[doc = "No keys are associated with this account."] + NoKeys, + #[codec(index = 4)] + #[doc = "Key setting account is not live, so it's impossible to associate keys."] + NoAccount, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "New session has happened. Note that the argument is the session index, not the"] + #[doc = "block number as the type might suggest."] + NewSession { + session_index: ::core::primitive::u32, + }, + } + } + } pub mod pallet_sudo { use super::runtime_types; pub mod pallet { @@ -9567,7 +10344,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9632,7 +10408,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9653,7 +10428,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9680,88 +10454,13 @@ pub mod api { #[codec(index = 3)] #[doc = "A [sudo_as](Pallet::sudo_as) call just took place."] SudoAsDone { - sudo_result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - }, - } - } - } - pub mod pallet_tables { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, - :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub enum Call { - # [codec (index = 0)] # [doc = "TODO: add docs"] update_tables { source_and_mode : runtime_types :: sxt_core :: tables :: SourceAndMode , tables : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < (runtime_types :: sxt_core :: tables :: TableIdentifier , runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > ,) > , } , # [codec (index = 1)] # [doc = "Create tables with a known commit and snapshot url from which data can be loaded"] create_tables_with_snapshot_and_commitment { source_and_mode : runtime_types :: sxt_core :: tables :: SourceAndMode , tables : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < (runtime_types :: sxt_core :: tables :: TableIdentifier , runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , runtime_types :: proof_of_sql_commitment_map :: commitment_scheme :: PerCommitmentScheme < runtime_types :: proof_of_sql_commitment_map :: generic_over_commitment :: OptionType < runtime_types :: proof_of_sql_commitment_map :: generic_over_commitment :: ConcreteType < runtime_types :: proof_of_sql_commitment_map :: commitment_storage_map :: TableCommitmentBytes > > > , runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > ,) > , } , # [codec (index = 3)] # [doc = "Clear schemas and tables from chain state for all namespaces and identifiers"] clear_tables , # [codec (index = 2)] # [doc = "Attempts to recreate all tables stored in the genesis, but does not start loading from"] # [doc = "snapshot"] create_empty_genesis_tables , } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, - :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "The `Error` enum of this pallet."] - pub enum Error { - #[codec(index = 0)] - #[doc = "There was an error deserializing the Arrow schema"] - ArrowDeserializationError, - #[codec(index = 1)] - #[doc = "Existing commit for this table identifier"] - IdentifierAlreadyExists, - #[codec(index = 2)] - #[doc = "Failed to parse Create Statement DDL"] - CreateStatementParseError, - #[codec(index = 3)] - #[doc = "Not all schemas were removed"] - NotAllSchemasRemovedError, - #[codec(index = 4)] - #[doc = "Not all commitments were removed"] - NotAllCommitmentsRemovedError, + sudo_result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, - :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "The `Event` enum of this pallet"] - pub enum Event { - # [codec (index = 0)] # [doc = "The schema for a table has been updated"] SchemaUpdated (runtime_types :: sxt_core :: tables :: SourceAndMode , runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < (runtime_types :: sxt_core :: tables :: TableIdentifier , runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > ,) > ,) , # [codec (index = 1)] # [doc = "Tables have been created with known commitments"] TablesCreatedWithCommitments { source_and_mode : runtime_types :: sxt_core :: tables :: SourceAndMode , table_list : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < (runtime_types :: sxt_core :: tables :: TableIdentifier , runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , runtime_types :: proof_of_sql_commitment_map :: commitment_scheme :: PerCommitmentScheme < runtime_types :: proof_of_sql_commitment_map :: generic_over_commitment :: OptionType < runtime_types :: proof_of_sql_commitment_map :: generic_over_commitment :: ConcreteType < runtime_types :: proof_of_sql_commitment_map :: commitment_storage_map :: TableCommitmentBytes > > > , runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > ,) > , } , } } } - pub mod pallet_template { + pub mod pallet_tables { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -9773,49 +10472,15 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "The pallet's dispatchable functions ([`Call`]s)."] - #[doc = ""] - #[doc = "Dispatchable functions allows users to interact with the pallet and invoke state changes."] - #[doc = "These functions materialize as \"extrinsics\", which are often compared to transactions."] - #[doc = "They must always return a `DispatchResult` and be annotated with a weight and call index."] - #[doc = ""] - #[doc = "The [`call_index`] macro is used to explicitly"] - #[doc = "define an index for calls in the [`Call`] enum. This is useful for pallets that may"] - #[doc = "introduce new dispatchables over time. If the order of a dispatchable changes, its index"] - #[doc = "will also change which will break backwards compatibility."] - #[doc = ""] - #[doc = "The [`weight`] macro is used to assign a weight to each call."] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] pub enum Call { - #[codec(index = 0)] - #[doc = "An example dispatchable that takes a single u32 value as a parameter, writes the value"] - #[doc = "to storage and emits an event."] - #[doc = ""] - #[doc = "It checks that the _origin_ for this call is _Signed_ and returns a dispatch"] - #[doc = "error if it isn't. Learn more about origins here: "] - do_something { something: ::core::primitive::u32 }, - #[codec(index = 1)] - #[doc = "An example dispatchable that may throw a custom error."] - #[doc = ""] - #[doc = "It checks that the caller is a signed origin and reads the current value from the"] - #[doc = "`Something` storage item. If a current value exists, it is incremented by 1 and then"] - #[doc = "written back to storage."] - #[doc = ""] - #[doc = "## Errors"] - #[doc = ""] - #[doc = "The function will return an error under the following conditions:"] - #[doc = ""] - #[doc = "- If no value has been set ([`Error::NoneValue`])"] - #[doc = "- If incrementing the value in storage causes an arithmetic overflow"] - #[doc = " ([`Error::StorageOverflow`])"] - cause_error, - } + # [codec (index = 0)] # [doc = "TODO: add docs"] update_tables { source_and_mode : runtime_types :: sxt_core :: tables :: SourceAndMode , tables : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < (runtime_types :: sxt_core :: tables :: TableIdentifier , runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > ,) > , } , # [codec (index = 1)] # [doc = "Create tables with a known commit and snapshot url from which data can be loaded"] create_tables_with_snapshot_and_commitment { source_and_mode : runtime_types :: sxt_core :: tables :: SourceAndMode , tables : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < (runtime_types :: sxt_core :: tables :: TableIdentifier , runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , runtime_types :: proof_of_sql_commitment_map :: commitment_scheme :: PerCommitmentScheme < runtime_types :: proof_of_sql_commitment_map :: generic_over_commitment :: OptionType < runtime_types :: proof_of_sql_commitment_map :: generic_over_commitment :: ConcreteType < runtime_types :: proof_of_sql_commitment_map :: commitment_storage_map :: TableCommitmentBytes > > > , runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > ,) > , } , # [codec (index = 3)] # [doc = "Clear schemas and tables from chain state for all namespaces and identifiers"] clear_tables , # [codec (index = 2)] # [doc = "Attempts to recreate all tables stored in the genesis, but does not start loading from"] # [doc = "snapshot"] create_empty_genesis_tables , } #[derive( :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, @@ -9824,28 +10489,29 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Errors that can be returned by this pallet."] - #[doc = ""] - #[doc = "Errors tell users that something went wrong so it's important that their naming is"] - #[doc = "informative. Similar to events, error documentation is added to a node's metadata so it's"] - #[doc = "equally important that they have helpful documentation associated with them."] - #[doc = ""] - #[doc = "This type of runtime error can be up to 4 bytes in size should you want to return additional"] - #[doc = "information."] + #[doc = "The `Error` enum of this pallet."] pub enum Error { #[codec(index = 0)] - #[doc = "The value retrieved was `None` as no value was previously set."] - NoneValue, + #[doc = "There was an error deserializing the Arrow schema"] + ArrowDeserializationError, #[codec(index = 1)] - #[doc = "There was an attempt to increment the value in storage over `u32::MAX`."] - StorageOverflow, + #[doc = "Existing commit for this table identifier"] + IdentifierAlreadyExists, + #[codec(index = 2)] + #[doc = "Failed to parse Create Statement DDL"] + CreateStatementParseError, + #[codec(index = 3)] + #[doc = "Not all schemas were removed"] + NotAllSchemasRemovedError, + #[codec(index = 4)] + #[doc = "Not all commitments were removed"] + NotAllCommitmentsRemovedError, } #[derive( :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, @@ -9855,31 +10521,15 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Events that functions in this pallet can emit."] - #[doc = ""] - #[doc = "Events are a simple means of indicating to the outside world (such as dApps, chain explorers"] - #[doc = "or other users) that some notable update in the runtime has occurred. In a FRAME pallet, the"] - #[doc = "documentation for each event field and its parameters is added to a node's metadata so it"] - #[doc = "can be used by external interfaces or tools."] - #[doc = ""] - #[doc = "\tThe `generate_deposit` macro generates a function on `Pallet` called `deposit_event` which"] - #[doc = "will convert the event type of your pallet into `RuntimeEvent` (declared in the pallet's"] - #[doc = "[`Config`] trait) and deposit it using [`frame_system::Pallet::deposit_event`]."] + #[doc = "The `Event` enum of this pallet"] pub enum Event { - #[codec(index = 0)] - #[doc = "A user has successfully set a new value."] - SomethingStored { - something: ::core::primitive::u32, - who: ::subxt::ext::subxt_core::utils::AccountId32, - }, - } + # [codec (index = 0)] # [doc = "The schema for a table has been updated"] SchemaUpdated (runtime_types :: sxt_core :: tables :: SourceAndMode , runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < (runtime_types :: sxt_core :: tables :: TableIdentifier , runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > ,) > ,) , # [codec (index = 1)] # [doc = "Tables have been created with known commitments"] TablesCreatedWithCommitments { source_and_mode : runtime_types :: sxt_core :: tables :: SourceAndMode , table_list : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < (runtime_types :: sxt_core :: tables :: TableIdentifier , runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , runtime_types :: proof_of_sql_commitment_map :: commitment_scheme :: PerCommitmentScheme < runtime_types :: proof_of_sql_commitment_map :: generic_over_commitment :: OptionType < runtime_types :: proof_of_sql_commitment_map :: generic_over_commitment :: ConcreteType < runtime_types :: proof_of_sql_commitment_map :: commitment_storage_map :: TableCommitmentBytes > > > , runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > ,) > , } , } } } pub mod pallet_timestamp { @@ -9894,7 +10544,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9942,7 +10591,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9971,7 +10619,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -9992,7 +10639,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10012,7 +10658,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10033,7 +10678,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct ChargeTransactionPayment(#[codec(compact)] pub ::core::primitive::u128); @@ -10045,7 +10689,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum Releases { @@ -10055,6 +10698,88 @@ pub mod api { V2, } } + pub mod pallet_validators { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "The pallet's dispatchable functions ([`Call`]s)."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Add a new validator."] + add_validator { + validator_id: ::subxt::ext::subxt_core::utils::AccountId32, + }, + #[codec(index = 1)] + #[doc = "Remove a validator."] + remove_validator { + validator_id: ::subxt::ext::subxt_core::utils::AccountId32, + }, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "Errors that can be returned by this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "The validator id is already registered"] + DuplicateValidatorError, + #[codec(index = 1)] + #[doc = "Removing this validator will drop the total validators below the acceptable threshold"] + TooLowValidatorCountError, + #[codec(index = 2)] + #[doc = "Error adding a new item to the list"] + ErrorPushingValidatorListError, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "New validator addition initiated. Effective in ~2 sessions."] + ValidatorAdditionInitiated(::subxt::ext::subxt_core::utils::AccountId32), + #[codec(index = 1)] + #[doc = "Validator removal initiated. Effective in ~2 sessions."] + ValidatorRemovalInitiated(::subxt::ext::subxt_core::utils::AccountId32), + } + } + } pub mod primitive_types { use super::runtime_types; #[derive( @@ -10065,7 +10790,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct U256(pub [::core::primitive::u64; 4usize]); @@ -10082,7 +10806,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10103,7 +10826,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10122,7 +10844,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10141,7 +10862,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10164,7 +10884,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10180,7 +10899,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10203,7 +10921,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10220,7 +10937,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum ArithmeticError { @@ -10246,7 +10962,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10269,7 +10984,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10285,7 +10999,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10302,7 +11015,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum Equivocation<_0, _1> { @@ -10331,7 +11043,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct EquivocationProof<_0, _1> { @@ -10350,7 +11061,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct Slot(pub ::core::primitive::u64); @@ -10363,7 +11073,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct SlotDuration(pub ::core::primitive::u64); @@ -10380,7 +11089,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10397,7 +11105,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct OpaqueMetadata( @@ -10411,7 +11118,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum Void {} @@ -10426,7 +11132,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct CheckInherentsResult { @@ -10442,7 +11147,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct InherentData { @@ -10466,7 +11170,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10488,7 +11191,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10508,7 +11210,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -10547,7 +11248,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11079,7 +11779,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11106,7 +11805,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11145,7 +11843,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11168,7 +11865,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11189,7 +11885,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11212,7 +11907,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11239,7 +11933,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum DispatchError { @@ -11280,7 +11973,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum ExtrinsicInclusionMode { @@ -11297,7 +11989,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct ModuleError { @@ -11312,7 +12003,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum MultiSignature { @@ -11331,7 +12021,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct OpaqueValue( @@ -11345,7 +12034,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum TokenError { @@ -11378,7 +12066,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum TransactionalError { @@ -11398,7 +12085,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct RuntimeVersion { @@ -11427,7 +12113,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11449,7 +12134,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct RuntimeDbWeight { @@ -11459,6 +12143,91 @@ pub mod api { } pub mod sxt_core { use super::runtime_types; + pub mod attestation { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub enum Attestation { + #[codec(index = 0)] + EthereumAttestation { + signature: runtime_types::sxt_core::attestation::EthereumSignature, + proposed_pub_key: [::core::primitive::u8; 33usize], + state_root: ::subxt::ext::subxt_core::utils::H256, + }, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub enum AttestationKey { + #[codec(index = 0)] + EthereumKey { + pub_key: [::core::primitive::u8; 33usize], + }, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct EthereumSignature { + pub r: [::core::primitive::u8; 32usize], + pub s: [::core::primitive::u8; 32usize], + pub v: ::core::primitive::u8, + } + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub enum RegisterExternalAddress { + #[codec(index = 0)] + EthereumAddress { + signature: runtime_types::sxt_core::attestation::EthereumSignature, + proposed_pub_key: [::core::primitive::u8; 33usize], + }, + } + } pub mod indexing { use super::runtime_types; #[derive( @@ -11469,7 +12238,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11494,7 +12262,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11519,7 +12286,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11540,7 +12306,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11559,7 +12324,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11592,7 +12356,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11616,7 +12379,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11640,7 +12402,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11660,7 +12421,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11695,7 +12455,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11726,7 +12485,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11745,7 +12503,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" )] @@ -11764,6 +12521,27 @@ pub mod api { } pub mod sxt_runtime { use super::runtime_types; + pub mod opaque { + use super::runtime_types; + #[derive( + :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, + :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, + :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] + #[decode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" + )] + #[encode_as_type( + crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" + )] + pub struct SessionKeys { + pub aura: runtime_types::sp_consensus_aura::sr25519::app_sr25519::Public, + pub grandpa: runtime_types::sp_consensus_grandpa::app::Public, + } + } #[derive( :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, :: subxt :: ext :: subxt_core :: ext :: codec :: Encode, @@ -11772,7 +12550,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub struct Runtime; @@ -11784,7 +12561,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum RuntimeCall { @@ -11792,20 +12568,24 @@ pub mod api { System(runtime_types::frame_system::pallet::Call), #[codec(index = 1)] Timestamp(runtime_types::pallet_timestamp::pallet::Call), + #[codec(index = 2)] + Session(runtime_types::pallet_session::pallet::Call), #[codec(index = 3)] + Validators(runtime_types::pallet_validators::pallet::Call), + #[codec(index = 5)] Grandpa(runtime_types::pallet_grandpa::pallet::Call), - #[codec(index = 4)] - Balances(runtime_types::pallet_balances::pallet::Call), #[codec(index = 6)] - Sudo(runtime_types::pallet_sudo::pallet::Call), - #[codec(index = 7)] - TemplateModule(runtime_types::pallet_template::pallet::Call), + Balances(runtime_types::pallet_balances::pallet::Call), #[codec(index = 8)] - Permissions(runtime_types::pallet_permissions::pallet::Call), + Sudo(runtime_types::pallet_sudo::pallet::Call), #[codec(index = 9)] - Tables(runtime_types::pallet_tables::pallet::Call), + Permissions(runtime_types::pallet_permissions::pallet::Call), #[codec(index = 10)] + Tables(runtime_types::pallet_tables::pallet::Call), + #[codec(index = 11)] Indexing(runtime_types::pallet_indexing::pallet::Call), + #[codec(index = 13)] + Attestations(runtime_types::pallet_attestation::pallet::Call), } #[derive( :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, @@ -11815,28 +12595,31 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum RuntimeError { #[codec(index = 0)] System(runtime_types::frame_system::pallet::Error), + #[codec(index = 2)] + Session(runtime_types::pallet_session::pallet::Error), #[codec(index = 3)] + Validators(runtime_types::pallet_validators::pallet::Error), + #[codec(index = 5)] Grandpa(runtime_types::pallet_grandpa::pallet::Error), - #[codec(index = 4)] - Balances(runtime_types::pallet_balances::pallet::Error), #[codec(index = 6)] - Sudo(runtime_types::pallet_sudo::pallet::Error), - #[codec(index = 7)] - TemplateModule(runtime_types::pallet_template::pallet::Error), + Balances(runtime_types::pallet_balances::pallet::Error), #[codec(index = 8)] - Permissions(runtime_types::pallet_permissions::pallet::Error), + Sudo(runtime_types::pallet_sudo::pallet::Error), #[codec(index = 9)] - Tables(runtime_types::pallet_tables::pallet::Error), + Permissions(runtime_types::pallet_permissions::pallet::Error), #[codec(index = 10)] - Indexing(runtime_types::pallet_indexing::pallet::Error), + Tables(runtime_types::pallet_tables::pallet::Error), #[codec(index = 11)] + Indexing(runtime_types::pallet_indexing::pallet::Error), + #[codec(index = 12)] Commitments(runtime_types::pallet_commitments::pallet::Error), + #[codec(index = 13)] + Attestations(runtime_types::pallet_attestation::pallet::Error), } #[derive( :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, @@ -11846,28 +12629,31 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum RuntimeEvent { #[codec(index = 0)] System(runtime_types::frame_system::pallet::Event), + #[codec(index = 2)] + Session(runtime_types::pallet_session::pallet::Event), #[codec(index = 3)] - Grandpa(runtime_types::pallet_grandpa::pallet::Event), - #[codec(index = 4)] - Balances(runtime_types::pallet_balances::pallet::Event), + Validators(runtime_types::pallet_validators::pallet::Event), #[codec(index = 5)] - TransactionPayment(runtime_types::pallet_transaction_payment::pallet::Event), + Grandpa(runtime_types::pallet_grandpa::pallet::Event), #[codec(index = 6)] - Sudo(runtime_types::pallet_sudo::pallet::Event), + Balances(runtime_types::pallet_balances::pallet::Event), #[codec(index = 7)] - TemplateModule(runtime_types::pallet_template::pallet::Event), + TransactionPayment(runtime_types::pallet_transaction_payment::pallet::Event), #[codec(index = 8)] - Permissions(runtime_types::pallet_permissions::pallet::Event), + Sudo(runtime_types::pallet_sudo::pallet::Event), #[codec(index = 9)] - Tables(runtime_types::pallet_tables::pallet::Event), + Permissions(runtime_types::pallet_permissions::pallet::Event), #[codec(index = 10)] + Tables(runtime_types::pallet_tables::pallet::Event), + #[codec(index = 11)] Indexing(runtime_types::pallet_indexing::pallet::Event), + #[codec(index = 13)] + Attestations(runtime_types::pallet_attestation::pallet::Event), } #[derive( :: subxt :: ext :: subxt_core :: ext :: codec :: Decode, @@ -11877,7 +12663,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum RuntimeFreezeReason {} @@ -11889,7 +12674,6 @@ pub mod api { Debug, )] # [codec (crate = :: subxt :: ext :: subxt_core :: ext :: codec)] - #[codec(dumb_trait_bound)] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum RuntimeHoldReason {} diff --git a/crates/proof-of-sql-sdk/Cargo.toml b/crates/proof-of-sql-sdk/Cargo.toml index ad381f3..debc416 100644 --- a/crates/proof-of-sql-sdk/Cargo.toml +++ b/crates/proof-of-sql-sdk/Cargo.toml @@ -21,6 +21,9 @@ subxt = { workspace = true, features = ["jsonrpsee"] } sxt-proof-of-sql-sdk-local = { workspace = true, features = ["native", "prover-client"] } tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } tonic = { workspace = true, features = ["tls", "tls-roots"] } +sp-core = { workspace = true} +snafu = { workspace = true } +itertools = { workspace = true } [[example]] name = "cli" diff --git a/crates/proof-of-sql-sdk/src/substrate.rs b/crates/proof-of-sql-sdk/src/substrate.rs index cf0a938..6256714 100644 --- a/crates/proof-of-sql-sdk/src/substrate.rs +++ b/crates/proof-of-sql-sdk/src/substrate.rs @@ -1,4 +1,5 @@ use futures::future::try_join_all; +use itertools::Itertools; use proof_of_sql::{ base::{ commitment::{QueryCommitments, TableCommitment}, @@ -8,13 +9,18 @@ use proof_of_sql::{ }; use proof_of_sql_parser::ResourceId; use subxt::{blocks::BlockRef, Config, OnlineClient, PolkadotConfig}; +use snafu::{ResultExt, Snafu}; use sxt_proof_of_sql_sdk_local::{ + attestation::{self, create_attestation_message, verify_signature}, resource_id_to_table_id, - sxt_chain_runtime::api::{ - runtime_types::proof_of_sql_commitment_map::{ - commitment_scheme::CommitmentScheme, commitment_storage_map::TableCommitmentBytes, + sxt_chain_runtime::{ + self, + api::{ + runtime_types::proof_of_sql_commitment_map::{ + commitment_scheme::CommitmentScheme, commitment_storage_map::TableCommitmentBytes, + }, + storage, }, - storage, }, }; @@ -69,3 +75,116 @@ where .collect::>(); Ok(results) } + +/// Errors that may occur during the attestation process. +#[derive(Debug, Snafu)] +#[allow(dead_code)] +pub enum AttestationError { + /// Represents an error originating from the Subxt library. + #[snafu(display("Subxt error: {source}"))] + SubxtError { source: subxt::Error }, + + /// Represents an error fetching attestations for a specific block. + #[snafu(display( + "There was an error reading the attestations for block {block_number} on chain" + ))] + ErrorFetchingAttestations { block_number: u32 }, + + /// Error indicating that attestations for a block have inconsistent state roots. + #[snafu(display("The attestations have different state roots, impossible to verify"))] + StateRootMismatch, + + #[snafu(display("Attestation error: {source}"))] + LocalError { + source: attestation::AttestationError, + }, +} + +/// Verifies the attestations for a given block by checking their validity and consistency. +/// +/// This function performs the following steps: +/// 1. Connects to a blockchain node using the provided `url`. +/// 2. Fetches the attestations for the specified `block_number`. +/// 3. Ensures all attestations have consistent `state_root` values. +/// 4. Verifies the signature for each attestation. +/// +/// # Arguments +/// +/// * `url` - The URL of the blockchain node to connect to. +/// * `block_number` - The block number for which attestations need to be verified. +/// +/// # Returns +/// +/// Returns `Ok(())` if all attestations are valid and consistent. Otherwise, it returns an +/// `AttestationError` describing the failure. +/// +/// # Errors +/// +/// This function can return the following errors: +/// - `AttestationError::SubxtError`: If there is an error communicating with the blockchain node. +/// - `AttestationError::ErrorFetchingAttestations`: If the attestations for the block cannot be fetched. +/// - `AttestationError::StateRootMismatch`: If the attestations have inconsistent state roots. +/// - `AttestationError::InvalidSignature`: If a signature verification fails. +/// +/// # Examples +/// +/// ```rust +/// use your_crate::{verify_attestations_for_block, AttestationError}; +/// +/// #[tokio::main] +/// async fn main() -> Result<(), AttestationError> { +/// let url = "http://localhost:9933"; +/// let block_number = 12345; +/// +/// verify_attestations_for_block(url, block_number).await?; +/// println!("Attestations verified successfully!"); +/// Ok(()) +/// } +/// ``` +#[allow(dead_code)] +pub async fn verify_attestations_for_block( + url: &str, + block_number: u32, +) -> Result<(), AttestationError> { + let api = OnlineClient::::from_insecure_url(url) + .await + .context(SubxtSnafu)?; // Updated to SubxtErrorSnafu + + let attestations_addr = sxt_chain_runtime::api::storage() + .attestations() + .attestations(block_number); + + let attestations = api + .storage() + .at_latest() + .await + .context(SubxtSnafu)? // Updated to SubxtErrorSnafu + .fetch(&attestations_addr) + .await + .context(SubxtSnafu)? // Updated to SubxtErrorSnafu + .ok_or_else(|| ErrorFetchingAttestationsSnafu { block_number }.build())?; + + let attestations = attestations.0; + + if !attestations + .iter() + .map(|attestation| { + let sxt_chain_runtime::api::runtime_types::sxt_core::attestation::Attestation::EthereumAttestation { state_root, ..} = attestation; + Some(state_root) + }) + .all_equal() + { + return Err(AttestationError::StateRootMismatch); + } + attestations + .iter().try_for_each(|attestation| { + let sxt_chain_runtime::api::runtime_types::sxt_core::attestation::Attestation::EthereumAttestation { + signature, + proposed_pub_key, + state_root, + } = attestation; + let msg = create_attestation_message(state_root, block_number); + verify_signature(&msg, signature, proposed_pub_key) + .map_err(|err| AttestationError::LocalError { source: err }) + }) +}